9
$\begingroup$

A says:

“B is a knave.”

B says:

“A and C are of the same type.”

Knights tell the truth and Knaves lie.

What is C? (i.e. a knight, or a knave?)

$\endgroup$
7
$\begingroup$

Determining C analytically

Let $a,b,c$ be booleans that mean "A, B or C (respectively) tells the truth". Also assume that if X says Y, then either both X and Y are true or both are false (i.e. X=Y). Then your statements are:

1. $a = \bar{b}$, from A says "B is a knave"; and
2. $b = (a=c)$, from B says "A and C are of the same type".

Substituting (1) into (2) gives us

$\bar{a} = (a = c)$. This reduces to $\bar{c}$ for $a=T$ as well as for $a=F$.

So

C is a knave.

$\endgroup$
  • 2
    $\begingroup$ Pedantic note: it really isn't transitivity of "=" that you're appealing to (or if it is, you're right only by coincidence)! Transitivity means "if a = b and b = c then a = c" and so far as I can see that really isn't relevant here. What's relevant is that (a=b)=c turns out to be equivalent to "an odd number of a,b,c are true", and of course then the same holds for a=(b=c). $\endgroup$ – Gareth McCaughan Sep 27 '17 at 9:50
  • 1
    $\begingroup$ @GarethMcCaughan Thanks, I've corrected the explanation. $\endgroup$ – Lawrence Sep 27 '17 at 10:10
20
$\begingroup$

Use truth table to find out what is C

If A is knight, then B is knave, means A and C are different type. A is knight so C is Knave
If A is knave, then B is knight, means A and C are same type. A is knave so C is Knave enter image description here

$\endgroup$
  • 3
    $\begingroup$ It's not clear how you used the truth table to get to the answer. On first glance it looks like you just highlighted the rows in the truth table that you had already worked out correctly above? But +1 for the explanation itself $\endgroup$ – IanF1 Sep 27 '17 at 8:02
  • 1
    $\begingroup$ @IanF1 Jamal ruled out all but the two highlighted rows. $\endgroup$ – jpmc26 Sep 27 '17 at 8:03
  • 12
    $\begingroup$ I don't think that the truth table adds anything useful to the answer in this context. $\endgroup$ – Sarthak Mittal Sep 27 '17 at 10:26
  • $\begingroup$ @IanF1 It seems like a useful visual guide to help run through all the possibilities without making a mistake or missing out any combinations. For example I can read the first row like this, "A is telling the truth, which means B is a knave, which means B lies, which contradicts the row, so this row is not correct". Continue until you've eliminated all the impossible rows. $\endgroup$ – JBentley Sep 27 '17 at 14:34
  • 1
    $\begingroup$ @SarthakMittal, for me it does. I constructed a formula $(A\oplus B)\land(B\rightarrow(A=C))\land(\overline B\rightarrow(A\oplus C))$ and checked it's truthtable (but then found this answer). Of course there is another way to solve it just by substituting $\overline A$ instead of $B$. $\endgroup$ – rus9384 Sep 27 '17 at 15:11
4
$\begingroup$

We are given:

  • A: B is knave

  • B: A = C.

If A is knight: then B is knave and AC so C is knave.
If A is knave: then B is knight and A = C so C is knave.
Therefore C is knave.

$\endgroup$
  • $\begingroup$ This answer does not add anything to other answers. $\endgroup$ – Wen1now Sep 27 '17 at 9:10
  • 1
    $\begingroup$ I feel I've offered a different way of solving the puzzle and presented it simply. $\endgroup$ – rabathehutch Sep 27 '17 at 9:22
  • $\begingroup$ "If A is knight, then B is knave, means A and C are different type. A is knight so C is Knave If A is knave, then B is knight, means A and C are same type. A is knave so C is Knave" is what Jamal has answered; it is practically identical to your solution $\endgroup$ – Wen1now Sep 27 '17 at 10:01
  • 1
    $\begingroup$ This answer uses a different approach to present and justify the solution - and frankly I think Jamals Truth-Table is just confusing and this one here is a simpler and better answer. $\endgroup$ – Falco Sep 28 '17 at 13:34
4
$\begingroup$

Assume that B is a knight (telling the truth). Therefore, A and C are the same type. A has asserted that B is a knave (lies). But this is false, by the assumption. Therefore, A is a knave (lies). Since A and C are the same type, C is a knave (lies).

Assume now that B is a knave (lies). Therefore, A and C are of different types. A has asserted that B is a knave (lies). This is true, by the assumption. Therefore, A is a knight (telling the truth). Since A and C are of different types, C is a knave (lies).

Since regardless of what we assume B to be, C is deduced to be a knave (lies), we conclude that C is a knave.

Note that we make no assumptions about A; we only make assumptions about B, and reason from the consequence of that assumption. Further, we ultimately do not know anything about A or B.

$\endgroup$
3
$\begingroup$

If C is a Knight, and so is B, then A is too, but A would be lying.
If C is a Knight, and B is a Knave, then A is a Knave, but then B is a Knight. Contradiction.
Conclusion: C is a Knave

$\endgroup$
2
$\begingroup$

Sketch

$A$ says $B$ is a Knave is equivalent to $B$ says $A$ is a Knave - exactly one of $A$ and $B$ is a Knight.

Define a new operator $[X=]$, with $X$ a Boolean variable. If $X$ is true, $[X=]$ becomes $=$, otherwise it becomes $\ne$.

Now we have $B\implies \lnot A$ and $B\implies (A\;\;[B=]\;\;C)$.

And $(A\;\;[\lnot A=]\;\;C)\implies C=\text{false}$ - so C is a Knave.

Tech stuff

$(A\;\;[B=]\;\;C)$ is a boolean ternary operator, written $\triangle(A,B,C)$. $B$ can be seen as switching between a XOR gate (X,0,false) and a NXOR gate (N,1,true).

The truth table is:

\begin{array} {|c|c|c|c|} \hline A&B&C&out\\ \hline 0&X&0&0\\ \hline 0&X&1&1\\ \hline 0&N&0&1\\ \hline 0&N&1&0\\ \hline 1&X&0&1\\ \hline 1&X&1&0\\ \hline 1&N&0&0\\ \hline 1&N&1&1\\ \hline \end{array}

It can also be written as:

$$(\lnot A \land \lnot B \land C) \lor (\lnot A \land B \land \lnot C) \lor (A \land \lnot B \land \lnot C) \lor (A \land B \land C)$$

and:

$$A+B+C-AB-BC-CA+ABC$$

Proof

Rows $3$ and $5$ give the result for this question ($A=\lnot B$ and out is true imply $C=0$).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.