Solution

The Spy Who Claimed to Be a Spy

Show the problem again

Three people, Ada, Bo and Cy, are exactly one knight (always tells the truth), one knave (always lies) and one spy (may say anything, true or false). Each of them knows who is who. They say: - Ada: "I am the spy." - Bo: "I am the spy." - Cy: "Ada is the spy." Who is the knight? Answer with the name.

Worked solution

A knight can never say "I am the spy", since that would be false. So neither Ada nor Bo is the knight, and the knight must be Cy. Cy's statement is therefore true: Ada is the spy. That leaves Bo as the knave, and indeed his claim "I am the spy" is false, as a knave's must be. Every other assignment of the three roles fails, as a check of all six permutations confirms. Answer: Cy.

Source: Original puzzle in the knights-and-knaves tradition popularised by Raymond Smullyan. Statement written for AxiomIQ.