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?
(From http://www.ocf.berkeley.edu/~wwu/riddles/intro.shtml)
(In reply to
re(2): An impractical solution... by levik)
LeviK: While this is valid statistical analisys, it turns the problem into a gamble, rather than provides a foolproof solution.
Yes, I agree that if you take this problem from a strict mathematical point of view, FriedLinguini's solution is elegant and probably optimal.
However, often find it useful or amusing to look at puzzles in a larger context  it frequently results in an answer other than the mathematically correct one. This puzzle is one example.

Posted by Jim Lyon
on 20020827 10:54:44 