23 Prisoners and 2 Switches

Question: A prison has 23 prisoners in 23 different cells. The prisoners have no way to communicate with each other in any way from their cells. There is another room, the rec room, that has two switches on the wall (A and B). The switches have on and off positions but they start in an unknown position.

Prisoners are randomly taken to and from the rec room one at a time. They must change the position of only one of the two switches each time they go to the room. At any point a prisoner can yell out, "Every prisoner has been here!" If the prisoner is correct that all of the prisoners have visited the rec room, then they all go free. If they aren't correct then they are all executed.

Before they start they are given one planning session during which they can discuss a method to win the game. What method can they use to ensure they all go free?

Riddle Discussion

Similar Riddles

Autumn Love (medium)

Question: What did the leaves say to the autumn wind?

Question: What do you have that I use more than you do?

Question: Listen closely, for these for riddles are all connected. 1. How do you put a giraffe in the refrigerator? 2. How do you put an elephant in the refrigerator? 3. The lion king is having an animal conference, and all animals attend except one. Which animal does not attend? 4. You are on a stranded island that is inhabited by crocodiles. How do you get across without getting eaten alive?

Question: What tastes better than it smells?

Question: What goes in the water black and comes out red?