NPF: RIDDLER

I'm currently reading a book that includes some firsthand accounts from Vietnam-era POWs describing how they killed literally years worth of time in near-total silence and without any reading material. Several mentioned that they enjoyed passing around complicated riddles to keep their minds occupied. This one almost had me resorting to Google, although eventually I got it. Take a shot at answering it in the comments if you want.

You're walking down a road that splits into two paths. One path is safe and leads to your destination. The other is so dangerous that you'll be killed if you take it. You don't know which is which. Each path has a sentry standing watch; one sentry always lies and the other always tells the truth. Again, you don't know which is the liar and which one is honest. You can only ask one question and only one of the sentries will answer it. What's the one question to ask that will guarantee you end up taking the safe path?

I know, right?

Be Sociable, Share!

44 Responses to “NPF: RIDDLER”

  1. Adam Says:

    I haven't figured it out yet but it reminded me of this whole series of logic puzzles that revolve around the same sort of premise, knights and knaves: http://philosophy.hku.hk/think/logic/knight.php

  2. APJ Says:

    The key to "one always lies and the other always tells the truth" riddles is to ask one of them how the other one would answer the question, guaranteeing that you will get a false answer. So: "Which path would the other sentry say leads to my destination?" will induce either sentry to point out the dangerous path.

  3. FMguru Says:

    A classic.

    "Which road will the other guy tell me to take" – and take the opposite road.

    Microsoft and Google used to use fiendish braintwisting logic riddles like this as part of their interview process. Google, I know, dropped them a few years back when HR discovered that the ability to answer these sort of 3-star GAMES Magazine questions didn't really correlate with future job performance. They're fun to read, though. Do a search for keywords like "google microsoft interview riddles"

    Here's a not too tough one: You have eight basketballs (or bowling balls or whatever) all of the same size. 7 of them weigh the same, and one of them weighs slightly more. How can you find the ball that is heavier by using a balance and only two weighings?

  4. middle seaman Says:

    It's an old one. FMguru has the answer provided lying is: false means true and true means false. Liars are a little more sophisticated than that. In that case the problem is way more complicated.

  5. driff Says:

    I came up with "Does the honest man guard the dangerous path?"
    Whichever man, if he says yes, take the other path.

  6. harveyhaave Says:

    This was on DR Who a long time ago – ask one what the other would say, choose the opposite.

  7. Scepticus Says:

    I don't think I am clever enough to figure this out on my own. I was told the answer when I first encountered the riddle as a child.

  8. Pat Says:

    Ooh! I know this one. "The honest sentry" is a metaphor for Kissinger, right?

    FMguru, I assume the answer is weigh three against three, and if one group is heavier, weigh two of that group against each other (and if they're equal, it's the omitted third that was heavier)—and if the three-against-three are equal, it's one of the last two that is heavier.

  9. Ed W. Says:

    @FM Guru–first weigh is 3 on one side, 3 on the other. If those 6 balance, you just weigh the other two and you're done. If the 6 *don't* balance, weigh any two from the heavier side (1 on each side); if those balance, it's the 3rd, if they don't balance, well, there you go.

    Now here's another logic puzzle–if I haven't seen Transformers: Dark of the Moon, will I be able to follow the plot if I drop in ⅔ of the way through the run time on FX? The answer should be pretty obvious, but if it's not, the answer is that it's a trick question–Transformers movies don't have a plot.

  10. Dr. Mac Says:

    Who the fuck cares. The Governator will just blow them up anyway.

  11. Alex SL Says:

    FMguru,

    Every time I read stuff like that I wonder if most HR people on the planet aren't insane.

  12. Gordon Guano Says:

    The movie Labyrinth had a young Jennifer Connelly figuring this one out.

  13. purpleplatypus Says:

    I thought this post was a joke about how cliched the questions were, or something, at first. This riddle is literally *ancient*, and has shown up in many pop culture contexts too, so I just sort of assume everyone knows it.

  14. Ben Says:

    While this is a common riddle, I'd forgotten the answer myself and had to reason it out. I rather like driff's take on it, supra, which is really more poetic than the usual response.

  15. David Says:

    Any question to one sentry about what the other one would tell you is built on the assumption that both sentries knows what rule governs both of their behaviors. It could be that each sentry is ignorant of the behavior of the other one. Instead, ask either sentry, "Do you know whether you are obligated to always follow a rule about telling truth or lies?" Each sentry knows there is a rule that governs his/her behavior, so the truth-telling one says yes, and the dishonest one says no.

  16. NonyNony Says:

    @FMGuru – "Google, I know, dropped them a few years back when HR discovered that the ability to answer these sort of 3-star GAMES Magazine questions didn't really correlate with future job performance. "

    Shockingly the ability to answer questions like this in a stress-filled interview correlates more with whether or not you spent a lot of time with riddles in your youth, rather than how you think on your feet. I always thought it was silly for interviewers to ask questions like this unless their intent was to find someone with a certain kind of problem-solving background (i.e. one that focused on messing around with logic puzzles).

    I remember one interview where the interviewer basically gave me a thinly veiled Monty Hall problem, which I was able to answer because I had seen the Monty Hall problem before. I still wonder exactly what the point of that was – did they really think that I came up with that explanation on my own right there in front of them, or were they just looking for someone whose breadth of education had had him/her encounter the Monty Hall problem before? I never did get a good answer out of the interviewer (though I did get the job offer, so I assume that the latter must have counted for something since the interviewer knew that I wasn't coming up with a solution on the fly and had actually seen that problem before.)

  17. c u n d gulag Says:

    Alex,
    As a Trainer who often had to work with HR people, and was sometimes part of HR, I don't think they're insane – or, not much.

    Imo – they're more like incompetent's and busy-bodies who are pretty useless in any other field, and are smart enough to know it.

    And that would include me.

  18. Matt Says:

    New to the blog here, which leads to my much simpler riddle: What does the "NPF" in the headline stand for? I see it frequently here; not sure what it means. Similar to how you feel like a dolt when someone explains you the answer to a riddle, I'm sure I'll be feeling like a jack ass when I hear the answer.

  19. c u n d gulag Says:

    I'm no good at puzzle games, maybe because I'm not very logical. Another reason is that I don't like any games whatsoever – not even when I was a kid. And especially not card games. Largely because I suck at all games, and I get easily bored unless I'm winning.
    I can see, though, how useful these kinds of games would be for POW's – to keep their sanity, and take their minds off of their horrible situation.

    I do like sports, however. And I was pretty good at most of them.

    I was, though, great at the first version of Trivial Pursuits – because I've got a terrific memory (or, had), and I read a lot, am interested in geography and science, and was in tune with the culture and music back then.
    I don't remember anyone ever beating me at a single game.
    I'm sure someone must have, and I've just conveniently blocked it out.

    Now, in updated versions, I wouldn't know any cultural references at all, because I don't go to movies, don't watch TV, and don't listen to music.
    I'd get my ass kicked!!!

  20. Elle Says:

    @Matt

    What does the "NPF" in the headline stand for?

    It means 'No Politics Friday'. On Fridays, Ed delights his readership with a smörgåsbord of esoteric sporting meanderings, Cold War factoids, popular music criticism, and arcane archived films.

  21. Eric Says:

    I've been working this for about a half hour and haven't looked at the comments yet, so sorry if this is duplicative and someone has already written this.

    Since you don't know (a) which sentry is guarding which path (two possible scenarios) AND (2) you don't know which sentry will answer your question, your question must be one that will always point you to the correct path regardless of who answers and regardless of which path he is currently guarding. I believe that question is:

    "Does the liar guard the safe path?"

    If whoever answers says "no" take that person's path. It is either the honest sentry guarding the safe path, or the liar guarding the safe path.

    If whoever answers says "yes" then take other's path. It is either the honest sentry guarding the dangerous path, or the liar guarding the dangerous path.

  22. Hazy Davy Says:

    I must have heard it, before. "What will the other dude say?". Go to the one that says "Take this path".

  23. Anubis Bard Says:

    I love that riddle. Another favorite (though not nearly as hard) is the old one about the guy with a boat, who needs to carry a chicken a fox and a bag of grain across a river, but can only carry one at a time. And you can't leave the fox alone with the chicken or the chicken with the grain. It's a nice one for teaching a kid how to reason something out.

  24. Matt Says:

    Improved version:

    http://xkcd.com/246/

    :)

  25. SeaTea Says:

    Thanks to "Labyrinth" this was an easy one. :) Yet another reason to be thankful for the ridiculously beautiful Jennifer Connelly.

  26. Sarah Says:

    Glad to know I'm not the only one who remembers Labyrinth.

    So what's the name of the book?

  27. swkellogg Says:

    You ask : Do both of you tell the truth?

  28. swkellogg Says:

    Oops that was dumb — I still didn't get the path right — doh!

  29. Greg Says:

    Never one to jump to the defense of HR but in the MSFT & GOOG brain teaser bit, the people who stopped the practise of asking these brain teaser questions are people _from_ HR.

  30. purpleplatypus Says:

    David's answer, like swkellogg's, will tell you whether you're addressing the liar or the truth-teller, but does not, by itself, tell you which path is safe.

    Also, this:
    http://www.giantitp.com/comics/oots0327.html

  31. My Truth Hurts Says:

    That's the riddle from the Tom Baker Dr Who episode "Pyramids of Mars". You ask one what the other would answer and the correct answer can be deduced from that.

  32. Major Kong Says:

    Here's a fairly easy one that was a puzzler on "Car Talk" a while back:

    A traveling salesman is staying in a very small and finds that he really needs a haircut.

    The town is so small that it has exactly two barbershops.

    The first barbershop is immaculately clean and modern. The barber is well groomed and has impeccable hair.

    The second barbershop is old and dirty, just like its barber, who has awful looking hair.

    Which barbershop does the salesman pick and why?

  33. Sarah Says:

    Which barbershop does the salesman pick and why?

    The second barbershop. Because if the first barber is perfectly capable of keeping his own shop clean, he can't be cutting his own hair–and worse than that, he must be cutting the second barber's hair, which is why it looks so bad.

  34. Jared Says:

    Of course, things get harder when there's a third guard who kills people who ask him tricky questions…

  35. John Doheny Says:

    Oh for fuck's sake, you guys are really overthinking this. Ask him if he's a tree frog.

  36. Sarah Says:

    Oh for fuck's sake, you guys are really overthinking this. Ask him if he's a tree frog.

    The answer to that question will tell you which of the sentries is a liar and which is the truth-teller. How do you determine which path is the safe one to take? Remember, you can only ask one question.

  37. Ben Says:

    "swkellogg Says:
    January 17th, 2014 at 10:51 am

    You ask : Do both of you tell the truth?"

    And then you've used up your question and don't know which path is safe, and you die.

  38. Phoenician in a time of Romans Says:

    I think the reasoning behind the use of the riddles in HR was being over-impressed with the idea of "out of the box" thinking. The liar riddle depended on the answerer realising that while the status of either guard was undetermined, the status of both co-mingled was known, while the basketball riddle depended on realising that you could exclude balls from being weighed entirely.

  39. Neal Deesit Says:

    The conceptually more parsimonious solution is to ask this question: "If I asked you which is the safe path, what would your answer be?"

    The truthful sentry will tell the truth about his hypothetical true answer, and indicate the safe path. Similarly, the lying sentry will lie about his hypothetical false answer and, because there are only two paths, will also indicate the safe path. So, it doesn't matter which one replies.

    Although the puzzle stipulates that "you don't know which [sentry] is the liar and which one is honest," it stipulates nothing about whether each sentry knows the truthfulness of the other. But this additional condition is necessary for any solution that involves asking the sentries a hypothetical question about what the other sentry would say.

    Asking the sentries collectively what each himself would say does not require that either sentry know anything about the veracity of the other; thus the self-reporting hypothetical question is conceptually more parsimonious.

  40. Coises Says:

    “Is the safe path guarded by the sentry who tells the truth?”

    If the answer is yes, take that path; if no, take the other.

  41. Andrew Says:

    @Neal

    I usually understand these sorts of questions to assume that the two Guards are actually "oracles", in that you can ask them *any* question and the truth-telling guard will tell the truth, even if he didn't know it to be the truth – vice versa for the liar.

    Of course, it depends on whether the puzzle is being presented as a "logic" puzzle, or a "lateral thinking" puzzle; the latter does require you to make reasonable, educated assumptions about the aspects of the puzzle. So, it depends.

    ~~~

    A good riddle when spoken – but not written out – is "What word becomes longer when you take a latter away from it? Written out, it usually answers itself, but when stated verbally, it's much tougher.

    ~~~

    A second one I've always liked is "A father and son are in a car accident. The father dies instantly. The boy, in critical condition, is rushed to the nearest hospital for emergency surgery.

    The surgeon looks at the child aghast and says, "I can't operate on him! He's my own son!"

    It was my first exposure to the necessity of feminism at the tender age of five, which is why I like it.

  42. Karl Says:

    The answer was given in the movie Labyrinth.

    Also, without the constraint of only a single question, I would go with "What's 2 plus 2?"

  43. john Says:

    ask each guard "do you like gladiator movies?"

  44. Andrew S. Says:

    "Is it safe to take this dangerous path?"