The question
All knights always tell the truth, and knaves always lie. A visitor asks three islanders, "Is one of you a knight?" The first says "Yes," the second says "No," and the third says "Yes." Who is who?
Logic lab
Truths and lies collide: use the question itself to test each person.
All knights always tell the truth, and knaves always lie. A visitor asks three islanders, "Is one of you a knight?" The first says "Yes," the second says "No," and the third says "Yes." Who is who?
The actual answer to the question is yes if there is at least one knight, and no otherwise. Listen to who is contradicting that result.
If there were no knights, the truthful answer to the question would be no, so no one could say yes. Since we heard yes, the true answer must be yes, and knights must say yes while knaves say no. Therefore the first and third islanders are knights (they say yes), and the second who said no must be a knave.