[Math] In how many ways can 5 different toys be packed in 3 identical boxes such that no box is empty, if any of the boxes may hold all of the toys

permutationsprobability

The toys are differnt here but the boxees are identical.

since no box can be empty we can have two situations for this.

A)2,2,1
B)3,1,1

considering case A(2,2,1)

ways of selecting 2 toys from 5 = 5C2=5.4/1.2=10
then to select 2 from the rest three = 3C2 = 3.2/1.2=3

total number of ways to puting this into boxes in this case = 5C2 * 3C2 * 1C1 = 30

similarly,considering case B(3,1,1)

total number of ways to puting this into boxes in this case = 5C3 * 1C1 * 1C1 = 10

so total = 30 + 10 = 40 —> wrong

this seems incorrect.
what would be the proper solution.

Best Answer

For the case $(3,1,1)$ there are $\binom{5}{3}$ ways to choose the toys that will go in the $3$-box. Then the game is over: the remaining toys must be split $1$-$1$, and since the boxes are indistinguishable, there is only $1$ way to do this. So the case $(3,1,1)$ gives $10$ possibilities.

For the case $(2,2,1)$, there are $\binom{5}{1}$ ways to choose the toy that will go in the $1$-box. Now we have $4$ toys left, a real sports car and $3$ others. There are $\binom{3}{1}$ ways to choose what toy will accompany the sports car. So the case $(2,1,1)$ gives $15$ possibilities.

Remark: For a general treatment of this sort of problem, please look at Stirling numbers of the second kind. For small numbers like the ones in your problem, one does not need the general theory. Your division into cases is a good approach.