Three prisoners in a line
Three prisoners stand in a row: front, middle, back. The person at the back sees both hats ahead; the middle person sees only the front hat; the front person sees nothing. Each wears a black or white hat, cannot see their own, and cannot communicate.
If anyone guesses their own color correctly, all go free; a wrong guess means execution. The warden says: at least one hat is black.
After looking for a while, no one speaks. Then the middle prisoner says: “I know my hat color.”
What color is the middle prisoner’s hat, and why?
The middle prisoner wears a black hat.
Setup
Label the row front → middle → back. The middle prisoner sees only the front hat.
Lemma: front and middle cannot both be white
If front and middle were both white, back would see two white hats. With “at least one black,” back must be black and would announce that immediately.
The puzzle has a period of silence, then the middle person speaks—so (white, white, ?) is impossible.
Middle sees white on front
Middle sees front = white. By the lemma, middle cannot be white (else back would have spoken). So middle is black and can declare it.
Middle sees black on front
Middle sees front = black. Again middle must be black, by contradiction:
Suppose middle is white. Then the front two are black, white, and back sees (black, white).
- If back is white: only one black hat (on front)—back could deduce “I am white” at once.
- If back is black: configuration (black, white, black). Back, wearing black, sees black then white ahead and reasons: “If I were white, there would be only one black hat”—that case would have been resolved already; so I am black,” and would speak before middle.
So with front black, middle white, back would always figure out their color before middle. That contradicts middle being the first to say “I know.”
Hence middle cannot be white when front is black; middle is black.
Conclusion
Whether middle sees white or black on front, rational reasoning forces middle’s hat to be black. The initial silence rules out (white, white, *) and (black, white, *) with back speaking first; middle then concludes: my hat is black.