Number of ways of distributing five distinct balls to four distinct boxes

combinatorics

In how many ways can we distribute 5 different balls in 4 different boxes when order is not considered inside boxes and empty boxes are not allowed?

My attempt:

In order to ensure no empty boxes, let us distribute 1 balls to each boxes. Choosing any 4 balls from 5 balls is $5\choose 4$ and arranging them to go into boxes is $4!$. Then the remaining 1 ball can choose to go into any one of the boxes. Number of ways for this is $4\choose 1$. By multiplication theorem, the total ways is ${5\choose 4}\times 4! \times {4\choose 1}$. But this is double of what is given as correct answer. What is the flaw in my logic?

Best Answer

You counted twice all the variants with two balls in a box. Say, let at first time you chose balls with numbers $2,3,4,5$, and then ball number $2$ falls into the first box. Suppose after that you put ball number $1$ into the first box. This is one way.

Let at first time you chose balls with numbers $1,3,4,5$, and then ball number $1$ falls into the first box. Suppose after that you put ball number $2$ into the first box. This is the second way. And these ways are the same, if the rest balls are in the same boxes. So you count each way twice.

To avoid it, chose two balls by ${}_2C_5$ ways, then a box for them by $4$ ways, and then put $3$ balls into the rest $3$ boxes by $3!$ ways. You get right answer after multiplying it.