PBPuzzle Break
logic puzzles

Knights and Knaves Puzzles: How to Solve Truth-Teller Riddles

A clear method for knights and knaves logic puzzles, plus three original puzzles for two, three, and four islanders, each with exactly one answer.

Knights and knaves puzzles take place on an imaginary island where every person is one of two types. NRICH, the mathematics enrichment project at the University of Cambridge, states the setup in its own Knights and Knaves problem: the island "is inhabited entirely by knights (who always tell the truth) and knaves (who always tell lies)." Each puzzle gives you a few statements and asks you to work out who is which.

These puzzles feel slippery at first because every statement might be a lie. The trick is that a lie is just as informative as the truth, as long as you track which one it is. Below is a method that works every time, followed by three original puzzles. Each was checked against every possible combination of knights and knaves, and each has exactly one consistent answer.

The one rule that makes these solvable

A knight's statement is true. A knave's statement is false. So for every speaker, this must hold:

The speaker is a knight if and only if the statement is true.

That single sentence is the whole puzzle engine. You never need to wonder about motives or tricks. You only need to check, for each possible assignment of types, whether every speaker's type matches the truth of what they said.

The method: assume, test, keep what survives

  1. Pick one person and assume they are a knight. Treat their statement as true and see what it forces about everyone else.
  2. Follow the consequences. Each new fact tells you whether the next speaker's statement is true or false, which tells you their type.
  3. Look for a contradiction. If someone ends up both a knight and a knave, the starting assumption was wrong.
  4. Try the opposite assumption. Assume the same person is a knave and repeat.
  5. Keep only the assumption that survives. If exactly one survives, you have the answer.

With n people there are 2 to the power n possible assignments: 4 for two people, 8 for three, 16 for four. NRICH's guidance on working systematically describes the value of listing possibilities in an ordered way so nothing gets missed. For small groups you can even list every assignment and check them all, which is exactly how the answers below were confirmed.

Two useful shortcuts

  • "X is a knave," said by Y, means X and Y are opposite types. If Y is a knight, X really is a knave. If Y is a knave, the claim is false, so X is a knight.
  • "X is a knight," said by Y, means X and Y are the same type. By the same reasoning, the two always match.

Spotting these pairs first often cuts the work in half.

Puzzle 1: Rhea and Otto

  • Rhea says: "Otto and I are different types."
  • Otto says: "Rhea is a knave."

Puzzle 2: Ivy, Jun, and Kit

  • Ivy says: "Exactly two of us three are knights."
  • Jun says: "Ivy is a knave."
  • Kit says: "Jun and I are the same type."

Puzzle 3: Ada, Bo, Cy, and Dee

  • Ada says: "Bo is a knave."
  • Bo says: "Cy and Dee are both knights."
  • Cy says: "Ada is a knight."
  • Dee says: "Among the four of us, there are more knaves than knights."

Try all three before reading on.

Answers and reasoning

Puzzle 1: Rhea is a knight, Otto is a knave. Assume Rhea is a knight. Then her statement is true, so Otto is the other type, a knave. Otto's claim "Rhea is a knave" is then false, which fits a knave. Everything is consistent. Now assume Rhea is a knave. Her statement is false, so she and Otto are the same type, making Otto a knave too. But then Otto's claim "Rhea is a knave" would be true, and a knave cannot say something true. Contradiction. Only the first assumption survives.

Puzzle 2: Ivy is a knave, Jun is a knight, Kit is a knave. Jun's claim about Ivy uses the first shortcut: Jun and Ivy are opposite types, so exactly one of them is a knight. Assume Kit is a knight. Then Jun matches Kit, so Jun is a knight and Ivy is a knave. That makes two knights (Jun and Kit), so Ivy's statement "exactly two of us are knights" would be true, which a knave cannot say. Contradiction. So Kit is a knave. Kit's statement is false, so Jun is the opposite of Kit: a knight. That makes Ivy a knave. Now there is exactly one knight, so Ivy's statement is false, which fits. Consistent.

Puzzle 3: Ada and Cy are knights; Bo and Dee are knaves. Cy's claim about Ada uses the second shortcut: Ada and Cy are the same type. Assume Ada is a knave. Then Cy is a knave too, and Ada's false claim means Bo is a knight. But Bo says Cy is a knight, which would be false. A knight cannot say that. Contradiction. So Ada is a knight, Cy is a knight, and Ada's true claim makes Bo a knave. Bo's statement must be false; since Cy really is a knight, the false part has to be Dee, so Dee is a knave. Finally, check Dee: there are two knights and two knaves, so "more knaves than knights" is false, which fits a knave. Consistent, and the only assignment out of 16 that is.

Want more practice?

NRICH's original Knights and Knaves problem lines up 25 islanders in a queue and asks how many of them are knights. The same rule (type matches truth) cracks it once you notice what each "the person in front of me is a knave" statement says about neighboring pairs.

Key takeaways

  • On the island, a speaker is a knight exactly when their statement is true.
  • Assume one person's type, follow the consequences, and discard any assumption that leads to a contradiction.
  • "X is a knave" said by Y makes X and Y opposites; "X is a knight" makes them the same.
  • With a handful of people, listing every possible assignment is fast and proves the answer is unique.
  • A lie carries as much information as the truth once you know who is lying.

Sources

  1. NRICH, University of Cambridge Millennium Mathematics Project, Knights and Knaves
  2. NRICH, University of Cambridge Millennium Mathematics Project, Developing Mathematical Thinking: Working Systematically
logic puzzlesknights and knavesbrain teasers