23 prisoners and two switches
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?
Here are the rules they can use to ensure they will all go free eventually:
The prisoners will choose one ‘leader’ and everybody else will be a follower. If you are a follower:
- If switch A is in the on position, toggle switch B.
- If switch A is off, you have not toggled switch A yet, and you have seen switch on during a previous visit; then toggle switch A. Otherwise toggle switch B.
If you are a leader:
- If switch A is off, turn it on.
- If switch A is on, turn it off. If you did not turn switch A on during their previous visit, increment the count of prisoners.
Once the leader increments the count to 23 they can yell, “Every prisoner has been here!” and all of them will be released.
More puzzles to try-
- 3 + 3 = 3 5 + 4 = 4 1 + 0 = 3 2 + 3 = 4 ...Read More »
- There are 10 stacks of 10 coins each. Each coin weights 10 gms. However, one stack of coins is defective ...Read More »
- Which clock works best? The one that loses a minute a day or the one that doesn’t work at all?Read More »
- Paul, Sam and Dean are assigned the task of figuring out two numbers. They get the following information: Both numbers ...Read More »
- Five puzzleFry ship’s pirates have obtained 100 gold coins and have to divide up the loot. The pirates are all ...Read More »
- Four days are there which start with the letter ‘T‘. I can remember only two of them as “Tuesday , Thursday”. ...Read More »
- Two fathers took their sons to a fruit stall. Each man and son bought an apple, But when they returned ...Read More »
- A farmer is taking her eggs to the market in a cart, but she hits a pothole, which knocks over ...Read More »
- Let it be simple and as direct as possible. Interviewer : Tell me how much time (in days) and money would ...Read More »
- Solve this logic sequence puzzle by the correct digit- 8080 = 6 1357 = 0 2022 = 1 1999 = ...Read More »
- A man leaves his house in the morning to go to office and kisses his wife. In the evening on ...Read More »
- Jasmine, Thibault, and Noah were having a night out and decided to order a pizza for $10. It turned out ...Read More »
- Which letter replaces the question markRead More »
- A murderer is condemned to death. He has to choose between three rooms. The first is full of raging fires, ...Read More »
- Richie established a very strange number system. According to her claim for different combination of 0 and 2 you will ...Read More »
- The result of math class test came out. Fariha’s mark was an even number. Srabon got a prime!! Nabila got ...Read More »
- Robi is a very serious student. On the first day of this year his seriousness for study was 1 hour. ...Read More »
- Ragib: I got digits of a 2 digit number Sakib: Is it an odd? Ragib: Yes. Moreover, the sum of ...Read More »
- If u r genius solve it:- 40 * 14 = 11 30 * 13 = 12 20 * 12 = ...Read More »
- When do we call “10” while looking at number “2”?Read More »