PDA

Click to See Complete Forum and Search --> : Ultimate Riddle - Ya Think Your Smart?


kovan
Aug 24th, 2000, 02:32 PM
there it iz boyz n girlz(if there is any)

your locked by the government
put in to a jail with 2 doors

each door is guarded by 1 GUARD
so there is 2 doors, and 2 guards

da canadian government has given you the choice, it could lead you to freedom or to your death

they have told you that you can ask ONE yes or no question to ONE of the guards..
knowing that one door leads to freedom and the other to your death..

you dont know which guard is guarding which door
and here is the last tip

one of the guards ALWAYS lies
and the other guard ALWAYS tells the truth..

so you can ask one yes or no question so you can be set free(your trying to find out which door to go throu with the yes or no answer you get from one of the guards)

again one guard lies other tells the truth to everything
you dont know which guard is guarding which door (so you dont know if the truthfull is guarding the freedom door or the hell door, and vise verse)


PLEASE DONT RUIN THIS THREAD(looks at dennis with a evil grin)

parksie
Aug 24th, 2000, 02:43 PM
How about asking one guard if the other is the one who always lies?

kovan
Aug 24th, 2000, 02:47 PM
if you ask the lier "is the other guy lying" he will say yes
if you ask the truthfull "is the other guy the lier" he will also say yes
how do you figure which one is which?
hehe
this involves some thinking..

i aint giving the answer
someone got to come up with it

dimava
Aug 24th, 2000, 02:49 PM
ok:


MsgBox "raise your right hand and tell me, is the the door to freddom?", VBYesNo

kovan
Aug 24th, 2000, 02:50 PM
if msg = vbYes then
msgbox "Your screwed"
else
msgbox "You still screwed"
end if

dimava
Aug 24th, 2000, 02:54 PM
you can ask 1 question to each of the guard right?

parksie
Aug 24th, 2000, 02:55 PM
You can only ask one question.

How about: "If I asked the other guard which was the door to freedom, what would he say?" to one of the guards.

kovan
Aug 24th, 2000, 02:55 PM
ONE question to EITHER guard
meaning who ever you ask
you got one question...

noone
Aug 24th, 2000, 02:59 PM
I think Parksie has it.

Aug 24th, 2000, 03:03 PM
Parskie,
if he said the other guard would say "this door" then what makes you think that it is that or the other door?
because you still dont know which one is the liar.

dimava
Aug 24th, 2000, 03:03 PM
I would ask 1 guard to ask the other quard which way si to freedom so if I ask the liar one then he will ask the other and tell me the opposite of what the other said, and if I ask the one that tells the truth then he can't lie so no matter what the other guy says, he'll tell the truth

parksie
Aug 24th, 2000, 03:05 PM
I think that works...

Aug 24th, 2000, 03:06 PM
I got it, I didnt think about the question before posting that!
well I dont have it parksie does

if you ask the one guard, didnt matter which one,
lets say he said door #2
if he was lying then it would be #1, if the other guy was a liar it would be #1
:D

Illuminator
Aug 24th, 2000, 03:07 PM
Grrr I cant remember, and I had this question on my Descrete Structures Final too.

A implies Not(B)

If A is liar that means B is not
If A tells lies then B will not tell lies

If A is not liar then B is liar
If A tells truths then B will not tell truths

There is a trick here and I cant remember :(

noone
Aug 24th, 2000, 03:07 PM
You ask Parksie's question and then you DONT go in the door the guard said.
EG: Door A is freedom. Door B is death.
You ask the lying guard. He knows the other guard would say door A, so he says door B.
You ask the truthful guard. He knows the other guard would say door B, so he says door B.
And since you DONT go in that one, you are alive :)

dimava
Aug 24th, 2000, 03:07 PM
that doesn' make sence becuase you woun't know which one you got becuase you only have 1 question to ask in total

noone
Aug 24th, 2000, 03:09 PM
But no matter which guard you ask, you will always get the death door as the answer, so you go through the other door.

Illuminator
Aug 24th, 2000, 03:09 PM
Got it! Ask if one of the door leads to freedom. the liar will have to say no the truth teller will have to say yes!

Illuminator
Aug 24th, 2000, 03:10 PM
Question: "Does one of these two doors lead to freedom?"

