content-image

Puzzles of the Week

Who We Are

Previous Next

Prisoners with Hats

To celebrate a special occasion, a prison offered to let some prisoners go free if they could pass a test.

The prison had a very large collection of small hats of two colors – say, black and white. On the day of the test, three prisoners were selected and lined up blindfolded facing toward the front of the line. A small colored hat was placed on each prisoner and then the blindfolds were removed. Each prisoner could see all the hats of the prisoners in front of them, but they could not see their own hat or any of the hats behind them.

During the test, the last prisoner in line says a hat color. If that was their hat color, they are set free. Otherwise, they go back to prison. Each prisoner can hear each answer behind them before they give their own answer. No hints to other prisoners were allowed in the tone or manner that each answer was given.

All these rules were made clear to the prisoners the day before the test, and they were allowed to strategize together.

THE CHALLENGE

Describe a strategy that guarantees the largest number of prisoners will go free.

EXPLORATION

How does your solution change if there are four or even five prisoners? Devise a strategy that works for any number of prisoners.