In: Statistics and Probability
4. How many different ways can you put 8 balls in 8 boxes A1, . . . , A8
if (a) the balls are all different and no box is empty 8!
(b) the balls are all different and only three boxes A1, A2 and A3 are empty
(c) the balls are all different and exactly four boxes are empty
(d) the balls are all different and each box is either empty or contains exactly two balls
(e) the balls are identical
(f) the balls are identical and exactly two boxes are empty
please explain in detail too thanks! especially e and f
We have 8 balls with us, and we want to put them in 8 boxes A1, A2,...,A8, under the following different situations:
Part a: The balls are different, and no box is empty
Since we have 8 balls, and none of the boxes are to be empty, each of the boxes will have only one ball.
So, let us start by filling the box A1, then go on filling the boxes A2, A3,... and lastly A8.
Let us now fill the box A1. We can put any one of the 8 balls in that box. Since the 8 balls are different, this can be done in 8 ways. So, in any one of the 8 ways, we put one ball in that box.
Having put one ball in box A1, we have 7 balls at hand, one of which needs to be put in the box A2. Here, we note that, for any one ball put in the box A1 in 8 ways, any one of the remaining 7 balls can be put in the box A2 in 7 ways. So, we can fill the boxes A1 and A2 with two balls in 8*7 ways.
Now, having put two balls in boxes A1 and A2, we have 6 balls at hand, one of which needs to be put in the box A3. Here, we note that, for any two balls put in the boxes A1 and A2 in 8*7 ways, any one of the remaining 6 balls can be put in the box A3 in 6 ways. So, we can fill the boxes A1, A2 and A3 with three balls in 8*7*6 ways.
We proceed this way till we fill the boxes A1 to A7 with 7 balls in in 8*7*6*5*4*3*2 ways. Now here, we see that for any seven balls put in the boxes A1 to A7 in 8*7*6*5*4*3*2 ways, only one ball is left to fill the box A8, which can be done in only one way.
So, finally, we can fill the 8 different balls in the 8 boxes A1 to A8 in 8*7*6*5*4*3*2*1 ways, i.e, 8! ways, i.e, 40320 ways
Part b: The balls are all different and only the three boxes A1, A2, A3 are empty
Here, we are two put all the 8 balls in the last three boxes. So, some of the boxes may have more than one ball. However, it should be noted that not all boxes will have more than two balls, because in that case, out of the remaining five boxes, we will again have one or two empty boxes.
The 8 balls can be put in 5 boxes either by
Now, let us consider each case one by one.
Case 1: Let us first choose the box in which we place 4 balls. That box can be chosen in 5 ways.
Now, having chosen a box, let us now choose 4 balls to place in that box. This can be done in ways.
Thus, 4 balls can be put into one of the boxes in ways.
Now, having put 4 balls in one of the boxes, we now need to put the remaining 4 balls in 4 other boxes. Now, for every 4 balls put in one of the boxes, the remaining 4 balls can be put into the other boxes in 4! ways as in the previous part.
Hence, we can put the 8 balls into 5 boxes in this case in altogether ways
Case 2: Let us first choose the 3 boxes which will have 2 balls each. This choice of the boxes can be made in ways.
Now, having chosen those boxes, let us now fill them with 2 balls each. The first box will be filled with 2 balls, and these 2 balls will be chosen in ways.
Now, after filling the first box, the second box has to be filled with 2 balls out of remaining 6, and this can be done in ways, and similarly the third box in ways. Thus, three of the boxes can be filled with 6 balls in 10*28*15*6=25200 ways.
Having filled the 3 boxes, we fill the remaining 2 boxes with one ball each, as in part a, in 2! =2 ways.
Thus, altogether, in this case, the boxes can be filled in 25200*2=50400 ways.
Case 3: Here, as before, we first choose the box having balls and then fill it with 3 balls by choosing them. Then we choose the box where we will put 2 balls after choosing, and finally put the remaining 3 balls in 3 boxes, each having one ball. This way, the boxes can be filled in ways.
Thus, combining the above 3 cases, we get that 8 balls can be put into boxes A4 to A8 in ways.
Part e: The balls are identical
Here, since the 8 balls are identical ,we cannot choose which ball to put in which box. As a result, since all the 8 boxes should contain 8 balls, there is only one way in which each box will have one ball. So, 8 identical balls can be put in 8 boxes in only 1 way.
Part f: The balls are identical, and exactly two boxes are empty
Here, we first need to choose the two empty boxes, as the two boxes to be kept empty are not specified. This choice can be made in ways.
Now, having chosen the 2 boxes in 28 ways, we now fill the remaining 6 boxes with the 8 balls. This can be done either by
Let us consider the cases one by one
Case 1: We first choose two boxes in which we put 2 balls each. The boxes can be chosen in ways.
Having chosen the boxes, we now fill them with two balls each. Since the balls are identically looking, the first box can be filled in only one way, and, having filled the first box, same goes for the second box. So, the two boxes can be filled with 4 balls in 15 ways.
Having filled them, we now fill the remaining 4 boxes with 4 other balls. This can be done, yet again, as before, in only one way.
Hence, having chosen the empty boxes, we fill the 6 boxes with 8 balls in 15 ways.
Case 2: Similarly, we first choose the box having 3 balls, fill them after choosing the balls, and then fill the remaining 5 with the 5 other balls. All this is done in ways.
So, combining the two cases, 8 balls can be put in exactly 6 boxes in ways.