Assigning 60 kids to 20 rooms with constraints

82 Views Asked by At

Update: Still I didn't get a correct answer


I have the following problem:

Given $60$ kids and $20$ rooms where each room has $4$ seats, what's the number of possibilities to order them such that no room is empty?

I tried to simplify my problem by saying we need to choose 20 kids from 60. and to divide them into the rooms (each in one room) then with the left 40 we need to divide them into 20 rooms that the maximum a room can take is 3 kids.

But, I wasn't able to solve the second part. Note: the order of seats and the order of rooms is important (all different) maybe inclusion-exclusion may help here?

2

There are 2 best solutions below

8
On BEST ANSWER

The total number of ways to distribute the kids are $80\times 79 \times 78....\times21= \frac{80!}{20!}$.

We will subtract from these the cases where atleast one room is empty. Clearly, atmost $5$ rooms can be empty at once. By inclusion-exclusion, the said number of ways will be

$$\sum_{k=1}^5 {20 \choose k}\cdot (-1)^{k+1} \cdot \frac{(80-4k)!}{(20-4k)!} $$ Giving us the answer:

$$\frac{80!}{20!} - \sum_{k=1}^5 {20 \choose k}\cdot (-1)^{k+1} \cdot \frac{(80-4k)!}{(20-4k)!} =$$

enter image description here

2
On

So you have to solve the equation $$a_1+a_2+\cdots+a_{20}=60$$ where $1\leq a_i\leq 4$ for all $i$

Make a polynomial $$(x+x^2+x^3+x^4)^{20}=x^{20}(1+x)^{20}(1+x^2)^{20}$$ and calculate coefficient at $x^{60}$ and multiply it with $60!$.