Fork that leads to two paths
by iarnab_kundu, Dec 29, 2014, 6:48 AM
Say, you are at a fork. There are two roads diverging from it. One of them is unsafe and the other one is safe.
They are identical in all other respects, and you want to discern which one is the safe one.
For your help there are two people standing who can only respond to bool questions. (Like "Is the sky red?")
One of them always speak the truth, and the other always lies. The two persons are identical in all other respects.
You can ask them one question, the same one to both.
And based on their answers you have to choose the right path.
Which question will it be?
My solution-
A: If I ask you "Is 1=1", will you answer yes?
B: If I ask you "Is this road safe?" will you answer yes?
Let
be the output we define.

means that the person is liar. The liar says no to the correct path and yes to the other. Thus for him
means that the road is safe and unsafe otherwise.
Now the liar obviously inverts the values, and if we name
to be the reply we receive then we have

If the answer is
then we choose the same path, otherwise choose the next one.
Vipul Naik's solution:
Is at least one these statements true?
(a) You are a liar,
(b) The left road is the correct one."
The liar will always say no, but the other person's answer will be the answer to (b). So if the left road is the correct one, you will get one no and one yes. If the right road is the correct one, you will get two nos.
They are identical in all other respects, and you want to discern which one is the safe one.
For your help there are two people standing who can only respond to bool questions. (Like "Is the sky red?")
One of them always speak the truth, and the other always lies. The two persons are identical in all other respects.
You can ask them one question, the same one to both.
And based on their answers you have to choose the right path.
Which question will it be?
My solution-
A: If I ask you "Is 1=1", will you answer yes?
B: If I ask you "Is this road safe?" will you answer yes?
Let




Now the liar obviously inverts the values, and if we name


If the answer is

Vipul Naik's solution:
Is at least one these statements true?
(a) You are a liar,
(b) The left road is the correct one."
The liar will always say no, but the other person's answer will be the answer to (b). So if the left road is the correct one, you will get one no and one yes. If the right road is the correct one, you will get two nos.
This post has been edited 4 times. Last edited by iarnab_kundu, Dec 29, 2014, 7:14 AM