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?

  • $\begingroup$ How many balls are there? In the first sentence you say $n+1$ balls, but later it changes to $n+5$ balls. $\endgroup$
    – user940
    Commented Sep 6, 2015 at 16:22
  • $\begingroup$ @ByronSchmuland n+5! Sorry for that! $\endgroup$
    – user268444
    Commented Sep 6, 2015 at 16:34
  • $\begingroup$ 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. $\endgroup$ Commented Sep 6, 2015 at 16:53
  • $\begingroup$ Hint: How many ways can you put the $n+5$ balls in the remaining $n-2$ boxes with no empty boxes? $\endgroup$
    – user940
    Commented Sep 6, 2015 at 17:30

2 Answers 2



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.

  • $\begingroup$ You get an identity by equating both ;-) $\endgroup$
    – vonbrand
    Commented Sep 8, 2015 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .