Can someone tell me if the following I/O are correct?
removed....
they were nonsense.
Thanks
11118 - Prisoners, Boxes and Pieces of Paper
Moderator: Board moderators
11118 - Prisoners, Boxes and Pieces of Paper
Last edited by sclo on Mon Oct 16, 2006 9:02 am, edited 1 time in total.
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
The puzzle is indeed fascinating, the correct answer is far from what one would expect.
For those who are not getting the trick, the problem statement contains the following important sequence: "The prisoner opens n/2 boxes of his choice, one by one." (emphasis mine)
Abednego, thanks for showing us this problem!
For those who are not getting the trick, the problem statement contains the following important sequence: "The prisoner opens n/2 boxes of his choice, one by one." (emphasis mine)
Abednego, thanks for showing us this problem!

Thanks for the hint misof. And what a surprising result! (the limit for n to infinity is nonzero) Really a fun puzzle. By the way, does anybody has a proof that there is no better strategy?
For those still struggling with the problem: work out the case for n=4 by hand. Let the second box the first prisoner opens be dependant on what was in the first box he opened, and try to find a way for the other prisoners to use this information.
For those still struggling with the problem: work out the case for n=4 by hand. Let the second box the first prisoner opens be dependant on what was in the first box he opened, and try to find a way for the other prisoners to use this information.
-
- A great helper
- Posts: 281
- Joined: Tue Sep 10, 2002 5:14 am
- Location: Mountain View, CA, USA
- Contact:
There is a formula that starts out being very complicated, but then it simplifies to something trivial. My code is 3 lines long.
Originally, the problem comes from a talk in a math conference. The title of the talk was "Seven problems you think you've misheard." It also came with a proof of optimality.
Originally, the problem comes from a talk in a math conference. The title of the talk was "Seven problems you think you've misheard." It also came with a proof of optimality.
If only I had as much free time as I did in college...
-
- A great helper
- Posts: 281
- Joined: Tue Sep 10, 2002 5:14 am
- Location: Mountain View, CA, USA
- Contact:
The amazing Google reveals this page:
http://www.sciencenews.org/articles/200 ... thtrek.asp
It has references at the bottom.
http://www.sciencenews.org/articles/200 ... thtrek.asp
It has references at the bottom.
If only I had as much free time as I did in college...