A has no information about anybody else, so if A is telling the truth, A is a detective. Otherwise, A must lying and must thus be a mafioso.

Now consider B. If B is an innocent, B has no information about C, D or E; the only way B could know who the detective is would be if A is the detective. But B cannot know from A’s statement whether he is a detective or a mafioso if B is an innocent because either way B would expect A to claim to know B’s identity. This means B, if an innocent, is lying. Thus, B cannot be an innocent. Now, if B is a mafioso and A is a mafioso, then A would be telling the truth, so B cannot be a mafioso if A is a mafioso. Similarly, if A is a detective and B is a mafioso, B would be able to know immediately that A is a detective because B would know if A were a mafioso and since A must be a mafioso or a detective and since B knows A isn’t a mafioso, A would have to be a detective; if this were true, then B would be telling the truth! This means that B must be a detective, which means A must be a mafioso.

Now C must either be a mafioso or an innocent. If C were a mafioso, C would know that A was a mafioso; thus, C would think that B were either an innocent or the detective. If B were innocent, B would not know who the detective is, so C would know that B was a detective. But this would mean C spoke truly! Thus, C must be an innocent.

Finally, we have D. If D is mafioso, then D knows A must be a mafioso. This means, further, that D knows that B must be a detective, since an innocent would not be able to know who the detective is for the reasons stated earlier. Since D know that both he and A are the mafiosos and B is the detective, D would know C and E are innocents, which means D spoke truthfully. This is a contradiction, so C must be an innocent. Thus, we have:

Mafioso, Detective, Innocent, Innocent, Mafioso

]]>Now everyone knows A is Mafia and B is detective. So C is telling truth, hence innocent. Now if D is Mafia, since D knows there are only two Mafia, D would immediately knows that E is innocent. But D says D knows who E is, so D is not Mafia.

So E is Mafia.

A – Mafia

B – Detective

C – Innocent

D – Innocent

E – Mafia

Quite interesting, but once you write it down, it would be quite easy.

]]>A – Mafia

B – Detective

C – Innocent

D – Innocent

E – Mafia

Note that A must not be innocent, since innocents know nothing and would truthfully state as such.

B isn’t innocent, since an innocent wouldn’t have enough info from A’s statement to identify the detective (it would be consistent that A is a truth-telling detective or a lying mafia).

B also isn’t mafia, since if they were then A would be the detective, but B would have known this fact as soon as A stated their knowledge and so would have lied about knowing who the detective was.

Therefore B is the detective, and A is mafia.

The above logic can be carried out by anyone at the table, so C’s statement tells us only that they’re truthful (hence an innocent).

Similarly, anyone in D’s position knows who the remaining person is by process of elimination, so D is similarly innocent since they truthfully report their knowledge.

So A,B,C,D,E are M,D,I,I,M respectively.

]]>