How many ways are there to put five identical red balls and eight identical blue balls into 20 distinct boxes?

A- if at most one ball can be put into each box.

B- if at most one ball of each color can be put into each box?

I don't know if we add up the blue and red. Such as 20C5 and 20C8 and add them up for A but for B I don't know how to start.


A: Choose $5+8=13$ boxes out of $20$ and multiply that by the number of ways of putting one red ball into $5$ of the chosen $13$ boxes. The rest of the chosen boxes get one blue ball each. Therefore the answer is $\binom{20}{13}\binom{13}{5}$.

B: Choose $5$ boxes out of the $20$ and put one red ball in each of them. Then choose $8$ boxes out of the $20$ and put one blue ball in each of them. The two ways of choosing the boxes are independent of each other, so we just multiply the obtained numbers to get the total number of ways to distribute the balls. Therefore the answer is $\binom{20}{5}\binom{20}{8}$.

  • $\begingroup$ So it's not (20C5) (15C8)= 6435 ? For part A $\endgroup$ – user413528 Mar 28 '17 at 14:39
  • $\begingroup$ That's a different way of arriving to the same solution. If you compute both answers you should get the same number. However, it seems to me the number you computed is incorrect. $\endgroup$ – PSL Mar 28 '17 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.