More Knights And Knaves
Computer Mad Scientist Hillel Wayne has taken up knights and knaves problems with his favored tactic, Formal Methods.
In the November 16, 2020 issue of his newsletter, Wayne writes:
One of the most famous ones is “Knights and Knaves”: you have a bunch of statements from people, where statements from knights are always true and statements from knaves are always false. Like if we had
You see A and B. A says "we are both knaves".
If A was a knight, then it would be self contradictory, so A is a knave. But then the state “we are both knaves” is false, so B is a knight.
If a February 11, 2019 blog post, Wayne writes:
Knights and Knaves puzzles are supposed to be solved through creativity and cleverness: you read the statements and figure out the contradictions. Let’s instead take all the fun out and solve them with a program.
Hillel Wayne kind of gets it. It’s a lot of fun to try to short-circuit the explosion of possibilities, to cope with the human brain’s short term and working memory limitations. I do think he’s either being humorous (or missing the point of an idea I’m working on) when he says a program takes all the fun out of it.
Besides that, there’s ambiguities in English that you have to deal with
even in simple knight-and-knave problems like You see A and B. A says "we are both knaves"
.
Ambiguity
You see A and B.
That definitely means something like Person A and person B live on the Island of Knights and Knaves. A is either a knight or a knave, and you don’t know which category A belongs to. The same is true of B. None of that is explicit in Wayne’s problem statement.
Wayne uses “A” and “B” as names. The Great Master, Raymond Smullyan, uses funny names like “Og” and “Bog” to humanize the problems, to give them more implicit context.
The phrase A says "we are both knaves"
has a further ambiguity.
How should you translate that to symbolic logic?
This is a difficulty many such English language puzzles have,
like the 2023-11-06 Slylock Fox
newspaper strip.
If KA
means “A has type of knight”, KB
means “B has type of knight”,
then we can represent that English language statement at least two ways:
(~KA & ~KB)
~(KA & KB)
The ~
is a prefix that negates the next thing to the right,
so ~KA
means “A is not a knight”, which is the same as “A is a knave”.
I reckon you could also say (~KA & ~KB)
in English as “A is not a knight, and B is not a knight”.
Smullyan and Wayne use translation (2).
This situation boils down to a parenthesizing choice.
The problem is that the two alternatives have different truth tables.
Truth Tables
KA | KB | KA = (~KA & ~KB) |
---|---|---|
true | true | false |
true | false | false |
false | true | true |
false | false | false |
KA | KB | KA = ~(KA & KB) |
---|---|---|
true | true | false |
true | false | true |
false | true | false |
false | false | false |
In both of the above truth tables, KA
means “A is a knight”,
KB
means “B is a knight”.
The &
is roughly equivalent to the English word “and”.
The two equations where KA = ...
are true compound statements.
A can say the right hand side of the equations.
If A is a knight, the whatever A says is true.
So KA
is logically equivalent (=
) to the right hand side compound statement.
Each truth table has one statement that evaluates to true.
- In the first table, A is a knave, B is a knight
- In the second table, A is a knight, B is a knave
The two parenthesizations of the English statement lead to opposite conclusions.
In the second table, A is a knight that says “we are both knaves”. But A is a knight, contradicting the statement.
I conclude that the parenthesization of the second table, ~(KA & KB)
,
is wrong.
The English phrase “is a knave” has a higher priority,
or binds tighter than “we are both”
in this problem.
I don’t know if that sort of prioritization is always true in English.
Unfortunately, it’s an easy mistake. I wanted the second table to work out, as does Bob Weber Jr. Dang ol’ English language!