The puzzle:
The prison guard informs the prisoners that tomorrow they will play a
game. The prisoners will be lined up, single file, so each can see
all the prisoners in front of him, but none of those behind him. A
small hat, either blue, green, or red, will then be placed on each
prisoner's head, and the guard, starting at the back of the line, will
ask each man in turn to state the color of the hat on his head. If the
prisoner answers correctly, he is freed, but otherwise he is shot on
the spot. The prisoners have a day to plan a strategy for saving the
maximum number of lives. What's the best they can do?
Cheesy solutions aren't allowed: each prisoner must say "blue",
"green", or "red" only, and varying the way the color is said (volume,
speed, etc.) as a way of codifying information is out; no mirrors, no
peeking; there can be any number of each color of hat--no assumptions
may be made about the probability distribution of colors.
I have a solution in which at most two prisoners die:
The last prisoner in line says "blue" if the number of blue hats he
sees, not including the guy right in front of him (the second-to-last
in line), is even, and "green" if the number of blue hats is odd. The
second-to-last prisoner then uses a similar code to let the rest of
the prisoners know whether the number of green hats he sees is even or
odd. The third-to-last prisoner can then count the number of blue and
green hats he sees. If both have the same parity as that seen by the
first two prisoners, then his hat is red, but if the parity of one of
the two colors is different, then his hat is that color. Once he
hears the third guy's color, the fourth guy can do a similar
calculation to get his hat color, and so on all the way to the front
of the line.
My question:
A friend of mine claims to have a solution in which only at most one
prisoner dies, but he won't tell me what it is. Does such a solution
exist?
I am not offering a large question fee, so I assume if this question
is answered, it will either be by someone who is familiar with the
puzzle, or who enjoys this type of puzzle enough that poor pay isn't
an issue. |