[Math] How many ways are there to put five identical red balls and eight identical blue balls into 20 distinct boxes.

combinationsdivisor-counting-functionprobability

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.

Best Answer

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}$.

Related Question