Previous Month | RSS/XML | Current
A spy has infiltrated the Agency for Counter-Terrorism (ACT). According to the agency's definition, a spy is someone who knows everyone in the agency by name but is known by name to no one else. An internal investigation by the agency's spyhunters has narrowed the suspects down to eight agents whom I will call only A through H to protect the seven innocent suspects.
The spyhunters interrogated the eight suspects in pairs, asking only whether they knew the other agent's name. While under interrogation, the agents were monitored by the most advanced deception-detection equipment available―equipment that is still classified as top secret―according to which each suspect interrogated told the truth.
Here are the answers elicited from the pairs of suspects when asked whether they knew each other's names:
A: "Yes"; B: "Yes".
C: "Yes"; D: "No".
E: "No"; F: "Yes".
G: "No"; H: "No".
Finally, after a short conference, the investigators called back into the interview room two of the agents, C and F, for further questioning. Asked if they knew each other's names, each replied:
C: "No"; F: "Yes".
Which suspect is the spy?
Extra Credit: Could there be more than one spy in the ACT? If not, why not?
F is the spy.
Explanation: If agent X knows agent Y's name, then Y cannot be a spy, since no one else knows a spy's name. So, based on the first round of questioning and the fact that the answers given by the suspect's are true, we can rule out A, B, D and E as spies.
If agent X doesn't know agent Y's name, then X is not a spy, because spies know the names of every other agent. This rules out agents G and H, who didn't know each other's names.
So, the first round of questioning narrowed the suspects down to C and F, which is why those two were called back in for additional questioning. Since C didn't know F's name but F knew C's, F is the spy.
Extra Credit Solution: No, there can be at most one spy in an organization. Suppose there were two spies, X and Y: given that X is a spy, no other person knows X's name, yet since Y is also a spy, Y knows X's name, which is impossible. Therefore, two or more spies in the agency is not possible.
Disclaimer & Disclosure: The above puzzle is fictitious. The ACT is so top secret that it officially doesn't exist.
The puzzle is a variation on the Celebrity Problem*, and a spy is the opposite of a celebrity: a celebrity is someone whose name everyone else knows but who does not know the name of anyone else. Celebrities can be discovered in the same fashion as spies, except that the effect of the questions is the opposite: if X knows Y's name or Y does not know X's name, then X is not a celebrity. Similarly, there can only be one celebrity in a group.
* ↑ See: Anany & Maria Levitin, Algorithmic Puzzles (2011), pp. 8-9.