- 09 Oct '05 20:27Maybe 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 - 09 Oct '05 20:37 / 2 edits

How many hats are there (if there's a finite number)?*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

P.S: If the hats are infinite the strategy must be clever... - 09 Oct '05 20:37

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?*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 - 09 Oct '05 20:53

I have heard this before, but I am not sure if I remember the solution.*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

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. - 09 Oct '05 20:56

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.*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?** - 09 Oct '05 21:01

Well, is that considered a trick?*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. - 09 Oct '05 21:22 / 1 edit

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

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. - 09 Oct '05 21:31

Not so sure about that...*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. - 10 Oct '05 00:24
*Originally posted by Virak*

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 - 10 Oct '05 06:50OK 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. - 10 Oct '05 08:02

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?*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. - 10 Oct '05 09:12

Xanthos is right. Your solution is utterly false.*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.