# Knights and knaves puzzler

A very special island is inhabited only by knights and knaves. Knights always tell the truth, and knaves always lie.

You meet three inhabitants: Peggy, Joe and Zippy.

• Peggy claims, "I am a knight or Joe is a knave."
• Joe tells you, "Peggy is a knight and Zippy is a knave."
• Zippy says, "I and Joe are different."

Determine who is a knight and who is a knave?

I based and answer on similar puzzle i got an answer to. And i got up to here, entering this into python truth table i did not get anywhere. TruthTable = "((P or not J) and (not P or J) and (P and not Z) or (not P and Z) and (Z or not J) or (J or not Z))"

• Peggy should claim "Either I am a knight, or Joe is a knave", to remove the ambiguous interpretation. – amI Oct 6 '19 at 5:21
• @amI IF you wanted to make it read as exclusive or, you should indeed put that here. If you want normal or, the way it is written is correct and the only reasonable way to do it. Now note that exclusive or makes this unsolvable (contradictory). – Zizy Archer Oct 6 '19 at 9:11
• @ZizyArcher - Unless one of us (or someone else) spells out the reasons, we'll each think the other is wrong about the relative implications of OR vs XOR -- don't wait for me. – amI Oct 7 '19 at 3:37
• @amI Analyze Peggy statement: The second part is always true (Joe cannot be anything else than knave). With OR, there is no restriction on the first part and the statement is always true, so Peggy is knight and the first part is also true. With XOR, if Peggy is knight, first part is true and the whole statement is false = contradiction. If Peggy is knave, the first part is false, the whole statement is true = contradiction again. – Zizy Archer Oct 7 '19 at 6:03
• @ZizyArcher - Now I can't see it any other way than yours -- Thanks and congrats. – amI Oct 8 '19 at 5:16

Zippy claims that either

Zippy is a Knight and Joe is a Knave

or

Zippy is a Knave, and so is Joe

hence

Joe is a Knave regardless.

This makes

Peggy a Knight (since Joe is a Knave, the OR condition is always satisfied)

and

Zippy a Knight, since Joe's statement must be false

• If the OR is always satisfied, then Peggy remains an unknown; it has to be an XOR to allow a solution. – amI Oct 6 '19 at 5:23
• Nah, Peggy's statement is true with ordinary OR => he is knight. XOR wouldn't allow a solution. – Zizy Archer Oct 6 '19 at 19:07

I agree with Braegh's assessment of the logical statements, however, there is a nuance that was not addressed:

It is not stated that the knights and knaves are logicians. As such we should take their statements at face value. Meaning that we should treat them as regular people. I'm sure you've heard the statement "the sky is blue or my name isn't Batman!". The 'or' in this case does not act like a normal OR operator, but more like an XOR operator. Meaning if the sky is blue - first part of the statement is true - then the second part has to be false. Likewise, if the second part of the statement is true, then the first has to be false. That's how these statements are understood in everyday speak.

Given this we can assess the situation like this:

Joe is still a knave, as per Zippy's statement. However, since we know Joe is a knave, and Peggy states "I am a knight or Joe is a knave", then Peggy cannot be a knight. Since Joe is a knave, Peggy has to be lying about being a knight, making her a knave.

Now for the tricky part:

Since both Joe and Peggy are knaves, Zippy can theoretically be either knight or knave and still have these statements make logical sense. However, let's keep treating these people as people and not logicians. If it rained on Monday and Tuesday and I asked you to lie about it, would you say "it was sunny Monday and rained on Tuesday"? I would wager not. Asked to lie about something, most people would lie about the whole thing and say it was sunny on both days. So we should really be treating the statement "Peggy is a knight and Zippy is a knave" as two separate statements. As such, and since Joe is a knave, this would make Peggy a knave - something we already knew - and Zippy a knight

So that's my interpretation: Peggy and Joe are knaves and Zippy a knight.

• Even without the 'tricky part', Zippy becomes a known because one option of Zippy leads to a contradiction (in Joe's statement). – amI Oct 6 '19 at 5:30
• Your second part is wrong. If you take XOR, then false, true leads to a TRUE statement in the end = contradiction. – Zizy Archer Oct 6 '19 at 7:16
• Thing is, when i read your explanations it all makes sense. But whenever i tackle another problem my brain just melts. How does one approach these from a totally newbie perspective? – Milan Oct 6 '19 at 11:10