your two-question solution doesn’t work given the constraints imposed by Boolos
If the above is quoted correctly, the constraints imposed by Boolos are contradictory. It is not possible that 1) Random always answers truthfully or falsely and 2) Random always answers “da” or “ja”. So the fact that I had to throw out the latter constraint is of no import—since the constraints are contradictory, I had no choice but to throw one out.
Well, you don’t have to throw one out. You could interpret the constraints (which are quoted correctly, btw) as narrowing the set of legitimate questions to those which Random can answer both truthfully and falsely with “da” or “ja”. I’m not sure why Boolos would have that constraint in there unless it was to rule out the kind of solution you’re proposing. Still, I agree the problem is clumsily phrased.
Maybe the question could be patched by adding the possibility that the gods (including Random) don’t respond at all, but also changing Random’s behavior from “randomly answers truthfully or falsely” to “randomly says either ‘da’, ‘ja’ or nothing”. If you patch it in this way, I’m pretty sure a two-question solution isn’t possible.
ETA: Also, I don’t want to downplay the cleverness of your two-question solution. Whether or not it perfectly fulfills the constraints of the problem, it is still very nice.
The patched version requires three questions. In fact it requires asking three people—if you only ask two people any number of questions, Random could pretend that he is the other person and the other person is Random.
First of all, you need a question which lets you determine who any person B is, when asked of Truth.
You want to ask “if B is Truth, then yes, else if B is False, then no, else don’t answer”. Presumably, you can’t directly ask someone not to answer—they can only refuse to answer if they are Random or if yes/no would violate constraints, so this comes out to “if B is Truth, then yes, else if B is False, then no, else tell me if your answer to this question is ‘no’.”
Then you modify this question so that it can be asked either of Truth or False. As before, adding “tell me if the answer to Y is the truthfulness of your answer to this question” will produce a correct answer to a yes/no question from either True or False, so you get “tell me, in the case that B is not Random, if the answer to “if B is Truth, then yes, else no” is the truthfulness of the answer to your question, and in the case that B is Random, if your answer to this question is the negation of the truthfulness of your answer to this question’”.
You now have a question that can determine who one person is, when asked of either True or False.
(The version with da and ja is left as an exercise to the reader.)
Use that question to ask person 1 who person 3 is. Then use it to ask person 2 who person 3 is.
If 1 and 2 give the same answer, then they are either Truth or False giving an informative answer or Random imitating an informative answer. Either way you know the identity of 3, and you also know one non-Random person. Ask this non-Random person the question to find the identity of a second person, which gives you all three.
If 1 and 2 give different answers, then one of them is Random. In that case, you know that 3 is not Random, and you can ask 3 who 1 is. You now know the identity of 1, and you know whether 1 or 2 is Random; the non-Random one told you who 3 was, so you have the identity of 3 as well. This again gives you the identity of two people and so you have all three.
If the above is quoted correctly, the constraints imposed by Boolos are contradictory. It is not possible that 1) Random always answers truthfully or falsely and 2) Random always answers “da” or “ja”. So the fact that I had to throw out the latter constraint is of no import—since the constraints are contradictory, I had no choice but to throw one out.
Well, you don’t have to throw one out. You could interpret the constraints (which are quoted correctly, btw) as narrowing the set of legitimate questions to those which Random can answer both truthfully and falsely with “da” or “ja”. I’m not sure why Boolos would have that constraint in there unless it was to rule out the kind of solution you’re proposing. Still, I agree the problem is clumsily phrased.
Maybe the question could be patched by adding the possibility that the gods (including Random) don’t respond at all, but also changing Random’s behavior from “randomly answers truthfully or falsely” to “randomly says either ‘da’, ‘ja’ or nothing”. If you patch it in this way, I’m pretty sure a two-question solution isn’t possible.
ETA: Also, I don’t want to downplay the cleverness of your two-question solution. Whether or not it perfectly fulfills the constraints of the problem, it is still very nice.
The patched version requires three questions. In fact it requires asking three people—if you only ask two people any number of questions, Random could pretend that he is the other person and the other person is Random.
First of all, you need a question which lets you determine who any person B is, when asked of Truth.
You want to ask “if B is Truth, then yes, else if B is False, then no, else don’t answer”. Presumably, you can’t directly ask someone not to answer—they can only refuse to answer if they are Random or if yes/no would violate constraints, so this comes out to “if B is Truth, then yes, else if B is False, then no, else tell me if your answer to this question is ‘no’.”
Then you modify this question so that it can be asked either of Truth or False. As before, adding “tell me if the answer to Y is the truthfulness of your answer to this question” will produce a correct answer to a yes/no question from either True or False, so you get “tell me, in the case that B is not Random, if the answer to “if B is Truth, then yes, else no” is the truthfulness of the answer to your question, and in the case that B is Random, if your answer to this question is the negation of the truthfulness of your answer to this question’”.
You now have a question that can determine who one person is, when asked of either True or False.
(The version with da and ja is left as an exercise to the reader.)
Use that question to ask person 1 who person 3 is. Then use it to ask person 2 who person 3 is.
If 1 and 2 give the same answer, then they are either Truth or False giving an informative answer or Random imitating an informative answer. Either way you know the identity of 3, and you also know one non-Random person. Ask this non-Random person the question to find the identity of a second person, which gives you all three.
If 1 and 2 give different answers, then one of them is Random. In that case, you know that 3 is not Random, and you can ask 3 who 1 is. You now know the identity of 1, and you know whether 1 or 2 is Random; the non-Random one told you who 3 was, so you have the identity of 3 as well. This again gives you the identity of two people and so you have all three.