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

Home > Logic
Names in Boxes (Posted on 2017-04-09) Difficulty: 3 of 5
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!

No Solution Yet Submitted by Ady TZIDON    
Rating: 4.0000 (5 votes)

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

Each prisoner starts with his namesake box.  That box must be in the same loop as the goal box with his name inside it, specifically the goal box will be the last box in the loop.  If we ignore the 50 tries limit then every prisoner will find his name in a number of tries equal to the size of the loop he is in.


To illustrate a scenario with 10 prisoners: Lets say the boxes in order have names B G H A F C J E I D inside them and the prisoners name the boxes A B C D E F G H I J. Then there are the following loops: {A-B-G-J-D}, {C-H-E-F}, {I}

Lets follow Prisoner E.  He starts with the box named E and finds name F.  His next box is F, where he finds C.  His third box is C, where he finds H.  His fourth box is H, where he finds his name C.  

C, F, and H will all have similar results finding their name in that loop in the fourth try, the size of his loop.  A,B,D,G,J will all find their names on the fifth try.  I will be lucky since his name is in the box named for him.  In this specific 10 prisoner scenario they will each succeed in finding their own names within 5 tries.

  Posted by Brian Smith on 2017-04-12 13:08:19
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information