Truth-Teller–Liar Puzzles with Self-Reference

: In this paper, we use commonsense reasoning and graph representation to study logical puzzles with three types of people. Strong Truth-Tellers say only true atomic statements, Strong Liars say only false atomic statements, and Strong Crazy people say only self-contradicting statements. Self-contradicting statements are connected to the Liar paradox, i.e., no Truth-Teller or a Liar could say “I am a Liar.” A puzzle is clear if it only contains its given statements to solve it, and a puzzle is good if it has exactly one solution. It is known that there is no clear and good Strong Truth-Teller–Strong Liar (also called SS) puzzle. However, as we prove here, there are good and clear Strong Truth-Teller, Strong Liar and Strong Crazy puzzles (SSS-puzzles). The newly investigated type ‘Crazy’ drastically changes the scenario. Some properties of the new types of puzzles are analyzed, and some statistics are also given.


.Introduction
Logical puzzles have various roles in our life. They are helpful for training our brains, to learn logical thinking, and also for recreation. In terms of problem solving processes without human intervention, some techniques and methods have been proposed in order to solve logical puzzles (see, e.g., [1] for recent results). The formal study of various types of puzzles can be done by commonsense reasoning or by formal logic. Knight and Knave puzzles are logical puzzles that were introduced by Smullyan [2]. Formal solution methods for solving these puzzles by using classical propositional calculus were discussed in [3]. Similarly, in [4], based on logical representations, automated reasoning was used to solve puzzles. In a nutshell, Knights are Truth-Tellers and Knaves are Liars. Various types of Truth-Teller-Liar puzzles have been further popularized by various books and papers [5][6][7][8][9][10] under various names. In the simplest type of them, the participants say only statements about their types. Strong and Weak Truth-Tellers and Liars were introduced in [11,12]. Strong Truth-Tellers can say only true atomic statements, whilst Strong Liars can tell only false atomic statements. (In contrast, Weak Liars must say at least one false atomic statement, whilst Weak Truth-Tellers must say at least one true atomic statement, if they say anything.) In [11,13], it was proven that there is no SS-puzzle, i.e., a puzzle with Strong Truth-Tellers and Strong Liars such that it has a unique solution without any additional information, e.g., without knowing the number of Truth-Tellers. In various puzzles, there are not only Truth-Tellers and Liars; to complete the picture, one needs Normals, who are persons who can say false and true atomic statements, see, e.g., [6]. In [14], people who cannot say true and cannot say false statements were defined as Mutes (see Table  1). In the puzzles studied in [14], Mutes were stated as not being able to say anything, as their name infers. In puzzles where the allowed statements are of the form "X can/cannot say the truth," "X can/cannot say false statement," in the solution, it could be that some people neither can say true nor false statements; thus, they are Mutes. We also note that puzzles have various connections to graphs, to Boolean programming [15], and to other scientific disciplines. In [6,16], diagrammatical logic was used to represent various Knight-Knave and Knight-Normal-Knave puzzles, as well as their solutions. Various degrees of truthfulness of people in the puzzle and some paradoxical statements were also presented in [17]. Neutrals (a type somehow between Knights and Knaves) were used in [9].
As was proven in [11,13], there are no SS-puzzles with one solution, so our central aim was to reconsider these simplest puzzles by extending the possible types of people. On the other hand, there could be such a scenario in some puzzles in which some statements cannot be true and cannot be false; thus, people who cannot say true and cannot say false can still say some (paradoxical) statement. In this paper, we present a new type of puzzle. We investigate a new type of persons, the (Strong) Crazy people, and we use them along with Strong Truth-Tellers and Strong Liars in our SSS-puzzles. We show that, in contrast to SS-puzzles, there are SSS-puzzles with a unique solution without any additional information. In our puzzles, we use atomic statements of the form "X is a Liar" or "X is a Truth-Teller." However, we are still able to show an interesting extension of the binary world and see how to manage if there are more types of people in the puzzles, especially if the set of allowed truth-values of the statements is extended. Now, we use a novel approach to deal with paradoxical statements. We investigate the new type, the Crazy persons, instead of Mutes (see Table 2). This is a new approach in puzzles to deal with sentences that have a third truth-value; Crazy people can say self-contradictory statements that are not true and not false if a Truth-Teller or a Liar, respectively, would say them. We prove that these statements contain self-reference. In the present paper, we work with three types of people in puzzles.
In the next sections, we recall SS-puzzles and define our SSS-puzzles. We also show that many but not all unsolvable SS-puzzles become solvable if we shift the type of the puzzle to the SSS-puzzle.

