Here is the classic puzzle of the two guards, one a liar and one honest. As seen in Labyrinth, Doctor Who, and elsewhere.
You are in a dungeon (trying to get out, of course) and you encounter two doors with a centurion guarding each one. One guard always lies and the other
always tells the truth, but you do not know which is which. You are allowed one question to determine the correct door. (The correct door leads to a beautiful princess, a king’s ransom, and the exit, while the incorrect door leads to a man-eating lion, and horrible death.) What question should you ask, and to whom, to ensure your safety?
The guards know about each other. For example (although this does not help) if the first guard was a liar he would say that the second guard is a liar (because it is a lie to say the second guard is a liar).
It is impossible (and unnecessary) to determine which guard is a truth-teller and which is a liar.
Ask either guard, "If I were to ask the other guard which door leads to safety, what would he say?" Go through the other door.
Why does this work? Let's consider the two cases: (1) the guard you ask always lies or (2) the guard you ask always tells the truth. In case 1, the other guard always tells the truth, so if you asked him which door leads to safety, he would tell you the correct door. The guard you asked must lie about that though, so he will tell you the other door. In case 2, the other guard always lies, so would tell you the wrong door, and the first guard faithfully conveys this information to you. In either case, you will be told the wrong door, so going through the other door is the correct play.