[net.math] The way to Oz

james@ur-laser.uucp (James Chavin) (08/22/84)

     You are Dorothy on the way to the Wonderful Wizard of Oz.  One day, while
gaily skipping along the yellow brick road, you come to fork, one path leading
north and another one west.  Unfortunately, you don't know which path leads to
Oz and which path leads to /dev/null.
    Between the fork lies a quaint old cottage.  In this cottage there live two
identical witches.  One witch always tells the truth while the other witch
never tells the truth.  Both witches know the way to Oz, and have graciously
granted you one question to ask one of them.  You must consider your choice of
question carefully, for there must be no doubt as to the correct way to Oz.  A
question such as 'Which way to Oz?' is obviously useless, as you will not know
whether you asked the truthful or the deceitful witch.  The problem is not to
guess the correct way, but to ask the correct question so that regardless of
which hag is asked, the same path would be indicated.
 
 
---------
    
     I am posting the answer to the question from above.  I received, as of 
writing this, eleven correct answers and two wrong answers.  The answer below isone sent by John Higley.

If I was to ask the other hag which way to go, what would she say?
 
 
I would take her answer and go the other way.
 
 
Results:
 
Truthful hag:  Knowing that the lying hag would point you the wrong way says
               so by pointing you the wrong way
 
Lying hag:     Knowing that the truthful hag would point you the right way
               purposely lies and points you in the wrong direction.




Other people who sent me legitimate answers are
                  Dan Lai
                  Minh Duy Tu
                  Thom Brando
                  George Burgesser
                  Topher Eliot
                  Dieter Muller
                  Deepak S. Sabnis
                  Trey Garlough
                  Bill Bulko
 
  An original solution was given by Dave Maxey and is reproduced in full below-

Point in a direction (pick one, any one) and ask one of the witches:
 
"If I were to ask you the question 'Is that the way to Oz?', would you
say yes?"
 
The truth table works out like this:
 
A = 'Is that the way to Oz?'
B = "If I were to ask you A, would you reply yes?"
C = The way you are pointing is the way to Oz
 
            Lying Witch            Truthful Witch
       C is true  C is false    C is true  C is false
IF you
ask A    No          Yes           Yes        No 
 
ask B    Yes          No           Yes        No 
 
Therefore, you will receive an answer of Yes if it is the way to Oz and
No if it is not.


      I have given credit to everyone from who I received a correct answer as of
8/22/84.   Thanks for all the interest.
                                

                                    James Chavin
                                    Laboratory for Laser Energetics
                                    University of Rochester
                                    250 East River Road
                                    Rochester, N.Y. 14623
                                    {allegra,seismo} !rochester!ur-laser!james