How many ways can you choose $8$ tickets if the order of selection does not matter? A cash drawer holds $ \$1$, $ \$5$, $ \$10$, $ \$20$, and $ \$50$ bills. How many ways can you choose $8$ bills? (The order of selection does not matter.)
For me, the answer is simply $5^8 = 390625$ , but the answer is simply $495$. It seems I misunderstood "The order of selection does not matter". Can you explain where I was wrong in considering the last comment?
 A: What they are asking is how many of each type of "ticket" (In your solution, you are assuming that for example $(1,5,50,5,10)\neq (1,5,5,10,50),$ that is you are giving the "tickets" and ordering.). So call $x_i$ the number of "tickets" of the $i-$th kind. So $x_1$ is the number of \$1, $x_2$ is the number of $5, etc.
You want to know how many of this elements you have $$\{(x_1,x_2,x_3,x_4,x_5):x_i\geq 0\text{ and }\sum _{i=1}^5x_i=8\}.$$ This is a problem called stars and bars, and the solution is given by $\binom{8+5-1}{5-1}=495$
A: I guess that your solution is that we have $8$ choices, each from five elements, so we get $5^8$. But since problem says "the order of selection does not matter", taking two times each of $ \$1$, $\$5$, $\$10$ and $\$20$, will be the same no matter in which of 2520 different orders we want to do it.
A: Since the order of selection does not matter, what matters is how many bills of each type are selected.  Thus, you want to find the number of solutions of the equation
$$x_1 + x_5 + x_{10} + x_{20} + x_{50} = 8$$
in the nonnegative integers, where $x_k$ denotes the number of bills with the denomination $\$k$ that are selected.
A particular solution of this equation corresponds to the number of ways $5 - 1 = 4$ addition signs can be placed in a row of eight ones.  For instance,
$$1 1 + 1 1 1 + 1 + 1 1 + $$
corresponds to the solution $x_1 = 2$, $x_5 = 3$, $x_{10} = 1$, $x_{20} = 2$, $x_{50} = 0$.  The number of such solutions is
$$\binom{8 + 5 - 1}{5 - 1} = \binom{12}{4} = 495$$
since we must select which four of the  twelve positions required for eight ones and four addition signs will be filled with addition signs.
