Sunday, April 19, 2009

Two Headed Dragon: a Quick Logic Riddle

The Setup:
You walk down a long tunnel and come to the end with a door on either side. One door leads to paradise, and the other door leads to suffering, but they are both identical.  A two headed dragon sits in between the doors. One of the heads always lies, the other always tells the truth. There is no way to tell which one is which but you are allowed one question to ask one of the heads to help determine the correct road to paradise.

The Problem:
What question do you ask to discover the correct door?

The Solution:
Ask, "what door would the other head say leads to paradise?"  then go through the opposite door.

The Analysis:
The two dragon riddle poses an excellent example of extraneous v. necessary information. At first blush, you think to solve the riddle you must deduce which dragon lies and which tells the truth. Of course, even after the riddle is solved we still never know which is which. Because we never identify the honest dragon, we instead rely on the dragons to cross check eachother's answers--one will lie about the truth, the other will faithfully report a lie. The answer we get is always wrong but we know how its wrong and can deduce the correct answer from it. If we had more questions, we could figure out both which dragon lies and which door lead to paradise--but when our question economy is limited we can only choose one.

This type of intellectual shortcut is used all the time when the opportunity costs of inquiry outweigh the utility. For instance, most people have no idea how their car's engines operates or heart pumps. In complex software coding, different programmers code different functions and may have no idea how the final software works. Like the Two Dragons riddle suggests, some information may be sacrificed in a search for answers.

2 comments:

  1. I like the idea of avoiding the indeterminacy of the two dragons while being able to find the answer to the question. By using one as a proxy of the other (and given that one will never negate the truth and the other will always negate the truth), you can guarantee that the answer will always be false. We'll call the truthful dragon T(x) where T(x)=x and the deceitful dragon D(x) where D(x)=-x. Asking the proxied question, without being able to determine which, will be either: 1) T(D(x))=T(-x)=-x or 2) D(T(x))=D(x)=-x. We can see how combining each dragon into a single set relieves us of the burden of having to discern which dragon does what.

    EXTRA CREDIT: Imagine the same scenario but you have a third head that alternates between telling the truth and lying. You are also granted 1 more question (for 2 questions total). How can you be sure that which door leads to paradise?


    Indeterminacy of this sort also reminds me of something I recently read in Scientific American regarding the nonlocality of entangled pairs in quantum mechanics. In reading "Was Einstein Wrong?: A Quantum Threat to Special Relativity," I understood nothing of it. What I did try to extract from this article was the notion of nonlocality of entagled pairs. Our commonsense understanding of the physical world is that when two things are causally related, we can deduce one by the change of another: if the cue ball is moving toward the stationary 8 ball and they collide, you can deduce that the 8 ball will move. However, quantum mechanics, things aren't quite so simple. If we know (by whatever means or methods) that two entangled particles--say, electrons--are spinning in opposite directions--say, clockwise and counter-clockwise. However, at any given time, the direction of any one of the electron's spin is indeterminate. One can say that (I think) the spin of each electron is "created" the instant the spin of one electron in the pair is measured. But I'm very confused, as I've also read that even determining the spin of an electron in an entangled pair doesn't tell us about the spin of the other electron (!@(U#!(@# WUHT?). If anyone would care to enlighten me so I don't have to go digging into this myself, I'd be very grateful.

    I just thought that there might be a connection here: the relationship between two entangled particles are objectively useful without knowing the precise states of the pair's constituents. Likewise, we can deduce the correct answer to a problem by artificially creating an "entanglement" (posing the question in the way the solution requires) while never having the identities of the heads revealed; the first paragraph of this comment shows that it doesn't matter which head is lying, as long as there IS one lying. The indeterminacy, then, is fundamental to both entanglements and the two-headed dragon riddle, but it can largely be disregarded in arriving at our goal (even when it seemingly can't be disregarded).

    ReplyDelete
  2. EXTRA EXTRA CREDIT:

    Three gods A, B, and C are called, in some order, True, False, and Random. True always speaks truly, False always speaks falsely, but whether Random speaks truly or falsely is a completely random matter. Your task is to determine the identities of A, B, and C by asking three yes-no questions; each question must be put to exactly one god. The gods understand English, but will answer all questions in their own language, in which the words for yes and no are 'da' and 'ja', in some order. You do not know which word means which.

    > It could be that some god gets asked more than one question (and hence that some god is not asked any question at all).
    > What the second question is, and to which god it is put, may depend on the answer to the first question. (And of course similarly for the third question.)
    > Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain: if the coin comes down heads, he speaks truly; if tails, falsely.
    > Random will answer 'da' or 'ja' when asked any yes-no question.

    ReplyDelete