0

The situation:
A, B and C are each either a truth-teller or a liar, truth-tellers can only tell truths, and liars can only lie.
A: I am a truth-teller.
B: A is a truth-teller.
C: A is a liar.

How can I represent these statements such that it will be possible to test permutations of identities? For example: it is possible that A is a liar, but not possible if A is a liar and B is a truth-teller.

Bram28
  • 100,612
  • 6
  • 70
  • 118
Luna
  • 201

2 Answers2

0

The standard approach to solve these "Knights and Knaves" problems is to use a proposition $t_A$ that is true if and only if $A$ is truthful, and likewise for $B$ and $C$. Then $A$'s statement is encoded thus:

$$ t_A \leftrightarrow t_A \enspace, $$

which is tautologous; hence it gives us no information about $A$, $B$, and $C$. In like fashion,

$$ t_B \leftrightarrow t_A, \enspace t_C \leftrightarrow \neg t_A \enspace. $$

You can then enumerate the satisfying assignments to the conjunction of the tree sentences. (Of course, you can skip the tautology and just look at $(t_B \leftrightarrow t_A) \wedge (t_C \leftrightarrow \neg t_A)$.) In this case, you can easily see that there are two possible satisfying assignments.

0

Use $A$ for: $A$ is a truth-teller

What person $A$ says is true if and only if $A$ is a truth-teller, so you get $A \leftrightarrow A$

Likewise you get $B \leftrightarrow A$ and $C \leftrightarrow \neg A$

Using substitution, this also means $C \leftrightarrow \neg B$

No unique assignment of identities exists: it could be that $A$ and $B$ are true, and $C$ is false, or that $A$ and $B$ are false, and $C$ is true.

Here is a more interesting example (Puzzle 102 from http://philosophy.hku.hk/think/logic/knights.php):

"A very special island is inhabited only by knights and knaves. Knights always tell the truth, and knaves always lie.

You meet four inhabitants: Bart, Dave, Rex and Zoey. Bart tells you that Rex and Dave are both knights or both knaves. Dave tells you that Zoey is a knave. Rex claims, “Bart is a knave.” Zoey claims, “Rex is a knight and Dave is a knave.”

Symbolize this as:

  1. $B \leftrightarrow (R \leftrightarrow D)$

  2. $D \leftrightarrow \neg Z$

  3. $R \leftrightarrow \neg B$

  4. $Z \leftrightarrow (R \land \neg D)$

And now:

  1. $B \leftrightarrow (\neg B \leftrightarrow D)$ (substitute 3 in 1)

  2. $(B \leftrightarrow \neg B) \leftrightarrow D$ (from 5 by associativity of $\leftrightarrow$)

  3. $\bot \leftrightarrow D$ (from 6 since $P \leftrightarrow \neg P \Leftrightarrow \bot$)

  4. $\neg D$ (from 7 .. i.e. we now know Dave is a knave)

  5. $\bot \leftrightarrow \neg Z$ (substitute 7 in 2)

  6. $\top \leftrightarrow Z$ (from 9)

  7. $Z$ (from 10 ... so Zoey is a knight)

  8. $R \land \neg D$ (from 4 and 11)

  9. $R$ (from 12 ... so Rex is a knight)

  10. $\neg B$ (from 3 and 13 ... and Bart is a knave)

In other words: with a few simple principles you can solve these kinds of Knights and Knaves puzzles pretty quickly!

Bram28
  • 100,612
  • 6
  • 70
  • 118