Combinatorics – Choosing 10 Balls from 4 Boxes with Specific Conditions

combinationscombinatoricspermutations

Consider $4$ boxes, where each box contains $3$ red balls and $2$ blue balls. Assume that all $20$ balls are distinct. In how many different ways can $10$ balls be chosen from these $4$ boxes such that from each box at least $1$ red ball and $1$ blue ball is chosen?

I proceeded by first selecting a red ball and a blue ball from each box, which I think can be done by $$\left(\binom{3}1 \binom{2}1 2!\right)^4=20376$$

Now I have chosen $8$ balls, so I have $2$ more left to choose. Since I've chosen $4$ red balls and $4$ blue balls in total, I've $8$ red and $4$ blue left. So I can choose $2$ balls from them by either $2$ of one color and none from the other, or $1$ from each color. I can do that in

$$\binom{8}1 \binom{4}1 2! + \binom{8}2 2! + \binom {4}2 2!=132$$

So total number of required selections are $20376×132$.

However the correct answer is given as $21816$.

Where have I gone wrong and how do I get to the correct answer?

Best Answer

What did you do wrong?

Note that designating particular balls to be the representative of that color in a particular box leads to overcounting whenever you have more than one ball of that color drawn from that box since such selections are counted once for each way you could have designated one of the balls of that color as the ball of that color.

To illustrate, suppose the red balls are numbered $r_{ij}$ and the blue balls are numbered $b_{ij}$, where $i$ denotes the box number and $j$ denotes the number in that box. Then you count the selection $b_{11}, b_{12}, b_{21}, b_{31}, b_{41}, r_{11}, r_{12}, r_{21}, r_{31}, r_{41}$ four times.

\begin{array}{c c c c c} \text{box 1} & \text{box 2} & \text{box 3} & \text{box 4} & \text{additional balls}\\ \hline b_{11}, r_{11} & b_{21}, r_{21} & b_{31}, r_{31} & b_{41}, r_{41} & b_{12}, r_{12}\\ b_{11}, r_{12} & b_{21}, r_{21} & b_{31}, r_{31} & b_{41}, r_{41} & b_{12}, r_{11}\\ b_{12}, r_{11} & b_{21}, r_{21} & b_{31}, r_{31} & b_{41}, r_{41} & b_{11}, r_{12}\\ b_{12}, r_{12} & b_{21}, r_{21} & b_{31}, r_{31} & b_{41}, r_{41} & b_{11}, r_{11} \end{array}

Solution

Let's consider cases, depending on how many balls of each color are chosen and how many balls are selected from each box. Since at least one ball of each color must be selected from each box, there can be at most six balls of the same color.

Six red and four blue balls are selected

We must select a blue ball from each box, which can be done in $\binom{2}{1}^4$ ways. For the red balls, there are two possibilities. Either three red balls are selected from one box and one each is selected from the other three boxes, which can occur in $\binom{4}{1}\binom{3}{3}\binom{3}{1}^3$ ways, or two red balls each are selected from two of the four boxes and one red ball each is selected from the other two boxes, which can occur in $\binom{4}{2}\binom{3}{2}^2\binom{3}{1}^2$ ways. Hence, there are $$\binom{2}{1}^4\left[\binom{4}{1}\binom{3}{3}\binom{3}{1}^3 + \binom{4}{2}\binom{3}{2}^2\binom{3}{1}^2\right]$$ such selections.

Five red and five blue balls are selected

There are two possibilities. We select two red balls and two blue balls from the same box and one ball of each color from each of the other boxes, which can occur in $\binom{4}{1}\binom{3}{2}\binom{2}{2}\binom{3}{1}^3\binom{2}{1}^3$ ways, or we can select two red balls from one box, one red ball each from the other three boxes, two blue balls from a box different than the box from which two red balls were selected, and one blue ball from each of the other three boxes, which can occur in $\binom{4}{1}\binom{3}{2}\binom{3}{1}^3\binom{3}{1}\binom{2}{2}\binom{2}{1}^3$ ways. Hence, there are $$\binom{4}{1}\binom{3}{2}\binom{2}{2}\binom{3}{1}^3\binom{2}{1}^3 + \binom{4}{1}\binom{3}{2}\binom{3}{1}^3\binom{3}{1}\binom{2}{2}\binom{2}{1}^3$$ such selections.

Four red and six blue balls are selected

We must select one red ball from each box, which can occur in $\binom{3}{1}^4$ ways. We must select two blue balls each from two of the four boxes and one blue ball from each of the other two boxes, which can occur in $\binom{4}{2}\binom{2}{2}^2\binom{2}{1}^2$ ways. Hence, there are $$\binom{3}{1}^4\binom{4}{2}\binom{2}{2}^2\binom{2}{1}^2$$ such selections.

Total: Since these cases are mutually exclusive and exhaustive, the number of possible selections is $$\binom{2}{1}^4\left[\binom{4}{1}\binom{3}{3}\binom{3}{1}^3 + \binom{4}{2}\binom{3}{2}^2\binom{3}{1}^2\right] + \binom{4}{1}\binom{3}{2}\binom{2}{2}\binom{3}{1}^3\binom{2}{1}^3 + \binom{4}{1}\binom{3}{2}\binom{3}{1}^3\binom{3}{1}\binom{2}{2}\binom{2}{1}^3 + \binom{3}{1}^4\binom{4}{2}\binom{2}{2}^2\binom{2}{1}^2$$