Friday, August 30, 2013

100 Prisoners - Set Free or Hanged Challenge

Suppose there are 100 prisoners. They all are in the prison in solitary cells. The jailor/admin of the prison offered them a challenge. He says that he will put one prisoner per day, selected randomly into a special room with a light bulb and a switch which controls the bulb.

A prisoner can be selected more than once.
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 good day the prisoners can feel winning and stop this process and say that every prisoner has been in that special electrical room at least once.

If that happens to be true, all the prisoners will be set free. But if it is false, then all the prisoners will be executed.

What should the prisoners do to win the challenge and come out!!
(PS: Police should take ownership that they wont do the crime again. Hehehe)

1 comment:

  1. At the beginning, the prisoners select a leader. Whenever a person (with the exception of the leader) comes into a room, he turns the lights on (but he does this only once). If the lights are already on, he does nothing. When the leader goes into the room, he turns off the lights. When he will have turned off the lights 99 times, he is 100% sure that everyone has been in the room