Saturday, March 12, 2011

The Road To Safety

A lone traveler comes upon a fork in the road. One path leads to safety, the other will lead to certain doom. At the fork there are two twin brothers and each guards one of the paths. One always lies and the other always tells the truth — you do not know who is which.

You can only ask one yes/no question to one of the brothers. What should your question be to find the safe path?


This is one form of a well known logical puzzle known as ‘Knights and Knaves’. This particular format was used in the 1986 film Labyrinth.

The puzzle has many variations and in the future I will post one that is annoyingly more complex. For now, let's see what the answer should be for this one.

Solution
One question that could be asked is: “Will your brother tell me that your path leads to safety?”
You should take the opposite path of the answer because by asking it this way, both brothers will convey the lie to you.

Details: Even though you do not know which brother you ask, the answer you'll get is the same for both. If you asked the honest brother, and his path is the safe one, he will truthfully tell you that the lying brother will say “No”. However if his path is not safe, the honest brother knows that the lying brother will tell you “Yes”. Accordingly, if you ask the lying brother and his path is the safe one, he will lie and tell you that the honest brother would say “No”. If his path is not safe, the lie will be that the honest brother would say “Yes”.
So, it doesn't matter which brother you ask: if the answer is “No” then that path is safe, if “Yes” then take the other path.

Note that this assumes that the brothers know from each other which one of them always lies, and which one always tells the truth. Propose that for some reason, they are not aware of their condition. What question could you ask then?

Ask: “What would your answer be if I asked you if your path leads safety?’
In essence, this question will yield the truth from the honest brother, and forces the lying brother to lie about a lie, resulting in both cases in the truth.

Details: A “Yes” answer will always guarantee safe passage, while in the case of “No” you'd better take the other path. This one is a bit easier to explain.
If you ask the honest brother, all is well and you will get the correct answer. So far so good. If you ask the liar if his path leads to safety and it does, he would normally say “No” (and vice versa). But you asked him what his answer would be, and he will lie about that too... so he will say “Yes” (and vice versa)! The first lie cancels out the second.

No comments:

Post a Comment