Jump to content

100 Hat Riddle Used By Google To Test Candidates


vatchesa

Recommended Posts

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?

For the '100 hats riddle, the best strategy will present a situation where 99 of the prisoners can be saved with 100 percent certainty, while the remaining prisoner will have a 50/50 chance of survival.

To ensure this, the prisoners must agree upon a communication protocol: the first prisoner to speak will say 'blue,' if the number of blue hats he sees in front of him is even, or 'red' if he sees otherwise.

With this information, the rest of the prisoners can figure at their own hat colours based on the hats they see in front of them, and the responses they've heard behind.

In this case, everyone except the first prisoner will definitely answer correctly, the researchers say.

Link to comment
Share on other sites

×
×
  • Create New...