Final answer:
There are 48 ways to accommodate five guests in four rooms without leaving any room vacant.
Step-by-step explanation:
To accommodate five guests in four rooms in such a way that none of the rooms remain vacant, we need to consider two cases:
- Each room has at least one guest: In this case, we can distribute the five guests among the four rooms in a one-to-one manner. We can calculate the number of ways using the concept of permutations. The first guest can be assigned to any of the four rooms, the second guest can be assigned to any of the remaining three rooms, and so on. Therefore, the number of ways is 4 * 3 * 2 * 1 = 24.
- One room has two guests: In this case, we can choose one room to have two guests in C(4, 1) = 4 ways. The remaining three guests can be assigned to the remaining three rooms in a one-to-one manner, which can be done in 3 * 2 * 1 = 6 ways. Therefore, the number of ways is 4 * 6 = 24.
In total, there are 24 + 24 = 48 ways to accommodate five guests in four rooms without leaving any room vacant.