Part 1: Crash Course
Part 2: Component X
Part 3: Box it up
Part 4: One Away III
After finding Contraplexus' new target, you are at the entrance to their headquarters. You knockout a nearby guard and assume his clothes so you can search the halls without arousing suspicion. You make it inside and navigate through the hallways to look for where their plans are kept.
You soon discover that before you get far at all, you have to enter the security code to get to the secured area. You walk to a nearby room to figure how to hack the panel when you hear a few nearby Contra workers talking.
"Has anyone seen my tools? They have been missing for more than a week. I don't really trust everyone here anymore."
"I heard that one of the recently hired workers is actually a Perplexii, and wants to stop them from the inside. The employers should have checked their history more carefully."
"I know, Instead they are paranoid about security after the last break in. I mean, a randomly generated security code changing every week?"
"I can hardly keep up, and it's no use asking the guards, since they never remember. I don't even remember what this week's security code is."
"I don't know. I think last week's code was ABABB BABBA AABBB BAABB AABAA AAABA BBAAB ABBBB."
"I'll figure it out."
They start talking about the local football team and how to improve them. As they start to argue about what is right, you write down what they said and leave. You are unsure where to hook up with the Perplexii agent until you find a bulletin board in the hallway, suggesting all new workers are attending guard training today.
When you arrive, they are each in separate training sessions with a guard. Visiting them independently to not arrouse suspicion, you greet them and relay that you forgot the security code and have a meeting to attend in a few minutes. When you hear the codes, it's clear the real employees made up a code instead of telling you the real one.
Code A: ABAAB ABAAA ABBAB BAABA BAABB BBBAA BABAA ABABB
Code B: ABAAB BABBB AAABA BAABB ABABB BAABA BABAA ABAAA
Code C: ABAAB BABBA AABAB BAAAB BABAB BABBB AABAA BAABB
Code D: ABAAB BBABA AABBA BABAA BBBAB ABABB BABAA BBAAA
The head guard comes over and you can tell he is staring at you. He yells "Arrest him!" and suddenly a smoke bomb goes off in the middle of the room. You head out of the room, and back toward the keypad. If you enter the right code, you can enter the next secured section, but you don't know which employee to trust. Which one is the most likely to be the right code and which ones are just made up?
(The codes are given in chunks of 5 for readability. They may be disregarded when solving.)
If these codes are truly and literally being randomly generated each week, then this week's code should have no correlation to last week's code. In this case, I'll measure correlation by calling A's +1 and B's -1 and then computing the sum of the product of pairs of digits in the same position between the two codes. Think of it as a vector dot product. For uncorrelated codes, the expected value is zero, since as many digits are likely to match as are to be mismatched. Certainly in real life, the expected value is not guaranteed, only most likely, but we are in probabilityland...
So compute this measure of correlation between last week's code and the four candidate codes and see what happens. Here's what I got:
A: 0, B: +10, C: +10, D:-4
So B and C are more similar to last week than would be expected from a random process, and D is more dissimilar to last week. A is (conveniently) "just right" in terms of matching expectations.
I can't promise which one's the right code, but I know that if this analysis were all the information I had to work with I'd pick Code A every time!
|
Posted by Paul
on 2007-07-26 19:29:41 |