|
| 1 | +Prisoners and a light bulb |
| 2 | +========================== |
| 3 | + |
| 4 | +A prison guard is giving 100 prisoners a second chance for their death |
| 5 | +sentences. The guard tells them that everyday, starting from tomorrow, he will |
| 6 | +pick one prisoner randomly from his cell and bring him to his office. In the |
| 7 | +office there is a light bulb wired to a power switch. The light bulb is |
| 8 | +initially off and only has two states, on or off, triggered by the power |
| 9 | +switch. While the prisoner is in the office, he has to do one of the following |
| 10 | +things here: either _flip the power switch_ of the light bulb, and thus altering |
| 11 | +its state (if it is off, this turns it on, and vice versa), or do |
| 12 | +_nothing_. After the prisoner has chosen his action, he is brought back to his |
| 13 | +cell and locked up. The process is then repeated the next day with another |
| 14 | +random prisoner (it could be the same one, since the pick is random). |
| 15 | + |
| 16 | +Now, if any prisoner, that is currently in the office, knows for certain that |
| 17 | +every other prisoner has been in the office at least once, he can tell that to |
| 18 | +the guard. If his claim is true, they are all spared, otherwise the game is over |
| 19 | +and they all get killed! |
| 20 | + |
| 21 | +The guard is a very patient man and has thus no time limit for his little |
| 22 | +game. He will continue bringing a random prisoner to his office every day, until |
| 23 | +some one dares to make the claim. His random pick is [uniformly |
| 24 | +distributed](https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)), |
| 25 | +meaning that every prisoner has the _exact_ same probability to be picked |
| 26 | +(1/100). Moreover, each one of the prisoners is contained in a different |
| 27 | +isolated cell. There are no ways for them to communicate with each other at |
| 28 | +all. They can also not leave any kind of "message" in the office for the others; |
| 29 | +the guard only lets them flip the power switch for the bulb or do nothing. |
| 30 | + |
| 31 | +The guard lets the prisoner discuss a strategy for a short period of time before |
| 32 | +locking them in their respective cells for tomorrow's game. What is a winning |
| 33 | +strategy for the prisoners, that spares them from their death sentences? |
| 34 | + |
| 35 | +**[Solution](../solutions/bulb_solution.md)** |
0 commit comments