How many ways can we put 'z' different objects into 4 boxes such that at least two boxes remain empty?
I will assume that the boxes are distinguishable.
How many ways can we put different objects into 4 boxes
such that at least two boxes remain empty?
There are only two cases:
. . (1) There are two empty boxes.
. . (2) There are three empty boxes.
Case (1): Two empty boxes
There are: . choices for the 2 empty boxes.
The objects are partitioned between the other two boxes.
. . There are: . ways.
Hence, there are: . ways to have two empty boxes.
Case (2): Three empty boxes
There are: . choices for the three empty boxes.
The objects are placed in the remaining box.
. . There is: . way.
Hence, there are: . ways to have three empty boxes.
Therefore, there are: . ways to have at least two empty boxes.
This is the number of ways to have 3 empty boxes.
For the case of 2 empty boxes, there are ways to choose 2 of them, if they are different.
Taking one pair of 2 boxes...
the objects can be placed as follows
1 object in one box and 20 in the other
There are ways to do this as the 'z" objects are different.
2 objects in one box and 19 in the other
There are ways to choose 2 objects,
so that's the number of ways to place 2 in one and 19 in the other.
Continue on for 3 in one and 18 in the other, 4 in one and 17 in the other etc
and sum all the results. Multiply that sum by 6.
Add the number of ways to have 2 and 3 empty boxes.
However, there is likely to be a faster calculation.
There are to choose two empty boxes.
There are ways to assign the z objects to the two other boxes so neither is empty.
There are to choose three empty boxes.
There is only one way to put the objects into the remaining box.
To have either exactly two or exactly three empty boxes: