Question

2 guards

Asked by: 1loser1

A prisoner is being set free. He can leave through 2 doors. one door leads to freedom while the other leads to the gas chamber.  There are 2 guards. One always lies and one always tells the truth.  you can ask any one of teh guards  1 question.  What is the question?  good luck!

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2003-02-10 at 14:57:01ID20508263
Tags

one

,

question

,

doors

,

guard

,

2

Topic

Puzzles & Riddles

Participating Experts
30
Points
50
Comments
73

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. Two Statues and Two Doors.
    Two Statues and Two Doors. Ok you have passed away and found yourself in the afterlife, just one problem you have come across two doors guarded by two statues. You must chose a door, one door leads strait to hell the other to heaven, the only way to tell them apart is to a...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: ozoPosted on 2003-02-10 at 17:17:14ID: 7922190

"If I ask you if the left door leads to freedom will you answer 'yes'?"

 

by: postiePosted on 2003-02-10 at 17:50:05ID: 7922322

It seems to hold, but perhaps ozo you could have explained your reasoning so it is easier to verify the answer?

 

by: halfcent50Posted on 2003-02-10 at 19:04:27ID: 7922586

Ask either guard:

"If you were the other guard, which door would you say leads to freedom?"

Then take the OTHER door.

The truth teller will truthfully give you the answer that the liar would give (in other words, the wrong door.)
The liar will give you the opposite of what the truth teller would give you (in other words, ALSO the wrong door.)

So, in either case, the answer will be the door that leads to the gas chamber.  So take the OTHER door - which will be the door to freedom.

 

by: MennovdhPosted on 2003-02-11 at 01:43:01ID: 7924073

The question is "hey, wassup?"

Then you take either door, because after all those years in captivity you've become bitter, and no longer care whether you live or die; you doubt you will ever be able to adapt to normal life again. If by choose the door to the gas chamber, you die, and that's ok. If you choose the door that leads to freedom, you live for a few more years, and that's also ok, but it really doesn't matter anymore.
Nothing really matters.

 

by: sirjulioPosted on 2003-02-11 at 02:39:00ID: 7924297

halfcent has provided the correct question and therefore provided the answer the riddle demands. However he has been too quick to point out the prisoners choice. Mennovdh maintains a valid point; bitterness can ensue from captivity and the deprivation of liberty can eat away one's soul. So after the prisoner knows which door leads to where, he needs to ask another question and not to the guards but himself: "Do I desire to live or die?". Then the answer is to take the door which is dictated by his motivation.

 

by: andyalderPosted on 2003-02-11 at 04:07:12ID: 7924704

>>"If you were the other guard, which door would you say leads to freedom?"

Not quite it should be "If I was to ask the other guard, which door would he tell me leads to freedom?"

 

by: meintsiPosted on 2003-02-11 at 06:42:07ID: 7925731

Question:
How many times does this question appear in this forum?

Answer:
I don't know because I'm too lazy to count all the variations I've seen here.

(I'm just mad  because I never thought about keeping the answer permanently stored on my office clipboard until now.)

 

by: MennovdhPosted on 2003-02-11 at 07:01:07ID: 7925870

I wondered about something else too;

Are you aware of the one guard always speaking the truth, and the other constantly lying?

If not; why bother asking any question at all, just rush out towards your freedom..., or doom.

If so; who told you? The truth-speaking guard, the lying guard, the king, your lawyer...? Either way; how can you be sure he was telling you the truth?

 

by: SunBowPosted on 2003-02-11 at 11:20:37ID: 7927957

The answer truly lies here:
http://www.experts-exchange.com/Miscellaneous/Puzzles_Riddles/Q_20437461.html
"Fork  U"

-> if you can sort it out, let me know and I'll give you the 10 points, or the 9.999r...

 

by: SunBowPosted on 2003-02-11 at 12:27:07ID: 7928489

> A prisoner is being set free.

er, say again? A gullible prisoner you say? Suspicious cynicism from watching too much TV has me think it is election year, and the local Sheriff of Nottingham has hired assassins behind every shrub surrounding the building to deal with a rumoured potential escapee and dispatch with extreme prejudice. As such, I'd tend to give halfcent50's comment in other thread an increased seriousness: "Just sit and wait."

Put my feet up, keep the right to ask question later (defer), close eyes, relax, and think about question some more, stock up on more of that nutritious prison dining, for without a job who knows when the next meal will come (might as well start planning for that eventuality as well), and in the meantime, the trigger fingers of any hired deputies out there will get sluggish, their attention span will wane as their own bellies start to grumble and their eyes droop. While they may not be there, no chance yet for a preview of environment, one can still leverage some alternative approaches to the survival algorithm, and build in some defusers.

I think also there of ozo comment in other thread, touched on by Mennovdh above, such as where do you justify an assumption that "being set free" is itself the truth?

So, take time out to revisit personal requirements, as in sirjulio (and even Mennovdh), make plans that are more appropriate on the personal level (what lies on the outside - another roll in the hay?), and put into operation, but not until ready/prepared for eventualities and ramifications. Do duly consider risks.

----------------------

Problems for such questions entail lack of information, ambiguities, handling negatives, double negatives (makes positive?), philosophy, psychology, personal belief system, etc.

Example: Left vs Right. Which what is who's. My left when I look at you? The guard on my left looks at me, when I refer to left, does he think of his left looking at me, or mine, or the left side of the other guard, or .... (sheeze, that just goes on and on)   At first blush, all is simple enough, for seemingly simple question. But that only works for the test-givers, not so for the test-takers, whatever the IQ.

So a chief problem of ambiguities needs some resolution by clarifying the specifics using more precise definitions. In this case, proper identification of exactly which door is referred to is of paramount importance, lest one get gassed and realize "oops" I meant ... <ugh>

-----------------------

> He can leave
> you can ask

;-) oh, what do I/we care about him anyway? Was he guilty? Do we really want him to go free? I/we are not he? All that unknown, I think I'd rather form up a question to find out where we can get the best food & drink in town, let prisoner operate on own devices.

 

