Overview
Knights and Knaves puzzles were popularised by logician Raymond Smullyan. Every inhabitant is either a knight, who only ever tells the truth, or a knave, who only ever lies — and from their statements alone you must deduce who is who.
The two-person version here hinges on a single statement, 'We are both knaves,' which turns out to be self-defeating in a way that pins down both identities.
How to solve Knights & Knaves
- List all four possibilities for (A, B): knight/knight, knight/knave, knave/knight, knave/knave.
- For each, check the rule: a knight's statement must be true, a knave's must be false.
- If A were a knight, 'we are both knaves' would have to be true — but that would make A a knave. Contradiction, so A is a knave.
- Since A is a knave, the statement is false. 'Both are knaves' being false means B is not a knave — so B is a knight.
The key insight
Nobody, knight or knave, can ever truthfully say 'I am a knave.' Spotting that a self-referential claim is impossible for one type instantly halves the search space.
Variations & echoes
- Larger puzzles add spies (who can lie or tell the truth) and chains of statements about each other.
- The technique — enumerate assignments, eliminate contradictions — is exactly how a SAT solver works.
- It trains the habit of testing every case against the constraints rather than guessing.
Frequently asked questions
Could both be knights?
No. A knight must speak truly, but 'we are both knaves' is false for a knight, so A cannot be a knight.
What if A had said 'at least one of us is a knave'?
That version is solvable too: A must be a knight and B a knave, because only a knight can truthfully assert it.