100 Prisoners and a Light bulb

Problem:

There are 100 prisoners are in solitary cells, unable to see, speak or communicate in any way with each other. There’s a central living room with one light bulb, the bulb is initially off. No prisoner can see the light bulb from his own cell. Everyday, the warden picks a prisoner at random, and that prisoner goes to the central living room. While there, the prisoner can toggle the bulb if he wishes. Also, the prisoner has the option of asserting the claim that all 100 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven’t been to the living room), all 100 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.

Before the random picking begins, the prisoners are allowed to get together to discuss a plan.  What plan should they agree on, so that eventually, someone will make a correct assertion?

light-bulb-100-prisoner-350x250

Solution:

In evaluation of the problem, there is no limit on the number of times that a prisoner can go into the cell, however the prisoners need a way to communicate with each other on who when into the cell.  Therefore one person is chosen as the counter.

Every time any prisoner is selected other than counter person , 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 (simple as that).
Now if Counter person 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 just sits and do 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”.

.

3 Thoughts on “100 Prisoners and a Light bulb

  1. Ashok Kumar Rajpurohit on October 16, 2013 at 8:50 am said:

    if a prisoner is going to the first time to the cell he will toggle the bulb else he will just sit and come back so every prisoner can keep the count how many times the switch was toggled. when 100th prisoner go to the cell he know that all others have already been to the room so he can call to the warden and tell him.

  2. Ash Hacker on November 4, 2013 at 12:53 pm said:

    If a bulb is initially switch on then it will surely make the prisoners shot death.
    As counter increases by on at last 100 position one goes to call the warden..

  3. Nayanika Ghosh on February 21, 2015 at 9:11 pm said:

    perhaps the warden never choose the counter person….in that duration may be 99 prisoners have been to the cell many time,while the first one would have only turned on yhe bulb…In that case…the prisoners will be never freed?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation