Prisoners and Light Bulb Puzzle

preview_player
Показать описание
#MicrosoftInterviewPuzzle #Puzzles #JobInterviewPuzzles

Prisoners and Light Bulb || Microsoft Interview Puzzle || Challenging Job Interview Puzzles

Puzzle Details

Once in a prison with 100 prisoners, the Warden introduces a strange but interesting challenge to all the prisoners. This challenge can even grant them the freedom and thus every one of the prisoners becomes quite excited.

The warden selects one prisoner everyday randomly from the lot and moves him into a pitch black room with a bulb and a switch that controls the bulb. The prisoner can carry out three different actions in the room - He can switch on the bulb, switch it off or do nothing and sit idle. A prisoner can be picked up more than one time.

Now the warden introduces the twist in the challenge. He tells them that the prisoners can put a stop to the process any day they feel that “Every prisoner has been in the dark room at least once” If the prisoners are correct, then every single one of them will be set free. But if they have put up a wrong judgment, all of them will be killed.

Seeking it to be the only chance of freedom, the prisoners take up the challenge. They are given some time to discuss regarding it before the process could begin. How will they plan things so that they are finally set free?

we recommend to pause the video and try yourself before checking the solution. Check the video for the solution.

Challenging Job Interview Puzzles

Interesting Riddles

Math Puzzles
Рекомендации по теме
Комментарии
Автор

Prisoners and Light Bulb : Here is a famous puzzles which have been asked in a Microsoft Interview.
share your opinion about the video.

SimplyLogical
Автор

Of course, a problem is that, if only a single prisoner visits the room every day (with no special rules for Jason's visits), then the process could take many decades to complete. Also, Jason would have to know the original condition of the switch to make an accurate count. If Jason didn't know, and the process started dark, he would be counting himself on his first visit; if it started lighted (and then, in fact, a first-time-entry-prisoner had turned it off), he would be properly counting that prisoner. Unless he knew the original state, he could end up one prisoner short and waiting an EXTREME time for someone to turn it off who, in fact, didn't exist.

GetMeThere
Автор

So they have to keep going until Jason has been in the room at least 100 times? He has a 1/100 chance to be picked each time, disregarding the fact that he could be picked multiple times in a row, they may aswell give up; they'd all die of old age by the time he has turned it back on 100 times.

Sir_Rebral
Автор

LOL. Then all you would need is 100 people together who can actually follow directions perfectly for quite a long time. A near impossibility, lol. (Not to even mention Jason, who has to keep a count perfectly 100 times -- that alone is not easy, even for a careful person).

GetMeThere
Автор

They ask if anybody hasn't been in the room yet, you didn't say that they can't talk

AxelRicknell
Автор

I guess this won't be a perfect solution. Perfect solution would be to allow each prisoner to do the same process (turning it on) twice. Jason should count 197 before declaring all have visited. Now the question is why allowing them to do twice. Just consider condition of first prisoner going there before Jason and finding the switch OFF. If he turns it on once, he will never repeat it and Jason will never get 99 counts. Please correct me if I am wrong. Thanks

Padmadas_P
Автор

Prisoner can keep one number (incrementing counter). When first prisoner goes to the room, he should just turn the light off and make that counter to one. No prisoner should ever touch that light so that all of them will see darkness at least once. Also when any prisoner go to room for the 1st time, he should increment commonly maintained counter and when it reaches 100 the all of them can be set free. No need to mess with turning on/off! 🙂

falgunpatil
Автор

He could be selected on the 100th time and then not again until the 90the time! That would take years lol you may aswell just wait 10 years then say yep!

gardzygaming
Автор

yeah, so this is badly translated or something should the prisoners be allowed to communicate? are they blindfolded when they enter the room?

As stated I'd make sure everyone turns the switch to dark and noone has a death-wish then tattoo each person as soon as they come out. Assuming random chance we're looking at three years on the outside. (519 days on average. )

apollyon
Автор

Ok but they all enterd the room in the very beginning so technically they all have been in the room at least once anyways? Or am I missing something?

amitafimhuolla
Автор

one of the prisoner will die before they fi ish

pppluronwrj
Автор

All the prisoners can get their pants filled with mud stain on one side on the ass forming a circle.

If you enter for the first time, you switch on the light and find a spot to seat. If you enter on the second time, just switch on and the lights and count how many circles it has accumulated in rows of 10 for easy count.

Once it reaches a 100, it means all the 100 prisoner butt had entered the room.

francscasoh