Release calendarTop 250 moviesMost popular moviesBrowse movies by genreTop box officeShowtimes & ticketsMovie newsIndia movie spotlight
    What's on TV & streamingTop 250 TV showsMost popular TV showsBrowse TV shows by genreTV news
    What to watchLatest trailersIMDb OriginalsIMDb PicksIMDb SpotlightFamily entertainment guideIMDb Podcasts
    OscarsEmmysToronto Int'l Film FestivalHispanic Heritage MonthIMDb Stars to WatchSTARmeter AwardsAwards CentralFestival CentralAll events
    Born todayMost popular celebsCelebrity news
    Help centerContributor zonePolls
For industry professionals
  • Language
  • Fully supported
  • English (United States)
    Partially supported
  • Français (Canada)
  • Français (France)
  • Deutsch (Deutschland)
  • हिंदी (भारत)
  • Italiano (Italia)
  • Português (Brasil)
  • Español (España)
  • Español (México)
Watchlist
Sign in
  • Fully supported
  • English (United States)
    Partially supported
  • Français (Canada)
  • Français (France)
  • Deutsch (Deutschland)
  • हिंदी (भारत)
  • Italiano (Italia)
  • Português (Brasil)
  • Español (España)
  • Español (México)
Use app
Elementary
S2.E2
All episodesAll
  • Cast & crew
  • User reviews
  • Trivia
IMDbPro

Solve for X

  • Episode aired Oct 3, 2013
  • TV-14
  • 43m
IMDb RATING
7.9/10
1.4K
YOUR RATING
Jonny Lee Miller in Elementary (2012)
CrimeDramaMystery

