Every once in a while, I hear puzzles about 100 prisoners and a meticulous, demanding warden. All of these puzzles share a common characteristic, a set of prisoners must work together to devise a clever scheme to thwart the warden. I hear these puzzles often enough that each time they reappear, I view them with an increased level of understanding corresponding to the stage of my mathematics education. Any problem may have a solution, but, sometimes, that solution may not be the most efficient one possible. For example, suppose you want to find something in your room but don’t remember where you put it. You can either search the room by yourself. Or you can call your (many) friends to help you. From a correctness standpoint, both solutions are correct. You’ll find what you’re looking for eventually. But from an algorithmic standpoint, the second solution where you search in parallel with your friends is better because it has a shorter runtime. The same holds for solutions to the 100 prisoners puzzle. Some solutions may be theoretically correct answers to the puzzle but may have expected runtimes that exceed the life span of an average person and are, thus, practically undesirable. Now, through this lens, the lens of a theoretical computer science student, I would like to present to you the 100 prisoners puzzle and its variants.100 Prisoners and a Light Bulb The original, very famous puzzle involving an interrogation room, a light bulb, and 100 prisoners is the following :
One hundred prisoners just arrived in prison. The warden tells them that starting tomorrow, each of them will be placed in an isolated cell, unable to communicate amongst themselves. Each cell has a window so the prisoners will be able to count the days. Each day, the warden will choose one of the prisoners uniformly at random with replacement, and place him in a central interrogation room containing only a light bulb with a toggle switch. The light bulb is initially switched off. The prisoner may observe the current state of the light bulb. If he wishes, he may toggle the light bulb. He also has the option of announcing that he believes all prisoners have visited the interrogation room at some point in time. If this announcement is true, then all prisoners are set free, but if it is false, all prisoners are executed. The warden leaves and the prisoners huddle together to discuss their fate. Can they agree on a strategy that will guarantee their freedom?
What you think about this puzzle? Subscribe My newsletter and stay tuned to my blog. Do share your thought below in the comments.
Comments
Post a Comment