Monday, September 28, 2009

Movie: The Departed - A Fool Proof Plan To Catch The Mole

I just saw the original Hong Kong film, Mou Gaan Dou, which Martin Scorsese knocked off to create The Departed. The Hong Kong version was much better in my humble opinion, but on a more interesting note, it got me thinking about tricks the police chief could have played to catch the gang's mole within the police force. Here's one that I think is pretty much guaranteed to work, assuming everyone follows orders properly.

Background:

In case you're not familiar with this movie, or don't remember it, the situation is basically that the gang has a mole within the police force, and the police force has a mole within the gang. Each side is trying to find out the identity of the other side's mole without revealing the identity of their own mole. Great plot line. Anyway, here's a nice solution that surreptitiously uses the gang's own mole against the gang. It can be used by either side to win the game, but for clarity's sake, I will describe how the police could do it. First let's start with a simple example to illustrate the basic idea:

Example:

Let's say the police chief has 3 reports, Peter, Paul, and Polly, and he wants to figure out which is the mole. Meanwhile, the gang leader has 4 reports, Greg, Gary, Gus, and Goliath.

The police chief tells Peter that the mole is Greg, tells Paul that the mole is Gary, and tells Polly that the mole is Gus. All of these statements are lies, because the chief already knows Goliath is the real mole inside the gang.

If Peter is the gang's mole, he will tell the gang leader that Greg is the police's mole, and the gang leader will kill Greg. Goliath will know this and report back to the police chief that Greg was killed, indicating Peter must have been the mole.

If Paul is the mole, Gary gets killed, giving away that it's Paul.

If Polly is the mole, Gus gets killed, giving away that it's Polly.

In no circumstance in the real police mole killed, but you're guaranteed to catch the gang's mole, while also seeing the gang kill off one of it's own loyal members!

Generalized Solution:

1) Assume the police chief P has p underlings P1...Pp, and the gang leader G has g underlings G1...Gg. Also, for clarity, let's assume p=g for now (ie: the police and the gang have the same number of members). Let's also label the underlings so that Px and Gy are the moles. Therefore, G knows Px is a mole, and P knows Gy is a mole. P's goal is to find Px.

2) For each policeman i, P takes Pi into his office and tells him "Gi is our mole in the gang, but you can't tell anyone else. I'm telling you this, because I'm assigning a top secret mission which requires you to communicate and cooperate with Gi." (Or some other pretext can be given for revealing this information). Note that Gi is NEVER the actual police mole. Instead it's some random other member of the gang.

3) The mole within the police Px will think he's learned the identity of the gang mole Gy, and will immediately tell gang leader G: "Gi is the mole." All other policemen Pi will not reveal their information to anyone, because they are loyal.

4) Gang leader G will immediately kill (or do something very nasty if it's the PG-13 version) Gi thinking he's the mole. The police's actual mole, Gy will note who was killed and tell police chief P, who can use this information to determine who mole Px is (because only Px was told that that the Gx who was killed was the mole, so he MUST be the source of the leaked information).

That's the basic outline. Here are some special cases that aren't covered above:

1) Multiple moles in the police force:

If there are r moles, then r people will be killed inside the gang, each of which can be trace back to the r moles who leaked the info. So the solution works for this case too.

2) g > p: (ie: more gang members than policemen)

Trivial. Just select p gang member's names to tell the p policemen.


3) p > g (ie: more policemen than gang members)

There are 2 ways to handle this:

A) Do the trick on a g-sized batch of policemen. Wait a couple days. If no one is killed, select another batch. Keep trying until someone is killed.

B) Tell each policemen that there are 2 police moles in the gang they have to work with. Pick a unique set of 2 for each policemen. This works assuming g-Combination-2 < p

No comments: