0

Question: Suppose we have $n$ distinguishable balls and $n$ distinguishable boxes. How many ways can we throw the balls into the boxes such that exactly $k$ boxes are empty?

The answer has already been found (e.g. here), but I am looking for a correction to my solution, which is very close.

Consider $k=2$. I used the following approach:

  • There are $\binom{n}{2}$ choices for the empty boxes.
  • There are $\binom{n}{2}$ choices for which balls will be considered to go into "repeated boxes".
  • The remaining $(n-2)$ balls can be permuted arbitrarily to give a factor of $(n-2)!$

Lastly, we now pick the "repeated boxes". If the boxes are different, we have $(n-2)(n-3)$ choices. Within each of these, we can permute the order of the two balls. If the boxes are different, we can again permute the order, but only in one box now. Thus, the answer is:

$$\binom{n}{2}^2 (n-2)! \bigg[\frac{(n-2)(n-3)}{2^2} + \frac{n-2}{3}\bigg]$$

This turns out to be the correct answer, but I am not convinced by (my own) dubious reasoning. It also gives an incorrect answer for $k=3$. Using similar reasoning for this case, I arrive at:

$$\binom{n}{3}^2 (n-3)! \bigg[\frac{(n-3)(n-4)(n-5)}{2^3} + \frac{2(n-3)(n-4)}{3 \cdot 2} + \frac{n-3}{4}\bigg]$$

It turns out that the correct answer is:

$$\binom{n}{3}^2 (n-3)! \bigg[\frac{(n-3)(n-4)(n-5)}{2^3} + \frac{\color{red}3(n-3)(n-4)}{3 \cdot 2} + \frac{n-3}{4}\bigg]$$

I think I must be on the right lines with my solution -- the patterns with the falling factorials and powers of $2$ seems unlikely to be a coincidence -- but I'm struggling to understand why some of these combinatorial factors/quotients arise. Please could someone help with interpreting them?

RobPratt
  • 45,619
legionwhale
  • 2,411
  • Without going through the argument, the problem is almost certainly when you choose the $n \choose 2$ balls to go in the repeated boxes. You could choose $1,2$ as the repeated balls and put them in boxes with $3,4$. Or you could choose $3,4$ as the repeated balls and put them in boxes with $1,2$ You are multiply counting the configurations by specifying which ball went in the box first. – Ross Millikan Jul 08 '22 at 23:41
  • @RossMillikan I cannot be overcounting as my answer gives an underestimate. I have accounted for that permutation (although potentially incorrectly). How certain is almost certain, by the way? – legionwhale Jul 08 '22 at 23:44
  • @user2661923 Do you mean $k=3$? Since I got the correct answer for $k=2$, though my reasoning may be faulty. – legionwhale Jul 09 '22 at 00:24

0 Answers0