Prisoners got freed

100 prisoners are stuck in the prison in solitary cells. The warden of the prison got bored one day and offered them a challenge. He will put one prisoner per day, selected at random (a prisoner can be selected more than once), into a special room with a light bulb and a switch which controls the bulb. No other prisoners can see or control the light bulb. The prisoner in the special room can either turn on the bulb, turn off the bulb or do nothing. On any day, the prisoners can stop this process and say "Every prisoner has been in the special room at least once". If that happens to be true, all the prisoners will be set free. If it is false, then all the prisoners will be executed. The prisoners are given some time to discuss and figure out a solution. How do they ensure they all go free?




Similar Riddles

In an Art Gallary, When the clock hit 11 am, Artist hung the painting number 30. When it struck 4 pm, he hung painting number 240 and when it struck 7:30 pm, he hung painting number 315.

Can you determine, which painting number will he hang when the time is 9:20 pm?

Asked by Neha on 18 Sep 2025


Three cars are driving on a track that forms a perfect circle and is wide enough that multiple cars can pass anytime. The car that is leading in the race right now is driving at 55 MPH and the car that is trailing at the last is going at 45 MPH. The car that is in the middle is somewhere between these two speeds.
Right now, you can assume that there is a distance of x miles between the leading car and the middle car and x miles between the middle car and the last car and also, x is not equal to 0 or 1.
The cars maintain their speed till the leading car catches up with the last car and then every car stops. In this scenario, do you think of any point when the distance between any two pairs will again be x miles i.e. the pairs will be x distance apart at the same time ?

Asked by Neha on 08 May 2021

Manish has to secure 40% marks to pass his B.tech final exams.
He got just 40 marks and failed by 40-marks.

What is the maximum marks?

Asked by Neha on 04 Aug 2023


Three men in a cafe order a meal the total cost of which is $15. They each contribute $5. The waiter takes the money to the chef who recognises the three as friends and asks the waiter to return $5 to the men.

The waiter is not only poor at mathematics but dishonest and instead of going to the trouble of splitting the $5 between the three he simply gives them $1 each and pockets the remaining $2 for himself.

Now, each of the men effectively paid $4, the total paid is therefore $12. Add the $2 in the waiters pocket and this comes to $14. Where has the other $1 gone from the original $15?

Asked by Neha on 06 Sep 2021

How is the moon similar to a dollar?

Asked by Neha on 26 Sep 2023

How many bricks does it take to complete a building that is 15 feet wide, 30 feet deep, and 12 feet tall made of brick?

Asked by Neha on 23 Feb 2024


Two friends decide to get together; so they start riding bikes towards each other. They plan to meet halfway. Each is riding at 6 MPH. They live 36 miles apart. One of them has a pet carrier pigeon and it starts flying the instant the friends start traveling. The pigeon flies back and forth at 18 MPH between the 2 friends until the friends meet.

How many miles does the pigeon travel?

Asked by Neha on 02 Aug 2021

Can you write down eight eights so that they add up to one thousand?

Asked by Neha on 02 Apr 2022

The King of a distant land had heard that Birbal was one of the wisest men in the East and so desired to meet Birbal. He sent Birbal an invitation to visit his country.

In due course, Birbal arrived in the distant kingdom. When he entered the palace he was flabbergasted to find not one but six kings seated there. All looked alike. All were dressed in kingly robes. Who was the real king?

The very next moment he got his answer. Confidently, he approached the king and bowed to him.

How did Birbal know who was the real king?

Asked by Neha on 17 May 2021


I always drive my customer away.

Who am I?

Asked by Neha on 29 Oct 2024

Hot Articles

Amazing Facts

Word ladder puzzle

The word ladder puzzle was invented by Lewis Carroll, author of Alice’s Adventures in Wonderland.