# In how many ways we could put balls into boxes?

In how many ways we could put $n+5$ indistinguishable balls into $n$ distinguishable boxes and at least $2$ boxes have to be empty?

This is my answer: ${n}\choose{2} $$\cdot$$ {n+5+n-2-1}\choose{n+5}$ because first of all we have to choose $2$ empty boxes and after that we put $n+5$ balls into $n-2$ boxes. Is it correct?

• How many balls are there? In the first sentence you say $n+1$ balls, but later it changes to $n+5$ balls. – user940 Sep 6 '15 at 16:22
• @ByronSchmuland n+5! Sorry for that! – user268444 Sep 6 '15 at 16:34
• You will be overcounting, e.g. if boxes 1-2 is one combo kept empty, box 3 may be another empty box, but boxes 1-3 and 2-3 will again figure as initial empty combos. – true blue anil Sep 6 '15 at 16:53
• Hint: How many ways can you put the $n+5$ balls in the remaining $n-2$ boxes with no empty boxes? – user940 Sep 6 '15 at 17:30

$\textbf{Hint}$:

First count the number of ways to distribute the balls without any restrictions,

and then subtract the number of distributions with

A) no empty box$\;\;$ and $\;\;$B) exactly one empty box.

One way is to sum up using Theorem 1 of stars and bars for $2$ through $(n-1)$ empty boxes

$$\sum_{k=2}^{n-1} {n\choose k}{n+5-1\choose n-k-1}$$

but user84413's approach is more efficient.

• You get an identity by equating both ;-) – vonbrand Sep 8 '15 at 23:16