SCHOOL OF COMPUTER SCIENCE

Puzzle 12: THE LIGHTS OF THE ROUND TABLE

King Arthur is preparing for a meeting of the round table. The seats at the round table are
numbered 1 through n. Each seat has a reading lamp and when Arthur goes into the round table
room he finds that someone has switched off some of the reading lamps. Being a king, Arthur
cannot simply switch on those lights that are currently off. He has to tell somebody else to do
it.
So Arthur has to write down a list of numbers of seats and then get a servant to flip the switch
on each light that is listed. The next meeting is to discuss the banishment of Merlin and the
meeting can only start when all of the lights are turned on. Using a crystal ball Merlin can see
the list of numbers that the king has written and is able to rotate the table before the servant
gets there.
So for example, if n=100 and the king asks for 3,28,97 to be flipped, then if Merlin rotates
the table by 10 places, the servant will in fact flip the switch on lamps that were in positions
93,18,87 and so may flip the switch on a light that is already on. The servant is not allowed to
use common-sense. Disobeying the kings instructions can be hazardous to ones health.

  Solution

< back to the main puzzle page