PDA

View Full Version : Prisoners Riddle


DougShrapnel
05-10-2006, 10:50 PM
Suppose 100 prisoners are in a line. Each prisoner is given a hat, but are not allowed any form of communication after they are given the hats (no blinking morse code or anything like that). They are standing in a line facing front and can see all the hats of the others in front of them, but not their own or anyone behind them. They are told that the probability of the hat they are wearing being black is 2/3, and that the remaining hats are white and that each hat was independently randomly chosen with these odds. Now each prisoner will be called up in the order of the line starting with the one in the back (who can see 99 other hats in front of him/her), one by one is forced to guess which color the hat on their own head is. If they guess correctly they live, if they guess incorrectly they are executed on the spot right then and there. As the procedure progresses the others can hear the guesses of those behind him/her and whether or not they guessed correctly.
Ok, assuming that the prisoners are allowed to collude and strategize before they are given their hats (they know of the pending situation before it takes place, but cannot communicate at all once the hats are given out), what should they do to maximize their probability of their own survival? What should they do to maximize the number of surviving prisoners (is this the same question)?

guesswest
05-10-2006, 11:13 PM
I've lost count of the amount of times I've been in that exact situation....

guesswest
05-10-2006, 11:20 PM
And surely it's just a case of counting? ie the guy at the back knows exactly what hat he has on and everyone else does subsequently by adding the hats he sees to the ones he's heard called out?

chezlaw
05-10-2006, 11:30 PM
[ QUOTE ]
And surely it's just a case of counting? ie the guy at the back knows his exact probability and everyone subsequent does by adding the hats he sees to the ones he's heard called out? The white hats at the back would all get shot.

[/ QUOTE ]
Independent variables.

How about the first says their guess is whatever the colur of the seconds hat. The second now know their hat's coulour and guess correctly. 3rd guess whatevers the 4th's is etc.

That way 50% are guaranteed to survive and many of the rest survive by getting lucky.

Everyone should agree to this and then to maximise their personal survival they should cheat if they're an odd number and guess black.

chez

guesswest
05-10-2006, 11:32 PM
Damnit - chez's quote unmasks my sneaky edit. I'm pretty sure everyone would know exactly wouldn't they?

DougShrapnel
05-10-2006, 11:35 PM
You can get 99 saved.
And 100 saved 1/2 the time.

guesswest
05-10-2006, 11:37 PM
I don't get why not 100?

chezlaw
05-10-2006, 11:38 PM
[ QUOTE ]
You can get 99 saved.
And 100 saved 1/2 the time.

[/ QUOTE ]
Not at 4am you can't

chez

DougShrapnel
05-10-2006, 11:40 PM
[ QUOTE ]
I don't get why not 100?

[/ QUOTE ]Run the plan by me again?

guesswest
05-10-2006, 11:43 PM
Well - the guy at the back deduces his own hat by ruling out the 99 he sees. And everyone else does the same with a combination of visible hats/ones they've heard called out, finally the last guy knows his own hat because he's heard what the other 99 are. No?

DougShrapnel
05-10-2006, 11:45 PM
[ QUOTE ]
[ QUOTE ]
You can get 99 saved.
And 100 saved 1/2 the time.

[/ QUOTE ]
Not at 4am you can't

chez

[/ QUOTE ]Ok, I'll just give the answer. The guy at the end of the line count's up all the white hats. If it's even he guesses that his hat is white. If it's odd he guess that his hat is black. The next guy now knows what color his own hat is, and down the line.

Guesswest, the guy at the back has no way to know what color his hat is.

chezlaw
05-10-2006, 11:45 PM
[ QUOTE ]
Well - the guy at the back deduces his own hat by ruling out the 99 he sees. And everyone else does the same with a combination of visible hats/ones they've heard called out, finally the last guy knows his own hat because he's heard what the other 99 are. No?

[/ QUOTE ]
i know i should be asleep but I'm confused.

Suppose the guy at the back sees everyone wearing a black hat (unlikely but possible). now what?

chez

guesswest
05-10-2006, 11:48 PM
My understanding was that he could see everyone in front of him. Did I misread?

DougShrapnel
05-10-2006, 11:51 PM
[ QUOTE ]
Who gets to wear the grey hat?

And - my understanding was that he could see everyone in front of him. Did I misread?

[/ QUOTE ] Yeah he can see, but he is 1st to call out. It's indy variable, so his odds don't change at all.

If you like these sort of things. Here is a bunch
riddles (http://www.azillionmonkeys.com/qed/puzzles.html)

guesswest
05-10-2006, 11:54 PM
OK sorry if I'm being really stupid here, I'm sure I'm making the mathematicians cringe. But guy at the back looks forward and sees 65 black hats, he knows he has a black hat? No? He has odds but why is he concerning himself with them?

chezlaw
05-10-2006, 11:54 PM
[ QUOTE ]
[ QUOTE ]
[ QUOTE ]
You can get 99 saved.
And 100 saved 1/2 the time.

[/ QUOTE ]
Not at 4am you can't

chez

[/ QUOTE ]Ok, I'll just give the answer. The guy at the end of the line count's up all the white hats. If it's even he guesses that his hat is white. If it's odd he guess that he has is black. The next guy now knows what color his own hat is, and down the line.

[/ QUOTE ]
Thanks.

The first guy has a problem if he should guess white. He can double his chances of survival by guessing black. the arrangemnt should be as you suggest plus a promise to kill the first person if he survives by cheating.

chez

Jshuttlesworth
05-10-2006, 11:56 PM
each hat has a probability 2/3 of being black, not "2/3 of the hats are black"

guesswest
05-11-2006, 12:01 AM
[ QUOTE ]
each hat has a probability 2/3 of being black, not "2/3 of the hats are black"

[/ QUOTE ]


/images/graemlins/blush.gif /images/graemlins/blush.gif /images/graemlins/blush.gif

DougShrapnel
05-11-2006, 12:01 AM
[ QUOTE ]
OK sorry if I'm being really stupid here, I'm sure I'm making the mathematicians cringe. But guy at the back looks forward and sees 65 black hats, he knows he has a black hat? No? He has odds but why is he concerning himself with them?

[/ QUOTE ]So you flip a coin 7 times. 3 times it's heads and 4 times it's tails. By your reasoning the 8th flip is always heads. Do you think that is correct?

guesswest
05-11-2006, 12:01 AM
Of course not - I misread the question

Do I win 2+2 retard of the year award?

bunny
05-11-2006, 12:31 AM
I think you're a loooong way down the list.