Three prisoners stand in a single file line facing a wall. They are shown 5 hats (3 black, 2 white) before being blindfolded. Each is given one hat, and the rest are hidden. P3 (back) sees P2 and P1. P2 (middle) sees P1. P1 (front) sees no one. P3 is asked if he knows his hat color and says 'No'. P2 hears this, is asked, and also says 'No'. P1 then correctly announces his hat color. What color is P1's hat?
Black.
P3 would only know his color if he saw two white hats in front of him. P3 saying 'No' means at least one of P2 or P1 has a black hat. P2 realizes that if P1 had a white hat, P2's own hat would have to be black for P3 to be unsure. Because P2 also said 'No', P1 deduces that his own hat cannot be white, so it must be black.
About this riddle
Logic riddles give you a few facts and ask what must be true. List what you know, cross out what cannot be, and see what is left.
Difficulty: Hard. More like this: Logic riddles with answers or try Einstein's Logic Grid for a different kind of puzzle.
More logic riddles
You enter a room with three light switches on the wall, all currently in the OFF position. Through a closed door are three light bulbs in another room, corresponding to each switch. You can flip the switches however you like, but you may only open the door and look at the bulbs once. How can you determine which switch operates which bulb?
A password consists of four different non-zero digits. The sum of the first two digits equals the sum of the last two digits. The first digit is three times the fourth digit. The second digit is an even number greater than 5. What is the password?
Five friends line up for a ride at the fair, and the sign lists only these facts. Aria stands ahead of Luca. Nico stands ahead of Hugo. Hugo stands ahead of Aria. Felix stands ahead of Nico. Who stands first in line?
I am an invisible barrier that can stop a speeding train if placed correctly, yet a butterfly can pass through me without slowing down. I have no mass, no height, and no width. What am I?
A master thief leaves a note at a crime scene containing four numbers: 3, 5, 4, and 2. The detective looks at the numbers and immediately states the next number in the sequence is 11. What is the secret rule behind this sequence?
A shepherd needs to cross a river with a wolf, a goat, and a cabbage. However, his boat can only hold himself and one item at a time. If left alone, the wolf eats the goat, and the goat eats the cabbage. How can the shepherd cross safely in the fewest round trips?

