Note: Read this problem carefully, because it's completely different from the original.
, 100 prisoners are put into solitary cells, and there's a room with a light bulb. (No prisoner can see the light bulb from his or her own cell.) Every night, the warden picks a prisoner at random, and that prisoner goes to the living room. While there, the prisoner can toggle the bulb if he or she wishes. but this time, the prisoner needs to assert that he knows, which prisoner was in the living room before him. If the assertion is false, all 100 prisoners will be shot. 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.
The prisoners are allowed to get together one night, to discuss a plan.
But, the prisoners know that after that night, when they will go back to their solitary cells. the warden will choose one prisoner secretly (and this time, not randomly) and will kill him.
What plan should they agree on, so that eventually, someone will make a correct assertion?
One prisoner, designated A is selected to leave the light on, regardless of if he's the first to be called in or any other time. Any other prisoner who might be the first to be called in is to leave the light off.
From then on, anyone who finds the light already on will say prisoner A was the previous visitor to the room.
The only thing that could upset this plan is if prisoner A is the one to be killed the night of the big meeting. Presumably the warden doesn't know which one is prisoner A, so the people have a 99% chance of getting out eventually.
If the prisoners want to risk all of them getting killed, they could designate another prisoner, B, to wait, say 1000 days, and if they are still in jail, assume that A was the one killed, and as soon as B gets called in, he should turn on the light. The next prisoner, realizing that 1000 days have gone by (at least), will say B was the previous one in.
Posted by Charlie
on 2007-03-07 10:48:24