Problem bank
Problem 254 of 333MediumBrainteaserP254
A line of hats in three colours
100 prisoners stand in a line, all facing forward. Each wears a red, green or blue hat, assigned in any way the warden likes. Each prisoner sees every hat in front of him, but not his own or any behind him. Starting from the back of the line, each prisoner in turn says one of the three colours aloud, and everyone hears every answer. A prisoner who names the colour of his own hat is freed. The prisoners may agree on a strategy beforehand. How many can they guarantee to free?
See the hint and solution with a free account
Every problem on Quant Engine is free, with a hint and a full worked solution. Making an account takes 30 seconds and no card. Then you can see them and track what you have solved.