Elementary Wiki
Elementary Wiki

Oh, when I was young and very full of myself, I decided to spend a summer trying to solve it. When I looked up, three years had gone by. P versus NP may well be unsolvable.

— Solve for X

Tanya Barrett is a mathematics professor at Triboro college and an enthusiastic specialist in unsolvable math problems. Her passion play was P vs NP, which could be significantly dangerous to all cyber-security if solved, which she had her sights on for years.


Season 2[]

In a single night, the murders of Felix Soto and Cyril Nauer, two mathematicians also trying to solve P vs NP, are committed, as well as the near-fatal shooting of mugger Benny Charles as a witness to Soto's murder. Charles and then Soto are discovered first, promoting the investigation. The revelation of P vs NP being a factor of the murders is revealed when in a room adjacent to where Soto was shot dead, a blacklight in a lamp shows various abundant mathematical calculations painted all over the walls, the problem being officially identified by Harlan Emple, who reveals in awe the two men were surprisingly close to solving it. Prof. Barrett is referenced by Emple as an expert to consult for more information. She elaborates how she cataloged all the experts who were dedicated candidates to solving the problem, as well as having tried herself when she was young and highly self-esteeming, but she didn't continue to try to solve it after an intended summer turned into three years. She's surprised Soto had a partner since he was highly competitive, but when Holmes recognizes Nauer's handwriting as he second one at the scene besides Soto's, she confirms his identity, yet assuming him as a suspect is cut short when Bell reports Nauer's already found dead and transported to the morgue.

S02E02 I Dont Want Trouble
Please! I don't want any trouble!

S02E02 Barrett Meet
I profiled all the mathematicians who had really devoted themselves to the problem.

Finding a wiretap in Nauer's house and tracing it back to Roe Encryption Technologies reveals they wanted to pay Nauer for the results, which he refused, and that they referred to Barrett to authenticate the problem and progress, which she said to them wasn't even close. Knowing from Emple this is a lie, they confront her in interrogation. She not only knew about the P vs NP progress, but she also bought a 9mm gun, the type used in the shootings, and has a Boston Terrier, whose hairs were found at the scene of Nauer's murder. She plays it off by saying she didn't think it was relevant and that she worried the surveillance was illegal, but she needed money from her classes being cut. She saw the two geniuses made headway, but she decided not to tell Roe because of the illicit acquirement of evidence, assuming it could squash the espionage. When she's confronted with the circumstantial evidence, she says her gun was stolen and filed a report, appalled at the notion she's a murderer over the math problem, providing an alibi by her account that tapes at a bar show her meeting with a colleague, programmer Wayne Kaneshiro, who confirms it later in a statement.

S02E02 Interrogation
I'm sorry I didn't tell you everything I knew yesterday.

S02E02 Interrogation Watson
You filed a police report. Yes, we know. Only, the gun wasn't stolen, was it?

S02E02 Interrogation Ending
"This is insane. I didn't kill anyone." "Then you shouldn't have any problem accounting for your whereabouts."

Holmes later tracks Barrett in the college halls just before her class asking her about who else knew about the victims' progress in the problem, as well as people who hold grudges against her. She catches on to what he's implying: it seems someone's framing her for the murders. She mentions one suspect after prodding, Jason Harrison, her ex she split with after a long relationship, saying he didn't take it well and harassed her in emails. Yet when he's brought in and confronted with evidence implying he both threatened her and had his own evidence stacking against him, he not only denies it all in disbelief, he demands for counsel. But they catch a break when Benny Charles, the mugger, wakes up from his coma, ready to make an ID>

S02E02 Class Denial
Are you saying you think I've been framed?
After enough convincing Charles to stop insisting on a deal, he gives a description of the woman who shot him, which fits Barrett perfectly. The confirmation is only strengthened by her ID photo showing the exact face Charles saw by his word. They're stumped since the time stamp shows her and Kaneshiro at the bar together at the time of the murders as shown on the footage. But they see a man buying multiple beers, which is most affordable at happy hour, hours after the murders were committed. They realize the time stamp is digital, giving them the evidence they need to confront her in her lecture hall. Despite her voicing of what she alleges frustration and exhaustion over being "harassed", they confront her with the evidence. Turns out she was successful at solving P vs NP. She teamed up with Kaneshiro to develop a program form her solution so she could rob several notorious banks by hacking into their systems, promising him a cut if they collaborated. But being shocked at seeing from the wiretaps Nauer and Soto were getting closer as well, she killed them before they could claim the prize and cyber-security would swiftly improve itself. To cover her tracks, she set up the time stamp change to fabricate an alibi and fake evidence against Jason Harrison to frame for the crimes with a false motive. They then say Kaneshiro was confronted and he gave them both up once he knew they were made. She's then immediately arrested, later taken into custody of the NSA along with the information leading her to have solved P vs NP to prevent it from being released.[1]

S02E02 Hospita ID
Yeah, that's the bitch shot me.

S02E02 Profile Right
Now we know you killed them because you'd already solved it.

S02E02 Confrontation Denial
I don't know where you're getting this.


  1. Season 2, episode 2: "Solve for X"