It is currently Tue May 06, 2025 3:27 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6
Author Message
Offline
 Post subject: Re: Logical puzzles
Post #101 Posted: Wed Dec 15, 2010 3:36 am 
Lives in gote

Posts: 493
Liked others: 80
Was liked: 71
Rank: sdk
GD Posts: 175
HermanHiddema wrote:
tj86430 wrote:
I would like to see the solution, please. If you don't want to post it here, pm me.


As requested, the solution:

On the evening in advance, the prisoners get together and assign a number (1 through 100) to each prisoner. Each prisoner memorizes the numbers of all prisoners. This means that each box is now virtually marked with a prisoner name on the outside. It also means that the piece of paper in any box can now be seen as a reference to a box. Effectively, the boxes have become a permutation of the numbers 1-100, referencing each other.

The next day, each prisoner enters the room and opens the box with his own number on it. If it contains his name, he's done. If it contains another prisoners name, he next opens that prisoners box. He repeats this procedure, following the references to new boxes, until he has found his name, or until his 50 tries are up.

Each permutation is guaranteed to contain loops, and every box is guaranteed to be part of exactly one loop. The shortest loops are when a box points to itself (loop of length 1) or when two boxes point to each other (length 2). The longest possible loop has length 100 (each box points to a new box, until the 100th box in the sequence points back to the first).

The prisoners all go free if the longest loop in the permutation contains at most 50 boxes. The chance of that is 1 - ln(2), which is about 31.18%

Background article: http://www.sciencenews.org/view/generic ... s_in_Boxes


The strategy is pretty clear. Ok I accept, if it works it works :)

But I still have two problems with it:

1- I still don't get how you calculate 1-ln(2). It is not at all apparent for me that the probability of the longest loop not exceeding 50 is 1-ln(2). But anyway that's pure mathematics. My next problem is more important, which is:

2- Is there a proof that this strategy gives the highest survival probability?

While understanding the strategy and how it works, I must admit that I don't get the feeling of it. Why would creating such a "linked list" maximise the survival probability?
Which information do you exploit for increasing the probability?

_________________
If you say no, Elwood and I will come here for breakfast, lunch, and dinner every day of the week.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #102 Posted: Wed Dec 15, 2010 4:20 am 
Gosei
User avatar

Posts: 2011
Location: Groningen, NL
Liked others: 202
Was liked: 1087
Rank: Dutch 4D
GD Posts: 645
Universal go server handle: herminator
entropi wrote:
2- Is there a proof that this strategy gives the highest survival probability?


Not that I know of, but obviously I also do not know a better strategy.

Quote:
While understanding the strategy and how it works, I must admit that I don't get the feeling of it. Why would creating such a "linked list" maximise the survival probability?
Which information do you exploit for increasing the probability?


For each individual prisoners, the chance of finding their name has not increased (nor has it decreased). Each prisoner still has 50% chance of finding their name. The strategy just ties them together. So now either all the prisoners in the loop fail, or none of them fail (depending on the loop length). And by doing that, we eliminate the possibility that fewer than 51 prisoners will fail. If the longest loop is at least 51, then all the prisoners in that loop will fail. If the longest is 50 or less, nobody fails. So all the cases of 1,2,3,4,....,47,48,49,50 prisoners failing have suddenly been eliminated.

At the same time, all the cases of 51,52,53,54....,97,98,99,100 prisoners failing have had their chance increased. With a random strategy, the chance of all prisoners failing is as astronomical as all of them succeeding. With this strategy, the chance of all prisoners failing is exactly 1%. Here too, the strategy ties the prisoners together in sharing their fate.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #103 Posted: Thu Dec 16, 2010 6:38 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
entropi wrote:

1- I still don't get how you calculate 1-ln(2). It is not at all apparent for me that the probability of the longest loop not exceeding 50 is 1-ln(2). But anyway that's pure mathematics. My next problem is more important, which is:



Herman is quite pessimistic. His probability of 1 - ln2 is correct in the limit towards infite prisoners. I guess in the finite case at hand the survival chance is exactly 1/2 - 1/3 + 1/4 ...... + 1/100 which is about 0.01 % better than Herman's value. I didn't manage to prove my formula yet. At least I checked it for n =2 and n = 4. When I was trying n = 6 to discover the system, some friends came to visit me unexpectedly, disturbing my cycles. Odysseus' descendents, Cyclops presumed.

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #104 Posted: Fri Dec 17, 2010 2:49 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
entropi wrote:

1- I still don't get how you calculate 1-ln(2). It is not at all apparent for me that the probability of the longest loop not exceeding 50 is 1-ln(2). But anyway that's pure mathematics. My next problem is more important, which is:


I'll try to calculate what is the probability that there is one cycle of length 51 exactly if we shuffle the numbers 1 to 100.
There are 100! shuffles ( permatutions ). How many contain a 51 cycle?
There are 100 over 51 that is 100! / ( 51! * 49! ) ways to divide the numbers in two groups: the 51 cycle group and the rest. The rest can be ordered at 49! different ways.
For the 51 cycle we have 50 ways to choose the first element, 49 ways for the second and so on. So from 51 numbers one can realize a 51 cycle in 50! ways.
All together, taking quotients and products, the probability is 1/51.

For Herma's problem to get the probability of failing:
You repeat this for 51-cycles to 100-cycles and add the probabilities. ( They are exclusive ). So you get:
1/51 + 1/52 + 1/53 + .. .. + 1/100 as the probability for failure.
Somehow this sum equals 1 - 1/2 + 1/3 - 1/4 .. + 1/100. And this approaches ln(2).
Because ln(1+x) = x - x^2/2 + x^3/3 - x^4/4 ... ( substitute x = 1 )

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #105 Posted: Fri Dec 17, 2010 4:38 pm 
Lives in sente
User avatar

Posts: 924
Location: Pittsburgh
Liked others: 45
Was liked: 103
Rank: lazy
KGS: redundant/silchas
Tygem: redundant
Wbaduk: redundant
DGS: redundant
OGS: redundant
For a derivation of the probability in the prisoner puzzle see wikipedia.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #106 Posted: Fri Dec 17, 2010 5:11 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
Redundant wrote:
For a derivation of the probability in the prisoner puzzle see wikipedia.


better lay-out indeed. thx

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #107 Posted: Fri Dec 17, 2010 5:44 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
entropi wrote:
2- Is there a proof that this strategy gives the highest survival probability?
While understanding the strategy and how it works, I must admit that I don't get the feeling of it. Why would creating such a "linked list" maximise the survival probability?
Which information do you exploit for increasing the probability?


a. Eugene Curtain and Max Washauer have recently proved that this solution cannot be improved
upon. ( from link.pdf )
b. Why it works. Assume two prisoners. If they choose random their chance is 25 %. If they agree upon mr one choosing the first box and mr two the second box. Now their chance is 50%. They made sure they succeed or fail together.
If you next try 4 prisoners by hand you see why it works. If they fail as team at least 3 of them has failed personally.

_________________
I think I am so I think I am.

Top
 Profile  
 
Offline
 Post subject: Re: Logical puzzles
Post #108 Posted: Fri Dec 17, 2010 6:35 pm 
Lives in sente
User avatar

Posts: 801
Location: Amsterdam (NL)
Liked others: 353
Was liked: 107
Rank: KGS 7 kyu forever
GD Posts: 460
cyclops wrote:
1/51 + 1/52 + 1/53 + .. .. + 1/100 as the probability for failure.
Somehow this sum equals 1 - 1/2 + 1/3 - 1/4 .. + 1/100.


This can be proven quite easily by induction.

_________________
I think I am so I think I am.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group