|| Welcome to the Blog managed by the KVPY 2005 Batch || Twish asks members to comment on the blog MaKeOvEr!! || RG says: Looks like a famine situation here || Blog glows in bright shades || KVamPys tame their own minds... with new mysterious posts on TP ?! || What is TP after all ? || KVamPYs start thinking about their Summer Projects as the Entrances are about to end.. || IIT? IISc? IISER? KVamPYs wonder where to enjoy this summer.. || Obiwan and Sunita in ISSER || Arun awaiting replies to his letter. || Swetabh ( Bhakt ) and Abhilash trying for IIT Kanpur ( Along with Twish ) || What about the next year ? Apply again for KVPY ? || Bulbs light up as blog fills up with posts. || Latest News brought to u by Twish (Twishmay) and Rash (EMAIL US NEWS) || EvErY bOdY KnOwS..... KVamPYs RoCk!! ||

Saturday, June 23, 2007

Tough one

The warden of a prison meets 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 labeled 1 and 2, each of which can be in either up or the down position. I am not telling you their present positions. 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 flip one switch when he visits the switch room, and may only flip one of the switches. Then he'll be led back to his cell.

"No one else will be allowed to alter the switches until I lead the next prisoner into the switch room. 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. I will not touch the switches, if I wanted you dead you would already be dead.

"Given enough time, everyone will eventually visit the switch room the same number of times as everyone else. At any time, anyone 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 all die horribly. 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?

3 comments:

Ankit Sagwal said...

let me try this,even though i feel i am far from solving it.
How about getting two configurations, lets say on-on and on-off as category 1, and other two off-off and off-on as category 2.Now any prisoner that visits first time tries to get a category 2 configuration, which is always possible.....and second timers get 1 when they leave.
The problem of initial position is kinda solved here......but the number of tries is very large.....one prisoner has to see 22 config 1 to say that they have all visited

RG said...

not necessarily, you see, the same prisoner can be taken in multiple times...

Ankit Sagwal said...

well, if the same guy gets taken in again and again he keeps the position at 1........i shud have written "multiple timers" instead of "second timers".
and the no shud be 23 and not 22.....to cover up for the initial configuration.
i still dont see anything wrong with wat i say, except that there can be a shorter and smarter method, if u have it, go ahead....and solve it