Truth-Teller and Liar Riddles: How to Solve Them
This article was written with AI and may contain mistakes. Found one? Tell us.
To solve a truth-teller and liar puzzle, pick one person, assume they tell the truth, and follow what that means for everyone else. If you reach a contradiction, the assumption was wrong and that person is a liar. Most puzzles of this kind fall to that one move, plus two shortcuts explained below.
This guide covers the rules, the shortcuts, three worked examples and a practice puzzle with its answer at the end.
What is a truth-teller and liar puzzle?
You meet a group of people. Each one is either a truth-teller, who always tells the truth, or a liar, who always lies. You hear what they say, and you have to work out who is who.
These are often called knights and knaves puzzles, where the knights always tell the truth and the knaves always lie [1]. Puzzles like this can be studied with plain commonsense reasoning or with formal logic, and some methods even let computers solve them without help [1].
In the cleanest version, people only make simple statements about each other's type, such as A saying that B is a liar or that C is a truth-teller [1]. That is the version this guide starts with.
The basic method: assume and test
- Pick one person, usually the one who says the most.
- Assume they are a truth-teller. Every statement they made is then true.
- Follow each statement to its consequences for the others.
- If two facts clash, the assumption is wrong. Go back and make that person a liar instead.
- If no clash appears, check every statement made by every person against your answer.
Step 5 matters. An answer is only right if every truth-teller's statements come out true and every liar's statements come out false.
Shortcut 1: what statements tell you
Some statements give you a lot for free.
Nobody can say I am a liar. A truth-teller would be lying, and a liar would be telling the truth. No truth-teller and no liar could make this statement [1]. If a puzzle has someone saying it, something else is going on, such as a third type of person.
Anyone can say I am a truth-teller. A truth-teller says it truthfully and a liar says it falsely, so the statement tells you nothing on its own.
When A says B is a liar, A and B are different types. If A tells the truth, B really is a liar. If A lies, B is actually a truth-teller. Either way they are opposite.
When A says B is a truth-teller, A and B are the same type. If A tells the truth, B is truthful. If A lies, B is a liar too.
These last two rules turn many puzzles into a simple chain of same and different.
Shortcut 2: why you sometimes need one more clue
Here is something surprising. If every statement in a puzzle is a simple claim about one person's type, such as B is a liar or C is a truth-teller, the puzzle can never have just one answer.
The reason is simple. Take any answer that works and flip everyone: every truth-teller becomes a liar and every liar becomes a truth-teller. A simple claim such as B is a liar changes from true to false when B's type flips, and the person who said it has flipped too. So a truth-teller who said something true becomes a liar saying something false, and the reverse. The flipped answer works too.
Researchers have proved this formally: with only these simple statements and no extra information, there is no puzzle with a unique solution [1]. A statement about two people at once, such as we are both liars, is not a simple claim, and the flipping trick does not apply to it. That is why real puzzles add something more, such as the number of truth-tellers, a statement about two people at once, or a third type of person.
A puzzle is called good when it has exactly one solution [1]. So when you meet a puzzle that only uses simple claims about types, look for the extra clue. It is the key that removes the mirror answer.
Worked example 1: one statement about two people
A and B are each a truth-teller or a liar. A says: we are both liars.
Assume A is a truth-teller. Then the statement is true, so A is a liar. That clashes with the assumption, so A must be a liar.
Since A is a liar, the statement is false. It is not true that both are liars. A is a liar, so B must be the truth-teller.
Answer: A is a liar and B is a truth-teller.
Notice that this puzzle has one answer even though it only talks about types. That works because A's statement is a combined claim that includes A itself, so flipping everyone does not simply flip its truth value.
Worked example 2: a chain with a count
A, B and C are each a truth-teller or a liar. Exactly one of them is a truth-teller.
- A says: B is a liar.
- B says: C is a liar.
Use the shortcut. A says B is a liar, so A and B are different types. B says C is a liar, so B and C are different types. That makes A and C the same type, with B on the other side.
Without the count, two answers would fit: A and C truthful with B a liar, or A and C liars with B truthful. The count says exactly one truth-teller, so B is the truth-teller and A and C are liars.
Check: A is a liar and says B is a liar, which is false. Good. B is truthful and says C is a liar, which is true. Good.
This is shortcut 2 in action. The statements alone allow a mirror answer, and the count removes it.
Worked example 3: a third type of person
Some puzzles add people who are neither. In the wider literature you can meet people who may say true or false things as they please [1].
A 2020 paper added a new third type: a person who only makes statements that contradict themselves, such as claiming to be a liar [1]. With truth-tellers, liars and this third type together, the authors showed that puzzles with exactly one solution exist even without any extra information [1]. In this guide we call the third type a paradox-teller.
Here is a small example in that spirit. A, B and C are a truth-teller, a liar and a paradox-teller, one of each.
- A says: I am a liar.
- B says: A is a liar.
Only a paradox-teller can say I am a liar, so A is the paradox-teller. That leaves B and C as the truth-teller and the liar. B says A is a liar, but A is the paradox-teller, not a liar, so B's statement is false. B is the liar, and C is the truth-teller.
How to set out your working
A small table keeps everything tidy. Write each person across the top and each assumption down the side. Mark each cell with T for truth-teller or L for liar, and write an x where a statement fails.
For worked example 2, it looks like this:
| Assume | A | B | C | Result |
|---|---|---|---|---|
| A is truthful | T | L | T | Two truth-tellers, but the count says one |
| A is a liar | L | T | L | Every statement checks out |
For larger puzzles, think of the people as points and each statement as a line between two points labelled same or different. Researchers also draw puzzles this way, as graphs, to study them [1]. Going round a loop of lines quickly shows whether the labels can all be satisfied.
Computers can also solve puzzles like these by automated reasoning [1]. The same idea, called constraint satisfaction, was used to settle a well-known packing puzzle that asks whether the squares of side 1 to 24 can exactly fill a square of side 70 [2].
Common mistakes to avoid
- Treating a lie as the opposite statement. If a liar says A and B are both truthful, the truth is only that they are not both truthful. One of them may still be truthful.
- Forgetting to check every statement. One unchecked statement can hide a wrong answer.
- Missing the mirror answer. If your puzzle only has statements about types, test the flipped answer too, and look for the clue that rules it out.
Practice puzzle
A, B and C are each a truth-teller or a liar.
- A says: B is a truth-teller.
- B says: C is a liar.
- C says: B and I are both truth-tellers.
Who is who? Try it before you read the answer.
Answer: A and B are truth-tellers and C is a liar. A says B is a truth-teller, so A and B are the same type. B says C is a liar, so B and C are different types. Now test C. If C were a truth-teller, B would be a liar, so C's statement that B and C are both truth-tellers would be false, and a truth-teller cannot say something false. So C is a liar, which makes B a truth-teller and A a truth-teller too. Check C: a liar says that B and C are both truth-tellers, and that is false, because C is not. Every statement fits.
Notice how C's statement about two people at once removes the mirror answer, just as in worked example 1.
Then try this logic riddle, which uses the same rule-out method with fruit instead of people:
References
- Alzboon, L., & Nagy, B. (2020, February 4). Truth-Teller–Liar Puzzles with Self-Reference. Mathematics, 8(2), 190. DOI 10.3390/math8020190
- Laverty, B., & Murphy, T. (2018, September 25). Optimal Rectangle Packing for the 70 Square. Recreational Mathematics Magazine, 5(9), 5-47. DOI 10.2478/rmm-2018-0001