Rahul Mehta Gandhinagar LsCandidate
Logic \ Maths problem (nothing to do with politics)
.
Problem-1 :
.
There were 100 prisoners P1 P2 ... P100
.
The prison warden told them following
.
(1) Tomorrow , all of you will be stand a line in order P1 to P100.. And Warden will put red hat or black hat on each prisoner's heads AT RANDOM. All can be red, all can be white --- any of the 2^n combination may come.
.
(2) P1 will face wall and see no one's hats.
.
P2 will see hat of P1 and no one else.
.
P3 will see hats of P2 and P1 and no one else
.
P4 will see hats of P3, P2, P1 and no one else
.
P100 will see hats of all
.
In general, a prisoner K will see hats of P1 to P(K-1) i.e. all prisoners before him and not his hat and hats of prisoners after him
.
(3) Warden will first ask P100 , the last prisoner, who sees hats of all except him. -- " whats the color of your hat". The prisoner can LOUDLY say, but say ONLY of two words "red" or "black" and NOTHING else, If he is correct, he lives and if he is wrong, he dies. But none of other prisoners will know that he has died or lived. But all prisoners will hear what he said.
.
Next , Warden will ask Y, then X and then finally A .
.
So all prisoners know what all prisoners in line after him said, along with their number.
.
---
,
Now prisoners are locked in room before hat putting starts. They can discuss a strategy.
.
----
.
What strategy do you propose so that number deaths are minimized.
.
The warden will NOT know what strategy they have made. And in any case, warden will put hats at random
.
==============
.
Problem-2 :
.
Now in a harder version of this puzzle, say warden is snooping and prisoners know that warden is snooping and prisoners know that warden will know the strategy prisoners have made. And warden is free to decide which color to put on whose heads. (i.e. NOT random hat picking as previous case). Then what strategy should prisoners make?
.
===============
.
Problem-3
.
Consider problem-1. Say it is known that half the prisoners will have red hats and half will have white hat. Then what strategy should prisoners take?