All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Names in Boxes (Posted on 2017-04-09)
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/2100 ∼ 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!

Comments: ( Back to comment list | You must be logged in to post comments.)
 re(2): Loops | Comment 8 of 10 |
(In reply to re: Loops by Charlie)

Having all cycles of length 50 or less works because each prisoner is guaranteed to be in their own loop.
If box 1 has prisoner 2's name,
box 2 has prisoner 4
box 4 has prisoner 3 and
box 3 has prisoner 1 then each of these prisoners will find their name in exactly 4 tries.
None of the other prisoners would ever have to check any of the boxes of this cycle.

 Posted by Jer on 2017-04-12 13:27:25

 Search: Search body:
Forums (1)