'WandaVision' Episode 4 Spoiler: Does P equal NP? How Marvel's 'Vision' comic explains why Wanda is such a dangerous threat
Spoilers for 'WandaVision' Season 1 Episode 4
"Perhaps, at this point, we should consider P vs. NP."
This is the opening caption to 'Vision' #6, written by Tom King, drawn by Gabriel Hernandez Walta, colored by Jordie Bellaire and lettered by Clayton Cowles. This 'Vision' series is one of the bigger influences on the style, themes and story behind 'WandaVision'.
It follows Vision's (Paul Bettany) attempt to live a "normal" suburban life with the family he created out of thin air. In 'WandaVision', Wanda has also created both a family and a suburban life out of thin air — one uses magic, the other technology, but their goals are very much the same.
In issue 6, the ghost of Agatha Harkness warns the Avengers of the threat that Vision will pose, and attempts to explain why, exactly, the Avengers' friend and fellow superhero might just be the one who kills them all. She explains it through the use of an engineering problem — the one of P vs. NP.
As she explains it, P represents a problem that can be solved through the use of an algorithm, a particular method, a shortcut. In short, it's a problem to which there are the means of getting to a solution.
NP, on the other hand, represents a problem for which there IS a solution, but there is no known means of reaching that solution. NP is for the bigger problems and questions in life. Obviously there are answers, but how one goes about finding out what those answers are, remains a mystery.
For computers, the only way of solving for NP is to cycle through all possible solutions until it finds the right one. In other words, there is no solution the computer won't consider in order to fix the problem. Nothing is out of bounds.
Both the Vision in the comics and Wanda Maximoff (Elizabeth Olsen) on the show are faced with what seems like the unsolvable — the challenge of leading a happy, normal life together despite not being normal people. It's definitely an NP sort of problem — one for which there is no clear solution. Both Wanda and Vision attempt to make shortcuts — Vision, by building himself a wife and two children, and Wanda, by literally pulling her Vision and everyone around them into a perfect, sitcom world.
In both versions of the story, the worlds built by their respective shortcuts start to fall apart.
In the comic, Agatha Harkness claims that P is not equal to NP, which means that for some challenges, there are no shortcuts. There are no clear paths towards a happy ending. A happy ending DOES exist, but how to achieve it is not something anyone is capable of truly knowing.
Harkness explains that the Vision knows this, which is why he cycles through all possible solutions to keep his family safe and happy, no matter who it sacrifices, no matter who it hurts. He is single-mindedly focused on one goal — the protection of his home and family — and anything else that gets in the way of that will burn. Indeed, a number of people die before the final issue of 'Vision', and Vision is arguably responsible for all of it.
On 'WandaVision', SWORD is slowly figuring out what Wanda has been doing —warping reality to get her way, and using the residents of Westview in which to do it. For a time, she has made a home for herself and Vision, and created a family. SWORD, however, is working on ways to restore reality to its rightful place. Wanda's dream is a beautiful one, but an impossible one, and it's one that SWORD is working to take away from her. Unlike all the other times, forces have kept her and Vision apart, however, Wanda now has the power to cycle through every possible solution to keep her home intact.
Wanda's powers have grown, unlike anything that's been seen before - but it's not her powers that make her a threat. It's the tragic fact, faced with the impossible, Wanda has chosen to continue fighting for her family despite the odds. Normally the mark of a superhero, when married to the impractical denial of reality — something Wanda is literally able to do with a simple "No" — it makes Wanda one of the most dangerous threats the MCU has seen.
The next episode of 'WandaVision' airs on February 5 on Disney+.