Knights and Knaves

Last updated

Knights and Knaves is a type of logic puzzle where some characters can only answer questions truthfully, and others only falsely. The name was coined by Raymond Smullyan in his 1978 work What Is the Name of This Book? [1]

Contents

The puzzles are set on a fictional island where all inhabitants are either knights, who always tell the truth, or knaves, who always lie. The puzzles involve a visitor to the island who meets small groups of inhabitants. Usually the aim is for the visitor to deduce the inhabitants' type from their statements, but some puzzles of this type ask for other facts to be deduced. The puzzle may also be to determine a yes–no question which the visitor can ask in order to discover a particular piece of information.

One of Smullyan's examples of this type of puzzle involves three inhabitants referred to as A, B and C. The visitor asks A what type he is, but does not hear A's answer. B then says "A said that he is a knave" and C says "Don't believe B; he is lying!" [2] To solve the puzzle, note that no inhabitant can say that he is a knave. Therefore, B's statement must be untrue, so he is a knave, making C's statement true, so he is a knight. Since A's answer invariably would be "I'm a knight", it is not possible to determine whether A is a knight or knave from the information provided.

Maurice Kraitchik presents the same puzzle in the 1953 book Mathematical Recreations, where two groups on a remote island – the Arbus and the Bosnins – either lie or tell the truth, and respond to the same question as above. [3]

In some variations, inhabitants may also be alternators, who alternate between lying and telling the truth, or normals, who can say whatever they want. [2] A further complication is that the inhabitants may answer yes–no questions in their own language, and the visitor knows that "bal" and "da" mean "yes" and "no" but does not know which is which. These types of puzzles were a major inspiration for what has become known as "the hardest logic puzzle ever".

Examples

A large class of elementary logical puzzles can be solved using the laws of Boolean algebra and logic truth tables. Familiarity with Boolean algebra and its simplification process will help with understanding the following examples.

Alice and Bob are residents of the island of knights and knaves.

Both knaves

Alice says, "We are both knaves”.

In this case, Alice is a knave and Bob is a knight. Alice's statement cannot be true, because a knave admitting to being a knave would be the same as a liar telling the truth that "I am a liar", which is known as the liar paradox. Since Alice is a knave this means she must have been lying about them both being knaves, and so Bob is a knight.

Same or different kinds

Alice says, "We are the same kind," but Bob says, "We are of different kinds."

In this scenario they are making contradictory statements, so one must be a knight and one must be a knave. Since that is exactly what Bob said, Bob must be the knight, and Alice is the knave.

Identity alone

If all one wants to know is whether someone is a knight or a knave, this can be tested by simply asking a question to which the answer is already known. In the film The Enigma of Kaspar Hauser , a character solves the puzzle of whether a man is a knight or a knave by suggesting asking the man "whether he was a tree frog".

Fork in the road

Fork in the road Heaven and Hell puzzle.jpg
Fork in the road

This is perhaps the most famous rendition of this type of puzzle:

John and Bill are standing at a fork in the road. John is standing in front of the left road, and Bill is standing in front of the right road. One of them is a knight and the other a knave, but you don't know which. You also know that one road leads to Death, and the other leads to Freedom. By asking one yes–no question, can you determine the road to Freedom?

This version of the puzzle was further popularised by a scene in the 1986 fantasy film, Labyrinth , in which the protagonist finds herself faced with two doors with guardians who follow the rules of the puzzle. One door leads to the castle at the centre of the labyrinth, and one to certain death. It had also appeared some ten years previously, in a very similar form, in the Doctor Who story Pyramids of Mars .

This version of the puzzle was also used in the episode "Jack Tales" of the 2nd season of the American animated TV series Samurai Jack . It was again used in 4th season of the Belgian reality TV show De Mol in 2016. There are several ways to find out which way leads to freedom. All can be determined by using Boolean algebra and a truth table.

In Labyrinth, the protagonist's solution is to ask one of the guards: "Would [the other guard] tell me that [your] door leads to the castle?" With this question, the knight will tell the truth about a lie, while the knave will tell a lie about the truth. Therefore, the given answer will always be the opposite of the correct answer to the question of whether the door leads to the castle.