When a well-respected mathematician is found dead, Holmes and Watson set out to solve a murder and the purpose of the highly guarded equation he was trying to decipher.When a well-respected mathematician is found dead, Holmes and Watson set out to solve a murder and the purpose of the highly guarded equation he was trying to decipher.When a well-respected mathematician is found dead, Holmes and Watson set out to solve a murder and the purpose of the highly guarded equation he was trying to decipher.

  • Director
    • Jerry Levine
  • Writers
    • Robert Doherty
    • Jeffrey Paul King
    • Arthur Conan Doyle
  • Stars
    • Jonny Lee Miller
    • Lucy Liu
    • Jon Michael Hill
  • See production info at IMDbPro
  • IMDb RATING
    7.9/10
    1.4K
    YOUR RATING
    • Director
      • Jerry Levine
    • Writers
      • Robert Doherty
      • Jeffrey Paul King
      • Arthur Conan Doyle
    • Stars
      • Jonny Lee Miller
      • Lucy Liu
      • Jon Michael Hill
    • 2User reviews
    • 5Critic reviews
  • See production info at IMDbPro
  • See production info at IMDbPro
  • Photos32

    View Poster
    View Poster
    View Poster
    View Poster
    View Poster
    View Poster
    + 27
    View Poster

    Top cast14

    Edit
    Jonny Lee Miller
    Jonny Lee Miller
    • Sherlock Holmes
    Lucy Liu
    Lucy Liu
    • Dr. Joan Watson
    Jon Michael Hill
    Jon Michael Hill
    • Detective Marcus Bell
    Aidan Quinn
    Aidan Quinn
    • Captain Thomas Gregson
    Lynn Collins
    Lynn Collins
    • Tanya Barrett
    Jeremy Jordan
    Jeremy Jordan
    • Joey Castoro
    Glenn Fitzgerald
    Glenn Fitzgerald
    • Linus Roe
    Rich Sommer
    Rich Sommer
    • Harlan Emple
    Khalil Kain
    Khalil Kain
    • Benny Charles
    Rick Holmes
    Rick Holmes
    • Jason Harrison
    Simon Feil
    Simon Feil
    • Office Worker
    Rock Kohli
    Rock Kohli
    • Cabbie
    Nicholas Maccarone
    • Wayne Kaneshiro
    Roger Brenner
    • NYPD
    • (uncredited)
    • …
    • Director
      • Jerry Levine
    • Writers
      • Robert Doherty
      • Jeffrey Paul King
      • Arthur Conan Doyle
    • All cast & crew
    • Production, box office & more at IMDbPro

    User reviews2

    7.91.3K
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10

    Featured reviews

    8ivko

    some details correct, some wrong

    A mathematician is killed and Sherlock discovers some mysterious math equations written in hidden ink on his walls. As he and Watson investigate, they discover that the slain mathematician and an unknown partner were working on the P vs NP problem. The show posits that someone has solved it, and the solution is the driving MacGuffin of the episode. I have to give the show credit for getting the essential details of the P vs NP problem and its implications correct. That said, I do have two quibbles with the plot.

    First, no mathematician writes their work in paint on their walls. It's not remotely secure, even if you do need a UV light source to see it, and mathematicians are just like regular folk; they don't always get everything perfect the first time, so writing your work on your walls with paint would be madness. But I get that really the producers just liked the effect of hidden writing appearing on the wall and it's a minor detail so no big deal.

    A much bigger deal is the solution they posit. Without getting too into the messy details, the P vs NP problem has two potential solutions. One solution would prove that P = NP while the other would prove P != NP. The show goes with someone finding a solution that is P = NP, which would essentially upend life as we know it on earth, and that's not an exaggeration. If P = NP, the solution proving it would necessarily involve showing how to solve a massive collection of related problems that would effect everything from cryptography to artificial intelligence to your weather forecast. Virtually every mathematician and computer scientist I have ever met, myself included, believes that P != NP, and that if the P vs NP problem does have a solution, it would be one proving the opposite of what they depict in the episode. I get that it facilitated what they wanted for the plot but it still feels a little sloppy, especially how they hand wave it away at the end by having he NSA "seize" everything so that they don't have to deal with the implications down the road.

    To me it's a bit like they had an episode where Sherlock and Joan discover that there is real alchemy that can turn lead into gold, and at the end of the episode having found the secret recipe before the bad guys Sherlock says something like "I've put the secret recipe in my bank deposit box and we shall never discuss making more gold again, Watson." I mean, yah, you can write whatever, but who's not going to believe that people would level cities to get their hands on that recipe, right? A solution to P vs NP where P = NP would be like that, but worth much, much more. So a decent episode, with an asterisk that most people will probably not notice or care about; like an excellent meal at a restaurant with one tiny flaw that you can pick at all night. Just the way I like it.

    Best Emmys Moments

    Best Emmys Moments
    Discover nominees and winners, red carpet looks, and more from the Emmys!

    Related interests

    James Gandolfini, Edie Falco, Sharon Angela, Max Casella, Dan Grimaldi, Joe Perrino, Donna Pescow, Jamie-Lynn Sigler, Tony Sirico, and Michael Drayer in The Sopranos (1999)
    Crime
    Mahershala Ali and Alex R. Hibbert in Moonlight (2016)
    Drama
    Jack Nicholson and Faye Dunaway in Chinatown (1974)
    Mystery

    Storyline

    Edit

    Did you know

    Edit
    • Trivia
      The P versus NP problem is a major unsolved problem in mathematics and computer science. Informally, it posits whether every problem with a solution which can be quickly verified by a computer can also be quickly solved by a computer. In other words, just because a computer can verify a solution is correct, can that same computer also come up with a solution on it's own? It was introduced in 1971 by Stephen Cook in his seminal paper "The complexity of theorem proving procedures" and is considered by most mathematicians and computer scientists to be the pre-eminent open problem in the mathematics. As the characters suggest, it is actually one of the seven Millennium Prize Problems offered by Clay Mathematics Institute to carry a US $1,000,000 prize for the first correct solution.
    • Goofs
      P = NP is worth precisely $0 to the rest of the world. That's why a specific institute is offering the prize instead of universities and businesses. It has no applications and no use for encryption breaking. It is just a very simple question: can a computer find proof to solve complex problems quickly? Basically, are computers problem solving abilities limited? Yes or no. Neither "yes" or "no" can break codes, they're just words. A majority of computer scientists don't believe P = NP, and the majority of those who say they believe it say they're just being contrary. Using high school maths term, can a computer find N? The simple rule that allows complex equations to be solved very simply. If a computer can find N and thus dramatically decrease the time it takes to solve an equation it's good to know, but only tells us that it will be possible, one day, for computers to quickly crack encryptions. It isn't possible to use it to write any kind of program to do the actual cracking or defend against decryption attempts.
    • Quotes

      Sherlock Holmes: I know all about poisons, Watson. I've become an expert on all of them. But over the last few years, I've come to understand that there is nothing on this earth so toxic as guilt.

    • Soundtracks
      Elementary Main Theme
      (uncredited)

      Written by Sean Callery

    Top picks

    Sign in to rate and Watchlist for personalized recommendations
    Sign in

    Details

    Edit
    • Release date
      • October 3, 2013 (United States)
    • Country of origin
      • United States
    • Language
      • English
    • Production companies
      • Hill of Beans Productions
      • Timberman-Beverly Productions
      • CBS Television Studios
    • See more company credits at IMDbPro

    Tech specs

    Edit
    • Runtime
      • 43m
    • Color
      • Color
    • Sound mix
      • Stereo
    • Aspect ratio
      • 16:9 HD

    Contribute to this page

    Suggest an edit or add missing content
    • Learn more about contributing
    Edit page

    More to explore

    Recently viewed

    Please enable browser cookies to use this feature. Learn more.
    Get the IMDb App
    Sign in for more accessSign in for more access
    Follow IMDb on social
    Get the IMDb App
    For Android and iOS
    Get the IMDb App
    • Help
    • Site Index
    • IMDbPro
    • Box Office Mojo
    • License IMDb Data
    • Press Room
    • Advertising
    • Jobs
    • Conditions of Use
    • Privacy Policy
    • Your Ads Privacy Choices
    IMDb, an Amazon company

    © 1990-2025 by IMDb.com, Inc.