[Math] Number of ways to pick a selection of coins

combinatorics

How many ways are there to pick a selection of coins from $1 worth of identical pennies, 1 dollar worth of identical nickels, and 1 dollar worth of identical dimes if you select a total of 16 coins?

I know I start off with C(16+3-1,16), but I can't seem to factor the fact that you can't have 16 dimes.

Best Answer

Here is one approach. Let $d$ represent the number of dimes you choose. This number is distinguished from the other two, because it can't go past $10$, but the other two can go up to $16$. Let $n$ represent the number of nickels. With $d$ dimes chosen, you can have $0$ through $16-d$ nickels. Then the number of pennies is determined as $16-d-n$.

$$\begin{align} \sum_{d=0}^{10}\sum_{n=0}^{16-d}1&=\sum_{d=0}^{10}(17-d)\\ &=17\cdot11-\binom{11}{2}\\ &=132 \end{align}$$

Alternatively,

$$\begin{align} \sum_{d=0}^{10}\sum_{n=0}^{16-d}1&=\sum_{d=0}^{10}(17-d)=17+16+\cdots+7\\ &=\sum_{d=1}^{17}d-\sum_{d=1}^6d\\ &=\binom{18}{2}-\binom{7}{2}\\ &=132 \end{align}$$