Another posited solution is to ask either man if they would say that their own path leads to freedom. In this case, the idea is that the knave, rather than lying about a truthful answer, will be forced to lie about the lie he would tell (ie, answer with a double negative), thus both knight and knave will give the correct answer.

Goodman's 1931 variant

The philosopher Nelson Goodman anonymously published another version in the Boston Post issue of June 8, 1931, with nobles never lying and hunters never telling the truth. Three inhabitants A, B, C meet some day, and A says either "I am a noble" or "I am a hunter", we don't yet know which. Then B, in reply to a query, says "A said, 'I am a hunter'". After that, B says "C is a hunter". Then, C says "A is noble". Now the problem is, which is each, and why?

Since a hunter always lies, they cannot admit their own identity: therefore, A could not have admitted to being a hunter. This means that B must be a hunter, his allegation directed at C must be false, and therefore A and C must be nobles.

Goodman reports the puzzle came back to him from various directions, including a 1936 Warsaw Logicians' meeting via Carnap; some echo versions were corrupted by joining B's two utterances into a single one, which make the puzzle unsolvable. Some years later, Goodman heard about the fork in the road variant; having scruples about counterfactuals, he devised a non-subjunctive, non-contrary-to-fact question that can be asked. [4]

See also

Related Research Articles

<span class="mw-page-title-main">Boolean algebra (structure)</span> Algebraic structure modeling logical operations

In abstract algebra, a Boolean algebra or Boolean lattice is a complemented distributive lattice. This type of algebraic structure captures essential properties of both set operations and logic operations. A Boolean algebra can be seen as a generalization of a power set algebra or a field of sets, or its elements can be viewed as generalized truth values. It is also a special case of a De Morgan algebra and a Kleene algebra.

<span class="mw-page-title-main">Logical disjunction</span> Logical connective OR

In logic, disjunction, also known as logical disjunction or logical or or logical addition or inclusive disjunction, is a logical connective typically notated as and read aloud as "or". For instance, the English language sentence "it is sunny or it is warm" can be represented in logic using the disjunctive formula , assuming that abbreviates "it is sunny" and abbreviates "it is warm".

In philosophy and logic, the classical liar paradox or liar's paradox or antinomy of the liar is the statement of a liar that they are lying: for instance, declaring that "I am lying". If the liar is indeed lying, then the liar is telling the truth, which means the liar just lied. In "this sentence is a lie", the paradox is strengthened in order to make it amenable to more rigorous logical analysis. It is still generally called the "liar paradox" although abstraction is made precisely from the liar making the statement. Trying to assign to this statement, the strengthened liar, a classical binary truth value leads to a contradiction.

<span class="mw-page-title-main">Logical conjunction</span> Logical connective AND

In logic, mathematics and linguistics, and is the truth-functional operator of conjunction or logical conjunction. The logical connective of this operator is typically represented as or or (prefix) or or in which is the most modern and widely used.

In classical rhetoric and logic, begging the question or assuming the conclusion is an informal fallacy that occurs when an argument's premises assume the truth of the conclusion. Historically, begging the question refers to a fault in a dialectical argument in which the speaker assumes some premise that has not been demonstrated to be true. In modern usage, it has come to refer to an argument in which the premises assume the conclusion without supporting it. This makes it an example of circular reasoning.

<span class="mw-page-title-main">Raymond Smullyan</span> American mathematician and logician

Raymond Merrill Smullyan was an American mathematician, magician, concert pianist, logician, Taoist, and philosopher.

<span class="mw-page-title-main">Logic puzzle</span> Puzzle deriving from the mathematics field of deduction

A logic puzzle is a puzzle deriving from the mathematical field of deduction.

In logic, a three-valued logic is any of several many-valued logic systems in which there are three truth values indicating true, false, and some third value. This is contrasted with the more commonly known bivalent logics which provide only for true and false.

In mathematical logic, a propositional variable is an input variable of a truth function. Propositional variables are the basic building-blocks of propositional formulas, used in propositional logic and higher-order logics.

<span class="mw-page-title-main">Induction puzzles</span> Logic puzzle

