Logical Puzzles

We can find many puzzles on mathematical logic principles for learning and fun purposes. Raymond Smullyan (1999—2017) is an American mathematician who is the author of many books on logical puzzles. Let’s look at a few exciting puzzles by Smullyan.

Puzzle 1

There are two kinds of inhabitants of an island: knaves and knights. The knaves always lie, and the knights always tell the truth. We meet two people on this island, XX and YY. The person XX says, “I am a knave, or YY is a knight.” And YY does not say anything. We want to determine whether XX and YY are knave or knight.

Solution

There are four possibilities here as each one of XX and YY can be knave or knight. We will examine all four cases and discard those leading to a contradiction.

Case 1: If both XX and YY are knights.

In this case, the statement of XX should be true as they are a knight. I am a knave, or YY is a knight, is a true statement because the disjunction of false and true is true.

Case 2: If both XX and YY are knaves.

In this case, XX must lie. But we observe that XX gives a true statement that I am a knave, which is a contradiction.

Case 3: If XX is a knave and YY is a knight.

In this case, XX must lie as they are a knave. But XX says, “I am a knave,” which is true. Therefore, this can not be the case as it leads to a contradiction.

Case 4: If XX is a knight and YY is a knave.

In this case, XX must tell the truth as a knight. But XX says that I am a knave or that YY is a knight, which is not true. Therefore, this case also leads to a contradiction.

Hence, we can conclude the only possibility that both XX and YY are knights.

Puzzle 2

There are two kinds of inhabitants of an island: knaves and knights. The knaves always lie, and the knights always tell the truth. We meet two people on this island, XX and YY. The person XX says, “We both are knights.” And YY says that “XX is a knave.” We want to determine whether XX and YY are knave or knight.

Solution

There are four possibilities here as each one of XX and YY can be knave or knight. We will examine all four cases and discard those leading to a contradiction.

Case 1: If both XX and YY are knights.

In this case, the statement of XX should be true as they are a knight. XX says that we both are knights, which is true. But if YY is a knight, then the statement that XX is a knave must be true, which is not the case. Hence, this case leads to a contradiction.

Case 2: If both XX and YY are knaves.

In this case, XX must lie. The statement of XX that we both are knights is a lie. But the words of YY that XX is a knave are not a lie. Hence, this case leads to a contradiction.

Case 3: If XX is a knave and YY is a knight.

In this case, XX must lie as they are a knave. The statement of XX, “We both are knights,” is a false statement. As YY is a knight, the statement of YY must be true. YY says, “XX is a knave, which is a truth. Hence, there is no contradiction.

Case 4: If XX is a knight and YY is a knave.

In this case, XX must tell the truth as a knight. But XX says that we both are knights, which is not the case. Hence, this case also leads to a contradiction.

Hence, we can conclude the only possibility that XX is a knave and YY is a knight.

Puzzle 3

Assume three kinds of inhabitants of an island: knaves, knights, and knatives. The knaves always lie, and the knights always tell the truth. The knatives can speak the truth, or they can lie. Assume we meet three people on this island: WW, XX, and YY. One of them is a knight, one is a knave, and one is a knative. We want to determine who is the knight, who is the knave, and who is the knative using the following information:

  • WW says: “I am the knight.”
  • XX says: “I am the knave.”
  • YY says: “XX is the knight.”

Solution

There are six possibilities, as shown in the following table:

Possibility WW XX YY
1 Knight Knave Knative
2 Knight Knative Knave
3 Knave Knight Knative
4 Knave Knative Knight
5 Knative Knight Knave
6 Knative Knave Knight

We’ll look at each case and discard those which lead to a contradiction.

Cases 1 and 6

If XX is the knave, he can not say I am the knave; that is a contradiction.

Cases 3 and 5

If XX is the knight, he can not say I am the knave; that is a contradiction.

Case 4

If YY is the knight, and he says XX is a knight, then XX should be a knight. But, XX can not be the knight because it is contradictory, as shown in cases three and five. Therefore, YY is not telling the truth, which is contradictory.

Case 2

If WW is a knight, he says I am the knight, which is consistent. If XX is knative and says that I am the knave, that means XX is telling a lie, which is consistent. If YY is the knave, and he says XX is the knight, he is telling a lie, which is again consistent.

So, after analyzing each case, we can conclude that WW is the knight, XX is knative, and YY is the knave.

Puzzle 4

There are two kinds of inhabitants of an island: knaves and knights. The knaves always lie, and the knights always tell the truth. Assume we meet two people on this island, XX and YY. The person XX says, “I am a knave if and only if YY is a knave.” And YY says, “Our kind is different.” We want to determine whether XX and YY are knave or knight.

Solution

There are four possibilities here as each one of XX and YY can be knave or knight. We will examine all four cases and discard those leading to a contradiction.

Case 1: If both XX and YY are knights.

In this case, the statement of XX should be true as he is a knight. I am a knave, if and only if YY is a knave is a true statement because FFTF\Leftrightarrow F\equiv T. The statement of YY should also be true as YY is a knight. YY says our kind is different, which is not the case, giving a contradiction.

Case 2: If both XX and YY are knaves.

In this case, XX must lie. But we observe that XX gives a true statement that I am a knave if and only if YY is a knave, which is a contradiction.

Case 3: If XX is a knave and YY is a knight.

In this case, XX must lie as he is a knave. As XX says, “I am a knave if and only if YY is a knave,” which is false; therefore, it is consistent. The statement given by YY should be true as YY is a knight. YY says our kind is different, which is true. Consequently, this case is consistent and does not lead to a contradiction.

Case 4: If XX is a knight and YY is a knave.

In this case, XX must tell the truth as a knight. But XX says that I am a knave if and only if YY is a knave, which is not true. Therefore, this case also leads to a contradiction.

So, we can conclude the only possibility is that XX is a knave and YY is a knight.