# I have a logic problem (knights and knaves) I need help with?

Okay if your familiar with logic and you know of the knights and knaves problem I can really use some help. I know knights tell the truth and knaves lie. I know that if there are two people A and B and A says, “At least one of us is a knave,” and B says nothing A is the knight. Example:

A B

knight knave true

knight knight false

knave knave true

knave knight true

Because of A’s statement one of the two has to be a knave so they can’t both be knights so logically A is right.

Now this is where I get a little confused:

A says, “I am a knave or B is a knight,’’ and B says nothing. How is it possible they are both knights?

P.S I missed class when this was taught and I won’t be able to contact my lecture or anyone from class because the semester is over. Can someone please explain the answer I was given in the notes I received for the second part and shed a little light on logic.

Observing members:
0
Composing members:
0
## 4 Answers

Here, you have to use a lot of boolean logic. When a knight or knave says that something is true or false, they take the statement, evaluate it, and then either tell the result or apply a logical NOT gate to it and tell you the opposite. Since you do not know if the statement is true or false, you must backtrack and figure out if it is possible for the statement to be true or false. This is called the Boolean satisfiability problem, trying to figure out if any input exists that gives you the output that you are testing for.

So in the example, either

((I am a knave) OR (B is a knight)) = true #he is a knight

Or

((I am a knave) OR (B is a knight)) = false #he is a knave

If he is a **knave**, then

(I am a knave = true) OR (b is knight = unknown) = false

Since the OR has a true value as input, it cannot give the false that is needed for the knave to say true. He cannot be a knave and must be a knight.

Now since we know that

(I am knave = false) OR (b is knight = unknown) = true

B must be a knight to make the OR evaluate to true, since the other input is false. B must also be a knight.

Since we have made no assumptions and eliminated every other possibility, we know that Knight Knight is the only possible combination.

@PhiNotPi thank you I think I’m kind of getting the hang of it. Do you know of any sites that can also help? I’d really appreciate it.

“I am a knave or B is a knight.”

With an “or” statement, only one of the component statements has to be true to make the whole statement true. So the truth table for that statement is

A/B

1. knight / knight true

2. knight / knave false

3. knave / knight true

4. knave / knave true

Knights always tell the truth, so a knight could make that statement only under condition 1.

@#%&! I was pleasantly drunk when I logged in. Now I’m more or less sober. Logic is a buzzkill.

Bonus free grammar tip: If *you’re* familiar with logic etc.

Long story short, logical “OR” is not the same as “EXCLUSIVE OR”; it is what non-logicians would call “AND/OR”, allowing both sides of the statement to be true. When a logician means what non-logicians mean by “OR”, they say “Either X or Y, **but not both**”. Most people imply a ”...but not both” that is not there.

## Answer this question

This question is in the General Section. Responses must be helpful and on-topic.