Prisoners and 2 Switches - Scenario A
Logic puzzles require you to think. You will have to be logical in your reasoning.
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 there is a switch room which contains two light switches labeled A and B, each of which can be in either the 'on' or the 'off' position. BOTH SWITCHES ARE IN THEIR OFF POSITIONS NOW.* 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 move one, but only one of the switches. He can't move both but he can't move none either. Then he'll be led back to his cell."
"No one else will enter the switch room until I lead the next prisoner there, and he'll be instructed to do the same thing. 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."
"But, given enough time, everyone will eventually visit the switch room as many times as everyone else. At any time any one of you 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 be fed to the alligators."
*note - the only difference from Scenario B, the original position of the 2 switches are known.
A) There is no restriction on the amount of time the prisoners could take before sending the notice to the warden that everyone has been to the switch room at least once.
B) There is no restriction on the number of time each prisoner can visit the switch room
C) The warden will not attempt any foul moves, such as intentionally not bringing a certain prisoner to the switch room forever.
1. Appoint a "scorekeeper" and the other 22 prisoners as "transmitters".
2. When a transmitter enter the switch room for the first time, he will flick switch B ON if he sees it in the OFF position. Alternatively, he will flick switch A if he sees switch B is in the ON position and waits for his next visit. The transmitter's mission is to find ONE opportunity to flick switch B to the ON position. After he completes his mission, he will flick switch A for all subsequent visits. In short, each transmitter's role is to send a signal to the scorekeeper that he has been to the switch room.
3. The scorekeeper's role is to flick off switch B whenever he sees it in the ON position. Each time he flicks off switch B he adds 1 to his score. When he sees switch B is already OFF, he flicks switch A instead and does not add to the score. As soon as he accumulates 22, he reports to the Warden.
Jun 24, 2004
|I like it!!! Cool |
Jun 26, 2004
|Interesting logic but I had in mind something that would take less time. Hope the scorekeeper doesn't die before the strategy carries through. |
Jun 26, 2004
|That was weird. I didn't understand what you were asking though. |
Jun 27, 2004
|that was really hard, and took a little too much time. i liked it though, and i would have never thought of the answer|
Jun 27, 2004
|Hmm...It's okaaaaaaaay, I guess. But yeah, it's basically impossible for anyone to think of the answer to that, and also I didn't know what we had to figure out, so I think you should have made that clearer! |
Jul 01, 2004
|I dont like people who give me headaches...|
Jul 04, 2004
|Ok i liked this 1 but the problem that there was no question...there is no point...the answer may be 15ducj=k and i have the right to say that cuz there is no question make it clearer the next time|
Jul 13, 2004
|This is very good. I liked the way it made my head ache. |
Jul 13, 2004
|Excellent Teaser in my opinion. It's perfectly logical, and it's perfectly solvable, though certainly not very easy. |
The question though not stated in the given is implied, so I don't think it to be a big deal that it's missing.
Jul 15, 2004
|OK so I just found a problem with the solution (provided the current statement of the given) For the solution to work the prisoners will have to keep visiting the jail cell even after all of them visited it an equal number of times. |
You see nowhere in the problem does it say that the warden will keep pulling prisoners into the switch room indefinitely. Problem states that he will pick them randomly, and that everyone will visit the room as many times as everyone else. Well what if the luck of the draw happens that randomly they will all be picked only once and all 23 will visit the room only once? Then the counter can only do one flip of the switch, and then they will never be freed.
So basically the problem needs an extra statement: “Assume that this exercise continues indefinitely until one of the prisoners speaks out.”
Jul 30, 2004
|It seems to me that the answer is slightly incorrect. In part 3 of the answer, the second ON should read OFF.|
Jul 30, 2004
|Thanks Sakirski, the pre-condition you mentioned is stated in the hint section. I like those 3 teasers you posted too. |
Aug 16, 2004
Aug 24, 2004
|Assuming non of the prisoners died in the jail. Then they would stay there 4ever.|
Sep 30, 2004
Feb 13, 2005
May 11, 2005
|As a matter of fact or fiction, this scenario's countless improbabilities bequeath indistinct objectives to its foreseen populace. This is neither bad nor good |
May 13, 2005
|If the warden picked one random prisoner every day, it would take about 596 days on average.|
May 16, 2005
|I wasn't sure what the question was asking - i was trying to work out how the warden would know if they were lying or not...(for some reason i had a nice double blind going on, and the warden didn't know who he was taking out either...)|
Jul 23, 2005
|its too hard & it takes toooooo long |
Nov 07, 2005
|What exactly are we supposed to find out? What does this teaser ask? I only see plain text with an explanation fallen from the sky. |
Nov 15, 2005
|Where is Scenario B?|
Feb 28, 2006
|Unless I don't understand the problem correctly, I think there is a flaw. For ease let's say that the warden has already decided that he is going to pick each prisoner 5 times. What if the scorekeeper is picked to make the first 5 visits? Who keeps score then?|
Feb 28, 2006
|Sorry, I'm new here. I guess I should have looked at the date of the problem first.|
Apr 01, 2006
|I think this is a nice try... for those of you who say you didn't know what to do then something is wrong with you cuz anyone could figure out that the prisoners should devise a plan to get out... DUH!!!! OBVIOUSLY... now as for the answer... if the scorekeeper counts 1 for every time that he flicks off the switch B that would be incorrect. If 1 prisoner goes before him and flicks B on and then the scorekeeper goes and flicks it off and they alternate like that for 3 turns then the scorekeeper would count 3 when in fact only 1 of his fellow prisoners has been to the room. For this reason the answer is wrong in my mind. |
Apr 14, 2006
|what was the question?|
May 16, 2006
|that solution makes a lot of sense... |
Jun 24, 2006
|I have to agree with mercenary007. alternating between the scorekeeper and one other person multiple times would ruin the solution.|
As it stands the prisoners are alligator chow.
Oct 16, 2006
|Read the problem again mercenary and cresh. Each transmitter only flips B to on if it's off one time, then only flips A after that, no matter whether they find B off again or not in later visits.|
I agree though that it's not totally clear if the warden is guaranteed to keep bring prisoners back or if he will stop after they've all had the same number of turns.
Dec 30, 2006
|I think THINK that i foud a flaw.|
What happened if 2 transmitters go to the room, and neither of them have gone to the room, how does the reciver know that 2 people has gone, not one?Unless someone explaines the tatic, i think the answer is wrong
Dec 30, 2006
|O wait, never mind |
Jan 07, 2007
|question is flawed... you have to assume too much... but i still liked it|
Mar 25, 2007
|i never knew the question|
Apr 20, 2007
|(sigh) well people, its to the alligators. Theres no way; we could have been in there for a hundred billion years. Still, yeah sure, the answer works out, and I was beat by the puzle... ih. I tried to split em into 2's and 4's with 4 possible combinations, and clubbing the warden, nope wasn't gona solve that one. a transmitter... don't feel bad, a transmitter, dude! okay so what if we're in the planning stage, and someone says what if the transmitter dies. hmm... |
Jun 11, 2007
|OW!!! My head hurts how do you come up with this stuff!!! It's so brilliant!!!|
Jun 13, 2007
|Great teaser, very creative.|
I was able to come up with the same solution, However, thought that there would be a more efficient one because this solution means pretty much that it will takes them an extremely long time to get out depending on their luck/probability.
Maybe change the number of prisoners to a smaller number. Then again, it is a jail haha
Jul 23, 2007
|brilliant!!!!! My math teacher gave this to us, but never told us the answer. Thanks!!!!|
Oct 26, 2007
|How do you come up with this stuff? I mean really! Does it just hit you? |
Jan 11, 2008
|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."|
and hint B) there are no restrictions to how many times each prisoner can visit the room...
make it impossible for the prisoners to devise a plan that doesnt involve luck.
May 14, 2008
|how 'bout flicking switch B on everytime a prisoner goes into the switch room for the first time, and flicking switch A if he/she already got there...then it's everybody's role to count the ons and offs of light B, because if they appoint only one 'counter', just one missed count could lead to dying old in prison...the counter would never reach 23...or is this what the solution suggests?|
head achy achy...
Nov 06, 2008
|Yes it works. Every one could count. This is a better way.|
Oct 31, 2011
|I love this teaser.|
And I know it's 3 years later, but what plokolplok suggests doesn't work. If you have more than one person who counts, who turns off switch B? Only one person can turn off switch B, otherwise they could be staying in there a LOT longer than they would with the poster's solution. And if one person turns it off, you can't have other people counting; a counter could come in five times in a row, see the switch ON each time and add 5, even though nobody else came in.
Jun 14, 2013
|I LOVE IT!!!!!!!! (little tricky though. Cut that out. not little, but A LOT!) I still love it though.|
Nov 13, 2013
|There is no 100% guaranteed solution, and it is in fact entirely hopeless. It's one thing for the warden to offer them a deadly game where he's the judge who doesn't have to play by the rules. But by giving it an element of randomness that only he controls, he's bluntly announcing that it's a trap to get all the prisoners killed. He won't ever pick anyone. It *looks* solvable and he's actually generous to give them a full day to think about it, but they'll probably come up with a flawed plan or nothing at all. Even if in the latter case they agree to do nothing, so long as they don't collectively realize that it's a trick, someone will inevitably try their luck. The idea of freedom is too tempting. Even suggesting to the sadistic warden that no solution exists still carries the risk of death. This puzzle is really creepy when you think about it.|
Back to Top