by: postiePosted on 2003-02-11 at 15:04:02ID: 7929639

I think we're all missing the point here.. what kind of a sicko warden sets a prisoner free only to set him this test which could continue his freedom or result in his state sponsored execution?  It must have been *real* slow at the prison that day.  

Guard: "Prisoner 458-3 is due for release today, sir"
Warden: "You know, there's this thing I read on a forum once I've always wanted to try..."

:D

 

by: MacRaePosted on 2003-02-11 at 19:15:05ID: 7931021

>> what kind of a sicko warden sets a prisoner free only to set him this test which could continue his freedom or result in his state sponsored execution?

A bit of a parallel here with God granting man free will and then waiting to damn him to eternal hell if he screws up.

 

by: halfcent50Posted on 2003-02-11 at 19:44:07ID: 7931156

<andyalder>

I don't see your point.
"If you were the other guard, which door would you say leads to freedom?" seems to be a valid question to ask.

Let's say Door 1 leads to freedom and Door 2 leads to death.

Ask the above question of the lie teller, and his thought reasoning would be:

"If I were the truth telling guard, then I would say Door 1, so since I always lie, I must answer Door 2"
So he would answer the prisoner by giving the wrong door as his answer - Door 2.

Ask the above question of the truth teller, and his thought reasoning would be:

"If I were the lie telling guard, then I would say Door 2, so since I always tell the truth, I must answer Door 2"
So he would answer the prisoner by giving the wrong door as his answer - Door 2.

Therefore, why would my question not work?  You would go through the OTHER door in either case.

Right?  Not a double negative as I've sometimes heard it explained, but a mix of positive and negative - resulting in a negative answer.

Ron

 

by: postiePosted on 2003-02-11 at 20:12:36ID: 7931280

I think what's going on there is that by putting the question through the two guards simultaneously you always get a lie.  You can sort of think of it as a twisted kind of multiplication: (hold on kids!) :)

Telling Truth = <FACT> x 1
Telling Lie = <FACT> x -1

The truth is an operation which doesn't affect the original fact (multiply by 1).  The fact is flawlessly reproduced.  A lie however, is an operation which reverses the sign of the fact. (multiply by -1).  The fact is garbled.  It also holds that two lies will produce the truth again.  -1 x -1 = 1

When you involve both guards responses in the same question you either get :

<FACT> x 1 x -1 = <FACT> x -1 = a lie.
or
<FACT> x -1 x 1 = <FACT> x -1 = a lie.
(depending on which guard you asked.)

When you think of it that way, it doesn't matter too much how the question is worded as long as there's somekind of element of "what would the other guy say" in there somewhere.

In fact, that would be the general solution to any of these "2 choices with a liar and a truth teller problem".

"What would the other person say if I asked them:" <INSERT QUESTION ABOUT CHOICE 1 HERE>

The answer will always be a lie.

 

by: Jerry_PangPosted on 2003-02-12 at 03:05:01ID: 7932704

... hmmmp let me see
<----<<   >>----->
Pit    or   Destination

i facing in one direction but i dont know which one.
so i choose >>----->

im a man, so i ask
im a woman going to the right direction. Right?

