Stories
Slash Boxes
Comments

SoylentNews is people

posted by janrinok on Sunday October 23 2016, @04:56PM   Printer-friendly
from the head-scratching dept.

I just happened to see this story appear in our #rss-bot feed. How to Solve the World's Hardest Logic Puzzle. Given that this is the weekend, I thought it might make for an interesting challenge and discussion.

To set the stage for the puzzle, the author provides some background on Raymond Smullyan, the puzzle's composer:

While a doctoral student at Princeton University in 1957, studying under a founder of theoretical computer science, Raymond Smullyan would occasionally visit New York City. On one of these visits, he met a "very charming lady musician" and, on their first date, Smullyan, an incorrigible flirt, proceeded very logically—and sneakily.

"Would you please do me a favor?" he asked her. "I am to make a statement. If the statement is true, would you give me your autograph?"

Content to play along, she replied, "I don't see why not."

"If the statement is false," he went on, "you don't give me your autograph."

"Alright ..."

His statement was: "You'll give me neither your autograph nor a kiss."

It takes a moment, but the cleverness of Smullyan's ploy eventually becomes clear.

A truthful statement gets him her autograph, as they agreed. But Smullyan's statement, supposing it's true, leads to contradiction: It rules out giving an autograph. That makes Smullyan's statement false. And if Smullyan's statement is false, then the charming lady musician will give him either an autograph or a kiss. Now you see the trap: She has already agreed not to reward a false statement with an autograph.

With logic, Smullyan turned a false statement into a kiss. (And into a beautiful romance: The two would eventually marry.)

Clever! But enough with the setup — What's the puzzle?

The Hardest Logic Puzzle Ever goes like this:

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.

The story's author is, himself, a bit of a puzzle-poser. The story tells how to solve the puzzle, but does not actually provide the solution. Are there any Soylentils up to the challenge?


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by darkfeline on Sunday October 23 2016, @08:42PM

    by darkfeline (1030) on Sunday October 23 2016, @08:42PM (#417951) Homepage

    The solutions don't seem to make sense?

    >The first is one of Smullyan’s classic knights and knaves riddles ... knights always tell the truth, knaves always lie, and your task is to find out who’s who. The solution is to ask a question like, “Are you a knight if and only if two plus two is four?”

    Knights: T T = T (both predicates are tautologies), knight answers Yes
    Knave: F T = F (contradiction, tautologies), Knave answers Yes

    You get no information from asking that question.

    >In the second puzzle, you know you’re asking a knight—but he only responds with “da” and “ja.” The strategy here is a variant of that in the first puzzle: You ask, “Does ‘da’ mean ‘yes’ if and only if two plus two equals four?”

    Da: T T = T, answers Yes
    Ja: F T = F, answers Yes

    Again, no info.

    >Suppose I place three cards in a row in front of you—two aces and a jack—face down. You don’t know how they’re ordered, but I do. You can ask one yes-no question, while pointing at one of the cards. If you happen to point at one of the two aces, I’ll answer the question truthfully, like a knight; if you point at a jack instead, I’ll answer “yes” or “no” at random, like Random. Where will you point, and what will you ask?
    >The answer: Point to any card and ask if one of the other cards is an ace.

    Ace: T (tautology) answers Yes
    Jack: T (tautology) answers Yes or No

    If you get a Yes you're fucked, if you get a No (pure luck), you know it's a jack.

    --
    Join the SDF Public Access UNIX System today!
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by mhajicek on Sunday October 23 2016, @09:35PM

    by mhajicek (51) on Sunday October 23 2016, @09:35PM (#417965)

    If the three are gods, they may answer your insolence with a lightening bolt to the face.

    --
    The spacelike surfaces of time foliations can have a cusp at the surface of discontinuity. - P. Hajicek
  • (Score: 2) by FatPhil on Sunday October 23 2016, @09:39PM

    by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Sunday October 23 2016, @09:39PM (#417967) Homepage
    > Knights: T T = T (both predicates are tautologies), knight answers Yes

    The knight is a knight even if 2+2!=4, so he answers No.

    Isn't "does 2+2=4?" a better question? Knights answer "yes", knaves answer "no".
    --
    Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
    • (Score: 2) by aristarchus on Sunday October 23 2016, @11:46PM

      by aristarchus (2645) on Sunday October 23 2016, @11:46PM (#417988) Journal

      The classic question, by Kaspar Hauser in The Enigma of Kaspar Hauser (German: Jeder für sich und Gott gegen alle; lit. Every Man for Himself and God Against All), by Werner Herzog, is "Are you a tree frog?" Knights usually answer "nein". Knaves answer "ja", and the jig is up!

      Citation: https://en.wikipedia.org/wiki/The_Enigma_of_Kaspar_Hauser [wikipedia.org]

      • (Score: 0) by Anonymous Coward on Monday October 24 2016, @04:55PM

        by Anonymous Coward on Monday October 24 2016, @04:55PM (#418209)

        What happens if you ask "how many tree frogs are you?" Nein!

        • (Score: 2) by kazzie on Monday October 24 2016, @06:11PM

          by kazzie (5309) Subscriber Badge on Monday October 24 2016, @06:11PM (#418230)

          In that case, the knight will say “ni”!

  • (Score: 2) by FatPhil on Sunday October 23 2016, @09:42PM

    by FatPhil (863) <reversethis-{if.fdsa} {ta} {tnelyos-cp}> on Sunday October 23 2016, @09:42PM (#417969) Homepage
    Final question perhaps should be "exactly one" rather than "one"?
    --
    Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
  • (Score: 3, Informative) by AthanasiusKircher on Monday October 24 2016, @03:00AM

    by AthanasiusKircher (5291) on Monday October 24 2016, @03:00AM (#418022) Journal

    The "two plus two equals four" stuff is the article's attempt to try to "paraphrase" the actual published solution to the problem (from 1996), but it doesn't make a lot of sense the way it's phrased. If you really want to understand the solutions, look them up (or solve the puzzle yourself) -- the phrasing TFA is just muddled and I'm not sure it actually is doing what the author thinks it is. (In fact, I'm pretty sure TFA is pretty confused about how the first two puzzles actually work.)

    As for the last problem, the quoted solution is correct -- I think you missed the detail that you're pointing at a different card from the one you're asking about. Imagine there are three cards, and I point to the middle one while asking "Is the card on the right an Ace?" My behavior is to choose the right card if you say "Yes" and the left card if you say "No."

    Why? Well, if the middle card is an Ace, then you'll answer truthfully. So if you say "Yes" I know the card on the right is an Ace and thus I choose it. If the card on the right is a Jack, you'll say "No," so I'll go with the card on the left.

    If, on the other hand, the middle card is a Jack, you'll answer randomly. But in that case your answer doesn't matter, since the Jack's in the middle and the two outer cards are Aces. Thus, whether I go with the card on the right or the left, I will definitely get an Ace.

    • (Score: 2) by darkfeline on Monday October 24 2016, @03:41AM

      by darkfeline (1030) on Monday October 24 2016, @03:41AM (#418030) Homepage

      Thanks for the clarification. The article was unclear about the goal of the last problem, which I assumed was to identify what all the cards are. It sounds like this is impossible, since in the proposed solution, you can only guarantee picking one ace, and cannot guarantee identifying all three cards/the jack.

      --
      Join the SDF Public Access UNIX System today!
      • (Score: 2) by AthanasiusKircher on Monday October 24 2016, @05:31AM

        by AthanasiusKircher (5291) on Monday October 24 2016, @05:31AM (#418049) Journal

        Yes, I now realize that TFA is vague on that point too. In general, it's a really bad presentation that basically completely rips off the original 1996 article but manages to screw stuff up and be vague so that the material is completely unclear.