Can You Solve the Prisoner Hat Riddle?

YouTube // TED-Ed
YouTube // TED-Ed | YouTube // TED-Ed

If you like brain teasers, we've got a doozy for you. In this TED-Ed lesson, Alex Gendler walks us through the "prisoner hat riddle," a classic puzzle. In this version, you and nine other humans have been abducted by aliens. The aliens would like to eat you all, but not if you can prove your intelligence. So they propose a test.

The aliens line you up, placing you in order of height (tallest in the back, shortest in front), and place black or white hats on each of you. You must face forward, and you mustn't look at your own hat. Starting with the person in the back, each person must say a single word: "black" or "white" to guess the color of the hat on his or her own head, despite not being able to see it. If nine of you get it right, you live. If you don't, you're lunch. The good news? You get to talk it through as a group first.

This is a classic puzzler because it requires the group to devise a way to signal hat-color information without directly saying it. I'll admit, I watched the setup, paused the video, and thought about it a bit. I did not solve this riddle. Can you? (The answer is explained after about 90 seconds of setup.)

You can read more about this lesson from TED-Ed. If you like this kind of puzzle, you need to check out their Math in Real Life video series.