4 ms·
> "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 g
by munificent 2y ago
> "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.
- thaumasiotes 2y ago> 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.
- munificent 2y agoGood 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.
- thaumasiotes 2y agoI 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.