Error in calculation of number of ways to put $20$ identical balls in $4$ labelled boxes if each box contains at most $18$ balls

combinationscombinatoricsdiscrete mathematicspermutations

The number of ways to put $20$ identical balls in $4$ labelled boxes in such a way that each box contains at most $18$ balls is,

$$(a)~~\binom{24}{4}-16~~(b)~~\binom{24}{4}-10~~(c)~~\binom{23}{3}-16~~(d)~~\binom{23}{3}-12~~(e)~~\binom{24}{4}-12$$

My solution:

Answer – Stars bars All balls can go in each box – $4C1\cdot$ Stars bars with $2$ balls and $3$ boxes (Fill $1$ box with $18$ balls leaves $2$ balls and $3$ boxes. AND $4C1$ ways of selecting full box )

$$\begin{align}
&= (23 C 3) – (4 C 1) \cdot ( 4 C 2)\\
&= (23 C 3) – 4 \cdot 6\\
&= (23 C 3) – 24
\end{align}$$

Where did I go wrong?

Best Answer

Okay so using we know that the number of ways without restrictions is simply $$\binom{n+r-1}{r-1}$$ And using $n=20,r=4$ we get $$\binom{23}{3}$$Now if we put $19$ balls in any one box then we have $\binom{4}1$ ways of selecting the one box and then we also have to select the next box to hold the last ball which can be done in $3$ ways each time, so we get for the case of $19$ balls in one box, $12$ ways that should not be included.
Also for the case of $20$ balls in one box, we get $4$ ways of doing that, so you get in total $16$ cases to be subtracted from the original answer, which leaves us with option c) $$\binom{23} 3 -16$$

Related Question