[Math] Logic Knights and Knaves problem involving implication question

boolean-algebralogicpropositional-calculuspuzzle

I'm kinda stuck on the following puzzle problem, and I will appreciate it if anyone can help point out any logic errors.

Question:

John and Sarah are members of the island of knights and knaves, where knights only tell the truth, and knaves only lie. John says, “I am a knight if and only if Skynet is on the island”. Sarah says, “if John is a knight, then Skynet is not on the island”. What are John and Sarah, and is Skynet on the island?

My attempt:

Case 1: If Sarah is a knight, then her claim must be true. Thus, for Sarah’s claim to be true, then either John is a Knave (Vacuous truth) or John is a knight and Skynet is not on the island. But if John is a knight, then Skynet must be on the island according to John’s claim, so John can’t be knight. Thus, if Sarah is a knight, then John must be a Knave. Also, we can conclude that John and Sarah can’t both be knights, since their consequents contradicts each other.

Case 2: If John is a knight, then he must tell the truth. So, there are two scenarios for the biconditional statement from John:

Scenario 1: “If I am a knight then Skynet is on the island” Since John is a knight, thus, Skynet
must be on the island. But Sarah claims that if John is a knight, then Skynet is not on the island, then she must be lying. So, Sarah is the Knave.

Scenario 2: “If Skynet is on the island, then I am a knight” Since John is a knight, in this case,
Skynet may or may not be on the island, either case will make this implication true.
So based on Sarah’s claim, she maybe telling the truth, but from Case 1, we know
that John and Sarah can’t both be knights. So Sarah must be lying, thus the knave.

Case 3: If Sarah is a Knave, then her claim is false. Thus, for her claim to be false, “if John is a knight” must be true, and “then Skynet is not on the island” must be false. So, we can infer that Sarah is the knave and John is the knight. From this, we can also conclude that it’s impossible for both John and Sarah be knaves, because if Sarah is a knave, then the only way for her statement to be false is when the antecedent of her claim must be true, and the consequent must be false. So, in this case John must be a knight.

Case 4: If John is a Knave, then what he says must be false, and since John’s statement is biconditional, then we have two scenarios:

Scenario 3: “If John is a Knight, then Skynet is on the Island”. Since John is not a knight, this
statement is a vacuous truth. So, this statement is true regardless of whether Skynet
is on the island or not. Thus, the biconditional is false only due to the following
Scenario 4 being false.

Scenario 4: “If Skynet is on the Island, then John is a Knight”. Since Scenario 3 is true,
we know that Scenario 4 must be false based on the rule of biconditional
statement, and since John is not a knight, we can infer that Skynet is on the island.

So, from Case 4, we know that if John is a knave then Skynet must be on the island. But since John and Sarah can’t both be knaves, then Sarah must be the knight if John is the knave. And base on Sarah’s claim…
But we assume John isn’t a knight, so is vacuous truth, so I am really lost here. I think there are some flaws in my logic.

Thanks

Best Answer

Here is a formal logic approach:

Use:

$J : $ John is a knight

$S : $ Sarah is a knight

$N : $ SkyNet is on the Island

OK, so John is a knight if and only if what John is saying is true:

$$J \leftrightarrow (J \leftrightarrow N)$$

By association of the biconditional this is equivalent to:

$$(J \leftrightarrow J) \leftrightarrow N$$

and thus to:

$$\top \leftrightarrow N$$

And thus we know:

$$N$$

Same for Sarah:

$$S \leftrightarrow (J \rightarrow \neg N)$$

Since we had $ N \leftrightarrow \top$ we can substitute:

$$S \leftrightarrow (J \rightarrow \neg \top)$$

Thus:

$$S \leftrightarrow (J \rightarrow \bot)$$

And so:

$$S \leftrightarrow \neg J$$

And thus we can conclude: SkyNet is definitely on the Island, and Sarah and John are opposite types ... though we don't know who is what.

Once you familiarize yourself will all these kinds of equivalences, I think you will find this algebraic approach to be quite powerful!