full transcript
#### From the Ted Talk by Alex Gendler: Can you solve the prisoner hat riddle?

## Unscramble the Blue Letters

You and nine other individuals have been cetauprd by speur ietlninlget alien overlords. The aliens think humans look quite tasty, but their citoiivzilan forbids einatg hglhiy logical and cooperative beings. Unfortunately, they're not sure whether you qafliuy, so they decide to give you all a test. Through its universal torsalatnr, the alien guarding you tlels you the following: You will be placed in a single-file line fincag forward in size order so that each of you can see everyone lined up ahead of you. You will not be able to look behind you or step out of line. Each of you will have either a black or a white hat on your head assigned randomly, and I won't tell you how many of each color there are. When I say to begin, each of you must guess the color of your hat sttinrag with the person in the back and moving up the line. And don't even try saying words other than blcak or white or signaling some other way, like intonation or volume; you'll all be eaten immediately. If at least nine of you guess correctly, you'll all be spared. You have five mueitns to discuss and come up with a plan, and then I'll line you up, assign your hats, and we'll begin. Can you think of a strategy guaranteed to save everyone? Pause the video now to figure it out for yourself. aenwsr in: 3 Answer in: 2 Answer in: 1 The key is that the person at the back of the line who can see everyone else's hats can use the words "black" or "white" to communicate some coded information. So what manieng can be agsinsed to those words that will allow everyone else to deduce their hat colors? It can't be the total number of black or white hats. There are more than two possible values, but what does have two possible values is that number's parity, that is whether it's odd or even. So the solution is to arege that whoever goes first will, for example, say "black" if he sees an odd number of black hats and "white" if he sees an even number of black hats. Let's see how it would play out if the hats were distributed like this. The tallest captive sees three black hats in front of him, so he says "black," telling everyone else he sees an odd number of black hats. He gets his own hat color wrnog, but that's okay since you're collectively allowed to have one wrong answer. Prisoner two also sees an odd number of black hats, so she knows hers is wihte, and answers correctly. prioesnr three sees an even number of black hats, so he knows that his must be one of the black hats the first two prisoners saw. Prisoner four hears that and knows that she should be looking for an even number of black hats since one was behind her. But she only sees one, so she deduces that her hat is also black. Prisoners five through nine are each looking for an odd number of black hats, which they see, so they figure out that their hats are white. Now it all comes down to you at the front of the line. If the ninth prisoner saw an odd number of black hats, that can only mean one thing. You'll find that this strategy wrkos for any possible amnanreregt of the hats. The first prisoner has a 50% chance of giving a wrong answer about his own hat, but the pratiy information he conveys allows everyone else to gseus theirs with absolute certainty. Each begins by expecting to see an odd or even nmbuer of hats of the specified color. If what they count doesn't match, that means their own hat is that cloor. And everytime this happens, the next person in line will switch the parity they expect to see. So that's it, you're free to go. It looks like these ainels will have to go hgnury, or find some less logical organisms to abduct.
## Open Cloze

You and nine other individuals have been **________** by **_____** **___________** alien overlords. The aliens think humans look quite tasty, but their **____________** forbids **______** **______** logical and cooperative beings. Unfortunately, they're not sure whether you **_______**, so they decide to give you all a test. Through its universal **__________**, the alien guarding you **_____** you the following: You will be placed in a single-file line **______** forward in size order so that each of you can see everyone lined up ahead of you. You will not be able to look behind you or step out of line. Each of you will have either a black or a white hat on your head assigned randomly, and I won't tell you how many of each color there are. When I say to begin, each of you must guess the color of your hat **________** with the person in the back and moving up the line. And don't even try saying words other than **_____** or white or signaling some other way, like intonation or volume; you'll all be eaten immediately. If at least nine of you guess correctly, you'll all be spared. You have five **_______** to discuss and come up with a plan, and then I'll line you up, assign your hats, and we'll begin. Can you think of a strategy guaranteed to save everyone? Pause the video now to figure it out for yourself. **______** in: 3 Answer in: 2 Answer in: 1 The key is that the person at the back of the line who can see everyone else's hats can use the words "black" or "white" to communicate some coded information. So what **_______** can be **________** to those words that will allow everyone else to deduce their hat colors? It can't be the total number of black or white hats. There are more than two possible values, but what does have two possible values is that number's parity, that is whether it's odd or even. So the solution is to **_____** that whoever goes first will, for example, say "black" if he sees an odd number of black hats and "white" if he sees an even number of black hats. Let's see how it would play out if the hats were distributed like this. The tallest captive sees three black hats in front of him, so he says "black," telling everyone else he sees an odd number of black hats. He gets his own hat color **_____**, but that's okay since you're collectively allowed to have one wrong answer. Prisoner two also sees an odd number of black hats, so she knows hers is **_____**, and answers correctly. **________** three sees an even number of black hats, so he knows that his must be one of the black hats the first two prisoners saw. Prisoner four hears that and knows that she should be looking for an even number of black hats since one was behind her. But she only sees one, so she deduces that her hat is also black. Prisoners five through nine are each looking for an odd number of black hats, which they see, so they figure out that their hats are white. Now it all comes down to you at the front of the line. If the ninth prisoner saw an odd number of black hats, that can only mean one thing. You'll find that this strategy **_____** for any possible **___________** of the hats. The first prisoner has a 50% chance of giving a wrong answer about his own hat, but the **______** information he conveys allows everyone else to **_____** theirs with absolute certainty. Each begins by expecting to see an odd or even **______** of hats of the specified color. If what they count doesn't match, that means their own hat is that **_____**. And everytime this happens, the next person in line will switch the parity they expect to see. So that's it, you're free to go. It looks like these **______** will have to go **______**, or find some less logical organisms to abduct.
## Solution