TRUTH IS im man           right direction ? if yes
NOTliar  answer: NO                
No, your not a woman
                          right direction ? if yes
liar     answer: NO
No, your a woman going to the right direction ??? right? his asnwer this, should be his answer
or should it be i dont know?

TRUTH IS im man           right direction ? if NOT
NOTliar  answer: NO        
No, your not going to the right direction
                          right direction ? if NOT
liar     answer: YES              
Yes, your a woman going to the right path

SO I THEREFORE CONCLUDE! if both answered yes and no then im not going to the right direction else if one cannot answer(hehe) or both no answer then im going to the right direction
 

 

by: Jerry_PangPosted on 2003-02-12 at 03:10:02ID: 7932725

erase ! again again again!

... hmmmp let me see
<----<<   >>----->
Pit    or   Destination

i facing in one direction but i dont know which one.
so i choose >>----->

im a man, so i ask
im a woman going to the right direction. Right?
***********************************
TRUTH IS im man           right direction ? if yes
NOTliar  answer: NO                
No, your not a woman
                          right direction ? if yes
liar     answer: NO
No, your a woman going to the right direction
Yes, your a woman going to the right direction
or Yes and No?? if its yes and no then its a NO answer
********************************

TRUTH IS im man           right direction ? if NOT
NOTliar  answer: NO        
No, your not going to the right direction
                          right direction ? if NOT
liar     answer: YES              
Yes, your a woman going to the right path
********************************
SO I THEREFORE CONCLUDE! IF i did get the answer
"No, your not going to the right direction" and
"Yes, your a woman going to the right path"
then the other way is the right answer!

 

 

by: Jerry_PangPosted on 2003-02-12 at 03:16:12ID: 7932750

"No, your a woman going to the right direction
Yes, your a woman going to the right direction
or Yes and No?? if its yes and no then its a NO answer"
i wonder how the liar will aswer to this question.

a simple plain NO, right?
or Yes to first part and no the second part.
OR Much Prefered answer by the liar.if he is very strict in lying then he should answer,
"technically, yes your a woman and no,your going to the wrong direction"

Satisfied?? **** APLAUSE!!! ****

 

by: Jerry_PangPosted on 2003-02-12 at 03:18:29ID: 7932757

offcourse right direction is a question of where is the path to freedom

 

by: andyalderPosted on 2003-02-12 at 04:11:45ID: 7932983

halfcent, "if you were the other guard" seems ambiguous to me. It could be argued that if you asked this of the guard who always tells the truth he could think you meant if he was standing infront of the other door in which case he would assume to always tell the truth still.

 

by: kenesoPosted on 2003-02-12 at 04:17:42ID: 7933009

wow this is great, I mean how we look at everything and see it differently, hence truth is relative!
But pls let me first comment on a couple of posts:
to halfcent50 - I think andyalder has a point, in the way that the guard could answer "well I am not him" and would burn ur opportunity.
1loser1's problem can be taken with some granted assumptions, like halfcent, andylader, postie did, or go further with the dramatically funny comments of mennovdh, and postie; or yet with the frustration of meintsi.
Therefore I'd like to add my comment:
if the prisonner is being set free, the gas chamber is an arbitrary acrion (assassination) by probabily postie's warden; hey you said the prisonner is set free!
To mennovdh - the prisonner has another option not asking any question, so he lives a few more yrs in the place he knows; but this too leads to another point: the assumption that we are talking about a lifetime/40 yrs/death sentence, so are we? what if the prisonner is in only for 1yr or so? would ur point still be ok?
Is he a criminal, or a pow, or political prisonner, or imprisonned for his religious belives?
One last (for now ;)) consideration, pls define freedom, can freedom of life be considered?

 

by: integerPosted on 2003-02-12 at 04:53:57ID: 7933196

This is logically the same problem as SunBow proposed.  I will give you my (correct btw) answer that I gave him on 12/27.  I will adsjust the phrasology to apply to your question:

Arbitrarily pick one person.  Ask him: "Which door would the other guard identify as the door that points freedom?"

Here is how you interpret the results:

It doesnt matter which guard you ask becuse they will both point to the incorrect sign.  Here is why:

The liar will point to the wrong sign because the truther would point to the correct sign.

The truther will point to the wrong sign because the liar would point to the wrong sign.

Therefore, all you need to do is pick the opposite sign of whatever the person tells you.

 

by: halfcent50Posted on 2003-02-12 at 17:10:27ID: 7938336

andyalder,

Hmmmm... - I'll have to think about that - can't see it right now - bad day today - braindead here.

One thing though, I didn't see anything in the question about guards standing in front of the doors - only that the guards were there and the doors were there (and of course the prisoner is there), and would answer only one question.

