The puzzle lays a restriction on the ghost's answers, but not on your question (i.e., your question doesn't have to be a yes/no question). I think it's a bit of misdirection.
Give the doors names: "Door 1 I name 'Yes', Door 2 I name 'No', and Door 3 I give no name. Behind the door of which name lies freedom?"
The ghost can answer "Yes," "No," or nothing, ...
Choose a guard and ask him,
If you choose the truthful guard, he will give you an honest answer. Enter his door if he says "yes" and enter the other door otherwise.
If you choose the liar, he will lie about what his reply would be. Since that reply is also a lie, the two lies cancel out. Enter his door if he says "yes" and enter the other door otherwise.
There's a logical inconsistency for the other options.
If we say that Alice is the one telling the truth, then Carlos is guilty, and he's lying about Diana, BUT that means Diana is telling the truth. We can only have one truth teller, so Alice must be lying.
It's a similar situation if we say John is telling the truth. Again, that leaves either Carlos or ...
If we assume that there are no contradictions in the puzzle (i.e. there cannot be a situation where the "1 lie, 1 truth" rule is violated), then we don't even need to read what B and C say. Only A's statement matters.
The truth tellers that are not the criminal will simply answer "no". The liars that are not the criminal will know their answer would be "yes", so they also answer "no".
If the criminal is a truth teller, they'll simply answer "yes". If the criminal is a liar, they know they'd answer "no", so ...
The easiest way to approach the problem is to identify mutually contradictory statements, which off course are
Carlos said “Diana did it.”
Diana said “Carlos lied when he said that I did it.”
and to ascertain these statements is to realize that one of them is telling the truth. So this would also mean the rest of the two statements are false
Alice said “...
Plotting every answer's truth combinations would take a lot of room, so let's take a couple of shortcuts first:
Assistant 2 is speaking the truth. There are no square numbers with 6 distinct divisors between 1 and 20. (The only numbers with 6 distinct divisors are 12, 18 and 20.)
Assistant 5's statement always adds one liar, except if there was exactly one ...
This answer is kind of cheap and relies on some technicalities, but here goes:
First round, ask everyone:
Next, ask everyone:
Now, we have one person we know is either always lying or always telling the truth. Now, we ask everyone:
So, at most, it would take:
I think I'll put a bit more work into this though, because the first question still seems ...
Here is a twisted solution.
If you get the answer yes:
If the guard is a truthteller, the number of truths is odd, 1. is false, 2. is false, so 3. must be true.
If the guard is a liar, the number of truths is even, 1. is true, 2. is false, so 3. must be true.
If you get a negative answer:
If the guard is a truthteller, the number of truths is even, 1. is ...
We're going to be using a timing attack. Here's how it works.
Ask one of the guards:
The truth-telling guard will be able to answer this right away. No matter how many nested self-referential clauses you put into that question, she doesn't need to remember them or count them, and it always remains a trivial question to which she can always instantly ...
A shortcut to get the correct answer, assuming that one exists, is to simply assume that A, B and C are all knights, and thus speak the truth. In this case, C will obviously answer "Yes." And since the question implicitly assumes that C's answer is the same for any possible scenario, C must always answer "Yes."
This, by the way, is a very handy exam-...
The mathematically minimum possible solution is:
Credit to supercat and user1540815! I overlooked an important fact in my first draft.
If the trolls stand in one line, there are 4 possible identities for the first troll, 3 for the second, 2 for the last. Overall, this is 24 possible combinations.
Trolls: W (truth),X (liar),Y (random),Z (mute)
This was about the same thing I said before.
See Trenin's answer for a different formulation of the same approach, in case that one is easier to understand.
Previous attempt at solution:
Corner case (reasoning above still works in this case, I'm just explaining here that you don't need to know if there is at least 1 troll and 1 true ...