## Mafia Logic Puzzle

I found this puzzle on the Russian QWERTY channel.

Share:Five people sit around a table playing Mafia. Among them are two innocent people, two Mafiosos, and one detective. The Mafia people know each other; the detective knows who each of them is; and the innocent people have no information whatsoever about anyone at the table.

During this particular game, the innocents and the detective always tell the truth, while mafia people always lie. They start by going around the circle making the following statements:

- A: I know who B is.
- B: I know who the detective is.
- C: I know who B is.
- D: I know who E is.
Who is who?

## Drake Thomas:

Solution (spoilers below):

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.

25 September 2018, 8:25 pm## Eric Carmody:

A making an “I know” statement means he must be either a detective or a mafia, not an innocent. If he were the detective then he would know who B is, whether a mafia or innocent. B could not be innocent then because he wouldn’t know whether A was lying or telling the truth and so then B must be mafia. But if B were mafia then he would now know A is the detective and thus could not say he knows who the detective is (because he always lies). So then A must be a mafia, say mafia 1. Then A is lying and does not know who B is, so B is either innocent or detective. He makes an “I know” statement so he must be detective and thus makes the true statement that he knows the detective (himself). Anyone could have figured this out (as I did) so now even the innocents know that A is a mafia and B is the detective. Thus C does know who B is and since he is telling the truth, C must be an innocent. Now we know between D and E we have one mafia and one innocent, and so D knows what he himself is and thus knows what E is. So then the statement that D makes is true, meaning D is also an innocent, leaving E to be mafia 2. So:

A – Mafia

25 September 2018, 9:54 pmB – Detective

C – Innocent

D – Innocent

E – Mafia

## Peance:

A is not innocent. If A is detective, then B is not Mafia, for B knows A is telling truth and therefore A is detective, so B is telling truth, contradiction. But then B is not innocent, for B would not know whether A is lying or not. So A is Mafia. Now A doesn’t know who B is, so B is detective.

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.

25 October 2018, 4:33 am## James:

Here is my argument:

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

14 January 2019, 7:49 pm## Tanya Khovanova's Math Blog » Blog Archive » Emissary Puzzles:

[…] love the puzzles there. Number 2 is a mafia puzzle that I suggested. Number 6 is a fun variation on the hat puzzle I wrote a lot about. Here is puzzle […]

3 March 2019, 2:31 pm