Ron

 

by: postiePosted on 2003-02-12 at 17:19:11ID: 7938397

And alternate answer is the prisoner walks up to any guard, pistols whips him and takes him hostage.  He then picks either door and starts to go through it.  If the guard starts shouting and complaining then it's the death door, so drop the guard (who sobs uncontrollably) and run through the other door to freedom!!! :)

 

by: Jerry_PangPosted on 2003-02-12 at 17:30:29ID: 7938473

is this the right answer.. hmmp..

know what. funny, The Prisoner is set free. SO if ask , which way to freedom? the guard 1 said door 1. then, "OK!, thanx." then, i found out its the gas chamber, so i come back. "Hey guard, Very funny! HAHA!". then i'll go the other door, the door to freedom.wil i die in the gas chamber?! why? i was set free you know.

 

by: Jerry_PangPosted on 2003-02-12 at 17:34:23ID: 7938496

"And alternate answer is the prisoner walks up to any guard, pistols whips him and takes him hostage.  He then picks either door and starts to go through it.  If the guard starts shouting and complaining then it's the death door, so drop the guard (who sobs uncontrollably) and run through the other door to freedom!!! :)"!
hehe, get got arrested and go back to prison.

 

by: Chris-MPosted on 2003-02-13 at 08:39:10ID: 7943073

"Which door leads to freedom"

 

by: msmalesPosted on 2003-02-14 at 20:34:24ID: 7954599

It really depends if the prisoner wants to get freedom or die! So I'm not clear on which goal the prisoner wants to reach.
---------------------
Here is a foolproof tactic to reach freedom (based on the given rules):

Ask the first guard a question, "Are you a guard?" (An easy question you can use to tell if he is lying or not!).

If the first guard says "Yes" (who tells the truth), ask the second guard (who we now know tells lies) a question, "Is the first door leads to freedom?" and the "No" answer will lead you there or the "Yes" answer will lead you to the gas chamber.

otherwise (if you ask the second guard (who tells lies) a question first)

If the second guard says "No" that he is a guard, ask the first guard (who we now know tells the truth) a question, "Is the first door leads to freedom?" and the "Yes" answer will lead you there or the "No" answer will lead you to the other door as the second guard always lies.
------------------

If the prisoner wants to die instead, you can try following the above script to lead him to the gas chamber!

Martin

 

by: postiePosted on 2003-02-16 at 14:31:20ID: 7961998

But according to the original question posed by 1loser1:

> you can ask any one of teh guards  1 question

not 2 as is suggested by your answer, msmales.  This is the reason why you have to include some sort of question about the door as well as a way of figuring out which is the liar.


 

by: msmalesPosted on 2003-02-17 at 02:21:33ID: 7965021

Okay, point taken. I didn't read the question properly, but it would have been my answer if I'm allowed 2 questions, one per guard.

So the one and only question the prisoner should ask is:

THIS IS IMPOSSIBLE. LOL. :)

Tell me the answer as if you're talking to a ONE YEAR OLD. Thanks :)

Anyway, here's my guess for this riddle: the prisoner must ask this question,

"SPEAK UP IF AND ONLY IF YOU ARE TELLING THE TRUTH AND THE FIRST DOOR LEADS YOU TO FREEDOM!"

The Truth guard will say yes to both so he speaks up but the False guard would not because he says yes to the first one but no to the second part.

Martin

 

by: sppriyaPosted on 2003-02-17 at 22:40:08ID: 7971878

If I ask the other person if the left door leads to freedom will he answer 'yes'?

 

by: msmalesPosted on 2003-02-17 at 23:00:51ID: 7971967

Of course, but the Liar (or Truth) guard will not speak up because he will have to say "yes" to both, therefore, I will believe the other guard, the only one who will ever speak, who says "yes" to both conditions in this one simple question. Both guards will have to obey the "speak up" command and you cannot lie or tell the truth based on this command.

Bottom line, I am using an AND logic in mathematics:

True and True = True (the one who speaks up)
True and False = False (so this one will not speak up).

Martin

 

by: msmalesPosted on 2003-02-17 at 23:02:45ID: 7971979

Of course, the first condition is always the same for both guards as both will return the same answer, but it really depends on the second condition that separates them out to who is really telling you where the freedom door is.

Martin

 

by: kc_karthikPosted on 2003-02-17 at 23:08:44ID: 7972006

The one question will be like this:

I'll approach any of the guard and ask him - 'If I ask the other guard where this door leads to then what will his answer be?'

the logic goes like this:

