Main content

## Math for fun and glory

### Unit 2: Lesson 1

Brain teasers- Cheryl's birthday
- Heavier ball
- Liar truth-teller brain teaser
- Toggler brain teaser
- Alien abduction brain teaser
- Blue forehead room brain teaser
- Blue forehead room solution
- Forehead numbers brain teaser
- Light bulb switching brain teaser
- Path counting brain teaser
- 3D path counting brain teaser

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Liar truth-teller brain teaser

How to get correct advice when you can only ask one question from either a liar or a truth-teller (when you don't know who is what). Created by Sal Khan.

## Want to join the conversation?

- My question is, can't you simply ask either one of them the question:

Do you know which door has the treasure?

The truthteller will tell the truth saying yes and the liar says no.

This is based on your assumption that both of them know the door to the treasure.(0 votes)- This would allow you to figure out who is the truth teller, but not which door to choose.(30 votes)

- I like this because there are a few different questions that would work. My answer was that you can ask either one of them "Suppose many people had come before me and asked which was the door of the riches. Which would you have pointed to?" The truth-teller would point to the correct door, and the liar would lie about his previous answers (for which he would have pointed to the wrong door), and point to the correct door!(80 votes)
- That is probably the best way to get a simple answer.(2 votes)

- an alternate question to asked to either the truth teller or liar would be " If I were to ask you which door opens to the treasure what would you answer" Both the truth teller and the liar would answer with the correct door.(46 votes)
- this is tough. would the liar straight out lie, or would he know he would lie and lie against his predicted lie. It comes down to a human characteristic, so I wouldn't chance asking this question. I'd just ask:"What would the other guy say is the incorrect door?", and then both would would say the correct door.(28 votes)

- I still don't get it; how would you know which one is the liar and which one is the truthteller?(19 votes)
- You don't know which is liar or truth teller. You don't need to know which is telling the truth. You just know by following the pattern that you will be told a lie, so you pick the opposite of what they say.(10 votes)

- Could you not also ask "which door would you send the truth teller through?" The truth teller would send himself through the treasure door. The liar would, in reality, send himself through the treasure door also BUT he would lie and say he would give it to the truth teller. So, whichever door they say they would send the truth teller through is the door with the treasure. Am I missing something with this answer?(16 votes)
- Unfortunately the liar would lie about which door he would send the truth-teller through.(1 vote)

- Let's imagine that a truthteller sits outside the correct door,and the liar sits outside the wrong door.Question is "Does the truthteller sits outside the correct door?".The truth teller will say"Yes!",the liar will say "No!".In an opposite situation : truthteller - wrong door,he will say "No!" and the liar,who will sit outside the correct door,will say"Yes!".In both situations "Yes!"will point us the correct door behind that person,and "No!" will mean, that the door behind that person is wrong!(4 votes)
- I dont see any fault with that...i think you find a second way to solve the brain teaser.(1 vote)

- Another way I think is to ask them both a math problem like 5x5

the liar would say -25 and the truth teller would say 25.(3 votes)- that would work, but then you would not know what door has the tresure(7 votes)

- if you ask the lier and he tells you the brown guy would open door two how do you know that hes the liar and hes not just lieing(0 votes)
- liar is lying.(1 vote)

- you could just ask each one to open their door(4 votes)
- that is not a? 0 0

-------------(3 votes)

- Hi, this brainteaser was fun but it also confused me. Any one who can explain it more thoroughly(3 votes)
- Oh yeah, this also confused me but I understood it later. So basically what Sal is saying is that if you ask the truth teller "What would the other guy say?" the truth teller would tell you the truth and say that the other guy would say Door Number 1 (which let's assume is the misery door). If you ask the liar "What would the other guy say?" then the liar , who knows that the truth teller would say Door Number 2, would say Door Number 1. In this case you know the incorrect door. Just pick the other door and you will have the correct door!(4 votes)

## Video transcript

This brain teaser is a bit of
a classic, and I'm sure a bunch of you have
heard it before. But I wanted to include this in
the brain teaser playlist that I'm making right now. Because this one is actually a
good build up, and a bit of a nice warm up session for a
slightly harder brain teaser that deals with people telling
the truth and lying. So this one, we could call it
the truth teller and the liar. So we're on some type of
adventure quest, and we get to a fork in a road, right? So let's say that there's
two doors. That's even better. So there's two doors. And I've gotten to the end of my
adventure quest. And I know that my treasure is behind
one of these two doors. Unfortunately, behind the other
door is slow and painful death, and all of the
misery in the world. So I want to pick the
door carefully. And beside the doors, there are
two people sitting there. There's one guy that
looks like this. And then there's another guy
that looks like this. And I know for a fact - the
gods of brain teasers have come and told me - that both of
these guys know which door has the treasure, and both of
these guys know which door has the unbelievable despair
that would ensue if I opened that door. So both of these
guys know which door I should be opening. And I also know, and both of
them know, that one of them always tells the truth. One is always honest. And then
one of them always lies. And the problem is I don't
know who's who. And I only have one chance. Obviously I can't just open
a door and close it. If I open the wrong door,
the despair will come out and kill. And you know, all of the
pain will happen. And I can only ask one question
of one of them to decide which door to open. So remember, they both know
the correct answer. But one of them always lies. One of them always
tells the truth. And I only have one question
to ask of one of them. So the brain teaser is: What
question do you ask? Who do you ask it to? Do you ask it to the green
guy or to the brown guy? And then what do you do based
on what they tell you? So that is the problem
description. And I will now give
you the solution. So if you don't want
the solution, and I encourage you not to. I think if you think about this
one for maybe 20 or 30 minutes, or at most a day. Sometimes when you sleep
on a brain teaser it might come to you. So I encourage you to do that. So pause it, stop
it, whatever. Don't listen anymore. Because here is the solution. So what you do is-- I mean,
you don't know who's who. So it's not like there's a
correct answer on who you ask a question of. But what you do is you ask you
either of the people, what would the other guy say is
the correct door to open? So let's think about this. So I could ask this guy, I'm
asking the green guy, what would this guy say is the
correct door to open? Now what happens if this
guy tells the truth? If this guy tells the
truth, then this guy's the liar, right? And so he will actually
tell me what this guy would tell me to do. So what would the other guy
say is the correct door to open, right? So this guy, if you were to tell
him the correct door to open, he would tell you the
incorrect door to open. Right? So when you ask this guy what
would that guy say, he'll be honest about what this
guy would say. And since he's a liar,
he would tell you the incorrect door. So the answer to this question,
you would get the incorrect door. Incorrect door would be the
answer to that question if this guy's the truth teller
and this guy's the liar. Now what happens if it's
the other way around? What if I ask this guy and he
happens to be the liar? So this guy's the liar, this
guy's the truth teller. So the liar, he can't
help himself. He will lie. So he knows that this other
guy is the truth teller there, right? There's only two
of them there. He knows this guy's
the truth teller. And he knows that this guy
when asked will say the correct door to open. So if you happened to be lucky
and you ask this guy the correct door, he would
tell it to you. This guy will lie. Let's say that this is the
correct door, door number two is the correct door. So let's say that door number
two is the correct door. If you ask this guy directly,
he'll say oh yeah, door number two. You'll find all your happiness
behind door number two. Now if this guy's a liar, he
knows that the truth teller will say door number two. But he's a liar, so he'll tell
you door number one. So once again, if I ask the same
question of the liar, I still get the incorrect door. Right? So no matter who I ask this
question to, their answer will be the wrong door, the incorrect
door, or the door that I get all of
the pain from. So what you do is you ask this
question, what would the other guy say is the correct
door to open? And no matter who you ask that
to, they're going to answer the incorrect door. And so you do the opposite. So I ask this guy, mister green
guy, what would mister brown guy say is the correct
door to open? And green guy will say brown guy
will tell you to open door number one. Well green guy says that brown
guy will tell me to open door number one, then I should
open up door number two. And likewise, if green guy says
brown guy will say to open door number two, then I
should open door number one. Anyway that's a nice warm up
brain teaser for the next one I'm going to give you.