Maths Olympiad Prep

Library / /14 of 14

Combinatorics Difficulty 5.6 AIME, harder Prove it United States

Problem:

Suppose there are 100 prisoners, each of whom is given a number between 1 and 100. There is also a room with 100 boxes, labeled 1 to 100, and 100 pieces of paper with the numbers 1 to 100 on them. Each piece of paper is randomly placed inside one of the 100 boxes.

One at a time, each prisoner is allowed to enter the room and open at most 50 boxes to see the numbers inside. If every prisoner opens the box with his own number inside it, they will all be released. They are not allowed to communicate at all during this process, but they can come up with a strategy beforehand. Show that there is a strategy that gives them at least a 30%30\% chance of winning.

Solution

Solution:

They can use the following strategy: each prisoner opens the box labeled with his own number. He then looks at the number on the paper inside and opens the box labeled with that number next. He continues doing so until he finds his own number or he has opened 50 boxes. For instance, prisoner 2 might open box 2 and find the number 5, then open box 5 and find the number 17, then open box 17, and so on.

Thus, the prisoners will win iff the permutation of paper numbers in box numbers has no cycle of length more than 50. If the permutation does have such a cycle, it has at most one, and its length could be 51,52,,9951, 52, \ldots, 99, or 100100. If the cycle has length nn, then there are 100!/n100! / n possible permutations, since there are
10099(100n+1) 100 \cdot 99 \cdots \cdot (100-n+1)
ways to choose the numbers in the cycle (in order) and (100n)!(100-n)! ways to permute the remaining numbers, but then we divide by nn since it doesn't matter to the permutation which of the nn numbers is first when we write out the cycle. Thus, the probability there is a cycle of length n>50n > 50 is 1/n1/n for each nn. There is at most one such cycle, so the total probability is

151+152++1100=(1+12+13++1100)(1+12+13++150)ln100ln50=ln230%.\begin{gathered} \frac{1}{51} + \frac{1}{52} + \cdots + \frac{1}{100} \\ = \left(1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{100}\right) - \left(1 + \frac{1}{2} + \frac{1}{3} + \cdots + \frac{1}{50}\right) \\ \approx \ln 100 - \ln 50 = \ln 2 \approx 30\%. \end{gathered}

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: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.