[Edu-sig] A mathematical teaser ...

Gregor Lingl glingl@aon.at
Sun, 16 Feb 2003 21:33:08 +0100


Hi educators!

What strategy would you recommend, to solve the problem stated below?
(For those of you who also read the tutor-list, please notice, that - 
although
I posted this same problem there also - my *question* here is 
(intentionally)
different).

Thanks for letting me know your ideas
Gregor

The problem is taken from "Spektrum der Wissenschaft", Feb. 2003 (which
is the German edition of Scientific American):

Coded entry

To cut costs for a doorguard who asks silly mathematical riddles, the union
of mathematical logicians has devised a sophisticated locking apparatus for
their union's home.
The lock of the door is controlled by four simple switches, which are
arranged in a square. The door opens if all the switches are "on" or if all
of them are "off". When a member arrives to enter, the door always is
locked, which means that some switches are in the on position and some are
off.
No one who wants to enter can see the switches or touch them directly.
Instead, there are four buttons on the door, labelled "P", "D", "1" and 
"2".
If you press "P", a pair of two switches in a horizontal or vertical row is
randomly selected. If you press "D" a pair of diagonally arranged switches
is randomly selected.
After this selection has taken place, pushing button "1" randomly selects
one of the previously selected switches and changes its position. 
Contrary to that,
pushing "2" switches both of them. The sequence "letter, digit" may be
repeated until the door opens (or you lose patience).
Find the shortest complete code which opens the door with certainty,
regardless of the original position of the four switches.