Hats puzzle

Hats puzzle

Posers and Puzzles

Cookies help us deliver our Services. By using our Services or clicking I agree, you agree to our use of cookies. Learn More.

V

Joined
08 Oct 05
Moves
723
09 Oct 05

Maybe you have heard it but here goes.
A group of prisoners are made into a line. Queue style. Each then has a hat placed on thier head. The hats are either black or white. The guard then asks the back person what colour his hat is then the second back person etc all the way down to the front person. Those who get the colour of thier hat right are set free those who get it wrong are put back in jail for life,shot, tortured etc. The one savng grace for these poor bastards is that they get to discuss stratergy beforehand.
They can see the hats of everyone in front of them but noone behind them.

What is thier optimal statergy? No tricks like Substituing it's black for black if the guy in front has a white hat.

Best of luck

f

Joined
01 May 05
Moves
390
09 Oct 05
2 edits

Originally posted by Virak
Maybe you have heard it but here goes.
A group of prisoners are made into a line. Queue style. Each then has a hat placed on thier head. The hats are either black or white. The guard then asks the back person what colour his hat is then the second back person etc all the way down to the front person. Those who get the colour of thier hat right are set free th ...[text shortened]... cks like Substituing it's black for black if the guy in front has a white hat.

Best of luck
How many hats are there (if there's a finite number)?



P.S: If the hats are infinite the strategy must be clever...

Joined
26 Apr 03
Moves
26771
09 Oct 05

Originally posted by Virak
Maybe you have heard it but here goes.
A group of prisoners are made into a line. Queue style. Each then has a hat placed on thier head. The hats are either black or white. The guard then asks the back person what colour his hat is then the second back person etc all the way down to the front person. Those who get the colour of thier hat right are set free th ...[text shortened]... cks like Substituing it's black for black if the guy in front has a white hat.

Best of luck
My puzzle, same except hats are Black, Red, Orange, Yellow, Green, Blue, Indigo , Violet and White. Prisoners are clever can discuss strategy beforehand and want to ensure that most of them will succeed. What is their strategy?

Insanity at Masada

tinyurl.com/mw7txe34

Joined
23 Aug 04
Moves
26660
09 Oct 05

Originally posted by Virak
Maybe you have heard it but here goes.
A group of prisoners are made into a line. Queue style. Each then has a hat placed on thier head. The hats are either black or white. The guard then asks the back person what colour his hat is then the second back person etc all the way down to the front person. Those who get the colour of thier hat right are set free th ...[text shortened]... cks like Substituing it's black for black if the guy in front has a white hat.

Best of luck
I have heard this before, but I am not sure if I remember the solution.

The guy in the back has no way of improving his own chances. However he can save the guy in front of him by promising to guess the color that the guy in front of him has. When it's the second guy's turn, he guesses the same color as the one behind him. However, he will do it in one of two ways. If it's the same color as the guy in front of HIM, he'll say it in a normal voice. If it's the other color, then he'll shout it in a funny voice. This way he can both save himself and still communicate to the guy in front of him what that hat color is.

Insanity at Masada

tinyurl.com/mw7txe34

Joined
23 Aug 04
Moves
26660
09 Oct 05

Originally posted by iamatiger
My puzzle, same except hats are Black, Red, Orange, Yellow, Green, Blue, Indigo , Violet and White. Prisoners are clever can discuss strategy beforehand and want to ensure that most of them will succeed. What is their strategy?
For this variation, the same strategy is used, but there are more ways the prisoners can say their answer. For example, the back guy sees the 2nd guy has a Red hat. So he says "Red". If the 2nd guy sees that the 3rd guy has an Indigo hat, he'll say "Red" but shout it. If the 3rd guy sees the 4th guy has a White hat, he'll say "Indigo" but sing the answer. If the 4th guy sees the 5th guy has a Yellow hat, he'll say "White" but in a growly voice. The answer is the person's own hat, but the voice used communicates the next hat.

f

Joined
01 May 05
Moves
390
09 Oct 05

Originally posted by AThousandYoung
I have heard this before, but I am not sure if I remember the solution.

The guy in the back has no way of improving his own chances. However he can save the guy in front of him by promising to guess the color that the guy in front of him has. When it's the second guy's turn, he guesses the same color as the one behind him. However, he will do ...[text shortened]... e can both save himself and still communicate to the guy in front of him what that hat color is.
Well, is that considered a trick?

Insanity at Masada

tinyurl.com/mw7txe34

Joined
23 Aug 04
Moves
26660
09 Oct 05
1 edit

Originally posted by fetofs
Well, is that considered a trick?
According to the way the question is asked, it sounds like it is a trick. I didn't understand that sentence at first.

If you can't use tricks like that, then how do you communicate anything to the guy in front of you? Without some sort of trick like that I don't think it's possible.

I guess without tricks, the answer would be that you count the number of hats in front of you, and then answer whichever color is greater (if you're the guy in back). Then the rest have a >50% chance of being right by giving the same answer.

f

Joined
01 May 05
Moves
390
09 Oct 05

Originally posted by AThousandYoung
According to the way the question is asked, it sounds like it is a trick. I didn't understand that sentence at first.

If you can't use tricks like that, then how do you communicate anything to the guy in front of you? Without some sort of trick like that I don't think it's possible.

I guess without tricks, the answer would be that you cou ...[text shortened]... re the guy in back). Then the rest have a >50% chance of being right by giving the same answer.
Not so sure about that...

Insanity at Masada

tinyurl.com/mw7txe34

Joined
23 Aug 04
Moves
26660
09 Oct 05

Originally posted by fetofs
Not so sure about that...
About what?

f

Joined
01 May 05
Moves
390
09 Oct 05

Originally posted by AThousandYoung
About what?
They can communicate normally, although they would have to do so by some sort of code proposed in the meeting before (but now that seems like a trick to me too)

B
Non-Subscriber

RHP IQ

Joined
17 Mar 05
Moves
1345
09 Oct 05

Oh, no. Not again.

c

Phoenix, AZ

Joined
24 Sep 05
Moves
379
10 Oct 05

Originally posted by Virak
Maybe you have heard it but here goes.
A group of prisoners are made into a line. Queue style. Each then has a hat placed on thier head. The hats are either black or white. The guard then asks the back person what colour his hat is then the second back person etc all the way down to the front person. Those who get the colour of thier hat right are set free th ...[text shortened]... cks like Substituing it's black for black if the guy in front has a white hat.

Best of luck
Here's my brilliant solution: Each prisoner just takes off his hat and looks at it 😀! You never said that wasn't allowed...

V

Joined
08 Oct 05
Moves
723
10 Oct 05

OK here is the solution.
The back guy can't impove his chances. He says white if he sees an even number of white hats black if he sees an odd number of white hats. The 2nd back guy then knows his hat colour and states it CORRECTLY. The 3rd back guy then knows the 2nd back guys colour (can effectively see it) and using the back guys answer is in the same place the second to last back guy was in.
This continues and they are all fine.

For multiple hat colour (say n colours), lable each colour as 0,1,2,3,4,...,n-1 The back guy adds up alll the hats in front of him (gets x) then divides x by n and says the remainder. Everyone ese can then work out thier hat colour.

X
Cancerous Bus Crash

p^2.sin(phi)

Joined
06 Sep 04
Moves
25076
10 Oct 05

Originally posted by Virak
OK here is the solution.
The back guy can't impove his chances. He says white if he sees an even number of white hats black if he sees an odd number of white hats. The 2nd back guy then knows his hat colour and states it CORRECTLY. The 3rd back guy then knows the 2nd back guys colour (can effectively see it) and using the back guys answer is in the same place the second to last back guy was in.
This continues and they are all fine.
This makes no sense. How does the second to back guy go from whether there are an odd number of white hats to what his hat colour is?

Insanity at Masada

tinyurl.com/mw7txe34

Joined
23 Aug 04
Moves
26660
10 Oct 05

Originally posted by Virak
OK here is the solution.
The back guy can't impove his chances. He says white if he sees an even number of white hats black if he sees an odd number of white hats. The 2nd back guy then knows his hat colour and states it CORRECTLY. The 3rd back guy then knows the 2nd back guys colour (can effectively see it) and using the back guys answer is in the same plac ...[text shortened]... x) then divides x by n and says the remainder. Everyone ese can then work out thier hat colour.
Xanthos is right. Your solution is utterly false.