Which path $A$ or $B$? (Gateway to Heaven Puzzle) How can I solve this question mathematically?
There are two paths $A$ and $B$, in each path there is a person, one of them is a liar and the other is a truth teller. I want to know the right path, so what is the question that I should ask only one of them. and be sure about the right path?
 A: This is often called the "Gateway to Heaven" puzzle, and is written in terms of an angel (truthteller) and a demon (liar) guarding the doors to Heaven and Hell. The demon is so deceptive that he and his door appear identical to the angel and his door.
Hint: Since you cannot be sure who you are talking to, somehow you need to create a question that involves both parties.
Solution (mouseover to read):

 Ask either person "What path would the other person say is the wrong one?" 
 If you are speaking to the truthteller, then he will answer faithfully on behalf of the liar. The liar would indicate the correct path (since you asked for the wrong one), and the truthteller will faithfully relay that to you.
 If you are speaking to the liar, then he will lie on behalf of the truthteller. That is, the truthteller would correctly tell you which path is wrong, but the liar will then reverse this and indicate the correct path to you.
 Thus, no matter who you are speaking to, the path they give as the answer will be the correct path.

