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?
(In reply to Another way
Regardless of whether day of the week or day of the month or some other modular count is chosen, on a given day, there will be only one of the 99 prisoners who is the designee for that day, and so a 1/99 chance of freedom. If the designee for that day was in fact killed on the first day, then there's zero chance of a match. So the larger the number of designees, the better it is. So assign each prisoner a number from 1 to 100, and count the days mod 100 (1 - 100 rather than 0 - 99, though). On the other hand, it's certain that one of the designees will be killed initially
It might be easier to keep track of the days of the month though, and assign numbers 1 - 31 to each of 31 prisoners; and then also, there's only 31/100 chance that a designee will be killed the first day and a more than 2/3 chance that every day will have a 1/99 probability of escape.
Posted by Charlie
on 2007-03-07 12:07:04