If suppose the door leads to Freedom and the guard if truthful, he knows the other guard will lie and tell it as Gas Chamber, so he'll say Gas Chamber.

Suppose the liar is sitting at this door, he knows the other guard will say Freedom so he'll lie by saying Gas Chamber.

Suppose the door leads to Gas Chamber and the guard is truthful he knows the other guard will lie by telling Freedom and so he'll say Freedom.

suppose the liar is sitting here he knows the other guard's answer will be Gas Chamber so he'll lie by telling Freedom.

So after asking this question and getting the answer, if the answer is Freedom then take the other door and if the answer is Gas Chamber then take the same door.

 

by: msmalesPosted on 2003-02-18 at 00:01:48ID: 7972200

Hmm. You got a point on assuming what the other guard would say. My answer is based on what this guard will answer the prisoner's question rather than assuming what the other guard would say.

But I think you are on a pot of gold!

I had to resort to the "speak up" command which is pretty amusing myself but I don't know if it's allowed :)

Martin

 

by: kohashiPosted on 2003-02-18 at 07:22:38ID: 7974694

I would twiddle my thumbs until one of them said I have to go home to fornicate (or variations thereof) with my wife.  And then ask the other which is the right door.  Since you know the guy who left is the liar this guard will tell you the truth.  You know he is a liar because:  wives and fornication... dream on.


:)

-kohashi

 

by: HanrahaNPosted on 2003-02-21 at 13:24:57ID: 7995556

ask one guard what the other would say.

 

by: VarklordPosted on 2003-02-21 at 13:43:40ID: 7995684

What compels the guards to answer the prisoner's question?  If the guards were particularly sadistic, they might psychologically torture the prisoner with statements unrelated to his question until he runs screaming through either door.

 

by: thegnuPosted on 2003-02-21 at 20:04:56ID: 7997277

The most secure way to do it, without the assumption that the guards themselves know that one always tells the truth and the other lies, ie knowledge about one another, is to ask either one:

If I were to ask you if the left path is the path to freedom, what would be your answer?

--------------------------
If it is the path to freedom:

The true one would answer yes if you asked him, and so would answer yes to your hypothetical question

The false one would answer no if you asked him, and so would answer yes to your hypothetical question

If it is NOT the path to freedom:

The true one would answer no if you asked him, and so would answer no to your hypothetical question

The false one would answer yes if you asked him, and so would answer no to your hypothetical question
--------------------------

My father told me this riddle when I was 7 and I didn't understand how it worked.  Now I do.  Ha!  I'm a tiny bit smarter now.

 

by: msmalesPosted on 2003-02-21 at 20:22:32ID: 7997332

But how would you know if the left path is really the path to freedom, as both guards give conflicting results? And the catch is you can only ask one and only one question.

 

by: integerPosted on 2003-02-22 at 06:57:00ID: 7998885

Guard Room
This is a small room lined with empty walls. There are exits to the east and west.
There are two guards here.

 

by: thegnuPosted on 2003-02-22 at 16:33:06ID: 8000674

The hypothetical question is a single question.  My explanation is all that is in four parts.

So the one and only question continues being:

If I were to ask you which of the two paths leads to freedom, what would you say?

The truth teller tells you the truth, and so the metaquestion doesn't affect the real question.  The liar WOULD lie, and does lie.  So since he would answer your question with a lie, and he answers your hypothetical metaquestion with a lie about what his untruthful answer would be as well, the double negative cancels itself out.

So both will essentially tell you the truth if you implement metaquestions.

This is less clear, but shorter:

Would you say the left route is to freedom?

That would make his little peabrain churn.  F***ing liar.

 

by: msmalesPosted on 2003-02-23 at 02:18:24ID: 8002382

Hmm. so your saying both will tell the truth if you ask a question:
Would you say the left route is to freedom?

So what happens if you asked this question instead:

Would you say the RIGHT route is to freedom?
(So the right route is to freedom because they tell the truth no matter what??)

 

by: soul_less_at_homePosted on 2003-03-01 at 04:24:49ID: 8047422

does the guy exist?

 

by: thegnuPosted on 2003-03-04 at 18:09:34ID: 8068921

msmales:
If you ask a Would you say that...? question, the liar's double negative will cancel itself out.  Because he will lie about hypothetically lying.  Test it with various questions.

I'm horrible at explaining stuff, but here it goes again, worded slightly differently.

If I asked you if the sky is blue, what would you say?

The liar would say NO, the sky is not blue.
So if you ask him what he would say, he will say YES

If I asked you if the sky is red, what would you say?

The liar would say YES, the sky is red.
So when you ask him what he would say to your question, he answers NO

voila!  True answer.

 

