Tuesday, July 8, 2008
50 Prisoners and Hats
A king has fifty prisoners. He decides to play a game to give them a chance to win their freedom. The next day, he will line up the prisoners in a straight line, all facing the same direction. He will then place either a white hat or a black hat on each of their heads. There is no pattern to how he will place the hats and there is no known set number of each color hat. He could choose any number of black hats and any number of white hats, as long as each prisoner has a hat on his head. Once in a line, the prisoner at the back can see all the hats in front of him, and the prisoner in the front can not see any of the hats. The king will start at the back and allow the last prisoner to guess his hat color. He can only say "white" or "black", and he can not signal with timing, pitch, hand motions, etc. Only "white" or "black" in a monotone voice, or they will all be killed. If the prisoner guesses correctly, he will be set free. If not, he will be killed and the king will move forward to the next prisoner in line. He will continue this way all the way down until all the prisoners have attempted to guess their hat color. During the exercise, each prisoner can hear what happens to all the prisoners behind him (whether each lives or dies). The night before, the prisoners meet together and come up with a strategy where at MOST, one of them will die. What is this strategy that guarantees to save at least 49 of them?
Subscribe to:
Post Comments (Atom)
1 comment:
ANSWER:
The prisoners decide they are going to keep track of black hats. The person in the back (who can see all the hats in front of him and who has to guess his hat color first), will say "black" if he sees an even number of black hats and "white" if he sees an odd number of black hats. He is the one who may die, depending on what his hat color is. Everyone in front of him can count the number of black hats in front of them and pay attention to what people behind them say in order to get their own hat color
Post a Comment