Prisoner to be freed

The warden meets with 23 new prisoners when they arrive. He tells them, "You may meet today and plan a strategy. But after today, you will be in isolated cells and will have no communication with one another.

"In the prison is a switch room, which contains two light switches labeled 1 and 2, each of which can be in either up or the down position. I am not telling you their present positions. The switches are not connected to anything.

"After today, from time to time whenever I feel so inclined, I will select one prisoner at random and escort him to the switch room. This prisoner will select one of the two switches and reverse its position. He must flip one switch when he visits the switch room, and may only flip one of the switches. Then he'll be led back to his cell.

"No one else will be allowed to alter the switches until I lead the next prisoner into the switch room. I'm going to choose prisoners at random. I may choose the same guy three times in a row, or I may jump around and come back. I will not touch the switches, if I wanted you dead you would already be dead.

"Given enough time, everyone will eventually visit the switch room the same number of times as everyone else. At any time, anyone may declare to me, 'We have all visited the switch room.'

"If it is true, then you will all be set free. If it is false, and somebody has not yet visited the switch room, you will all die horribly. You will be carefully monitored, and any attempt to break any of these rules will result in instant death to all of you"

What is the strategy they come up with so that they can be free?




Similar Riddles

You are playing a probability game with your friend using a fair coin. Both of you decide on a particular sequence that you have to achieve.

Let us suppose you chose the sequence to be: H T H
Your friend chose the sequence to be: H T T

Now you keep tossing coins until you get the sequence and the same is done by your friend. You keep doing that till you achieve your predefined sequence and keep writing the result on paper. At the end of the game the player whose average number of tosses will be lowest, he will win.

The results of the game 1 toss:
You: H T T H T H
Your score: 6
Your friend: H T H H H T H H T T
Your friends' score: 10

The results of the game 2 toss:
You: T T H T T H H T H
Your score: 9
Your friend: T T H H T H T T
Your friends' score: 8

The results of the game 3 toss:
You: T T H H T H
Your score: 6
Your friend: H H T H T T
Your friends' score: 6

Now after 3 games, your average score is 7 and your friend's average score is 8. Now assume that you keep playing the game and play many times. What will be the possible outcome of the following?

a) You win
b) Your friend win
c) Tie

Asked by Neha on 12 Oct 2026


I am never scared but became petrified and can’t live in a house but would die to make one. What am I?

Asked by Neha on 08 Sep 2025

In four steps you need to move the word 'cold' From 'warm' by replacing one alphabet at a time such that every word formed at each step is acceptable in English Dictionary.

Asked by Neha on 23 Aug 2024


How far can you walk into the woods?

Asked by Neha on 21 Jul 2025

In the following series, a set of numbers is progressing with a particular pattern. Can you deduce that pattern and find the missing set?

(2 + 6), (21 + 6), (58 + 6), (119 + 6), ___

Asked by Neha on 05 Dec 2025

What seven-letter word has hundreds of letters in it?

Asked by Neha on 01 May 2022


How can you take 2 from 5 and leave 4?

Asked by Neha on 03 Apr 2022

What can you deduce from the following BrainBat?

CRY
LMKI

Asked by Neha on 26 Aug 2024

You stand in front of two doors. A guard stands next to each door. You know the following things: one path leads to paradise, the other leads to death. You cannot distinguish between the two doors. You also know that one of the two guards always tells the truth and the other always lies. You have permission to ask one guard one question to discover which door leads to paradise. What one question would you ask to guarantee you enter the door to paradise?

Asked by Neha on 03 Jun 2025


What comes
Once in a Year
Twice in a Month
4 times in a Week
6 times in a Day

Asked by Neha on 24 Feb 2022

Hot Articles

Amazing Facts

Gambling

In Canada, a mathematical puzzle must be solved in order to win the lottery to classify it as a “game of skill” not gambling.