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?

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 they are, but does not hear A's answer. B then says "A said that they are a knave" and C says "Don't believe B; they are lying!" To solve the puzzle, note that no inhabitant can say that they are a knave. Therefore, B's statement must be untrue, so they are a knave, making C's statement true, so they are 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.

In some variations, inhabitants may also be alternators, who alternate between lying and telling the truth, or normals, who can say whatever they want.

See also

  • Ulam's game

References

  • — A note on some philosophical implications of the Knights and Knaves puzzle for the concept of knowability
  • Collection of computer-generated Knights and knaves puzzles
  • A text-based interactive knights-and-knaves puzzle generator and solver
  • Bul Game an online game with knights and knaves designed for educational purposes.