Truth-teller and liar puzzles: how to solve them
In a truth-teller and liar logic puzzle, everyone always tells the truth or always lies, and you work out who is which from what they say. There’s no guessing: one mix of truth-tellers and liars fits every statement, and the others all break somewhere. Three methods solve nearly all of them: assume and test, a table of every case, and, when you get to ask the question, the two guards trick. Each is worked through below on its own example, then there are three to try, with the answers hidden.
Three kinds you will meet
- Any number can lie. Everyone is a truth-teller or a liar, and the puzzle doesn’t say how many of each. The classic version is knights and knaves.
- You are told how many lie. “Exactly one of them is lying”, or “only one tells the truth”. That count is a clue in itself. Our who is lying riddles are this kind.
- You ask the question. Nobody makes statements. Instead you get one question to ask someone who might be lying, and you have to find a question that works either way. The two guards are the famous one.
The rules are the same in all three. A truth-teller’s every statement is true. A liar’s every statement is false, so a liar’s “and” statement needs only one false part, and a liar’s “or” statement must be false in every part.
Method 1: Assume and test
This is the method that cracks most puzzles. Pick one person, suppose they tell the truth, and treat their words as fact. Follow what that tells you about the others until either everything fits or something has to be both true and false. If it breaks, your guess was wrong, and that person is lying.
Try it on Mara, Nico and Otto. Each one always tells the truth or always lies.
- Mara: “Nico is a liar.”
- Nico: “Otto is a liar.”
- Otto: “Mara and Nico are both liars.”
- Pick the statement that says the most. Otto talks about two people, so start with him. Suppose Otto tells the truth: Mara and Nico are both liars.
- Follow it. Then Mara is lying, so her “Nico is a liar” is false, and Nico tells the truth. But Otto just said Nico is a liar. That breaks, so Otto is lying.
- Use what you learned. Otto is a liar, so Nico’s “Otto is a liar” is true: Nico tells the truth. Then Mara’s “Nico is a liar” is false, so Mara is lying.
- Check every statement. Otto said Mara and Nico are both liars. Only Mara is, so his words are false, as a liar’s must be. Everything fits.
Nico tells the truth, and Mara and Otto are lying. You only needed one guess, and it broke at once. That’s the best case. When a guess doesn’t break, keep it and try the next person inside it.
Method 2: A table of every case
If you’d rather not guess, list every case. Three people who each tell the truth or lie can be mixed in only eight ways. Write each way as a row, then check every statement in it. Any row where a truth-teller says something false, or a liar something true, is out. In a well-made puzzle, exactly one row is left.
Here are Pia, Rafe and Sol. Again, each always tells the truth or always lies.
- Pia: “Exactly two of us are liars.”
- Rafe: “Pia and Sol are both liars.”
- Sol: “Pia and Rafe are both liars.”
| Pia | Rafe | Sol | What goes wrong |
|---|---|---|---|
| Honest | Honest | Honest | Pia says two are lying, but none are. |
| Honest | Honest | Liar | Pia says two are lying, but only one is. |
| Honest | Liar | Honest | Pia says two are lying, but only one is. |
| Honest | Liar | Liar | It all fits. |
| Liar | Honest | Honest | Rafe says Pia and Sol are both lying, but Sol isn’t. |
| Liar | Honest | Liar | Pia is lying, yet two are lying, just as she says. |
| Liar | Liar | Honest | Pia is lying, yet two are lying, just as she says. |
| Liar | Liar | Liar | Rafe is lying, yet Pia and Sol really are both lying. |
Each row only asks you to check, never to think ahead, which is why a table can’t lead you astray. You could also reason it out: if Rafe told the truth, Pia and Sol would be the two liars, which makes Pia’s “exactly two” true, and a liar can’t say something true. The same goes for Sol. The table finds all that for you, one row at a time.
Pia tells the truth, and Rafe and Sol are lying. With four people there are sixteen rows, and with five, thirty-two, so a table is best for small puzzles, or for the last two or three people once the rest are settled.
Method 3: The two guards question
The most famous truth-teller and liar puzzle has no statements at all. You stand before two doors, each with a guard. One door is safe and the other is not. One guard always tells the truth, the other always lies, and you don’t know which is which. You may ask one guard one yes-or-no question. Many people know it from Jim Henson’s film Labyrinth (1986).
The trick is to build a question whose answer comes out the same whoever you ask. Ask either guard: “Would the other guard tell me that your door is safe?”
| You ask | The other guard would say | So you hear |
|---|---|---|
| The truth-teller | “No”, a lie | “No”, told truly |
| The liar | “Yes”, the truth | “No”, a lie about it |
Either way, your question passes through exactly one lie, and one lie flips the answer. So the answer is always wrong: if you hear “no”, the door is safe, and if you hear “yes”, take the other door. We checked it in all eight cases: which guard is honest, which door is safe, and which guard you ask.
The general trick: make the answer pass through the same number of lies whoever you ask. One lie, and it is always wrong, so do the opposite. Ask someone what he himself would say, and a liar lies twice, so the lies cancel and the answer is right.
Three to try
The first two were written for this page and checked by trying every possible mix: exactly one fits. In both, everyone always tells the truth or always lies, and any number can be lying. The third is a question puzzle.
Puzzle 1 (medium)
- Tova: “Zane tells the truth.”
- Ugo: “Exactly two of us are liars.”
- Zane: “Tova and Ugo are both liars.”
Show the answer
Ugo tells the truth, and Tova and Zane are lying.
Tova vouches for Zane, so the two of them are the same kind: if Tova is honest, so is Zane, and if she is lying, Zane is a liar. Suppose they both tell the truth. Then Zane’s words make Tova a liar, which can’t be.
So Tova and Zane are both liars. Zane’s “Tova and Ugo are both liars” must be false, and Tova is a liar, so Ugo isn’t: Ugo tells the truth. Check him: two of them are liars, exactly as he says.
Puzzle 2 (harder)
- Ines: “Jory is a liar.”
- Jory: “More of us are liars than truth-tellers.”
- Kofi: “Exactly one of Ines and Jory is a liar.”
- Lark: “Jory and Kofi are the same kind.”
Show the answer
Ines and Kofi tell the truth, and Jory and Lark are lying.
Ines calls Jory a liar, so they are opposite kinds: one honest, one lying. That makes Kofi’s statement true whoever is which, so Kofi tells the truth.
Now Jory. If he told the truth, there would be at least three liars among the four, but Jory and Kofi would both be honest, leaving two at most. So Jory is a liar, and Ines tells the truth. Jory and Kofi are different kinds, so Lark is lying too. Two liars out of four isn’t more than half, so Jory’s words are false, as they must be.
Puzzle 3 (a question)
A road splits in two. One way goes to the village. At the fork stands one guard, and you don’t know whether he always tells the truth or always lies. You may ask him one yes-or-no question. What do you ask to find the way?
Show the answer
“If I asked you whether the left road goes to the village, would you say yes?”
An honest guard answers truly. A lying guard would give you the wrong answer about the road, and then lie about what he would say, so the two lies cancel. Either way, “yes” means the left road goes to the village, and “no” means the right one does.
Where truth-tellers and liars show up in our games
Lie of Sight, our free daily puzzle, is a truth-teller and liar puzzle of the second kind: exactly one person is lying. But nobody talks about anyone’s honesty. Each of the Fibberson family says what they could see from where they stood in a room seen from above, like “I saw the clock” or “I didn’t see Grandma”. Whether that is true depends on where everyone stood, so you place them in the room until every story but one can be true at once.
Assume and test is still the method. Suppose one person is the liar, treat everyone else’s words as true, and see whether the room can hold them all. How to spot the liar works one case through square by square, and find the liar puzzles has three small rooms to try, with the answers hidden.
For more in words, try the knights and knaves puzzles, easy to hard, and the who is lying riddles, where you are told how many are lying.
Questions people ask
What is a truth-teller and liar puzzle?
A logic puzzle where each person either always tells the truth or always lies, and you work out which is which from what they say. Some tell you how many are lying; in others, any number can be.
What is the fastest way to solve one?
Pick the person whose statement says the most, suppose they tell the truth, and follow it. If you reach a contradiction, they are lying. For three or four people, a table of every case is slower but can’t go wrong.
What do you ask the two guards?
Ask either one: “Would the other guard tell me that your door is safe?” The answer always passes through exactly one lie, so it is always wrong. Take the other door.
Is knights and knaves the same thing?
Knights and knaves is the best-known kind of truth-teller and liar puzzle: knights always tell the truth, knaves always lie, and any number of them can be knaves.
Is there a daily truth-teller and liar puzzle?
Yes. Lie of Sight has a new case every day, free in the browser: a family each say what they saw in a room, exactly one of them is lying, and you work out who.
More daily puzzles from the Fibbersons
Lie of Sight is one of the family’s free daily games. The others: Rex’s Fetch, Lacey’s Web, Grandma’s Knitting, The Kid’s Treasure Map, Fibs’ Laser Chase and Dusty’s Rounds. They’re all on the game picker.
Ready for today’s case?
A new case every day. Free, with no sign-up to start.