# Probability [Distinct balls in distinct boxes]

6 different balls are put in 3 different boxes, no box being empty. The probability of putting balls in the boxes in equal numbers is ? Could anyone pleases give the answer and explain it.

## 2 Answers

We count the number of ways of putting the balls into boxes by inclusion exclusion. There are $3^6$ ways of distributing the balls among the boxes, but we do not admit the ways of distributing the balls among the boxes where one box is empty, is ${3\choose 1}2^6$. Then we must add back in the times when two boxes are empty ${3\choose 2}1^6$. So, we get:

$$3^6-3\cdot 2^6+3\cdot 1$$

Then we just need to calculate the number of ways that each box can end up containing two balls.

If we think of a permutation of the $6$ balls, and interpret the first two elements as going in the first box, the next two going in the second box, and the third two going in the third box, then we see that there are $6!$ ways of placing the balls evenly into the three boxes where the balls are ordered in the boxes. Then we have to divide by $2^3$ because the ordering of elements in their distinct groupings does not matter.

So, the final probability is:

$$\frac{6!/2^3}{3^6-3\cdot 2^6+3\cdot 1}\approx 0.16667$$

• I don't get the deletion for one empty box and then addition for 2 boxes part. – toothie Mar 18 '14 at 16:34
• First we count all of the ways of putting the balls into the boxes. Then we subtract off all of the ways we can put the balls into two particular boxes. Note that these ways overlap. Suppose we are splitting the balls between the first and third boxes, and between the first and second boxes. If we put all of the balls in the first box, then we see that this situation is counted twice. So, we have to add back in all of the ways we could put all of the balls in one box to avoid undercounting. – Bulberage Mar 18 '14 at 16:41
• ok, got it now! Thank you very much :D – toothie Mar 18 '14 at 16:43

Note that the balls and boxes are both distinct.

Select 2 balls in each of 3 boxes, count the permutations of the six balls. Ways to arrange 6 balls, 2 in each box: $N(2,2,2)=\frac{6!}{2!2!2!}$ That's permutations of all six balls, divided by permutations of balls in each box (since the order in the box does not matter).

Select the 1 box to have 4 balls, permute the balls. Ways to arrange 6 balls, 1 in each of 2 boxes and 4 in the third: $N(1,1,4) = \frac{6!}{4!}\times {3 \choose 1} = \frac{6!}{4!}\times 3$

Select 1 of 3 boxes to have 3 balls, select 1 of remaining 2 to have 2 balls, permute the balls. Ways to arrange 6 balls, 1 in one box, 2 in another, 3 into the third: $N(1,2,3) = \frac{6!}{2!3!}\times{3 \choose 1}{2 \choose 1} = \frac{6!}{2!3!} \times 3 \times 2$

Given that no box can be empty, that is all the ways to fill the boxes. So we want the probability : $$\dfrac{N(2,2,2)}{N(2,2,2)+N(1,1,4)+N(1,2,3)} \\ = \dfrac{\frac{1}{2!2!2!}}{\frac{1}{2!2!2!}+\frac{3}{4!}+\frac{1}{3!2!}\cdot 3\cdot 2} \\ = \frac{4!}{4!+2!2!2!3+2!2!4!} \\ = \dfrac{1}{6}$$