- hungry
- wrong
- intelligent
- civilization
- translator
- aliens
- facing
- guess
- answer
- captured
- super
- number
- highly
- parity
- tells
- prisoner
- eating
- white
- works
- arrangement
- color
- agree
- minutes
- starting
- qualify
- assigned
- meaning
- black

## Original Text

You and nine other individuals have been captured by super intelligent alien overlords. The aliens think humans look quite tasty, but their civilization forbids eating highly logical and cooperative beings. Unfortunately, they're not sure whether you qualify, so they decide to give you all a test. Through its universal translator, the alien guarding you tells you the following: You will be placed in a single-file line facing forward in size order so that each of you can see everyone lined up ahead of you. You will not be able to look behind you or step out of line. Each of you will have either a black or a white hat on your head assigned randomly, and I won't tell you how many of each color there are. When I say to begin, each of you must guess the color of your hat starting with the person in the back and moving up the line. And don't even try saying words other than black or white or signaling some other way, like intonation or volume; you'll all be eaten immediately. If at least nine of you guess correctly, you'll all be spared. You have five minutes to discuss and come up with a plan, and then I'll line you up, assign your hats, and we'll begin. Can you think of a strategy guaranteed to save everyone? Pause the video now to figure it out for yourself. Answer in: 3 Answer in: 2 Answer in: 1 The key is that the person at the back of the line who can see everyone else's hats can use the words "black" or "white" to communicate some coded information. So what meaning can be assigned to those words that will allow everyone else to deduce their hat colors? It can't be the total number of black or white hats. There are more than two possible values, but what does have two possible values is that number's parity, that is whether it's odd or even. So the solution is to agree that whoever goes first will, for example, say "black" if he sees an odd number of black hats and "white" if he sees an even number of black hats. Let's see how it would play out if the hats were distributed like this. The tallest captive sees three black hats in front of him, so he says "black," telling everyone else he sees an odd number of black hats. He gets his own hat color wrong, but that's okay since you're collectively allowed to have one wrong answer. Prisoner two also sees an odd number of black hats, so she knows hers is white, and answers correctly. Prisoner three sees an even number of black hats, so he knows that his must be one of the black hats the first two prisoners saw. Prisoner four hears that and knows that she should be looking for an even number of black hats since one was behind her. But she only sees one, so she deduces that her hat is also black. Prisoners five through nine are each looking for an odd number of black hats, which they see, so they figure out that their hats are white. Now it all comes down to you at the front of the line. If the ninth prisoner saw an odd number of black hats, that can only mean one thing. You'll find that this strategy works for any possible arrangement of the hats. The first prisoner has a 50% chance of giving a wrong answer about his own hat, but the parity information he conveys allows everyone else to guess theirs with absolute certainty. Each begins by expecting to see an odd or even number of hats of the specified color. If what they count doesn't match, that means their own hat is that color. And everytime this happens, the next person in line will switch the parity they expect to see. So that's it, you're free to go. It looks like these aliens will have to go hungry, or find some less logical organisms to abduct.
## Frequently Occurring Word Combinations

### ngrams of length 2

collocation |
frequency |

black hats |
6 |

odd number |
5 |

wrong answer |
2 |

## Important Words

- abduct
- absolute
- agree
- alien
- aliens
- allowed
- answer
- answers
- arrangement
- assign
- assigned
- begins
- beings
- black
- captive
- captured
- certainty
- chance
- civilization
- coded
- collectively
- color
- colors
- communicate
- conveys
- cooperative
- correctly
- count
- decide
- deduce
- deduces
- discuss
- distributed
- eaten
- eating
- everytime
- expect
- expecting
- facing
- figure
- find
- forbids
- free
- front
- give
- giving
- guaranteed
- guarding
- guess
- hat
- hats
- head
- hears
- highly
- humans
- hungry
- immediately
- individuals
- information
- intelligent
- intonation
- key
- line
- lined
- logical
- match
- meaning
- means
- minutes
- moving
- ninth
- number
- odd
- order
- organisms
- overlords
- parity
- pause
- person
- plan
- play
- prisoner
- prisoners
- qualify
- randomly
- save
- sees
- signaling
- size
- solution
- spared
- starting
- step
- strategy
- super
- switch
- tallest
- tasty
- telling
- tells
- test
- total
- translator
- universal
- values
- video
- white
- words
- works
- wrong