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

A time long back, there lived a king who ruled the great kingdom of Trojan House. As a part of the renovation of the kingdom to meet future security needs, he asked his chief architect to lay down a new play in a manner that all of his 10 castles are connected through five straight walls and each wall must connect four castles together. He also asked the architect that at least one of his castles should be protected with walls. The architect could not come up with any solution that served all of King's choices, but he suggested the best plan that you can see in the picture below. Can you find a better solution to serve the king's demand?

Castles in a line

Asked by Neha on 18 Sep 2023


The barber of Town shaves all men living in the town. No man living in the town is allowed to shave himself. The barber lives in that town. Who then shaves the barber of the town?

Asked by Neha on 25 Oct 2021

At a party, there are five people and a whole round cake lying at the centre of the table. Only four people will make a cut and take their piece and the last one will get the remaining piece on the table. How can they make sure that everyone gets a 1/5th of the piece?

Asked by Neha on 20 Sep 2024


It is raining today at 11:59 am. What is the probability of sunny weather after 72 hours?

Asked by Neha on 21 Jan 2024

A man is trapped in a room. The room has only two possible exits doors. Through the first door there is a room constructed from magnifying glass. The blazing hot sun instantly fries anything or anyone that enters. Through the second door there is a fire-breathing dragon. How does the man escape?

Asked by Neha on 09 Jan 2021

I travel all around the world but always stay in the corner. What am I?

Asked by Neha on 09 Mar 2022


How can you make a TV, a bed, a dog, and a car liquid?

Asked by Neha on 27 Mar 2024

In the picture, you can see a chess board. On the top left position, the K marks a knight. Now, can you move the knight in a manner that after 63 moves, the knight has been placed at all the squares exactly once excluding the starting square?

Are You A Chess Player?

Asked by Neha on 08 Apr 2024

What's the only room from which no one can enter or leave

Asked by Neha on 15 Apr 2024


Who are the happiest people in IPL match?

Asked by Neha on 24 Jan 2025

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.