• HexesofVexes@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 个月前

    So the traditional answer here is to ask them to point at the door the other guard will say is safe.

    However, I’m curious, does anyone know of any other valid solutions?

    • EntirelyUnlovable@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      “Is the guard that tells the truth standing in front of the safe door?” If they say yes, you go through their door, if they say no then you go to the other one

        • entropicdrift@lemmy.sdf.org
          link
          fedilink
          arrow-up
          0
          ·
          2 个月前

          Right, in which case the door they’re in front of is the safe door because they lied and said “Yes” when asked if the truth teller is in front of the safe door. And if they tell the truth and say yes, they’re still the person in front of the safe door. By asking it that way they make it so it doesn’t matter if they’re the liar or not. “Yes” means that person’s door is safe and “No” means you want the other door, no matter who you ask.

          • BigAssFan@lemmy.world
            link
            fedilink
            arrow-up
            0
            ·
            1 个月前

            I was thinking: he could lie about the guard but not about the safe door, so he would still be lying. But that’s technically a half-truth, which this particular guard isn’t capable of. So you’re absolutely right, thank you.

      • MajorasTerribleFate@lemmy.zip
        link
        fedilink
        arrow-up
        0
        ·
        2 个月前

        The liar, knowing the truth-teller will point to the good door, points to the bad door.

        The truth-teller, knowing the liar would point to the bad door, points to the bad door.

        Either way, you take the one your guard doesn’t point to.

      • zarkony@lemmy.zip
        link
        fedilink
        English
        arrow-up
        0
        ·
        2 个月前

        They will both point to the bad door.

        If asking the thruthful guard, he will point to the door the liar says is safe, which would be the bad door. If asking the liar, he would consider what the thruthful guard says is safe, then reverse that answer, still ending up on the bad door.

        They cancel out, so whichever guard you ask doesn’t matter.

    • Cargon@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      Could probably do something clever with XOR.

      Is exactly one of the following statements true? You are the liar. Your door is the safe door.

    • CileTheSane@lemmy.ca
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      Barbarian just ripped the head off of one of the guards, you think the other guard is going to be able to arrest them?

      “Answer our questions or you’re next.”

  • infinitesunrise@slrpnk.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 个月前

    The first time I encountered a version of this riddle it actually wasn’t Labyrinth. It was an old black and white episode of Dr Who aired on PBS when I was a little kid. Same scenario but if I recall, robots instead of guardsmen. I think the good doctor solved the riddle in the typical way of asking one robot what the other would say. I’m looking for it now but I can’t find the scene.

  • Triumph@fedia.io
    link
    fedilink
    arrow-up
    0
    ·
    2 个月前

    Ask either guard: “If I asked the other guard which door led to the castle, what would they say?” The answer is always the door that leads to instant death; enter the other door.

  • loaExMachina [any]@hexbear.net
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 个月前

    This doesn’t work. Knowing which guard is a liar doesn’t tell you which door is the correct one (the actual answer has been given in this thread).

  • ThatGuy46475@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    1 个月前

    Now let’s make it a little harder. You have three guards: one tells the truth, one lies, one answers randomly. The guards understand you, but only answer either “da” or “ja”. One means yes, one means no, but you don’t know which is which. You get to ask each guard one question.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 个月前

      Give them a paradox by encoding the other two’s potential responses into the question (similarly to the two guard solution, but this time the random response is included). If they are able to answer, then you asked the random one, because the liar and truth teller have no idea what the random one would answer so can’t answer only yes or no without potentially violating their truthiness rule.

      This isn’t to solve the puzzle but to see what the other two would do in that situation. If I figured out the random one with the first question, I’d use the 2nd to ask the same thing of one of the others. Then, if it’s still 2 doors, the two guard solution will work on the last one to figure it out.

      But if the first guard asked explodes or something when asked, I think that there wouldn’t be enough questions left to find both the random guard (which I believe you have to do first) and the door. Though if you change the question to only ask about one other’s answer instead of both, you’ll be able to find both the random guard and the safe door.

      Though hopefully the whole setup isn’t a lie and everyone present is a strategic liar that wants you dead. Imagine doing one of those riddles and when you step through the door you notice both doors lead into the same room whose walls now seem to be closing in and the last thing you hear is one of the guards asking another why riddles seem to get people to let their guard down anyways.

  • RememberTheApollo_@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    2 个月前

    This puzzle is always presented as difficult, but why not just ask a known? If your eyes are brown just ask “Are my eyes brown?” You’d immediately know which one lies or tells the truth.

    • Skua@kbin.earth
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      Then you still don’t know which door is the correct one, you’ve just learned which guard tells the truth and you’ve used up your one question. The trick is to ask which door the other guard would tell you is the correct one and then go through the other door. If you’ve asked the lying guard, they’ll lie about what the honest one would say and point you towards the wrong door. If you asked the honest one, they’ll truthfully tell you what the lying guard would say and also point you towards the wrong door

    • Edge004@lemmy.zip
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      The difficulty comes from only being able to ask one question. It’s very easy to figure out the liar, but it’s much more difficult to figure out the liar and the correct door in the same question

      • Aqarius@lemmy.world
        link
        fedilink
        arrow-up
        0
        ·
        2 个月前

        In fact, the lying guard is a red herring. You get one question, and need one piece of info: the door. The canonical question doesn’t tell you which guard lies, nor do you care to find out.

    • Seasoned_Greetings@sh.itjust.works
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      Because there are two doors and only one question. If you ask a known question unrelated to the door you find out who the liar is but lose your opportunity to ask them which is the correct door.

    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      2 个月前

      Knowing who lies and who tells the truth doesn’t tell you which door leads to the prize and which to death.

  • ArmchairAce1944@discuss.online
    link
    fedilink
    arrow-up
    0
    ·
    2 个月前

    That’s funny! but if you want to know how to solve this problem every time, even when asking one single question, just ask this question:

    “If I ask the other guy which is the correct path, which path will he tell me?”

    No matter who you ask, both of them will point to the WRONG path, meaning the correct one is the one they DIDN’T point to. Here is the logic.

    For the sake of argument, let’s assume the correct path is the right path. When you ask that question, if the person is the truthful one, he will be honest and say the left path. Because if you ask the liar what the right path is, he will say it is the left path (which is false). Now if you ask the liar what the other guy will say the correct path is, he will lie to you and say it is the left path (which is also false, the truthful one will tell you it is the right path and not the left).

      • howrar@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        1 个月前

        Truth teller: “He’ll point you towards the door that leads to certain death”

    • Nalivai@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 个月前

      “I have no idea what the other guy would say, we’re honest-lier pair of guards, not reading each other fucking thoughts pair of guards”

    • lightsblinken@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      2 个月前

      and also, using “correct path” instead of “right path” will be less confuzzling because english words can have multiple meanings and are the dumb.

        • thedirtyknapkin@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          1 个月前

          yeah, it could be the liar guard’s desire or prime directive to send you down the deadly path. to him that could be interpretated as the correct path. especially if these are automatons working off of some machine logic. like, they don’t even need to be out to get you, that’s totally something that bad code could do on accident.

    • Buddahriffic@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      1 个月前

      That last question is ambiguous enough (in this specific scenario) that either answer would work. It’s both true that the other guard can’t tell her something happened (due to being dead), while the other guard would have said that something did happen if he had been able to. So it’s a meaningless question but the wife doesn’t know that since she doesn’t know the guard is dead.

      Which just adds another layer to the joke lol.