Truth-teller and liar riddle is an old logical puzzle. There are several similar versions. Here is one of them:
A man stands in front of two doors. One of them leads to the way out, while the other one leads to nowhere.
There are two persons who know which door leads where, but one always tells lies and the other one always tells the truth.
The man doesn't know who is truth-teller or liar.
However, his decision (which door to choose) may be supported by setting only one question to only one of the two persons.
What should the question be so that the answer can give a 100% certainty for the right decision?
The riddle is also known from its use in The Labyrinth (1986) starring David Bowie.
All possible combinations (8 for the rejected question + 8 for the proper question) can be manually tested in the following applet.