Induction puzzles are logic puzzles, which are examples of multi-agent reasoning, where the solution evolves along with the principle of induction.

In computability theory a truth-table reduction is a type of reduction from a decision problem to a decision problem . To solve a problem in , the reduction describes the answer to as a boolean formula or truth table of some finite number of queries to .

<span class="mw-page-title-main">Relevance theory</span> Theory of cognitive linguistics

Relevance theory is a framework for understanding the interpretation of utterances. It was first proposed by Dan Sperber and Deirdre Wilson, and is used within cognitive linguistics and pragmatics. The theory was originally inspired by the work of Paul Grice and developed out of his ideas, but has since become a pragmatic framework in its own right. The seminal book, Relevance, was first published in 1986 and revised in 1995.

In logic, a four-valued logic is any logic with four truth values. Several types of four-valued logic have been advanced.

In mathematical logic, a tautology is a formula that is true regardless of the interpretation of its component terms, with only the logical constants having a fixed meaning. For example, a formula that states, "the ball is green or the ball is not green," is always true, regardless of what a ball is and regardless of its colour. Tautology is usually, though not always, used to refer to valid formulas of propositional logic.

<i>To Mock a Mockingbird</i> Book by Raymond Smullyan

To Mock a Mockingbird and Other Logic Puzzles: Including an Amazing Adventure in Combinatory Logic is a book by the mathematician and logician Raymond Smullyan. It contains many nontrivial recreational puzzles of the sort for which Smullyan is well known. It is also a gentle and humorous introduction to combinatory logic and the associated metamathematics, built on an elaborate ornithological metaphor.

In probability theory, a conditional event algebra (CEA) is an alternative to a standard, Boolean algebra of possible events (a set of possible events related to one another by the familiar operations and, or, and not) that contains not just ordinary events but also conditional events that have the form "if A, then B". The usual motivation for a CEA is to ground the definition of a probability function for events, P, that satisfies the equation P(if A then B) = P(A and B) / P(A).

The Hardest Logic Puzzle Ever is a logic puzzle so called by American philosopher and logician George Boolos and published in The Harvard Review of Philosophy in 1996. Boolos' article includes multiple ways of solving the problem. A translation in Italian was published earlier in the newspaper La Repubblica, under the title L'indovinello più difficile del mondo.

Monochromatic chess is a chess variant with unknown origin. The initial board position and all rules are the same as in regular chess, except that pieces that begin on a black square must always stay on a black square and pieces that begin on a white square must always stay on a white square. This would mean that knights can never move, but The Classified Encyclopedia of Chess Variants says that knights make a double jump. It has been suggested that a knight be replaced with a (3,1)-leaper (camel).

In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variables are the truth values true and false, usually denoted 1 and 0, whereas in elementary algebra the values of the variables are numbers. Second, Boolean algebra uses logical operators such as conjunction (and) denoted as , disjunction (or) denoted as , and negation (not) denoted as ¬. Elementary algebra, on the other hand, uses arithmetic operators such as addition, multiplication, subtraction, and division. Boolean algebra is therefore a formal way of describing logical operations in the same way that elementary algebra describes numerical operations.

Coercive logic is a concept popularised by mathematician Raymond Smullyan, by which a person who has agreed to answer a question truthfully is forced to perform an undesired action, where not doing so would mean breaking their agreement. Smullyan presents the concept as a question:

Suppose I offer you a million dollars to answer a yes/no question truthfully, would you accept the offer? If so, you shouldn't, for I would then ask: Will you either answer no to this question or pay me two million dollars? The only way you can answer truthfully is by answering yes and then paying me two million dollars.

References

  1. George Boolos, John P. Burgess, Richard C. Jeffrey, Logic, logic, and logic (Harvard University Press, 1999).
  2. 1 2 Smullyan, Raymond (1978). What is the Name of this Book?. Prentice-Hall.
  3. Kraitchik, Maurice (1953). Mathematical Recreations . Dover. ISBN   978-0486201634.
  4. Nelson Goodman (1972). "Puzzle". In Nelson Goodman (ed.). Problems and Projects . New York: Bobbs-Merrill. pp. 449–451 458. LCCN   73-165221.