rec.puzzles Archive

Four glasses are placed in the four corners of a square rotating table (like a lazy susan).

decision/rotating.table Added material

Problem

Four glasses are placed in the four corners of a square rotating table
(like a lazy susan).  You wish to turn them all in the same direction,
either all up or all down.  You may do so by grasping any two glasses,
feeling their orientation, and optionally turning either over.  There
are two catches:  you are blindfolded and the table is spun after each
time you touch the glasses.  Assuming that a bell rings when you have
all the glasses up or all the glasses down, how do you do it?
Show solution
Do the following, but stop if you hear the bell at any point.
1.  Turn two adjacent glasses up.
2.  Turn two diagonal glasses up.
3.  Pull out two diagonal glasses.  If one is down, turn it up and you're done.
    If not, turn one down and replace.
4.  Take two adjacent glasses.  Invert them both.
5.  Take two diagonal glasses.  Invert them both.

References
    "Probing the Rotating Table"
    W. T. Laaser and L. Ramshaw
    _The Mathematical Gardner_,
    Wadsworth International, Belmont CA 1981.

        ... we will see that such a procedure exists if and
        only if the parameters k and n satisfy the inequality
        k >= (1-1/p)n, where p is the largest prime factor
        of n.

The paper mentions (without discussing) two other generalizations:
more than two orientations of the glasses (Graham and Diaconis)
and more symmetries in the table, e.g. those of a cube (Kim).

Additional material

The same puzzle in another guise, posted in 1998:

    You are an explorer, and have found the treasure in a dark cave.
    You turn to leave, but the door slams shut and the ceiling begins to
    descend towards you...  You have in front of you a square post, and
    on each side of the post there is a hole big enough for you to fit
    your hand through.  In each hole is a switch, which can either be up
    or down.  You know that the door will open when all the switches are
    either up or all the switches are down.  You can put a hand in two of
    the holes and turn the switches up or down as many times as you
    like, but as soon as you withdraw your hands, the door will open (if
    the switches are aligned) and either way the post will revolve, so
    you have no way of knowing which holes you had your hands in when it
    stops revolving.  You have enough time for 5 different insertions of
    your hands before the ceiling crushes you...  you can hope for the
    best and keep turning switches in the hope of hitting all 4...  but
    what strategy can you use to ensure, after 5 tries, of having all the
    switches one way?

    -- Betsalel <bsteinha@macs.biu.ac.il>

Congratulations, this is a really nice puzzle.  Did you invent it?

1. Begin by reaching into opposite holes and turning both switches UP.
(If the other two switches are also UP, you're saved.  But suppose not.)
Remove your hands.

2. Next try, reach into *consecutive* holes (neighboring ones).  Flip
both switches UP.  Now you know that three of the switches are UP.  If
the fourth switch is UP, you're saved.  So suppose it is down.  Remove
your hands.

3. Next try, reach into opposite holes again.  If you feel a DOWN switch,
you can just flip it up and be saved.  So suppose you feel two UP
switches.  Then flip one DOWN, leave the other UP.  Remove your hands.

There are now two neighboring DOWN switches and two neighboring UP
switches.

4. Reach into neighboring holes.  Flip both switches.  If the switches
that you feel match (both UP or both DOWN), you can flip them both and be
saved.  So suppose they do not match, and you've flipped the UP to DOWN
and the DOWN to UP.  Remove your hands.

Now each switch differs from its neighbors.  That is, there are two
opposite UP switches and two opposite DOWN switches.  So,

5. Reach into opposite holes and flip both switches.  Whew, that was
close.

-- Jamie Dreier <pl436000@brownvm.brown.edu>

[ Editor: Aaron Bergman <abergman@pantheon.yale.edu> posted the same
sequence as the one given above (adjacent, opposite, opposite,
adjacent, opposite). ]

[ Editor: a suggested rewording of the problem, sent to the archive
maintainer in 1996. ]

>You may do so by grasping any two glasses,
>feeling their orientation, and optionally turning either over.

I gave this to a friend and he asked "either but not both?"  So it might
be nice to clarify.

Also, people tend to try randomized approaches, which may never terminate.
Your solution should work even if an adversary is allowed to spin the table
*after* you choose your glasses.  I'm not sure what the best way to capture
this is...

I guess I would re-word the whole thing as follows:

Four champagne glasses are placed in the four corners of a square rotating
table (like a lazy susan).  You wish to turn them all in the same direction,
either all up or all down.  You may touch no more than two glasses at a time,
and you are blindfolded so you must determine the orientation of the glasses
by feel; you may invert either or both of the glasses you select.  Here's
the catch: after you release the two glasses, the table is spun by an
adversary who's trying to make you fail.  Find a method that orients the four
glasses all up or all down no matter what the adversary does.

-- John R. Black <blackj@cs.ucdavis.edu>