A Stupidly Hard Dog Logic Puzzle

Looks like I’m late to the party, but here’s my attempt before I read the thread:

If I asked you whether you were the dog that always speaks the truth, would you say “arf”?

This probes for truth-speaking dog. Two probes are sufficient to learn which dog is a truther.
The third question is a bit reworded to probe one of non-truther dogs for being an obligate liar.

It’s hard to verify this solution by eyeballing, and drawing the truth table (8x5) is cumbersome. It’s easier to verify something more open, like:

By binary veracity I mean the class a statement belongs to out of two classes: “true statements” and “false statements”, no “95% true” stuff.
If I asked you whether binary veracity of the statement “you are the dog that always tells truth” is the same as binary veracity of the statement “arf corresponds to a positive response”, would your response be positive?


I remember a similar puzzle, but you only had two questions and there was a door behind each guard with only one door leading to escape - you had to learn which one.

1 Like

That’s the one I mentioned above that’s so classic it’s in Dr Who. :slight_smile:

Late to the party but this just posted: https://www.youtube.com/watch?v=ZA4JkHKZM50

1 Like

Nice! 3blue1brown is amazing.

Which reminds me of an amazing series of videos on complex numbers by Welch Labs.

We revisited this logic puzzle this week after encountering it in a slightly different form on the Ted Ed Riddles youtube channel (recommend!).

We came up with a much improved answer, that allows for a truly random dog and everything! (As in, the random dog just flips a coin and spits out T or F based on that, none of this “randomly decides whether to be a truther or a falser” business).

This uses both the indirection trick (so that you don’t have to care about truthers vs falsers), and uses a similar trick to those described already for not needing to care whether “arf” means ‘yes’ or ‘no’.

Yes vs Arf etc

First we came up with a somewhat convoluted solution to this:

“is P is true XOR arf=yes”

If you make out a truth table and work through the slightly-mind-bending-and-easy-to-get-wrong part of translating the t/f values from the truth table into appropriate ARF/RUF responses… you get that the answer will be RUF when proposition P is true and ARF when proposition P is false.

The questions

Our first question will help us pinpoint one of the dogs as definitely not random.

Question #1: ask the first dog “what would you say if i were to ask you if #2 is Random XOR arf=yes”

There are three possible states of the world:

  • [R N N], [N R N], [N N R]

If the dog answers ARF(aka “no, #2 is not the random one”), then we know for sure that the 2nd dog is not the random one. (i.e. [N R N] is impossible). Either I am talking to the random dog right now and just happened to get a garbage answer (in which case #2 is not random), or I am talking to a non-random dog, in which case (because of indirection) they have just told me accurately that #2 is not random. If #2 were the random one, I would not have gotten a “no” answer.

If the dog answers RUF(aka “yes, #2 is the random one”), then we know for sure that the 3rd dog is not the random one. (i.e. [N N R] is impossible). Either I am talking to the random one right now and got a garbage answer (but I’m talking to the random one, so 3 is definitely not random), or I am talking to a truthful (via indirection) dog, who has just accurately revealed that #2 is random. In either case, #3 is definitely NOT random.

So now, we’ve determined one non-random dog. We can direct our next question to them and get an accurate non-random answer. Let’s use this second question to narrow in on which of the other two dogs is Random.

Question #2: (of the previously determined non-random dog) “what would you say if I were to ask you if #1 is Random XOR arf=yes”.

Now we can take their answer straight: either ARF(no), meaning 2 is Random, or RUF(yes) and 1 is Random.

Finally, we can ask our same non-random dog again to determine which of the non-randos is truther

Question #3: “what would you say if i were to ask you if you are the truther XOR arf=yes”

Tada!

Okay, writing up an answer to a logic problem is tough. Probably this is about as clear as mud. We were later handed a simplification of our XOR thing where you just ask “if I asked you if P is true, would you answer ARF?”, but maybe @dreev would like to step in to explain that less-convoluted version?

1 Like

Thanks for writing this up, @bee! :heart: :brain:

I think (after confusing myself multiple times again) I can explain the simplification of the XOR trick for getting around the arf-vs-ruf problem:

Say you want to know whether it’s raining so you ask a truth-telling dog, “If I were to ask you if it was raining, would you say arf?”

First take the case that arf means yes. Then the dog will say arf if it’s raining and ruf if it’s not. Great.

Now the case that arf means no. That just gives us another double negative. You’re asking if the dog would say no to your question. So if the answer is yes, the dog will say “no, I would not say no” and if the answer is no, the dog will agree (yes) that they’d say no.

So either way, the dog is saying “arf” if the answer to the question is yes and “ruf” if it’s no. You don’t know or care if it’s a yes arf or a no-to-the-answer-being-no arf because both of those things mean the answer to the question you care about is yes.

All making sense? Unless you’re smarter than me, the answer will probably be no until you’ve drawn the whole truth table for yourself!

Oh yeah, and the indirection of “if I were to ask you” means that the above works just as well with a liar as a truther.

(Review: A liar lies to you about what they would say, meaning they lie about their lying, which means they answer exactly like a truther. For example, “what would you say if I asked if the sky is blue?” A truther would say yes the sky is blue and truthfully says they’d say yes. A liar would say no about the sky being blue and falsely says they would say yes. Either way, you get a “yes” answer when the sky is actually blue.)

Anyway, as @bee said, we are very pleased that we finally got a better answer to puzzle!

To make sure I’ve got it, and to incorporate the better solution to the arf-vs-ruf problem, here’s my own exposition of it:

Question 1, addressed to dog 1: “If I asked you if dog 2 was Random, would you say arf?”

Recall that the “if I asked you” trick makes liars into truthers and the “would you say arf” trick makes it so we can treat arf as yes.

So if dog 1 says dog 2 is Random then there are two possibilities: we’re asking a reliable dog and dog 2 really is Random, or we’re asking Random and the answer is meaningless. But either way, dog 3 is in the clear!

If dog 1 says that dog 2 is not Random then there are again two possibilities: we’re asking a reliable dog and dog 2 is not in fact Random, i.e., also reliable, or we’re asking the Random dog, in which case both other dogs are reliable. Once again, both possibilities yield a definitely-reliable dog – in this case dog 2.

At this point we’ve asked 1 question and identified one reliable (non-Random) dog – either dog 2 or dog 3.

Question 2, addressed to that non-Random dog: “If I were to ask you if dog 1 was Random, would you say arf?”

And, boom, now we know which dog is Random. Question 1 narrowed it down – identifying either dog 2 or 3 as non-Random – and question 2 either pinpoints dog 1 as Random or else identifies a second non-Random dog. (With 3 dogs total, identifying 2 of them as non-Random reveals Random by process of elimination.)

The only thing we don’t know now is which of the 2 non-Random dogs is the truther and which is the liar.

Question 3, addressed to either non-Random dog: “If I were to ask you if you were the liar, would you say arf?”

Et voila. Arf means you’re talking to the liar, ruf means the truther. QED.