[Math] How many ways are there to pick a collection of 8 coins from piles of pennies, nickels, dimes, and quarters

combinationscombinatorics

How many ways are there to pick a collection of 8 coins from piles of pennies, nickels, dimes, and quarters?

Here is my explanation below. This is the first time working through a question like this so I am not sure if I am correct or not, looking for some guidance, thanks!

The general formula I am using is
$$C(n,k) = \frac{P(n,k)}{k!}$$
which means find the ways to pick $k$ people from $n$, and divide by the $k$ variants. Writing this out, we get our combination formula, or the number of ways to combine $k$ items in a set of $n$:
$$C(n,k) = \frac{n!}{(n-k)!k!}$$
Then using this for my question,
$$C(8,4)= \frac{8!}{(8-4)!4!} = \frac{8!}{4!4!} = 70 $$

Best Answer

The answer is not $\binom84$. Instead, it is found by stars and bars: in a line of 8 coins, you can put three separators among those coins to partition them into four groups, which can be identified with pennies, nickels, dimes and quarters. Each way of placing the separators corresponds one-to-one with a possible collection.

There are three separators to be placed among $8+3=11$ coins plus separators, so the correct answer is $\binom{11}3=165$.