# How many ways can we distribute $r$ identical balls into $n$ distinct boxes with exactly $m$ boxes empty

There are $$\binom{r+n-1}{n-1}$$ ways for distributing $$r$$ identical balls into $$n$$ distinct boxes. The $$m$$ part is throwing me off. I would say there are $$\binom{r+n-m-1}{n-m-1}$$ ways, but I'm not sure if I'm right.

• choose the empty boxes: $$\binom nm$$ ways
• put the $$r$$ balls into $$n-m$$ boxes: $$\binom{r+n-m-1}{n-m-1}$$ ways, as you wrote
So your answer is off, but only by a factor of $$\binom nm$$.