Rusty is a member of the highly secretive Logician's guild. After years of grueling trials, he is now finally allowed to meet the three leaders of the guild. Their names are Truman, Lyle and Xavier, and they have specific ways of answering yes/no questions:
- Truman tells the truth.
- Lyle lies.
Xavier answers the "xor" of how Truman and Lyle would answer the question, meaning:
- If Truman and Lyle would give different answers, then Xavier responds "yes".
- If Truman and Lyle would give the same answer, then Xavier responds "no".
Rusty enters the main chamber, and find the leaders sitting in chairs labeled Left, Right, and Middle, though he doesn't know who is who (the three know each other's identities). The leaders give Rusty a challenge. Rusty must determine their identities by asking at most three yes/no questions, each directed at a single leader.
To make things harder, and to prevent paradoxes, the only allowable questions are those which are Boolean combinations of questions of one of these two forms:
"Is leader in the _____ chair named _____?"
"Are you named _____?"
For example, Rusty may ask questions like "Is the person in the middle chair either Xavier or Lyle?", or "Is it true that both you are Xavier and the person in the left chair is Truman?".
How can Rusty pass the test?
Note: It may seem that Xavier would always answer "yes", since Truman tells the truth, which should always be different than Lyle's lie. However, including the pronoun "you" in your question can break this symmetry.
Answer
╠ Ask one of them (let it be one in the middle) "Are you Truman?" (Q1)
╠═No╦ Middle is Xavier.
║ ║
║ ╠ Ask man on the left if he is Xavier. (Q2)
║ ╠Yes═ Left is Lyle. (Right is Truman.)
║ ╚═No═ Left is Truman. (Right is Lyle.)
║
╚Yes╦ Middle is either Truman or Lyle.
║
╠ Ask middle if he is Xavier. (Q2)
╠Yes╦ Middle is Lyle.
║ ║
║ ╠ Ask middle if left is Xavier. (Q3)
║ ╠Yes═ Left is Truman. (Right is Xavier.)
║ ╚═No═ Left is Xavier. (Right is Truman.)
║
╚═No╦ Middle is Truman.
║
╠ Ask middle if left is Xavier. (Q3)
╠Yes═ Left is Xavier. (Right is Lyle.)
╚═No═ Left is Lyle. (Right is Xavier.)
No comments:
Post a Comment