Box it up
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.)
I am thinking that if two codes are randomly generated, then about half of the terms would be different between the two. I placed all the possible codes under the old code and used - to denote similarity and + to denote difference from the old code.
Old: ABABB BABBA AABBB BAABB AABAA AAABA BBAAB ABBBB 19A/21B
A : ABAAB ABAAA ABBAB BAABA BAABB BBBAA BABAA ABABB 21A/19B
---+- ++++- -+-+- ----+ +-+++ ++++- -++-+ --+-- 20+/20-
B : ABAAB BABBB AAABA BAABB ABABB BAABA BABAA ABAAA 22A/18B
---+- ----+ --+-+ ----- -++++ +---- -++-+ --+++ 15+/25-
C : ABAAB BABBA AABAB BAAAB BABAB BABBB AABAA BAABB 20A/20B
---+- ----- ---+- ---+- +---+ +-+-+ +++-+ +++-- 15+/25-
D : ABAAB BBABA AABBA BABAA BBBAB ABABB BABAA BBAAA 20A/20B
---+- -++-- ----+ --+++ ++--+ -+--+ -++-+ +-+++ 19+/21-
To the right of each line, I have A/B totals and +/- totals. All the sequences have reasonable A/B totals, but new codes B and C have an unbalanced +/- ratio, which makes me think that the correct new code is A or D.