by: msmalesPosted on 2003-03-04 at 19:48:16ID: 8069298

Oh right. A double negative. That's smart :)
I wonder who got the accepted answer by now.

I'm sure the if blah, would you say blah question might be useful for future friendly robots who sometimes flunctuate by telling truths and lies. This question will act as an anti-dote for lies :) Sad to say about humans that they are too smart for this one... and can still tell lies...

 

by: Mar_velPosted on 2003-03-27 at 13:30:20ID: 8220716

Easy as anything:o)
the man shud ask, Which way wud the otha guard tell me to go out side to freedom.
if it is the guard that tells the truth you get the gas chamber and if it is the one that lies you get the gas chamber so the man goes the opposite way to which the guards will tell him

 

by: SunBowPosted on 2003-03-28 at 15:23:25ID: 8228436

See also (1 ambiguous guard):
Title: Mind Boggling Riddle
http://www.experts-exchange.com/Miscellaneous/Lounge/Q_20566560.html
Date: 03/28/2003 08:02AM PST
Status: Waiting for Answer
Points: 0

 

by: goibeePosted on 2003-04-13 at 21:36:00ID: 8324539

Your all crazy ;-). Half cent 50 got it right, and 1loser1 has not replied. Why are we wasting our time here?

Oh and i by the way, i think posties answer was the best

>I think we're all missing the point here.. what kind of a sicko warden sets a prisoner free only to set him this test which could continue his freedom or result in his state sponsored execution?  It must have been *real* slow at the prison that day.  

Guard: "Prisoner 458-3 is due for release today, sir"
Warden: "You know, there's this thing I read on a forum once I've always wanted to try..."

:D

Also Mennovdh had a good answer

>The question is "hey, wassup?"

Then you take either door, because after all those years in captivity you've become bitter, and no longer care whether you live or die; you doubt you will ever be able to adapt to normal life again. If by choose the door to the gas chamber, you die, and that's ok. If you choose the door that leads to freedom, you live for a few more years, and that's also ok, but it really doesn't matter anymore.
Nothing really matters.

 

by: soggybottomPosted on 2003-04-21 at 15:18:41ID: 8369718

All entertaining goofiness aside, it is ozo's answer that is MOST correct, because it does not assume that the guards know each other:  something the problem statement does not indicate either way.

Life and death situation--not a good time to make unfounded assumptions.

Of course, even ozo's question assumes a simple and direct answer in response: a seemingly fair inference in the context of the puzzle.

 

by: postiePosted on 2003-04-21 at 16:59:48ID: 8370171

Soggybottom, if you want to talk about "unfounded assumptions", what if the guards each only know the destination of their door, or if for security reasons, they only knew the destination of the other guard's door (in case the prisoner decides to get violent and take someone hostage)

> ozo:
> "If I ask you if the left door leads to freedom will you answer 'yes'?"

The way ozo's question is worded, if the guard actually didn't know the destination of the left door and was a liar, he could say yes, which doesn't help your cause since he doesn't actually know.

Ok, I'm being a bit pedantic and I'm sure none of the other answers would survive similar analysis, but I'm just trying to point out that the what Soggybottom infers about the chance of the guards not knowing each other is a similar sort of thing, and not necessarily valid.

On another note, what if the guard were to analyse ozo's question and consider that ozo is only allowed 1 question, which IS the question being asked, so the "if I asked a question" question is in fact a second question, and as such the guard wouldn't answer that question at all, meaning the results wouldn't be what you expect.

Ok, a bit hairy, but consider the first word.  "IF I ask you...", the guard knows full well that ozo's not allowed to ask a second question, so the IF event has a probability of 0, as it cannot occur now that the first question has been asked, so his answer would reflect if he's a liar or not, not the state of the door.  Ie: for the truth teller: I can't answer the question, so would I say yes? No.  For the liar, the opposite case.

By this reckoning, halfcent50's answer of :

> "If you were the other guard, which door would you say leads to freedom?"

Would still work, since there isn't a second question problem, there's still an if, but that's the ACTUAL question, not a question within a question.

Actually, as my first post eluded to, I think the points should go to the first person that adequately EXPLAINS the reasoning behind their answer as well having a correct answer, but I'm not the person who posted the question, so ultimately it's up to 1loser1.

 

by: soggybottomPosted on 2003-04-22 at 10:09:08ID: 8374638

Oh, man.  Now I really am soggybottom.  =)

 

by: draken2028Posted on 2003-05-05 at 19:06:06ID: 8466619

Actually, you don't have to do anything else, but sit there and wait for one of three things to happen...(notes, I am basing this on the fact that the guards will be the only guards there.  Next, that your wanting as the prisoner is to have freedom as opposed to the gas chamber.  Next, that you entered through a door, leading into a room that has a door towards your left, and one towards your right.  I am also assuming that the guards have the identical uniforms, are the same build, look absolutely identical, and hold themselves the same.  The last bit is that the lying guard is a pathological liar and can tell a fib as plain as telling the truth.)

Okay, the first thing would be to wait for the bathroom break.  You can see which door the guard might flinch to.  However, this is not always obvious.  As well, their shift could end, but I stated we are waiting for the guards to be the only ones, even if your choice takes forever.

Next, you could wait until the summer.  This would warm the exterior door leading to freedom.  In which case you would simply hold your hand to the door.  You could also notice any draft coming from one door as opposed to the other.  A gas chamber room is ventilated interiorly, as opposed to letting air escape(the filtering system in the room promotes fresh air and avoids any 'leaks').  The passing of air could mean an exterior setting, or your freedom.

The final one is to look at the guards' shoes.  Usually, you would not have two guards stationed at one door.  SInce this is a one-time shot it seems, the guards would have other patrols.  now, since this door is the only exit, you can look at their shoes.  Mud, dirt and anything else gives you a sign as to what is in the yard of the prison, as well as any other matters outside of the wall.  You could then look to see if there are tracks leading in from one door, as opposed to the other.

Other things to look for are how many executions are performed in this prison?  Usually, prisons have two forms of execution(in most world-power countries), which are injection and gassing.  Watch to see what room death-row inmates go into and do not come out of..,...this one could take the eternity.

Actually, I thought of one more, that is really nasty, but bears mentioning.  Eat as much as you possibly can right before the release.  Also, hold your stool and your urine.  Stand with your back to the door you just came through.  Now, let everything loose.  It might souond sick, but unless the guards are machines, they will open up one of the other doors, or risk getting sprayed or worse:)  Now, was the door that opened dark and gas chambery?  Or did it wreak of Snow White and doves?  Now, without asking, you have your door!:)

Or, I am totally wrong!HEHEHE....

Later

 

by: djsqueezePosted on 2003-05-28 at 07:33:06ID: 8598269

wold he ask "which way back to my prison cell"

the one who lies will tell him a wrong direction while the one who tells the truth will give him the correct directions. Then he will know which one is truthful and take the door suggested by the truthful one for his freedom.

 

by: msmalesPosted on 2003-05-28 at 23:49:05ID: 8603858

the question is totally asked in mathematical logical sense so that means you forget any assumptions you have therefore unlearn what you have learnt and apply logical principles to this question. Apply double negative to the Liar guard and he will start telling truths no matter what and also the Truth guard will tell the truth, and both will say the same answer which is the final answer, there you go!

 

by: halfcent50Posted on 2003-05-29 at 21:03:26ID: 8611219

I've got to disagree with the whole "double negative" logic.
The solution to this is what has been stated many times throughout this thread (including me on 02/10/2003):

-------------------------------------------------------------------------------------------
Ask either guard:

"If you were the other guard, which door would you say leads to freedom?"

Then take the OTHER door.

The truth teller will truthfully give you the answer that the liar would give (in other words, the wrong door.)
The liar will give you the opposite of what the truth teller would give you (in other words, ALSO the wrong door.)

So, in either case, the answer will be the door that leads to the gas chamber.  So take the OTHER door - which will be the door to freedom.
--------------------------------------------------------------------------------------------

But this is NOT an example of a double negative.
Mathematically speaking, a double negative results in a positive, just as a double positive does.

THIS is an example of a negative/positive - which (again mathematically speaking) ALWAYS results in a negative.

It is THIS logic which solves this puzzle.  Whether Negative/Positive or Positive/Negative, the result will always be the same:
A Negative answer (or FALSE)

So whichever guard is asked the question above, the answer will be a FALSE response.
Therefore, ask the question above, then take the OTHER door, which will be the door to freedom.

-4*+6=-24
+4*-6=-24

Same answer either way, and the sign will always be NEGATIVE (FALSE)

The same logic would apply if BOTH guards were liars (or BOTH were truthful).
Only in THAT case, each guard would actually tell you the correct door that led to freedom.

-4*-6=+24

Of course, if you knew BOTH were liars, you wouldn't need to do anything except ask either which door led to freedom, then take the opposite door.
BUT, the logic used in the answer to the original question would be just as accurate, just more complicated.

Ron

 

by: msmalesPosted on 2003-05-29 at 21:23:34ID: 8611305

aah, now i get it! i never heard a much easier response! this is half a cent's worth i think.

 

