I have come across a question and it is -
How many ways are there to distribute 17 distinct objects into 7 distinct boxes with at least two empty boxes?
There are two ways I am following to answer this question.
1st METHOD : Two boxes that would remain empty is to be chosen in C(7, 2)=21 ways. Corresponding to this, each of the 17 objects have 5 boxes to choose from. Hence, 17 objects can be placed in the five boxes in 5^17 ways. So, total number of ways = 21 * (5^17)
2nd METHOD : First, I find the total number of ways in which 17 objects can be placed in 7 boxes - this gives (7^17) ways, since each object can go to any of the 7 boxes. Next, from these total number of ways, I want to subtract the count of those ways in which all boxes are occupied and also in which only 1 box is empty while rest are occupied.
The number of ways in which none of the boxes is empty is C(17, 7) * 7! * (7^10). In this, C(17, 7) is for choosing 7 objects each of which will be placed in one of the empty boxes and the 7! is because there are 7! Ways to place the chosen 7 objects in the boxes. Once the 7 boxes are filled with 7 objects, the remaining 10 objects can be placed in any of the 7 boxes in (7^10) ways.
Now I can go forward to calculate those ways in which only 1 box is empty, but I wouldn't do this because there happens to be a problem in my approach that I followed till now. The problem is total count calculated in para 1 is less than the count in which no boxes are empty, as is calculated in para 2. However it should be the opposite case.
Please help me know where I am going wrong in solving this question.