noone
Aug 24th, 2000, 03:11 PM
Illuminator, that question will only tell you which guard is the liard. It wont help you get out.

dimava
Aug 24th, 2000, 03:12 PM
the person that is the liar will say no. but you still woun't know which one leads to death and free dom, the other will say... yes but you still woun't know

i think that I am correct:

I would ask 1 guard to ask the other quard which way si to freedom so if I ask the liar one then he will ask the other and tell me the opposite of what the other said, and if I ask the one that tells the truth then he can't lie so no matter what the other guy says, he'll tell the truth

Illuminator
Aug 24th, 2000, 03:12 PM
Doh! Forgot about getting out!

Sam Finch
Aug 24th, 2000, 03:13 PM
Let's make it harder.

You are still in the same situation, but

You only get one question (not one for each guard, just one question)

It is no longer the case that one guard is a truth teller and one is a liar, either of them could be either. ie You could have 2 liars, or 2 truth tellers, or one of each.


Now how do you do it?

Aug 24th, 2000, 03:15 PM
knock them both out, steal there guns and mow down everybody in your path ;)

parksie
Aug 24th, 2000, 03:16 PM
Unless they either shoot you first, or drop a bar on you. :D

dimava
Aug 24th, 2000, 03:17 PM
sam, thats the way it is, you get a total of 1 question. not one to every guard, read the thing over again, carefully

Illuminator
Aug 24th, 2000, 03:18 PM
and is has to be a YES or NO question

Sam Finch
Aug 24th, 2000, 03:22 PM
Yeah, I knew thatI was just clarifying because it looked like a few people got confused. The rule I changed is that it is no longer defiatley on guard wo always tels the truth and one guard who always lies, they might both tell the truth, or might both always lie. Or one of each.

dimava
Aug 24th, 2000, 03:23 PM
it is a yes or no question because he says yes or no to me

Gary.Lowe
Aug 24th, 2000, 03:40 PM
I'm not gonna be able to sleep tonight.

neither is half of the UK.

I've phoned every one I know and everybody has heard it before but can't remember the answer.

Boooo Kovan

parksie
Aug 24th, 2000, 03:44 PM
Does the UK ever sleep? This question hurts...

dimava
Aug 24th, 2000, 03:44 PM
lol

Sam Finch
Aug 24th, 2000, 03:49 PM
have you lot still not got it?


Go up to one of the guards and say "If I asked you if door A will lead me to freedom what would you say?" If he says yes go through door A, if he says no go through door B.

Aug 24th, 2000, 04:03 PM
but if he was the lying one, he would just reverse it, how could you tell whether he was telling the truth?

Sam Finch
Aug 24th, 2000, 04:10 PM
if he was the lying one then if you asked hime does door A lead to freedom he would Lie, so if you asked him "If I asked you does door A lead to freedom? what would you say" he would lie about what he would sayso If door A did lead to freedom the truthful answer to the question would be No because he would lie about it and that's what he'd say, but he would lie about that so he would say yes.

Aug 24th, 2000, 04:13 PM
what if he wasnt the liar?

Sam Finch
Aug 24th, 2000, 04:26 PM
then he would give the right answer to the question "Does door A lead to freedom" and he wouldn't lie about it so you still get the right door.




Public Const Does_Door_A Lead_To_Freedom = True 'Set it to false if you like


Private Function AskTrueGuard(Question As Boolean) As Boolean

AskTrueGuard = Question

End Function

Private Function AskFalseGuard(Question As Boolean) As Boolean

AskTrueGuard = Not Question

End Function


Public Sub GetTheRightAnswer

If CInt(Rnd) Then 'Ask A Random Guard

MsgBox AskTrueGuard(AskTrueGuard(Does_Door_A Lead_To_Freedom))

Else

MsgBox AskFalseGuard(AskFalseGuard(Does_Door_A Lead_To_Freedom))

Endif

End Sub

Aug 24th, 2000, 04:36 PM
OIC

kovan
Aug 25th, 2000, 05:51 AM
parksie had it (some what..)
answer is

you go to EITHER guard
and you ask "If i go to the other guard and ask him is this the door to freedom, will he say yes?"
his answer either gonna be yes or no
and you can figure it out fromt here