Distributing $20$ identical balls to $6$ distinct boxes where $1$ box must be empty

binomial distributioncombinatorics

I would like to count the number of ways to distribute $20$ identical balls to $6$ different boxes, where exactly only $1$ box is empty.

Let $r$ be the number of objects and $n$ be the number of boxes.

Since in this case $r$ is empty while $n$ is distinct, and there is at least $1$ empty box, $r = 20$ and $n = 5$

I have decided to use the formula $\displaystyle H^r_{r-n}$ which gives me $\displaystyle H^{20}_{15} = \binom{34}{15} ={1,855,967,520}$, (Since $H^n_{r}$ = ${r+n-1}\choose{r}$)

However since there are $6$ ways to choose the empty box, I am not sure of how to go through with the final answer. Should I be multiplying the answer by $6$?

Best Answer

Assume that $a$ balls go to first box, $b$ to second and so on and $f$ to the sixth box.

Now, we have the equation $a+b+c+d+e+f=20$. But your condition says exactly $1$ must be $0$. So we put one variable to $0$ in the above equation and ensure that all the other variables are $\geq 1$.

So let's say $f=0$, so we have $a+b+c+d+e=20$ where $ a,b,c,d,e \ge 1 $.

The solution to this can be easily found by forming a generating function $(x+x^2+x^3+\cdots)^5$ in which we have to find the coeffcient of $x^{20}$. That can be easily found now.

Or, if one doesn't wants to make a generating function, we use stars and bars method here. Let $a'=a+1,b'=b+1,\cdots,e'=e+1$ so that $a',b',\cdots,e'$ are now $\geq 0$ and after plugging these variables into our equation, we get our new equation as $a'+b'+c'+d'+e'=15$, whose solution by stars and bars is given by $\displaystyle \binom{15+4}{4}=\binom{19}{4}$.

But since we assumed $f=0$, we could have any of $a,b,c,d,e$ to be $0$, so we multiply this number by $6$, thus final answer turns out to be $\displaystyle 6\binom{19}{4}$.


Note that $a'$ is not to be confused with a derivative (see comments), it's just another variable!

Related Question