13 points · by jlees · 16y ago · 57 comments
The warden says to the prisoners: "You may each open any 50 of these boxes that you choose. If all 100 of you find the box with your name in it, you may all go free. If any of you fail, you will be imprisoned forever." He tells the prisoners that they may agree on their strategy beforehand, but that he will choose them to enter the room in a random order, and they will not know anything about the previous prisoners' experiences ahead of time. They cannot move the paper around between boxes.
What are the best odds the prisoners can give themselves? (Hint: it's better than 1/2^100.)
Bonus question: in the limit as the number of prisoners goes to infinity (and correspondingly, the number of boxes), what value do the optimal odds approach?
Each prisoner finds the room in the same state as each other. After opening the boxes they are subsequently closed again before the next prisoner. I believe this was intended to be inferred from:
... they will not know anything about the
previous prisoners' experiences ahead of time.
Hint - the probability of success is greater than 10%.There is a modification of the "obvious" solution that even works if the warden knows the prisoners' strategy beforehand and behaves in a maximally pessimal (from the prisoners' point of view) manner.
As the boxes are random, and the order is unknown, and there is no hidden information passed between each prisoner, and the room is reset each time - the only controllable factor the prisoners can agree on ahead of time is the strategy for which boxes each one will open.
Given the boxes are already randomized, using a random order is no more useful than using a sequential order.
So assuming they know the layout of hte boxes (is it 100 in a line or 100 in a square... presumably this can be figured out or some other strategy accounted for so everyone approaches things the same way) - each person opening 50 boxes has the same odds of finding their name. To maximize the odds of the entire GROUP finding their name, we need to ensure that each box is opened the same number of times by the end of the exercise. As we can't pass any information back and forth, this is the best we can do.
First 50 people open the first 50 boxes. Second 50 people open the second 50 boxes.
Or - as they may or may not know their position - they only need a strategy that ensures that each box is opened an equal number of times by the end.
To me that still looks like (1/2)^100..... which by definition isn't the answer - so I'm missing something. Eager to see the answer.
> To maximize the odds of the entire GROUP finding their
> name, we need to ensure that each box is opened the same
> number of times by the end of the exercise.
You were doing really well up to this point, but this doesn't follow.The rest of the prisoners should be able to easily find their names within 50 trials.
Success rate is PRETTY close to 50%.
Success rate: 100%. There probably are other constraints but I can only guess at them (do they visit the room one by one, and must they decide on a box to choose before leaving? Who can talk to whom? Must they close all boxes before leaving the room?)
For example, your suggested "strategy" is wrong - the first prisoner as you've stated only has a 50% chance.
Further, after each prisoner the boxes are closed so that each prisoner finds the room is exactly the same state, with no communication between them.
My 'solution' has all of the prisoners point out 'their' box after the second one has opened the last 50 boxes.
As to the 'no communication between': if there is no communication, it seems each of them cannot do better than 51/100 (50 opened boxes, and if their name isn't there, a 2% gamble)
However that isn't true. Suppose the first 51 each open the first 50 boxes and decide to choose the 51st box if they do not find their name, Then, all others, working under the assumption that the first 51 found their name (if they didn't, the game is lost anyways), can just open the last 49 and be certain to find their name.
That would bring the probability to about 2^-50. I doubt that is the optimal strategy, though. There seems to be much more room between 1/100! and 0.01^100.
The first person opens 50 boxes. Let's suppose they find their own name (otherwise we're dead anyway). They leave the room, everything is put back exactly as it was, they're not allowed to communicate with the others.
It seems to me you're suggesting the next person opens the second batch of 50. OK. But then they leave the room, everything is put back exactly as it was, and they're not allowed to communicate with the others.
What does the third person do? They're confronted by 100 closed boxes with no idea of anything, except that the first person's name is in the first 50 boxes, and the second person's name is in the second 50 boxes.
So, what now?
The catch is: once the prisoners decide on a strategy, they are not permitted to communicate anymore.
http://www.sciencenews.org/view/generic/id/7649/title/Puzzli...
http://ocfnash.wordpress.com/2009/12/12/pity-the-prisoners/
Warning: Don't spend hours of lateral thinking trying to solve this puzzle unless you have a degree in mathematics.
Edit: apparently there is a proof of optimality, mentioned here: http://mathoverflow.net/questions/31499/100-prisoners-100-bo...
It seems to me that the best that the prisoners can do is 1/2^50 (and the worst they can do is 0). For instance, if the prisoners decided that everyone would just open boxes 1-50, then they would have zero chance of finding all 100 names (since 50 of the boxes would never even be opened). It seems like the best they can do to maximize their chances is to make sure that each box is tried exactly 50 times. One way to do that is to divide the prisoners into two groups of 50, then assign the first group to boxes 1-50 and the second group to boxes 51-100. Then the chances that the first group all find their names is 1/2^50 (not 100% sure about this number, but it seems reasonable) - and if the first group all find their names, then the second group will too (since if all 50 in the first group were found in boxes 1-50, then all 50 in the second group must be in boxes 51-100). So the total probability of success is 1/2^50.
What's wrong with this?
Next prisoner uses a binary search to find his name in the first 50. Should have to open 6 boxes (log2(50)), if he finds it in the first 50 great. Either way he then sorts the next 44 boxes. Chance around 88%
3rd prisoner sorts the remaining 6 boxes, and finds his name in one of three piles using binary search. Chance, 100%
All remaining prisoners can use a binary search. log2(50) + log2(44) + log2(6)
I don't know how to integrate the 50% -> 88% chance, I'd estimate the answer to be around 44% based on my gut.
If the prisoners don't know the order they enter the room then they should each turn the first unturned box sideways to communicate the state of order. eg. if the first box is turned sideways you are prisoner #2.
I don't know if this is a brain teaser or just asking how to calculate the chances of 1/2 50 times in a row. (eg. the probability of correctly predicting 50 coin flips in a row)
I'm not seeing how a binary search will help you find your name in a randomized set of names - there is no order to work from to perform the search.
Here's a hint: If the prisoners cannot communicate after deciding on the strategy, is it possible there's any benefit of prisoners performing different strategies?
Beyond that, try to consider the different ways to select 50 boxes. They are randomized, so picking any 50 boxes at once will give you a 50% success rate, which with 100 ppl is unacceptably low. What other ways are there to select boxes? Are there any ways to pick boxes using information that's given?