[Math] How many ways can 20 coins be selected from four containers filled with pennies, nickels, dimes, and quarters

combinatoricsdiscrete mathematics

How many ways can 20 coins be selected from four containers filled with pennies, nickels, dimes, and quarters? (Each container is filled with only one type of coin)

So, 20 slots and four choices per each slot, right? First slot, I can choose P, N, D, or Q. I move on to slot 2 and do the same thing. This results in ${4}^{20}$, which is horribly incorrect.

Your help is appreciated!

Best Answer

Imagine that there are $4$ containers labelled $P,N,D,Q$ and you drop $20$ blank coins in any which way into the $4$ containers which magically become pennies, nickels, dimes, or quarters depending on which container you drop them.

This, then, is a typical stars and bars problem, $\binom{20+4-1}{4-1}=1771$