Register free in 2 easy steps
Forgot Password

Here is the Solution

 

Free the Prisoners

100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected more than once), into a special room with a light bulb and a switch which controls the bulb. No other prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb, turn off the bulb or do nothing. On any day, the prisoners can stop this process and say "Every prisoner has been in the special room at least once". If that happens to be true, all the prisoners will be set free. If it is false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a solution. How do they ensure they all go free?

SOLUTION : They all select one prisoner say, Steve.

Every time any prisoner is selected other than Steve, they follow these steps. If they have never turned on the light bulb before and the light bulb is off, they turn it on. If not, they donít do anything. Now if Bob is selected and the light bulb is already on, he adds one to his count and turns off the bulb. If the bulb is off, he does nothing. The day his count reaches 99, he calls the warden and tells him "Every prisoner has been in the special room at least once".

If his count has reached 99, it means 99 persons other than him have been through this room that makes a total of 100.

Back to all the Puzzles