Hacker News new | ask | show | jobs
by 885895 3880 days ago
>Suppose that you can’t remember whether Pluto is a dwarf planet, and you need to find out by asking someone nearby—but you don’t know whether that person is a knight or a knave. What’s the one yes-no question you can ask to figure out whether Pluto is a dwarf planet?

>"Are you a knight if and only if Pluto is a dwarf planet?"

>If the person’s a knight and Pluto is a dwarf planet, then you get the answer “yes,” since both statements on each side of if and only if are true, and knights always speak truly.

I don't get how this follows. Surely, the person being a knight or a knave is independent from whether or not Pluto is a dwarf planet so a real knight would say "no" either way since the assumption is bad and a knave would thus say "yes". Thereby, you have not determined whether or not Pluto is a dwarf planet but instead whether the person is a knight or a knave.

Please explain my error.

3 comments

It's easier if you see it as logical operations, rather than language. A iff B has the same meaning as A == B, but with the added twist that !B negates the answer in the example (knaves always lie). So let's take A = Pluto is a dwarf planet; B = you're a knight, then "are you a knight if and only if Pluto is a dwarf planet" has the formula (B && (A == B)) || !(!B && (A == B)), which after a bit of simplifying you can see is the same as A == True || !(A == False), or A == True.

Very often logic formulas, when translated in English, sound absolutely bonkers, not least because the words if, and, or have pretty loose meanings in ordinary language.

"If and only if" sounds strange to me too. Like asking if he's a knight when Pluto is a dwarf planet. And on second reading it looks like an awkward way to say And...

I think "Is one and only one of [A, B] true?" would be better. Or, (A ^ B).

There is no assumption. There is just "A if-and-only-if B" where A and B are both true and therefore by definition the whole statement is true.