Most people have heard the logic puzzle about the knight and the thief. The knight always tells the truth and the thief always lies. If you happen to run into the two of them on the road one day, how can you figure out who is whom by asking just one yes-or-no question?
A solution is to ask either of them if the other would claim to be the knight. If he answers no, then he is a knight because the thief would lie and say that he is not a knight, but because he does not lie he will truthfully report what the thief will say, which is no. On the other hand if the person you ask says yes, then you can deduce that he is a thief because the knight will truthfully reply that the person you asked is not a knight, but because as a thief he will always lie he will report the opposite of what the knight says, which is yes. Of course there are many ways to solve this puzzle, including the use of counterfactuals. For example, you could ask one of them, “If I were to ask if you are a knight, would you say yes?” A yes response in this case would mean that the person is a knight and a no would mean that he is a thief.
What happens when the knight and the thief are confronted with a paradox? If you were to ask “Are you going to answer a true statement with a no?” you would put the knight who is compelled to tell the truth in a very bad position. He should answer the true statement with a yes, which means he should answer the entire statement with no. However, by answering no, then actually the entire statement is now once again true. Most puzzles don’t take these questions into consideration, but if we add a corollary to the problem statement that neither the thief or the knight will answer when confronted with a paradox, then this puzzle can once again be solved depending on whether or not the subject of your inquisition responds to your question.
I recently came across a much more complicated and interesting version of this logic problem. See if you can figure it out using from the logic the knight and thief puzzle.
There are three omniscient gods, one tells the truth, one lies, and one answers you randomly. You can only ask them yes-or-no and the gods can understand English, but they will only answer you in their native tongue, ba and da, which you do not understand. How do you figure out which of the gods is which by asking three questions (or less)?