Suppose you met two inhabitants of the island of knights and knaves, Al and Berta. Al says "Both of us are knights", then Bertha says "Al is a knave". Now, you want to determine who is a knight and who is a knave (they can also be both knights or both knaves).
Solve this puzzle by using truth tables. Refer to the lecture 1.6 (on truth tables) for a similar solved problem.
Let $A$ be true iff Al is a knight, and let $B$ be true iff Bertha is a knight.
Al said $A \wedge B$. Bertha said $\neg A$. By the rules of knights and knaves puzzles, what Al said is true iff Al is a knight $A \leftrightarrow (A \wedge B)$ and what Bertha said is true iff she is a knight $B \leftrightarrow \neg A$. So the formula that would be true exactly in scenarios that satisfy the rules of the puzzle is $(A \leftrightarrow (A \wedge B)) \wedge (B \leftrightarrow \neg A)$.
$A$ | $B$ | $A \wedge B $ | $A \leftrightarrow (A \wedge B)$ | $\neg A$ | $ B \leftrightarrow \neg A $ | $ A \leftrightarrow (A \wedge B)) \wedge (B \leftrightarrow \neg A) $ |
---|---|---|---|---|---|---|
T | T | T | T | F | F | F |
T | F | F | F | F | T | F |
F | T | F | T | T | T | T |
F | F | F | T | T | F | F |
Al is a knave, Bertha is a knight.
You need to find out which witness(es), if any, were telling the truth, which (if any) were lying, and for which (if any) it cannot be determined given just this information. Here you can use a similar approach to the knights and knaves puzzle, and solve the problem using a truth table.
Let $p$ be true iff the butler is telling the truth,
(This choice of variable names is fairly arbitrary: calling them B, C, G and H is another possibility. As long as you have a variable for each witness with the value corresponding to whether that witness tells the truth, it should be fine).
$q$ true iff the cook is telling the truth,
$r$ true iff the gardiner is telling the truth
$s$ true iff the handyman is telling the truth.
The four statements that the detective decided are true are:
The formula that should be true in the scenarios satisfying the rules of the puzzle is the AND of those 4 statements: $(p \to q) \wedge \neg (q \wedge r) \wedge \neg (\neg r \wedge \neg s) \wedge (s \to \neg q)$.
$p$ | $q$ | $r$ | $s$ | $p \to q $ | $q \wedge r$ | $\neg (q \wedge r)$ | $\neg r$ | $\neg s$ | $ \neg r \wedge \neg s$ | $\neg ( \neg r \wedge \neg s) $ | $\neg q$ | $s \to \neg q$ | Final formula |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
T | T | T | T | T | T | F | F | F | F | T | F | F | F |
T | T | T | F | T | T | F | F | T | F | T | F | T | F |
T | T | F | T | T | F | T | T | F | F | T | F | F | F |
T | T | F | F | T | F | T | T | T | T | F | F | T | F |
T | F | T | T | F | F | T | F | F | F | T | T | T | F |
T | F | T | F | F | F | T | F | T | F | T | T | T | F |
T | F | F | T | F | F | T | T | F | F | T | T | T | F |
T | F | F | F | F | F | T | T | T | T | F | T | T | F |
F | T | T | T | T | T | F | F | F | F | T | F | F | F |
F | T | T | F | T | T | F | F | T | F | T | F | T | F |
F | T | F | T | T | F | T | T | F | F | T | F | F | F |
F | T | F | F | T | F | T | T | T | T | F | F | T | F |
F | F | T | T | T | F | T | F | F | F | T | T | T | T |
F | F | T | F | T | F | T | F | T | F | T | T | T | T |
F | F | F | T | T | F | T | T | F | F | T | T | T | T |
F | F | F | F | T | F | T | T | T | T | F | T | T | F |
There are three scenarios which agree with the detective's four statements. In all of them, $p = False, q = False$, so we can infer that both the butler and the cook are lying. With the gardiner and the handyman, we cannot say for sure; we only know that they cannot both be lying (at least one of them is telling the truth), as the detective already figured out.
The butler and the cook are both lying. Between the gardiner and the handyman, at least one (maybe both) is telling the truth, but this is the most we can say.