PROBLEM: Prisoners and hats?

Problem Description

There are 100 prisoners all sentenced to
death. One night before the execution, the warden gives them a chance
to live if they all work on a strategy together. The execution scenario
is as follows –

On the day of execution, all the prisoners will be made to stand in a straight line such that one prisoner stands just behind another and so on. All prisoners will be wearing a hat either of Blue colour or Red. The prisoners don’t know what colour of hat they are wearing. The prisoner who is standing at the last can see all the prisoners in front of him (and what color of hat they are wearing). A prisoner can see all the hats in front of him. The prisoner who is standing in the front of the line cannot see anything.

The executioner will ask each prisoner what color of hat they are wearing one by one, starting from the last in the line. The prisoner can only speak “Red” or “Blue”. He cannot say anything else. If he gets it right, he lives otherwise he is shot instantly. All the prisoners standing in front of him can hear the answers and gunshots.

Assuming that the prisoners are
intelligent and would stick to the plan, what strategy would the
prisoners make over the night to minimize the number of deaths?

P.S –  I want you to try solving them before checking the solution. Do share your logic & solutions in the comments. I’d love to see how uniquely can someone think!

Leave a Reply

Your email address will not be published. Required fields are marked *