Strong Truth-Teller and Strong Liar Puzzles (SS-Puzzles)
In this section, we recall Truth-Teller−Liar puzzles, which of one of the simplest types. Let us start with an example, then show the formal definition (based, e.g., on [13] In Example 1, we have two atomic statements. As already mentioned, there are various ways to define or understand the concept of Truth-Tellers and Liars, e.g., putting conjunction or disjunction between the atomic statements of a person and evaluating the obtained sentence. Depending on these concepts, various puzzles have been investigated in, e.g., [11,12]. In this paper, we use one of the simplest and yet very usual approaches that leads to the concepts of Strong Truth-Tellers and Strong Liars. In a solution of the SS-puzzle of Example 2, if we assume that Mark is a Liar, then Sara is a Truth-Teller, but Antony is neither Liar nor Truth-Teller. On the other hand, if we assume that Mark is a Truth-Teller, then Sara is Liar, but again Antony is neither a Liar nor a Truth-Teller. Thus, this SS-puzzle does not have any solution.

Example 3. Let us have another SS-puzzle with three people: Anne, Bale and Suzan. Anne said that Bale is a Truth-Teller and Suzan is a Liar, Bale said that Suzan is a Truth-Teller, and Suzan did not say any statement. Decide who is a Truth-Teller and who is a Liar?
In the solution of the puzzle in the previous example, if we assume that Anne is a Truth-Teller, then Bale is a Truth-Teller and Suzan is a Liar; however, Bale (who has the same type as Anne) said that Suzan is a Truth-Teller, which is a contradiction. On the other hand, if we assume that Anne is a Liar, then Bale is a Liar and Suzan is a Truth-Teller; however, Bale said that Suzan is a Truth-Teller, which is a contradiction, since Bale is a Liar and said a true statement. Consequently, the puzzle is unsolvable.

Strong Truth-Teller, Strong Liar and Strong Crazy Puzzles (SSS-Puzzles)
In this section, we introduce a new type of puzzle. As Table 2 shows, we distinguish the four types of people not in the previously shown (Table 1) usual way. In binary logic, every statement is either true or false, which led to the previous Mute type of people in the lower right corner of Table  1. However, there is another option if we allow statements that are not true and not false (e.g., typical paradoxical self-reference statements), because people who cannot say true and cannot say false may still say some statements. In our newly investigated puzzles, these people are called Crazy people. In this section, puzzles in which three types of people may appear are considered. Let us see the formal definitions. In graph G, if two persons say the same type of statements about each other, then the representation of these statements, the two edges pointing in opposite directions, can be substituted by a bidirectional same type (i.e., broken or solid) edge between the two nodes.

Notations and Definitions
• N: The set of all people in the puzzle. • G is the graph representation of the puzzle.
Let N be a set of people in the puzzle. If ∈ , then Γ , is a set of persons named by as Liars, and Γ , is a set of persons named by as Truth-Tellers. Further in this paper, we refer to a statement as ∈ Γ , , where , ∈ and m ∈ {0,1}.
Let us fix a/the solution of a solvable puzzle.
• T is the set of Strong Truth-Tellers, L is the set of Strong Liars, and C is the set of Strong Crazy people in the puzzle. T, L and C are disjoint sets; moreover, N = T ∪ L ∪ C.

Preliminary results
The first result about our new type of puzzle is already connected to the new type of people.

Definition 10. A puzzle is clear when there is no additional information given to solve it (only the statements of its persons).
The number of Liars or Truth-Tellers is an example of additional information in the puzzle.

Definition 11. A puzzle is a good puzzle if it has a unique solution.
One of the most important results known about SS-puzzles is the following:

Analyzing SSS-puzzles
In contrast to Theorem 1, if we consider the puzzle of Example 2 as an SSS-puzzle, then this puzzle has exactly one solution (see also Example 4 below). This fact is not only an important property of SSS-puzzles, as it also highlights the different nature of SS-and SSS-puzzles. On the other hand, Theorem 1 has a straightforward implication for our SSS-puzzles.  This puzzle has one solution such that Antony is a Crazy, Mark is a Liar and Sara is a Truth-Teller. This is because Antony said a self-contradictory statement, and Mark said a false statement about Antony, so Mark is a Liar and Sara is a Truth-Teller because she said a true atomic statement about Mark.
As Crazy people play an important role in solutions, let us identify them. The first step is about Crazy people who are not silent in the puzzle.

Lemma 2. In a solvable SSS-puzzle with set N of persons and their atomic statements, if
∈ , , then ∈ .
Proof. Let us fix a solution. If ( ∈ Γ , ) ∈ , then ∈T, since he/she said a true atomic statement, but, in fact, said about himself/herself that he/she is a Liar which implies that ∈ . That implies that ( ∈ Γ , ) ∈ , which contradicts our assumption ( ∈ Γ , )∈ . If we assume ( ∈ Γ , ) ∈ , then ∈ L since he/she said a false atomic statement, but, since said about himself/herself that he/she is a Liar, ∈ , which implies that ( ∈ Γ , ) ∈ , which contradicts to our assumption ( ∈ Γ , ) ∈ . Consequently, the only possibility is ( ∈ Γ , ) ∈ , which means that ∈ . □ By Lemma 2, in the solution of Example 4, Antony is a Crazy person, since he said the statement "I am a Liar."

Lemma 3. Let a solvable SSS-puzzle be given with a/the solution. If the type of
is the same as the type of ( , ∈ , j ≠ k) in the solution, then ∉ , and ∉ , .
Proof. Let us fix a solution. Let , ∈ (j ≠ k) such that at least one of and says some statement. Let us assume that ∈ Γ , (or ∈ Γ , ). Then, if , ∈ , this means that , said only self-contradictory statements, but ∈ Γ , (or ∈ Γ , ) is a false atomic statement, which means that this statement is not self-contradictory, which contradicts the assumption that , ∈ . If we assume that , ∈ , then ∈ Γ , (or ∈ Γ , ) means that ∈ Γ , (or ∈ Γ , ) is a false atomic statement said by a Truth-Teller that is also a contradiction. Finally, if , ∈ , then ∈ Γ , (or ∈ Γ , ) implies that ( ∈ Γ , )∈ (or ( ∈ Γ , ) ∈ ), which means that ∈ Γ , (or ∈ Γ , ) is a true atomic statement said by a Liar that contradicts Definition 9. Finally, if neither and says any statement in the puzzle, then, clearly, both ∉ Γ , and ∉ Γ , are satisfied. Therefore, there is no solution for an SSS-puzzle in which two persons, , , have the same type and ∈ Γ , (or ∈ Γ , ). □ Consequently, by Lemma 3, if the puzzle is solvable, then in the graph representation G, there is no broken edge between any two persons who have the same type (i.e., both of them are Truth-Tellers, both of them are Liars, or both of them are Crazy) in the solution of the puzzle.

Corollary 2. In an SSS-puzzle, if there are two persons
such that ∈ , (or ∈ , ), and both said the same statement about a third person , then the puzzle is unsolvable.
As the corollary states, there are SSS-puzzles without a solution. We have seen already that some of the SS-puzzles that have no solutions become solvable if we think about them as SSS-puzzles, i.e., if we allow not only Truth-Tellers and Liars but also Crazy people in the target of the solution function. Now, it turns out that not every puzzle becomes solvable in this way.
We continue to find out who are the Crazy people in the solutions. Proof. In case ≠ and the type of is the same as the type of but they say two different statements about (" is a Liar" and " is a Truth-Teller"), then in order to have a solution, , ∈ and ∈ ; otherwise, the puzzle is unsolvable.
If = , then this means that there is one person who said two different statements about . Therefore, in order to have a solution, ∈ and ∈ ; otherwise the puzzle is unsolvable. □ Now, we are ready to give a characterization of the Crazy people.

Theorem 2. In a solvable SSS-puzzle with set N of person, if
∈ , then can say at most one atomic statement, which is ∈ , .
Consequently, the only statement Crazy person can tell is ∈ Γ , , which is a Proof. In graph G, the nodes and the edges of G represent the persons and the statements in the puzzle that are represented by G, respectively. Therefore, based on Definitions 9 and 12, the solution set of the puzzle is the same as the solution set of G. □ Let us recall the notion of complete graphs from graph theory. is a graph of n nodes such that each pair of nodes is connected by an edge. In particular, , the triangle graph, is a graph that contains three nodes such that there is an edge between any two vertices. In the next result, we show how triangle graphs are connected to solvable puzzles.

Proposition 3. If the graph representation G of an SSS-puzzle P contains a subgraph whose underlying undirected graph is with broken edges, then P has no solution.
Proof. Let us assume that the graph representation G of the puzzle contains a subgraph with broken edges, such that the underlying undirected graph of this subgraph is exactly . Considering this subgraph, there are two possible forms of non-isomorphic subgraphs in G with broken edges. Figure 1 shows these two subgraphs. Let us start with the graph shown in Figure 1a. In the solution of the puzzle, and have same type, since they say the same statement about . However, according to Lemma 3, in order to have a solution ∉ Γ , and ∉ Γ , , there must be a contradiction in the formation of puzzle that has edges that are represented by subgraph shown in Figure 1a. Considering Figure 1b in the solution of the puzzle, ∉ , ∉ and ∉ , because by Theorem 2, a Crazy person cannot say any statement about other persons. Let us assume that ∈ ; therefore, ∈ and ∈ , but ∈ Γ , , which contradicts Lemma 3. On the other hand, if we assume that ∈ , then ∈ and ∈ but ∈ Γ , , which also contradicts Lemma 3. The last proposition is helpful if one wants to provide an unsolvable puzzle by using its graph representation.

Comparing SS-puzzles and SSS-puzzles
One may ask what the chance for a "random" puzzle to be solvable or to be good is. Some statistics about puzzles that are generated by computers were presented in [5]. In this section, we also present some statistics about the puzzles studied here, e.g., about the number of puzzles depending on the number of persons. Then, we give some details on the number of edges in the puzzle graphs. In the following statistical data, we considered puzzles in which each person can say only one statement about any person in the puzzle. Because an SS-puzzle becomes unsolvable if any person says both types of statements about a person, this restriction is used in the comparison. Table 3 shows the number of good puzzles, solvable puzzles with more than one solution, and unsolvable puzzles with two, three, and four persons of SS-and SSS-puzzles. Table 4 presents the number of solvable SS-and SSS-puzzles with two, three and four persons. In fact, the SS-and SSS-puzzles correspond to each other by the statements, but their solvability differs, as is shown. Table 5 shows the number of good SSS-puzzles with one, two, three or four Crazy persons in their solutions if there are two, three or four persons in the puzzle. The number of four-person good puzzles with one Crazy person in the solution is 124,480, the number of four-person good puzzles with two Crazy persons is 11,328, the number of four-person good puzzles with three Crazy persons 208, and the number of four-person good puzzles with four Crazy persons is 1.
Now, we turn to analyze the number of edges in the puzzles. In the case of SS puzzles, there are no good puzzles, and the maximal number of edges in a solvable puzzle with n persons is exactly n 2 because each person can say exactly one of the statements about any person (including himself/herself).
The maximum number of edges in good SSS-puzzles with four persons is 13 (see, e.g., Figure  2a and observe that some of the edges are bidirectional), the maximum number of edges in good SSS-puzzles with three persons is 7, and the maximum number of edges in good SSS-puzzles with two persons is 3. The minimum number of edges in good SSS-puzzles with four persons is 4 (as it is shown, e.g., in Figure 2b), the minimum number of edges in good SSS-puzzles with three persons is 3, and the minimum number of edges in good SSS-puzzles with two persons is 2. Meanwhile, the maximum number of broken edges in good SSS-puzzles with four persons is 7 (see Figure 2c), the maximum number of broken edges in good SSS-puzzles with three persons is 4, and the maximum number of broken edges in good SSS-puzzles with two persons is 2. Additionally, the minimum number of broken edges is in good SSS-puzzles with four persons is 1 (see Figure 2a for a graph with this property), and the maximum number of solid edges is 12 (Figure 2a has also this feature), and the minimum number of solid edges is 0 (see Figure 2b for an example). The number of unsolvable puzzles increases dramatically as the number of persons in the puzzle increases (see Table 3). In SS-puzzles, there are no puzzles with an odd number of solutions, since a solution and its dual (assigning Truth-Teller to the former Liars and Liar to the former Truth-Tellers) are both solutions for the SS-puzzle. In contrast, as Table 4 shows, there are various SSS-puzzles with an odd number of solutions. Table 5 shows that the majority of the good SSS-puzzles have exactly one Crazy in their solution. Table 3. The number of good, solvable (including good ones), and unsolvable Strong Truth-Teller-Strong Liar (SS)-and Strong Truth-Teller-Strong Liar-Strong Crazy (SSS)-puzzles with two, three and four persons. Two-person puzzle  Three-person puzzle  Four-person puzzle  SSS-puzzle SS-puzzle SSS-puzzle SS-puzzle SSS-puzzle SS-puzzle  Good puzzles  9  0  553  0  136017  0  Solvable puzzles  41  28  2619  1880  668849  506896  Unsolvable puzzles  40  53  17064  17803  42377872  42539825  Total  81  81  19683  19683  43046721  43046721 From here, we consider SSS-puzzles, where it is allowed for each person to say both type of statements about any other person in the puzzle, and we show some facts about the possible number of edges in the graphs of the puzzles. ∈ . Therefore, in any connected component in graph G, there are at least − 1 edges that make that component connected and one more edge that makes Crazy person. Thus, the total number of edges in each component is at least . Consequently, the total number of edges in the graph representation G is equal to:

Puzzle type
= □ Table 4. The number of SS-and SSS-puzzles with one, two, three, four, five, or more solutions for puzzles with two, three or four persons. Two-person puzzle  Three-person puzzle  Four-person puzzle  SSS-puzzle SS-puzzle SSS-puzzle SS-puzzle SSS-puzzle SS-puzzle  Good puzzles  9  0  553  0  136017  0  Two-solution puzzles  18  24  1467  1728  443876  490752  Three-solution puzzles  10  0  411  0  66836  0  Four-solution puzzles  1  4  51  144  7350  15552  Five-solution puzzles  0  0  24  0  3963  0  Puzzles with more than  five solutions  3  0  113  8 10807 592 Table 5. The number of good SSS-puzzles with one, two, three or four Crazy persons in the solution. Two-person puzzle Three-person puzzle Four-person puzzle   One  8  504  124480  Two  1  48  11328  Three  -1  208  Four  --1 Example 5. Figure 3 shows the graph representation of a minimal four-person good SSS-puzzle, which has four edges. The solution of this puzzle is: ∈ , ∈ , ∈ ∈ . Proof. Let us consider maximal puzzles in terms of the number of edges in their graph representation G. First, we show that between any two nodes A and B, there are, at most, two edges. If in the solution of the puzzle ∉ and ∉ , then between A and B, there will be, at most, two same type edges in opposite directions. If A or B have two different types of outgoing edges toward the other, then the puzzle will be unsolvable. If ∈ and ∈ , then by Theorem 2, both of them can have a self-broken edge and there are no edges between them. Finally, if ∈ and ∉ ( ∈ or ∈ ), then in the maximal graph G, ∈ and ∈ (in case of ∈ ).

Number of Crazy persons in the solution
In the solution of the puzzle with maximal graph G, let us assume that there are m Crazy persons and − Non-Crazy persons. Thus, the maximum number of edges between Non-Crazy persons equals ( − ) , since each one of these Non-Crazy persons has − − 1 outgoing edges toward others and one self-solid edge, and the maximum number of edges between Non-Crazy and Crazy persons is 2( − ) , since each Non-Crazy person can have two types of outgoing edges toward every Crazy person (if the Non-Crazy persons are Liars). By Theorem 2, graph G has m self-broken edges, since each Crazy person can have one self-broken edge. Therefore, the total maximum number of edges is given by:  Figure 4 shows the graph representation of a maximal four-person good SSS-puzzle, which has 16 edges, where the solution for such puzzle is: ∈ , ∈ , ∈ ∈ .

Conclusions
Truth-Tellers and Liars appear in various puzzles. In this paper, a new type of people was investigated: Crazy people, who can say only statements that are self-contradictory, i.e., no Truth-Teller or Liars could say them. Thus, SSS-puzzles are similar to SS-puzzles, but there can be three types of people in the solution instead of the original two. By investigating Crazy people, several unsolvable puzzles were found to become solvable, and it was shown that there are clear and good SSS-puzzles (which was not the case with SS-puzzles), just to recall our main results. It was also shown that there are unsolvable SSS-puzzles (based on Proposition 3, one can easily create such puzzles). A statistical comparison between SS-puzzles and SSS-puzzles was been presented for puzzles of up to four persons. Some features and characteristics of the graph representation of the good SSS-puzzles, e.g., the minimum and maximum number of edges in any good SSS-puzzle, were also discussed.
By considering the newly introduced Crazy type, message service systems, where neighboring units rely on each other, might benefit from such improved models. As a specific application of SSS-puzzles, we can generalize the scenario of [10], where satellites could send messages to mechanics about the status of neighborhood satellites regarding whether they are working properly.
As this is the first paper on SSS-puzzles, some questions are left open. In the future, we would like to find some easily checkable properties that characterize the good, solvable, and unsolvable SSS-puzzles. Another type of puzzles can also be considered in the future, where the person can say a new type of atomic statement which is " is a Crazy person."