# Knight and knaves

A very special island is inhabited only by knights and knaves. Knights always tell the truth, and knaves always lie. You meet three inhabitants: Alice, Rex and Bob, where

• Alice tells you that "Rex is a knave".
• Rex tells you that "it's false that Bob is a knave".
• Bob claims, "I am a knight or Alice is a knight."

So who is a knight and who is a knave?

The solution can be found by looking at each statement and what they imply:

Alice - "Rex is a knave"

This implies that Alice and Rex are of different types, as either Alice is a knight and rex is a knave, or Alice is a knave and Rex is not.

Rex - "It's false that Bob is a knave"

This implies that Rex and Bob are of the same type, as Rex is essentially calling bob a knight. If Rex were a knight, so would bob, and if Rex were a knave, so would bob.

Bob - "I am a knight or Alice is a knight."

This once again leads to 2 situation, either Bob is a knight, which would mean that Alice is a knave, or Bob is a knave, making Alice also a Knave.

From Alice's and Rex's remarks we can see that we have 2 situations

a) A - knight, R - knave, B - knave

or

b) A - knave, R - knight, B - knight.

However, according to Bob's statement:

if Bob were a knave, Alice would also be a knave. Thus, the only situation consistent with all the remarks is situation b.

Alice is a knave, and Rex and Bob are knights.

• Thank you. I would like to say that i understand it now but after trying to put it into python truth table i run into a problem. Where am i going wrong here? "((A and not R) or (not A and R) and (R or B) or (not R and B) and (B or A) or (not B or not A))" Oct 5, 2019 at 19:26
• I believe you have mixed up the second and third statements. The second statement should be (R and B) or (not R and not B), and the third statement should be (A or B) or (not A and not B). I believe those should work? Oct 6, 2019 at 15:08