A certain hotel has two types of rooms: double rooms priced at yuan each and triple rooms priced at 502723$ female students. If it is required that males and females cannot share a room, and all rented rooms must be fully occupied, find:
The minimum number of double rooms needed to minimize the cost;
Now, the hotel offers a 20% discount on double rooms and there are only double rooms left. In this case, find the minimum number of triple rooms needed to minimize the cost.
Problem 178
Official solution
### Step-by-Step Solution
#### Part (1): Minimum Number of Double Rooms
1. Calculate the cost per person for each room type:
- Double rooms: yuan per person.
- Triple rooms: yuan per person.
2. Since , the cost per person in a triple room is lower. Therefore, to minimize the cost, we should aim to rent fewer double rooms.
3. Calculate the number of rooms needed for male and female students if they were to stay in triple rooms:
- Male students: rooms.
- Female students: rooms and 2 people left.
4. The 2 remaining female students will need 1 double room.
Therefore, to minimize the cost, the minimum number of double rooms needed is .
#### Part (2): Minimum Number of Triple Rooms with Discount
1. Calculate the new cost per person for double rooms after a 20% discount:
- New cost for double rooms: yuan per person.
2. Since , the cost per person in a double room is now lower. Therefore, to minimize the cost, we should aim to rent more double rooms.
3. Let's denote:
- : Number of double rooms rented by male students.
- : Number of triple rooms rented by male students.
- : Number of double rooms rented by female students.
- : Number of triple rooms rented by female students.
4. We have the equations:
- For male students: .
- For female students: .
5. Solving for and , we get:
- .
- .
6. Considering the constraints that , , , are non-negative integers and the total number of double rooms available is 15, we find possible combinations for and that satisfy .
7. The maximum value of that meets the condition is , which corresponds to renting triple rooms in total to accommodate the remaining students.
Therefore, to minimize the cost with the discount applied and the limitation on the number of double rooms, the minimum number of triple rooms needed is .