Artificial intelligent assistant

Knight and Knaves logic problem From "Discrete mathematics and its applications", a book by Kenneth H. Rosen, chapter 1.1 exercise 57, goes as: 57. A says "I am a knave or B is a knight" and B says nothing. Knight always tell the truth and knaves always lie. We are to determine of which type are A and B. Assuming that, p: A is a knight q: B is a knight Can I arrive to the answer (provided by the book), which is "A is a knight and B is a knight" using a truth table? And if not, then how?

A truth table would help.

In that table, there are four possible truths; (i) A and B are knights, (ii) A is a knight and B is a knave, (iii) A is a Knave and B is a knight, and (iv) A and B are knaves.

Let's proceed with testing whether (i) is true or false. If both A and B are knights, then the statement by A that "I am either a knave or B is a knight" cannot be refuted.

Next, let's test whether (ii) is true or false. If A is a knight and B is a knave, then the statement by A that "I am either a knave or B is a knight" cannot be true. By hypothesis, A is a knight and is telling the truth. So, A is not a knave and the statement by A must mean that B is a knight. Inasmuch as B is a knave by hypothesis, we have a contradiction. Therefore, the hypothesis that A is a knight and B is a knave is false.

Can you continue from here?

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy f4a61fe29eee14b6d5bb0fdd6ea86121