2
$\begingroup$

I saw this riddle ealier today on 9GAG (and it's found on multiple news sites), Im not quite sure about the answer, but i'm wondering if someone can solve it.

100 prisoners are lined up by an executioner, who places a red or blue hat upon each of their heads. The prisoners can see the hats of the people lined up in from of them, but they cannot look at the hats behind them, or at their own. Starting at the back of the line, the executioner asks the last prisoner to state the colour of his hat. In order to live, the prisoner must answer correctly. If he doesn't, he is killed 'instantly and silently.' This means that the other prisoners will hear the answer, but will not know whether or not it was correct. The night before the line-up, the prisoners can discuss a strategy to help them survive. What should they do?

$\endgroup$
1
  • $\begingroup$ @IvoBeckers You are correct, I hadn't seen this post. The only difference is the context (and the number of hats) $\endgroup$ Mar 11, 2016 at 12:28

1 Answer 1

3
$\begingroup$

The first prisoner has a 50% chance of surviving. On the night before, they can choose a hat color to begin with and colors to be odd or even. So say they say odd = blue and red = even and they begin with blue. If the first prisoner sees a odd number of blue hats, he/she says "blue" and vice versa. Then if the second prisoner also sees an odd number of hats, then he/she will know that his/her hat is red. Then if the third prisoner sees an even number of blue hats, they'll know that his/her hat is blue. And so on. But good luck to the first prisoner! This answer is partly from http://ed.ted.com/lessons/can-you-solve-the-prisoner-hat-riddle-alex-gendler .

$\endgroup$
2
  • 1
    $\begingroup$ The better version of the riddle states that if 1 or 0 prisoners say the wrong hat colour all prisoners get to live and if 2 or more say the wrong hat number all prisonders will die. So the 50/50 for the first prisoner does not impact the solution to be wrong. $\endgroup$ Mar 11, 2016 at 12:37
  • $\begingroup$ Yes, in the video I included, it also allows one mistake. $\endgroup$
    – mbjb
    Mar 11, 2016 at 12:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.