Five balls of different colors are to be placed in three boxes of different sizes. Each box can hold all five balls. The number of ways in which we can place the balls in the boxes so that no box remains empty is
The solution to this problem has been given using the inclusion-exclusion approach in this link.
But I approached the problem from a different perspective and wanted to know where am I going wrong. Here's my solution:
So to ensure that no box remains empty, here are the possible configurations: (3 1 1) (2 2 1) Since the boxes are of different size so altering the configuration will also give rise to another possibility.
Now going with the first configuration i.e. (3 1 1), we see that:
The number of ways to select 1 box which will have 3 balls is 3C1. Now the number of ways to select 3 balls from 5 different balls is 5C3.
Hence the ways to put 5 balls in any of the three boxes will be: 3C15C3 Now for the other box, we have 1 box choice and 1 ball choice of remaining 2 balls. So the combination will be: 2C12C1
The last box will be chosen in 1 way and so will be the last ball.
Hence total possible ways:= 3C15C32C22C1=120 ways.
Now going with the second case that is: 2 1 1: Number of ways to select the box is: 3C1 Number of ways to select 2 balls: 5C2 Hence the configuration results in: 3C15C2 Similarly for the remaining two configurations we have: 2C13C2 and 1 ways.
Now if we compute combinations of second case we get: 3C15C22C13C2=180 ways. So the total number of ways should be 120+180 that is 300 ways. But answer seems to be 150. I know I have considered some factors twice, but couldn't figure it out where exactly it's happening. Kindly help me.