For those who wanted the solution to the three prisoners puzzle from the quest today (http://forums.layonara.com/calendar.php?do=getinfo&e=12312&day=2009-6-14&c=3) (or anyone else who might be interested):
Three Prisoners Puzzle
... and solution.
So, the puzzle, in the context of the quest:
Three prisoners are being held for questioning by a Rofireinite court. They are:
- Andrei "Nimblefingers" Ianos - rumoured to know his way around a lock, particularly when there are valuables beyond it.
- Barda "Soft Touch" Galerai - rumours abound in the darker parts of town that men who go home with her wake up with a headache. In an alley. Missing all their possessions.
- Cedrick "The Fist" Coaciala - Several previous arrests, usually to do with property damage to bars and their patrons.
The following facts are known:
- A substantial robbery occurred. One of the three prisoners was the perpetrator.
- All three are suspected to be members of the Tattered Cowl thieves' guild, so it's likely that they all know who did it.
- A mage (likely also from the guild) got to the subjects before the Rofireinites did, and cast the following (non-canon) spells on them:
- One (the perpetrator) is compelled to tell the truth to all questions asked of him or her.
- A second is compelled to answer any question presented to them with a lie.
- The third is compelled either to tell the truth or lie, at random, for each question presented.
- All three had their speech centers scrambled identically by the mage. Their language is now incoherent (though they understand Common), but the following is known: "ja" and "da" stand for no and yes - but which is which is unknown.
- A solicitor (hired by some unknown benefactor) has, through an obscure loophole in the local laws, limited the Rofireinites to three yes/no questions. (Though, of course, the answers will be "ja" or "da".) If they don't find the perpetrator within these three questions, all three prisoners must go free.
So. There's the puzzle. Those who want to try to work it out on their own, don't scroll down.
*
*
*
*
Hint: Hypothetical questions can help a lot here.
*
*
*
*
Hint the second: Particularly of the form "If I were to ask you Q, would you say X?"
*
*
*
*
Solution
Step One: Choose any one of the prisoners (we'll say Andrei, who will hereafter go by "A"), and ask the following question: "If I were to ask you 'Are you the one whose answers are true or false at random?', right now, would you say 'Ja.'?" If A says "Ja", they're the Random one. If they say "Da", they're either the liar or the truthteller.
How this works: Because the Random prisoner is either lying or telling the truth (and not simply answering at random) there's actually information here. The key is to break it down into cases. The first two cases to break down are whether A is Random, or Not Random. Assuming A is Random:
- Case 1: A is telling the truth, and "Ja" means yes. In which case, if the question were "Are you the Random prisoner?", he would answer "Ja". So his answer to the larger question is also "Ja".
- Case 2: A is telling the truth, and "Ja" means no. To the simple question ("Are you the Random prisoner?"), he would answer "Da", or yes, so to the larger question, he would answer "Ja".
- Case 3: A is lying, and "Ja" means yes. To the simple question, he would answer "Da", and lie. He is therefore compelled to answer "Ja" to the larger question.
- Case 4: A is lying, and "Ja" means no. To the simple question, he would answer "Ja", then, so he would also answer "Ja" to the larger question.
The case where A is non-random is left to the interested reader to flesh out, but in all cases, A is compelled to answer "Da".
Step 2(a):So, if A answers "Ja", we know he's the random one. We then choose one of B or C and ask them "If I were to ask you 'Are you the truthteller?', would you say 'Ja'?" If they answer "Ja", they're the truthteller. If "Da", they're the liar.
How this works: As above, cases are the key, but this one is much simpler. Assume our questionee is the truthteller.
- Case 1: "Ja" means yes. They would answer "Ja" to the simple question, so the larger question would also be "Ja".
Case 2: "Ja" means no. They would answer "Da" to the simple question, so the larger question would be "Ja".
This is easily extensible to the liar case as well, and we have our perpetrator.
Step 2(b): A isn't Random, so the next step is to determine whether he's the truthteller or the liar. We borrow the logic from 2(a), and we've got him.
Step 3: This is only required if A is the liar. We then know that one of B and C is Random, and one is our perp. The remaining question, then, posed to A, would be "If I were to ask you 'Is B the prisoner who answers randomly?', would you say 'Ja.'?" If B is Random, then A will answer "Ja", and C is our perp. If not, "Da", and B gets thrown in jail.
How this works: See step 2(a).
Hope this got you all thinking; if anyone has any questions or clarification needed, post it here. :)