# How many ways are there to choose $4$ balls from $3$ black, $2$ green, and $1$ red ball?

There are $3$ black, $2$ green, and $1$ red ball in the basket. How many ways there is to pick up $4$ balls from that basket?

I know the answer is $5$. I solved this problem using generating function but I want to have a closed-form solution. Primarily I thought the answer is $$\frac{3+2+1\choose4}{3!\cdot2!\cdot1!}$$ but after writing down all possible sets of four balls, these two results were different. In fact, I don't understand why this way of thinking gives wrong result.

• Not every selection is overcounted by $\binom{3+2+1}{4}$ in $3!2!1!$ ways. – Mauve Feb 15 '18 at 15:11
• You can yourself check your mistake. Consider a similar question. How many 4 letter sets can be formed using 3 A's, 2 B's, and 1 C. – Rohan Shinde Feb 15 '18 at 15:17

Case 1) If 3 balls are alike:

Then number of ways = $\binom {2}{1}$

Case 2) If 2 balls are alike, and other two balls are also alike:

then number of ways =$\binom {2}{2}$

Case 3) If 2 balls are alike and other two balls are different :

Then number of ways =$\binom {2}{1}$

Hence total number of ways = $\binom {2}{1}+\binom {2}{2}+\binom {2}{1}=5$

• The sum of binomials is 4 not 5. – mrJoe Feb 15 '18 at 15:24
• @mrJoe Sorry of the typo. Answer edited. Thanks – Rohan Shinde Feb 15 '18 at 15:34