Author Topic: Prisoners and switches  (Read 6904 times)


  • Jr. Member
  • **
  • Posts: 75
Prisoners and switches
« on: 七月 08, 2004, 08:57:09 am »
I hate to be the only person who's posting problems. If I don't see other people posting a problem,  this will be my last problem posting :).

  The warden meets with the 23 prisoners when they arrive. He tells
You may meet together today and plan a strategy, but after today you
will be in isolated cells and have no communication with one another.
In this prison, there is a "switch room" which contains two light
switches, labelled "A" and "B", each of which can be in the "on" or
"off" position. I am not telling you their present positions. The
switches are not connected to any appliance. 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", and this prisoner will
select one of the two switches and reverse its position (e.g. if it
was "on", he will turn it "off"); the prisoner will then be led back
to his cell.  The switches will not be touched by anyone else.

Each prisoner will visit the switch room aribtrarily often. That is,
for any N it is true that eventually each of you will visit the switch
room at least N times.)

At any time, any of you may declare to me: "We have all visited the
switch room." If it is true (each of the 23 prisoners has visited the
switch room at least once) then you will all be set free. If it is
false (someone has not yet visited the switch room), you will all
remain here forever, with no chance of parole.  

Devise for the prisoners a strategy which will guarantee their


  • Newbie
  • *
  • Posts: 16
Prisoners and switches
« Reply #1 on: 七月 08, 2004, 11:55:40 am »
我有好题目的话也会出,不过暂时没有,请原谅  :(