Solution

Find the Spy Among Six

Show the problem again

Six people, Ada, Bram, Cora, Dev, Eve and Finn, include exactly one spy (who may say anything, true or false); each of the other five is a knight (always truthful) or a knave (always lying). Treat "spy" as a third type when comparing types. They say: - Ada: "Bram is a knight." - Bram: "Ada is a knave." - Cora: "Finn and Dev are of the same type." - Dev: "Bram and Cora are of the same type." - Eve: "Ada is not the spy." - Finn: "Bram is not the spy." Who is the spy? Answer with the name.

Worked solution

Start with Ada and Bram. If neither were the spy, they would both be knights or knaves: Ada a knight forces Bram to be a knight, whose claim "Ada is a knave" is then false; Ada a knave means Bram is not a knight, so he is a knave, yet his claim "Ada is a knave" is then true. Both fail, so the spy is Ada or Bram. Then Eve and Finn are not the spy, and exactly one of "Ada is not the spy" and "Bram is not the spy" is false. So one of Eve, Finn is a knight and the other a knave: Finn is the knight if Ada is the spy, and the knave if Bram is. Suppose Ada is the spy. Then Finn is a knight and Eve a knave, and Bram, whose claim "Ada is a knave" is false, is a knave. Cora says Finn (a knight) and Dev are alike; Dev says Bram (a knave) and Cora are alike. If Dev were a knight, Cora would be a knave, making Cora's claim true, which a knave cannot do; if Dev were a knave, Cora would be a knight, but then Cora's claim (knight and knave alike) is false. Contradiction. So Bram is the spy. Now Finn is a knave and Eve a knight; Ada claims Bram is a knight, which is false, so Ada is a knave. Dev says Bram (the spy) and Cora are alike, which is false because Cora is a knight or a knave, so Dev is a knave. Cora says Finn and Dev (both knaves) are alike, which is true, so Cora is a knight. A search over all assignments with one spy confirms this is the only consistent one. Answer: Bram.

Source: Original puzzle; the 'spy' who may say anything is a standard extension of Smullyan's knights and knaves. Statement written for AxiomIQ.