Hacker News new | past | comments | ask | show | jobs | submit login

I see this problem differently, as mainly exhibiting a problem that cannot be analyzed without self-reference. Self-reference causes problems.

The more obvious solution that the postscript hints at is the question "what would you say if I asked you whether [this door] leads to the castle?". Here, we immediately cancel out the influence of whatever goblin we're speaking to, and we get the right answer, whereas in the movie's solution we immediately incorporate the influence of the lying goblin and get the wrong answer.

But the movie's solution is better for the movie, because "what would you say if I asked you X?" is a normal English way to ask "X", and in this case, where the two questions are different, the audience is guaranteed to be confused.






> "what would you say if I asked you whether [this door] leads to the castle?".

Very clever. If the goblin is lying, the double negation cancels out. If the goblin is telling the truth, the truth remains unchanged.

Personally, I didn't find the article very clarifying. Instead, I like to think of the goblins A and B as functions that take in the truth value of a statement and output an answer.

One goblin's function yields the boolean not of the result, and the other passes it through unchanged. You don't know which goblin has which functions, so the two ways to get a reliable answer out are:

    A(A(question))

    A(B(question))
The former is your answer here, which does the double negation. The latter is the answer in the movie where you pass it through both goblins which means the answer will reliably have its truth value flipped exactly once.

The nice thing about the latter solution is that it scales up to more goblins and an arbitrary ratio of liars. Let's say there are four goblins, Ann, Ben, Cat, and Dan. Two always lie and two always tell the truth. You can ask "Would Ann say that Ben would say that Cat would say that Dan would say that door 1 leads to the castle?" In other words:

    A(B(C(D(question))))
In this case, the answer tells you if door 1 is correct because there are an even number of liars so the negations cancel out. If the number of liars is odd, you flip the result.

> The nice thing about the latter solution is that it scales up to more goblins and an arbitrary ratio of liars. Let's say there are four goblins, Ann, Ben, Cat, and Dan. Two always lie and two always tell the truth. You can ask "Would Ann say that Ben would say that Cat would say that Dan would say that door 1 leads to the castle?"

> In this case, the answer tells you if door 1 is correct because there are an even number of liars so the negations cancel out. If the number of liars is odd, you flip the result.

That's worse scaling than the alternative approach, not better scaling. You need to increase the size of your question every time the number of goblins increases. But "what would you say if I asked you whether [this door] leads to the castle?" shows perfect scaling; it works without changes no matter how many goblins there are. It also isn't necessary to know how many of the goblins are liars.


Good point!

I was thinking that if there are multiple goblins, asking a question that only relates to one of them doesn't give you enough information to determine which goblins are liars. But you don't actually need to know that. You just need the truth value of the final answer.


I should point out that your all-inclusive question also doesn't give you enough information to determine which goblins are liars. In the general case that will always require one question per goblin, plus one more if you also care about the doors.



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: