by sfenu · 12y ago · 0 comments
The prisoners meet together and designate a leader. The leader will maintain a tally. They also designate one of the switches to not matter. The prisoners then use the following strategy:
When a prisoner is lead to the room, if the designated switch is off and it is the prisoner's first time flipping the relevant switch, it is turned on. Else, flip the irrelevant switch. If the prisoner is the designated leader, and the relevant switch is on, he adds a count to his tally and turns the relevant switch off. Otherwise he just flips the irrelevant switch. This way, once the leader has seen the light be on a sufficient number of times he can definitively say that they have all been in the room.
Ah, but what's a sufficient number of times? The unknown initial state is what tripped me for a bit. :)
The switches are not connected to anything, correct me if I am wrong but how will you find out light is on sufficient number of times