The names of 100 prisoners are placed in 100 wooden boxes, one name to a box, and the boxes are
lined up on a table in a room. One by one, the prisoners are led into the room; each may look
in at most 50 boxes, but must leave the room exactly as he found it and is permitted no further
communication with the others.
The prisoners have a chance to plot their strategy in advance, and they are going to need it,
because unless every single prisoner finds his own name all will subsequently be executed.
Find a strategy for them which has probability of success exceeding 30%.
Comment: If each prisoner examines a random set of 50 boxes, their probability of survival
is an unenviable 1/2^{100} ∼ 0.0000000000000000000000000000008. They could do worse—if they all
look in the same 50 boxes, their chances drop to zero. 30% seems ridiculously out of reach—but
yes, you heard the problem correctly!
With two people, each choosing one box:
As per the comment, if they both choose randomly, their probability of survival is only 1/2^2 = 0.25 but they can do better.
If they decide beforehand that the first person will check the first box and the second will chose the other their probability rises to 0.5
Trying four people, each choosing two boxes:
If
person 1 checks boxes 1 and 2
person 2 checks boxes 2 and 3
person 3 checks boxes 3 and 4 and
person 4 checks boxes 4 and 1
they have a 2/24 chance of surviving, which is slightly better than 1/2^4
The safe permutations are {1234, 4123}
Maybe some other checking scheme will improve on this.
Incidentally, I wouldn't be surprised if increasing the number of people makes the probability approach 1/e = .368

Posted by Jer
on 20170410 15:31:03 