Every prisoner can see the hats of the people in front but not their own hat, or the hats worn by anyone behind. A prison guard, starts at the back of the line and asks each prisoner the colour of their hat. If they answer correctly, they will be pardoned, if they get it wrong, they’ll be executed.
What is the problem in the hat?
The prisoners are donned with either a black hat or a white hat and, while they cannot see their own hat, they can see the remaining hats. The two colors are equally likely. The prisoners play as a team and win when at least one prisoner guesses the color of his or her own hat without any incorrect guesses being made.
Why mathematicians now care about their hat color?
If the two hats are different colors, he passes. If they are the same color, the player guesses his own hat is the opposite color. This way, every time the hat colors are distributed two and one, one player will guess correctly and the others will pass, and the group will win the game.
Can a player see the colour of another player’s hat?
Players can see the colours of at least some other players’ hats, but not that of their own. With highly restricted communication or none, some of the players must guess the colour of their hat. The problem is to find a strategy for the players to determine the colours of their hats based on the hats they see and what the other players do.
Do you know that there are only two hats of each color?
The prisoners know that there are only two hats of each color. So if D observes that B and C have hats of the same color, D would deduce that his own hat is the opposite color. However, if B and C have hats of different colors, then D can say nothing.
How many black and three white hats are required?
In another variant, only three prisoners and five hats (supposedly two black and three white) are involved. The three prisoners are ordered to stand in a straight line facing the front, with A in front and C at the back. They are told that there will be two black hats and three white hats.
Who is wearing the off color hat in the trivial case?
There are two cases: in the trivial case, one of the three prisoners wears the single off-color hat. Each of the other two prisoners can see that one prisoner is wearing the off-color hat. In the non-trivial case, the three prisoners wear hats of the same color, while A wears the off-color hat.