Wednesday, September 21, 2011

PUZZLE: Found this on a website. How many prisoners can you save?

Before we begin, Akshay you already know this, so don't answer.

In a land far far away there is a sadist and he happened to be the jailer of a prison. There are 20 peasants arrested on false charges and going to be executed tomorrow. The jailer, the sadist he is, decides to give a glimmer of hope to the prisoners to torture them further.

The jailer tells the prisoners that all them will be made to stand in a row, and a hat will be put on the heads of each of them. It will either be RED or BLACK. Each guy can see the hats of all those in front him. Then they will be asked to guess the color of the hat on their head, if they answer correctly they will be free to go, otherwise they will be shot. The peasants have until tomorrow to come up with a plan/algorithm such that the maximum number of them can be saved.

How many can you save?

Hint: The optimal method can save 19 


No comments: