CombinatoricsDifficulty 6.6National olympiadFind the answer
A hundred tourists arrive to a hotel at night. They know that in the hotel there are single rooms numbered as 1,2,…,n, and among them k (the tourists do not know which) are under repair, the other rooms are free. The tourists, one after another, check the rooms in any order (maybe different for different tourists), and the first room not under repair is taken by the tourist. The tourists don’t know whether a room is occupied until they check it. However it is forbidden to check an occupied room, and the tourists may coordinate their strategy beforehand to avoid this situation. For each k find the smallest n for which the tourists may select their rooms for sure.
[i]Fyodor Ivlev[/i]
Solution
1. Define the problem and notation: - We have n rooms numbered 1,2,…,n. - Among these rooms, k rooms are under repair. - 100 tourists arrive and need to find a free room without checking an occupied room. - We need to find the smallest n such that the tourists can always find a free room without checking an occupied room.
2. **Define the function f(i,j):** - Let f(i,j) be the j-th room that the i-th tourist will check in the strategy. - The tourists need to coordinate their strategy to avoid checking an occupied room.
3. Lemma: - If f(i1,j1)=f(i2,j2) for some i1<i2, then j1+j2≥k+3. - This lemma ensures that when the i2-th tourist is checking the j2-th room, they won't check an occupied room.
4. Proof of the Lemma: - (⇒) If f(i1,j1) is under repair, then the lemma holds. - If i2 had checked another room that is occupied by i1, then i2 would have exploded. - Otherwise, in the sequence f(i1,1),f(i1,2),…,f(i1,j1−1),f(i2,1),f(i2,2),…,f(i2,j2−1), there are at least k+1 rooms, and therefore there exists at least one room that is not under repair. - Hence, either f(i1,j1) won't be occupied by i1, or i2 won't check this room. - (⇐) If j1+j2≤k+2, and the k rooms f(i1,1),f(i1,2),…,f(i1,j1−1),f(i2,1),f(i2,2),…,f(i2,j2−1) are under repair, then i2 will explode in this strategy when checking the j2-th room.
5. Strategy Success Condition: - A strategy will succeed if and only if for all i1=i2 and j1,j2, if f(i1,j1)=f(i2,j2), then j1+j2≥k+3.
6. Case Analysis: - If k=2l−1 (odd), then for all i1=i2, (j1,j2≤l or j1=l+1,j2≤l), f(i1,j1)=f(i2,j2). Therefore, n≥100l+1. - If k=2l (even), then for all i1=i2, j1,j2≤l+1, f(i1,j1)=f(i2,j2). Therefore, n≥100(l+1).
7. Construction of the Strategy: - If k=2l−1 (odd), let: f(i,j)=⎩⎨⎧l(i−1)+j100l+1l(100−i)+2l+2−jif j≤lif j=l+1if j≥l+2 - If k=2l (even), let: f(i,j)={(l+1)(i−1)+jl(100−i)+2l+3−jif j≤l+1if j≥l+2
8. Conclusion: - For k odd: n≥50k+51. - For k even: n≥50k+100.
The final answer is 2∤k:50k+51 and 2∣k:50k+100.
Want a route through all this instead of an archive? The track
puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.
Source: NuminaMath-1.5,
licensed Apache-2.0.
Statement and solution reproduced as published; topic and difficulty added by this site.