News for hackers. Stuff that matters.
Re:The Hardest Logic Puzzle: A step-by-step guide to true, f... by 885895 on Saturday November 07, 2015 @06:12PM (#10526608)
>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.

Re:The Hardest Logic Puzzle: A step-by-step guide to true, f... by anon4 on Tuesday November 10, 2015 @06:46PM (#10543586)
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.

Re:The Hardest Logic Puzzle: A step-by-step guide to true, f... by fineman on Sunday November 08, 2015 @03:54PM (#10529859)
"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).

Re:The Hardest Logic Puzzle: A step-by-step guide to true, f... by tromp on Saturday November 07, 2015 @08:21PM (#10526964)
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.