[Math] Knights and Knaves. Translating an “Either or” statement into propositional logic

logicpropositional-calculus

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.

Best Answer

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?

Related Question