Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: notesfiles
Path: utzoo!linus!decvax!decwrl!amd!dual!zehntel!hplabs!hp-pcd!hpfcrs!lief
From: lief@hpfcrs.UUCP (lief)
Newsgroups: net.puzzle
Subject: Re: Orphaned Response
Message-ID: <15400002@hpfcrs.UUCP>
Date: Sun, 14-Oct-84 18:57:00 EDT
Article-I.D.: hpfcrs.15400002
Posted: Sun Oct 14 18:57:00 1984
Date-Received: Thu, 18-Oct-84 19:23:04 EDT
References: <-26200@iwu1c.UUCP>
Lines: 73
Nf-ID: #R:iwu1c:-26200:hpfcrs:15400002:37777777600:3834
Nf-From: hpfcrs!lief    Oct  9 14:57:00 1984

PROBLEM:  Given 12 golf balls, one being odd (either heavier or lighter).
          Determine which one is heavier or lighter with only 3 weighings
          on a balance scale.

I don't know what the solution is supposed to be, but here is how I would
do it (same technique as Hamming codes are done):

(1)  The balance scale can be thought of as a 3-state digit.  In other words:
     a. If the left is heavier than the right, the value is 0 (arbitrary).
     b. If the left is ligther than the right, the value is 1
     c. If the left is the same as the right, the value is 2

(2)  Because of the 3-state nature of the balance scale, if we perform 3
     seperate weighings, then that gives us 3^3 or 27 possibilities, which
     should be sufficient.  For our situation there exists 24 possibilities,
     either 1 of the 12 balls will be heavier or 1 of the 12 balls will be
     lighter.

(3)  I will assign a unique 3 digit value to each golf ball (using 3-state
     digits).  This to is somewhat arbitrary, except that we would like the
     heavy ball to be the complement of the light ball.  Thus we have:

     BALL ID       HEAVY VALUE       LIGHT VALUE
     =======       ===========       ===========
        a              000               111
        b              001               110
        c              002               112
        d              010               101
        e              102               012
        f              120               021
        g              121               020
        h              122               022
        i              210               201
        j              211               200
        k              212               202
        l              221               220

     Note that I did not use 011, 100, or 222.  Obviously, there is no
     complement for 2 since that is when both sides of the scale are equal.
     Thus, one would not use 222 as it could not be unique.

(4)  Divide the 12 golf balls into 3 groups of 4 and perform the 3 weighings
     in the following order (determined by the values assigned above in (3)):

     WEIGHING NUM     LEFT SIDE      RIGHT SIDE     OFF SCALE
     ============     ==========     ==========     ==========
          0            a b c d        e f g h        i j k l
          1            a b c e        d i j k        f g h l
          2            a d f i        b g j l        c e h k

     Note that the left side corresponds to digit 0, the right side corresponds
     to digit 1 and off scale corresponds to digit 2.  Weighing number 0 corres-
     ponds to the 1st digit of the ball value, weighing number 1 corresponds to
     the 2nd digit of the ball value, and weighing number 3 corresponds to the
     3rd digit of the ball value (1st digit is the left-most digit).  Just in
     case you don't understand this table, what I am saying is that in the 2nd
     weighing, place balls a, b, c, and e on the left side, balls d, i, j, and
     k on the right side, and balls f, g, h, and l off the scale.

(5)  Example:  Suppose on the first weighing, the sacles are equal.  On the
     second weighing the left side is heavier.  On the third weighing, the
     scales are equal again.  This gives me a result of 202 (where 2 is assigned
     for equality and 0 is assigned when the left side is heavier, as defined
     above).  Looking at the table in (3) shows that 202 corresponds to ball
     k being lighter than all the other balls.
 
     Example:  Suppose on the first weighing, the left side is heavier.  On the
     second weighing the left side is heavier.  On the third weighing, the
     right side is heavier.  This gives a result of 001.  Looking at the table
     in (3) shows that this corresponds to ball being heavier than all the other
     balls. 

Lief Sorensen