Lurker, but I just had to post here. A version of this was posted on The Big Questions in July. Here is my answer, pasted from there (but modified to use the different names), which beats the given answer because it uses two questions.
Let Y be “is the answer to X ‘da’”. If they respond ‘da’, that’s equivalent to saying ‘yes’ to X, and if they respond ‘ja’, that’s the equivalent of saying ‘no’ to X. This is the case even if they said ‘yes’ or ‘no’ because they lied.
“Tell me whether the correct answer to Y is the truthfulness of your answer to this question” will produce the answer to Y from anyone (True, False, or Random). You can ask it three times (with X being various ‘are you a ___’) and get correct yes/no answers all three times, which is enough to tell 6 combinations apart.
If you want to do better than that you need more than one bit per answer, which is possible by asking a question that Random cannot answer with either a yes or a no. Use a disjunction. “Tell me, in the case that you are not Random, whether the correct answer to Y is the truthfulness of your answer to this question, and in the case that you are Random, whether your answer to this question is the negation of the truthfulness of your answer to this question” will get an answer to Y from True or False, and no answer from Random. If X is ‘are you True’ and Y is the da version from above, then the entire question will be answered ‘da’ by True, ‘ja’ by False, and not at all by Random. This provides an obvious way to do it in 2 questions.
(break for formatting)
Whether Random speaks truly or not should be thought of as depending on the flip of a coin hidden in his brain; if the coin comes down heads, he speaks truly; if tails, falsely.
Random will answer da or ja when asked any yes-no question.
These two are not equivalent. The first of these allows you to exploit the fact that some yes-no questions cannot be answered truthfully or falsely, allowing the answer above. The second does not, and implies that some answers from Random are neither true nor false.
To say that something is conserved means that it is the same at one time as it is at another time.
If you cannot time travel, and you have a set of objects at 1 PM, then you can compare them to the same set of objects at another time, such as an hour later.
If you can time travel, you can do the same—but terms such as “at another time” and “an hour later” become tricky.
With time travel, the time as measured in the setting is not the same as the time as measured by the objects themselves. If some of those objects time travel from 2:30 back to 1:30, then at 2 PM, 1 hour passed in the setting, you have some objects for which 1 hour has passed, and you have other objects for which 2 hours have passed. If you add those objects up just because 1 hour has passed in the setting you are adding the wrong things. You should be adding the objects for which one hour has passed (ignoring the objects for which two hours have passed) because conservation means that the amount is preserved one hour later—you can’t mix objects from one hour later and from two hours later and expect to get an amount that is conserved. The fact that one hour has passed in the setting is useful in the non time travel case because the time that has passed in the setting is the same as the time that has passed for all of the objects. In the time travel case the fact that one hour has passed in the setting is just a distraction.