Switches Puzzle Hi all,
EE/ CS Guy
The problem here is that the worst case assumption can lead to everyone being stuck at a count of 2 forever.
Notadragon
The solution:
Sam Bhai
Doesn't work if the switch that the "chosen one" flips was initially on. No one else will flip it off before the chosen one goes to the room. And the chosen one will think that someone flipped it on, so he'll count 1.
Sean
Didn't you mean 46 (23+23) Sean ?
Rui Martins
Sean you are right that my solution won't work always, because if the switch was initially ON, the count would reach 23 and he'll figure out that everyone has visited the room, but when the switch was initially OFF the count would never reach 23 (It'll remain at 22).
Sam Bhai
Neo could count till 23, because he could exclude himself and "initial ON" case.
Sergei Shishkin
I think Sam got it right the first time with a small change. Assuming that the prisoners can tell the passing of days then the first prisoner in the room knows that he is first. If the first is the choosen one, he will make sure the right switch is in OFF position (switch it, if it is currently in a ON position, or switch the left switch if the right is already in OFF position). If the first person is not the choosen, he will make sure the right switch is in the ON position. The rest is like Sam described.
Yair Sarig
The answer was inspired by everyone else's comments, especially Sam's.
ChocoBean
The flaw in the above logic.
Aks
Nope. See, of course everyone will also have to visit the room as many times, they just won't be able to insert useful input most of the time. (only two of the 43+ times actually. sucks to be them)
ChocoBean
how about this?
Lee
um, guess i should've noticed something amiss while typing " if the
Lee
Uhm, this sounds awfully compllicated...
Martin Häcker
Can you imagine the chance of regaining your freedom after committing a crime? Is it possible for these prisoners to come up with a solution in a constructive manner? Well, if you ask me, no. However, that is not the question being asked here. The many solutions attempted to solve this problem in this forum have failed to recognize one thing, how will they know the number count if they are all isolated from each other? There are only two switches, whether on or off, how will they know how many times it has been flipped and by whom? In addition, they don’t even know the starting positions of the switches. They will only know how many times they have been there. Really, there is no solution; there is no freedom for these prisoners until they have served their time. Of course, if there were a genius in the bunch, than maybe it would be possible to find a solution; then again, if there were a genius, than he/she would not have been caught in the first place.
Angela Filippi
There is a solution 'cause I got it. what I think every one is skirting around but not getting is the fact that they can plan for each day they are there. It's a binary state problem and as well as the switches you can use the concept of 'odd' and 'even' days served. Using a "strategy" based on this allows every "chosen" prisioner to determine whether the person who last entered the room was a first-timer or a repeater. Basically, when the prisoners get together they decide on either LEFT or RIGHT switch and 'OFF' or 'ON' state for 'ODD' and 'EVEN' days served.
Ratso
I may be missing something, but if i am not i believe Chocobeans solution on 29th Aug seems to be correct. and ofcourse his argument posted on 30th proves the point..I dot see anything wrong with that one....is there something wrong??
AJ
I have spent a lot of time thinking about the problem and I have found another solution. I'm belive it is a slightly "better" solution than the one offered by ChocoBean in the sense the the prisioners get out faster. However it might be a "worse" solution in the sense that the algorithm is slightly more complicated.
Henrik Sandell
Ok, here is the solution: one person makes some type of stabbing implement from the springs in his bed and when he has enough for everyone, he makes a guess (probably wrong) and we kill those stinkin' gators.
Stan Owens
I don't see how any (?) of these solutions would work, because its based on the following false assumptions:
Paul
Well, it seems to me that there is a major point to this puzzle that everyone is ignoring. The warden hasn't described the room at all. Perhaps the prisoners would be allowed to ask the warden to describe the switch room to the prisoners, but since we cannot assume that that is so, there is only one definitive answer. The only way the prisoners could be assured to not be fed to the gators is this: serve their full prison sentences. Why?
Michael Kraack
Fog Creek Home |