There are 1000 prisoners and the warden decides to play the following game.
The prisoners are numbered 1 through 1000.
There is a room with 1000 boxes, numbered 1 through 1000.
There are 1000 pieces of paper, each numbered 1 through 1000.
The pieces of paper are randomly distributed one per box. (That is, paper #445 is just as likely to be in box #445, box #1, or any other box.)
Each prisoner will be taken in turn into the room with the boxes. He will open boxes of his choice one-by-one until either he finds the piece of paper with his own number on it or he has opened 500 boxes. Then he must leave and the room is reset. No communication between the prisoners is allowed once the game has begun.
If every prisoner finds the piece of paper with his or her number, then they will all be released. If a single prisoner fails to find his or her paper, then all of the prisoners will be locked up forever.
The prisoners are allowed to form a strategy before the game begins. What is the optimal strategy for the prisoners?
Approximately what is this strategy's probability of success?
[Note: there is both a cool graph-theoretic approach to this problem and also a group-theoretic approach. The end result of both is very simple and very beautiful. Have fun.]
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
View the arrangement of papers in boxes as an element of the symmetric group S 1 0 0 0 (the permutation in which n is sent m iff locker m contains the slip labeled n ). Then the prisoners will succeed exactly when this element has no cycle of length greater than 5 0 0 .
For k > 5 0 0 , there are ( k 1 0 0 0 ) ( k − 1 ) ! ( 1 0 0 0 − k ) ! elements in S 1 0 0 with cycles of length k . Therefore, the probability of the prisoners succeeding is 1 − 1 0 0 0 ! ∑ k = 5 0 1 1 0 0 0 ( k 1 0 0 0 ) ( k − 1 ) ! ( 1 0 0 0 − k ) ! ≈ . 3 0 7 ∈ [ 3 0 % , 4 0 % ) .
(This is a famous problem, and in general one can show that when there are 2 N prisoners and boxes and each prisoner picks N slips, the probability of success tends to 1 / e ≈ 0 . 3 6 8 as N → ∞ ).