Tuesday, April 30, 2019

[Part 3] Raymond Smullyan's Knights, Knaves, and Normals puzzles
Representing statements made by islanders




Now that we understand the advantages of using predicates and quantifiers, we can represent the fact that each and every inhabitant of this island must have exactly one type using the following axioms:

\(∀x\ (Kni(x)\ |\ Kna(x)\ |\ Nor(x))\)
\(∀x\ (Kni(x) \rightarrow (-Kna(x)\ \&\ {-Nor(x)}))\)
\(∀x\ (Kna(x) \rightarrow (-Kni(x)\ \&\ {-Nor(x)}))\)
\(∀x\ (Nor(x) \rightarrow (-Kni(x)\ \&\ {-Kna(x)}))\)

While this is knowledge about the island world itself that is shared by all puzzles, we now turn our attention to the statements that islanders make as part of each specific puzzle.

First, the contents of each statement can also be represented with the same predicates and constants. For example, the statement "If A is a knave, then B is normal", is represented by the following formula of our first-order predicate calculus:

\(Kna(A) \rightarrow Nor(B)\)

In general, we will represent any such statement using some formula \(\varphi\). 

Second, how do we represent the fact that a specific inhabitant made that statement?

Back on the other island, when propositional logic was adequate, we used the following representation principle for statements.


 Representation principle for Knights and Knaves puzzles

For any person P living on this island and any statement S,
the fact that P said S

will be represented by the formula:
\(P \leftrightarrow S\)


Refer back to this earlier post for a discussion of this principle. Briefly: back then, we saw that \(P\) (representing the fact that P is a knight) has the same truth value as \(S\) because:
  • If \(P\) is true, then P is a knight and all of its statements, including S, are true.
  • If \(P\) is false, then P is a knave and all of its statements, including S, are false.
If two formulas \(P\) and \(S\) always have the same truth value, we say that they are equivalent, which can be represented in propositional logic using the formula:

\(P \leftrightarrow S\)

This approach will not work in our predicate calculus because:
  • each islander is now represented by a constant, not a true/false proposition, and
  • there is now a third type (i.e., normal) to consider.
However, we can get around these two issues and extend the applicability of our representation principle to predicate logic using a case-by-case reasoning similar to the two-type scenario of the previous island. 

Note that the formula:

\(P \leftrightarrow S\)
is equivalent to:

\((P\ \&\ S)\ |\ ({-P}\ \&\ {-S})\)

reflecting the two cases discussed above, that is, P being either a knight or a knave.

To extend this approach to our new island with three types, we simply need to add the third case.

Assume that person P made statement S. 

First, we will represent statement S with a predicate logic formula \(\varphi\).

Second, we will consider three cases:
  • If P is a knight, then each one of P's statements, including S, is true; this is represented by the formula: \(Kni(P)\ \&\ \varphi\)
  • If P is a knave, then each one of P's statements, including S, is false; this is represented by the formula: \(Kna(P)\ \&\ {-\varphi}\)
  • If P is normal, then each one of P's statements, including S, is either true or false; since we have no information on the truth value of S, this case is represented by the formula: \(Nor(P)\).
In conclusion, when using predicate calculus to represent statements made by inhabitants of our new island, we will apply the following principle.


 Representation principle for Knights, Knaves, and Normals puzzles

For any person P living on this island and any statement S
(with P represented by constant \(P\) 
and S represented by formula \(\varphi\)),
the fact that P said S

will be represented by the formula:
\((Kni(P)\ \&\ \varphi)\ |\ (Kna(P)\ \&\ {-\varphi})\ |\ Nor(P)\)


Coming back to our earlier example, the fact that inhabitant C made the statement "If A is a knave, then B is normal" would be represented by the following formula of first-order predicate calculus:

\((Kni(C)\ \&\ (Kna(A) \rightarrow Nor(B)))\ |\ (Kna(P)\ \&\ {-(Kna(A) \rightarrow Nor(B))})\ |\ Nor(P)\)

No comments:

Post a Comment