Knights and Knaves
In the Knights and Knaves riddle you are facing a fork in the road, with one way leading to freedom and the other to death. There are two persons, a knight and a knave. The former always tells the truth while the latter always lies. You got to ask one yes/no question to find your way into freedom.
One solution is to use truth tables. For example in that the statements of both persons are concatenated together. According to the AND table it does not matter in which order true and false are combinated, the result is false. So if your question goes like »What would the other person say, if I’d ask him if this way leads to freedom?«, you always get a falsified answer and are able to identify the way into freedom.
A general assumption for this riddle is that both persons know the truth about whereto the ways lead. That introduces another approach, in that the knave must diversify between inner and outer opinion. To be able to always lie outwardly, he has to know the truth for himself, so his inner opinion is the truth. To take advantage of that, one could ask »Would you say for yourself, that this path leads to freedom?«. This provokes a contradiction in the knave’s answer and can therefore be spotted.
Finally a similiar approach that uses the inner opinion is possible too. If both know of the truth, but are still acting differently, this must be on purpose. So in other words, one wants to harm you and the other not. A simpler question would therefore be »Do you want me to go this way?«. The good guy, you can take at his word, because he has your best interests in mind. The bad guy on the other hand would like to send you to death, but since he’s forced to lie, you can take him at his word too.
Does it? Imagine an island filled with two groups of people: one group that believes only true statements, and another group that believes only false statements. Even if both groups tried to always be truthful, the first group would only utter true statements and the second group would only utter false statements. How would you tell whether you were on an island with these groups of people, or on an island with knights and knaves?
If you haven’t read it, you should check out Raymond Smullyan’s book called “What is the Name of this Book?”. It’s the source of knight and knave riddles, and it’s amazing.
Right. The knights want to harm you, and the knaves want to help you. Sadly, both groups were cursed by a witch to forever tell the truth or lie. A knight regrets every statement they make—they want to lead you astray, but are compelled to tell you the truth instead. And a knave also regrets every statement they make—they want to point you in the right direction, but are compelled to lie instead. Their only consolation is that, even by lying, they are revealing information, and they hope that you’re clever enough to figure it out.