Prisoners and the boxes

100 prisoners are numbered 1–100. A room has 100 boxes; each hides a distinct number 1–100 in random order. One by one, each prisoner may open 50 boxes looking for their own number, then leaves (boxes reset, no communication). If every prisoner finds their number, all go free. Random guessing gives 2−1002^{-100}. Is there a far better strategy?

Show hints (2)+
  1. Have each prisoner follow a chain determined by the numbers they find.
  2. Success depends only on the longest cycle of the permutation.

Answer

This is an open-ended question - work through it and compare your reasoning.

Create a free account to see the full worked solution and track your progress.

Interview format: Market Maker, Hedge Fund Quant, Systematic & Data-Driven Trading

Related questions