by: thegnuPosted on 2003-05-30 at 08:13:46ID: 8614790

postie:
>The way ozo's question is worded, if the guard actually didn't know the destination of the left door and was a liar,
>he could say yes, which doesn't help your cause since he doesn't actually know.
You could then ask:
"If I were to ask you if your door leads to freedom, what would you reply?"
This is a problem if the guard is standing in front of the other guard's door, and only has knowledge of his own.

>On another note, what if the guard were to analyse ozo's question and consider that ozo is only allowed 1 question,
>which IS the question being asked, so the "if I asked a question" question is in fact a second question, and as such
>the guard wouldn't answer that question at all, meaning the results wouldn't be what you expect.
So you could answer:
"What would your reply to the question, 'Does the door behind you lead to the gas chamber?' be?"

Also:
"If instead of asking this question, my use of my question were to question your truthfulness, why are you so indifferent about my mortality, prick?"

 

by: ErevionPosted on 2003-06-22 at 18:54:07ID: 8778344

"What would your answer be if the other guard tells me the door you're guarding is heaven?"

No matter who you ask, you'll always get a "NO" (or false) answer.

In reference to the above question:
You ask the guard who's lying, that question, and since the other guard says the truth, the lying one would give you the opposite (false) answer.
You ask the guard who's telling the truth, and since the other guard is lying, he gives you the opposite answer of what the other guard would tell you.

Of course understanding this fact will also mean there can be other questions asked beside this, but you get the point :)

 

by: thegnuPosted on 2003-06-23 at 08:13:23ID: 8782209

Erevion>
I think the guard might also answer:

CRIKEY!

he might just be really surprised.  he might answer:

really?  whoa...

 

by: thegnuPosted on 2003-06-23 at 08:14:35ID: 8782223

it's probably a little late to bring this up, but the guards aren't assigned doors in the question.

 

by: meintsiPosted on 2003-06-23 at 08:21:55ID: 8782290

Hey thegnu..

   Isn't that said,   CREE! JAFFAR.

 

by: ErevionPosted on 2003-06-23 at 18:34:05ID: 8786052

Yup, but hey I did mention "No matter who you ask" :P

 

by: goibeePosted on 2003-07-01 at 02:55:24ID: 8833072

A few comments

First of all i dont get this stuff about the guards being assigned doors, that is insignificant to the two answers posted.

Second, i am assuming the guards know what each door leads to other wise this question would be pointless. In fact this question would have no answer.

Third, we have two basic solutions here

#1 "If you were the other guard, which door would you say leads to freedom?"

You then take the other door

#2  "If I were to ask you if the left path is the path to freedom, what would be your answer?"

If it IS the path to freedom:
The true one would answer yes if you asked him, and so would answer yes to your hypothetical question
The false one would answer no if you asked him, and so would answer yes to your hypothetical question

If it is NOT the path to freedom:
The true one would answer no if you asked him, and so would answer no to your hypothetical question
The false one would answer yes if you asked him, and so would answer no to your hypothetical question


We also have a problem with each solution

With #1, by asking the question, we ASSUME that the guards are aware of eac other's presence and of each habit ie. always telling a  truth or lie. This may not be.

With #2, technically there are two questions being asked, a normal question and a hypothetical question. So this could be considered two questions and is bascially a question within a question.

So we now ask which is correct? Which one of the solutions is breaking the rules of the question?

 

by: VirtualThugPosted on 2003-07-16 at 17:35:33ID: 8939022

you can Ask which door do i go through

 

by: VirtualThugPosted on 2003-07-16 at 17:35:45ID: 8939025

you can Ask which door do i go through?

 

by: VirtualThugPosted on 2003-07-16 at 17:35:54ID: 8939030

you can Ask which door do i go through?

 

by: QuestiePosted on 2003-07-22 at 22:14:48ID: 8983104

You could always just watch the 80s movie Labyrinth and Jennifer Connelly poses that question to continue on her trip.  Plus the guards have two heads and are pretty cute.

 

by: mjuskoPosted on 2003-10-22 at 09:05:10ID: 9599761

Why are you asking the question?  Open the door, take a look around, if it's the path to freedom...asta la vista.  If smells of mustard gas, close the door and proceed to door #2.  Nothing in the scenario prevents you from examining, without actually passing through the doors.  Who knows there may even be a peep hole.

 

by: ozoPosted on 2004-04-28 at 14:26:42ID: 10943797

I answered the question at http:#7922190

 

by: halfcent50Posted on 2004-04-28 at 15:02:23ID: 10944007

I believe I answered the question on 02/10/2003 07:04PM PST

Ron

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...