You’re at a fork in the road. One path leads to a job you love, the other to a terrible one. There are two people at the fork:
One always tells the truth.
One always lies.
You don’t know who is who. You can ask one yes/no question to one of them to find the good path. What do you ask?
Think of a question which will involve both persons.
Solution
We need to craft a question that reveals the correct path regardless of who answers. To achieve this, we use a self-referential question. (composite functions)
Let p = "this road leads to the good job." Let T return the truth of p and N return its negation. Ask one person:
"Would the other person say that this road leads to the good job?"
Their spoken reply equals f(g(p)) (where f is the respondent and g the other). In both possible assignments this evaluates to ¬p, so the answer indicates the bad road — take the opposite road.