English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

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, each of which can be in either up or the down position. “
"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.”
"But, given enough time, everyone will eventually visit the switch room. At any time anyone of you may declare to me, 'We have all visited the switch

2006-06-29 07:34:27 · 4 answers · asked by Anonymous in Education & Reference Trivia

Here's the rest of it:
room.' and be 100% sure.
"If it is true, then you will all be set free. If it is false, all of you will be fed to the alligators. 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?

2006-06-29 07:35:04 · update #1

4 answers

Each prisoner other than the spokesman maintains a counter with initial value 0. When he enters the switch room, if switch "A" is "off" and his counter is 0 or 1, then he switches "A" to "on" and increments his counter. Otherwise (switch "A" is already "on" or his counter is 2) he switches "B".

The spokesman also has a counter with initial value 0. When he enters the switch room, if switch "A" is "on", he switches "A" to "off" and increments his counter. Otherwise (switch "A" is already "off") he switches "B". When the spokesman's counter reaches 44, he declares to the warden "We have all visited the switch room."

He is safe in making this declaration: among the 44 times that the switch had been "on", at most once was because the switch might have started out in the "on" position at the beginning of time. At most two were due to each prisoner (other than the spokesman himself) turning it on. If not everyone had visited the switch room, then it could have been turned "on" at most 2*21=42 times, and his counter would not exceed 42+1=43.

Further, given enough time, each prisoner will have two opportunities to turn "on" the switch, so that the spokesman's counter will eventually reach or exceed 44.

Switch "B" is only used so that the prisoner has something to flip when the protocol says he should not flip switch "A".

The non-spokeman prisoners turn the switch on twice instead of just once, because of the uncertainty about its initial position.

2006-06-29 08:31:20 · answer #1 · answered by Orichalcos 2 · 4 1

The prisoners write on the wall next to the switches in whatever device they have at hand.

Write their name, or make a single mark the first time they visit.

When there is 23 marks, they're done.
;-)

2006-06-29 07:49:05 · answer #2 · answered by fount_of_all_knowledge 3 · 0 0

choose one guy to be "LAST MAN" he will only flip switch "A" everyone else flips switch "B" the first guy to notice that switch a has moved twice ask for freedom ,it may take more then 23 flips or one rotation but there is no limit on flips just wrong answers

2006-06-29 19:05:16 · answer #3 · answered by badmts 4 · 0 0

couldnt b arsed to read it all sos

2006-06-29 07:38:03 · answer #4 · answered by y. 2 · 0 0

fedest.com, questions and answers