Thursday, July 26, 2007

Saving The Prisoners

There are some prisoners(say 500) to whom the death sentence is annouced. But being liberal the jailar gave a chance and annouced a day before to the prisoners that
"I will keep a colored hat on your head, it will be either Red or Blue,
I will make you stand each one on the stairs (rule or clue - the top most stair guy can see all the prisoners hats and thier colors down to him, means standing one person per stair)
**Rule - No one is allowed to see their hat color but can see all others who are down to them.
I will come to each person from top stair to down and ask their hat color, if you say correct color.. .you are escaped.. else shot"

Then the prisoners gathered and decided on one strategy so that maximum people can be saved.

what is that strategy and how many prisoners can be escaped?

3 comments:

Deepak said...

But who will volunteer for the top job?

Sandeep, here also you can arrive at the theoretical maximum number you can save using info theory arguments without actually finding the strategy. [Though i figured that out only after finding the strategy]

Anoop said...

yup ... the top one is a bit risky ...
all others are lucky

Rakesh B.S said...

i agree wit deepak sir and anoop.. :D