100 prisoners are put into solitary cells. There's a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his or her own cell. Every day, 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 or she 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 and inducted into MENSA, since the world can always use more smart people. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.
The prisoners are allowed to get together one night, to discuss a plan. What plan should they agree on, so that eventually, someone will make a correct assertion?
On the night of their meeting they could agree on a tiny standard measurement. For example, they could each agree to toggle the lightbulb just by the thickness of the fabric of their prision uniforms on their first visit and only on their first visit.
lets call the thickness of the fabric 'x'
each subsequent prisioner to vist would know how many prisioners had been in the room based on how many times the lightbulb had been turned by a unit of x. for example 3x would mean 3 prisioners had been in the rom. 99 x would mean 99 prisioners had been in the room.
now to be sure they should agree that the first prisioner would turn the lightbulb as tight as possible and then all subsequent prisioners would turn the lightbulb slightly looser. when the lightbulb has been turned looser by 99x. the prisioner would know that everyone else had been in the room and could declare themselves free.
Posted by vivek
on 2008-06-10 19:36:08