# Knights and Knaves. Translating an “Either or” statement into propositional logic

I'm studying for a midterm for my logic course. I was going through the lecture slides and came across this problem. You are on an island of kights and knaves. Knights always tell the truth and knaves always lie. Suppose person A says "Either I am a knave or B is a knight" What are A and B

Attempt There's two options for A. Either A is a knight or A is a knave. Consider the cases separately

A is a knight Then what A says is true. This means that either A is a knave or B is a knight But at this point I realized that I didn't know how to translate either...or...
into propositional logic. Is "either or" an exclusive "or" or and inclusive "or"?

A is a knave Then what A says is false. Therefore, taking the negation of what A said, Now I don't know how to negate this because I don't know how to translate this.

I'd appreciate any help I can get here. Thanks

EDIT: Not sure if this is correct but....

In the first case, we assumed A is a knight. Then what he says is true. Therefore, the first half of his disjunction ("I am a knave") is false so the second half of if ("B is a knight") must be true. Therefore, we get that both A and B ar knights. However, this contradicts what A said ("Either A is a knave or B is a knight"). Therefore, by contradiction. A can't be a knight. Therefore, A is a knave. So we take the negation of what A said, and we get that either, they're both knights or they're both knaves (am I negating that correctly?). Since we know that A is a knave (from our contradiction). then what ust be true is that they are both knaves. Is my logic correct? Sorry if this is long.

• "Either or" is ambiguous, see here: math.stackexchange.com/questions/68333/… – Adam Francey Feb 22 '16 at 23:05
• In fact, it doesn't really matter because the premise that knights are truthful and knaves are liars excludes the possibility that a knight could be a knave. – Git Gud Feb 22 '16 at 23:05
• That is based on "When I consider A to be a knight". You have not finished until you have shown that the other possibility, that A is a knave, cannot be true. If A is a knave then what he is saying is not true. What he said was "Either I am a knave or B is a knight". The opposite of that is "I am a knight and B is a knave". Since we are assuming A is a knave here, the first is not true so A cannot be a knave. – user247327 Feb 22 '16 at 23:23
• Let N(x) = x is a knight. Then (N(A) & (-N(A) OR -N(B)) OR (-N(A) & - (-N(A) OR -N(B))). deduce from that. – fleablood Feb 22 '16 at 23:26
• Or another way. N(A) => (-N(A) OR -N(B)) AND -N(A)=> -(-N(A) OR -N(B)) – fleablood Feb 22 '16 at 23:28

If "either or" is interpreted as inclusive then your statement is $$\big(A\wedge(\neg A\vee B)\big) \oplus \big(\neg A\wedge(A\wedge \neg B)\big)$$

Which simplifies to $A\wedge B$

If $A$ is a knight then "I am a knave or $B$ is a knight" is true and thus $B$ must be a knight.

If $A$ is a knave then "I am a knave or $B$ is a knight" is false, but it can't be... so $A$ is a knight and so is $B$.

If "either or" is interpreted as exclusive, then remembering the negation of exclusive-or is equivalence, your statement is

$$\big(A\wedge(\neg A\vee B)\big) \oplus \big(\neg A\wedge(A\leftrightarrow \neg B)\big)$$

Which simplifies to just $B$.

If $A$ is a knight then "I am a knave XOR $B$ is a knight" is true and thus $B$ must be a knight.

If $A$ is a knave then "I am a knave XOR $B$ is a knight" is false, so they can be both, and so $B$ must be a knight.

While we cannot say whether $A$ is a knight or a knave, we at least affirm that $B$ is a knight, regardless of the interpretation of "either or".

tl:dr $\neg (X\oplus Y) ~ \equiv ~ (X\leftrightarrow Y) \\ \qquad \equiv ~ (X\wedge Y)\vee(\neg X\wedge \neg Y)$

This is of course taking that the assumption "all knights always tell the truth, and all knaves always lie" is justified.   Who told you that?   Was it a knight, or a knave?

• Thank you. Although, If I had to guess, since this was a school problem, they probably wouldn't have an answer where A is ambiguous. So I'm guessing, the first case is probably the correct one. Thanks again. – The_Questioner Feb 23 '16 at 0:00