1. Home
  2. Explore
  3. Computer Science
  4. The P vs. NP Problem

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

The P vs. NP Problem

Speaker 1Speaker 2

The P vs. NP Problem

14:51
0:00-14:51
  1. Simon

    Welcome to the conversation. The panel begins with a simple plan: brief introductions, a short round of opening remarks on P versus NP and related questions, and then audience questions. The moderator even promises to enforce a strict three-minute limit—which immediately prompts a joke about how many panelists can fit into twenty to twenty-five minutes.

  2. Hope

    And the first speaker makes clear that P versus NP matters for more than practical computing. He compares it with questions like whether one equation governs the cosmos or how life began: questions so fundamental that it is hard not to want an answer.

  3. Simon

    His compact way of framing P versus NP is: can exhaustive search always be telescoped? In other words, can searching through a huge set of possibilities always be replaced by a much more efficient method? That is the heart of the question, and its importance is not limited to whether it helps a company solve a particular problem.

  4. Hope

    There is a practical puzzle, though. People say they solve NP-complete problems every day, and often they do. The point is that proving a problem NP-complete does not mean nobody will ever solve instances of it. Resourceful practitioners find ways to cope—but the solutions may not be clean or satisfying in the sense of a general, efficient algorithm.

  5. Simon

    That distinction matters. A polynomial-time algorithm for a complicated problem is a striking achievement; the panelist recalls Jack Edmonds developing such algorithms in the 1960s and imagining how satisfying that must have been. For him, resolving P versus NP is also about intellectual peace of mind—and, as he jokes, a good night's sleep.

  6. Hope

    Omer Reingold builds on that by saying a great problem can be worthwhile even if it remains unsolved, because we learn so much along the way. He suggests studying computational hardness across scales: from the vast to the tiny, and asking how things become hard and whether there are useful intermediate levels between easy and infeasible.

  7. Simon

    His first example is pricing computation to discourage spam. Spam works because sending an email is cheap: a scammer can send a million messages and still profit if just one recipient responds. One proposed countermeasure is to require a sender to solve a small computational task—perhaps a Sudoku-style puzzle—and include the solution with the email.

  8. Hope

    But choosing the right task is crucial. Very large Sudoku instances are infeasible, while very small ones are easy, even for children. For a practical system, you need to understand the range in between: where the task is just costly enough to discourage mass abuse without making ordinary email unusable.

  9. Simon

    Reingold also uses shuffling cards as an analogy. One shuffle leaves a lot of structure, but after some number of shuffles—he gives seven or eight as an illustrative range—the deck can be random enough for the purpose. Similar questions arise in cryptography: rather than making something random, you want to make it hard in a way that hides a message.

  10. Hope

    So the important research question is often not just whether something is easy or hard in the extreme. It is how many operations, or what degree of difficulty, moves it from one regime to another. A fine-grained understanding of that transition is useful both for security and for practical computational puzzles.

  11. Simon

    Ryan Williams turns to why P versus NP has resisted proof. He jokes that very few people work on it and that many of them—including himself—might be called crackpots. Then he gives the serious reason for the joke: researchers are far from understanding the full landscape of feasible computation.

  12. Hope

    For all we know, parts of the familiar diagram of complexity classes could collapse in surprising ways. One possibility mentioned is that computations taking exponential time might turn out to be solvable in randomized polynomial time. We have strong expectations about how the classes relate, but the panel emphasizes how little is actually settled.

  13. Simon

    Williams points to a much weaker open question as an example: whether algorithms with extremely restricted memory, such as logarithmic space, can solve NP problems like CLIQUE. The challenge is not merely proving that ordinary computers cannot solve NP problems efficiently; it is understanding what even severely restricted computers can do.

  14. Hope

    There are also proof barriers. Some standard techniques—Williams refers to methods from areas such as recursion theory—are known to be insufficient for separating P from NP, and even for separating some much weaker pairs of classes. In that sense, researchers can prove that certain approaches will not prove the result.

  15. Simon

    But Williams is optimistic. New techniques can get around barriers by connecting efficient programs for one task to impossibility results for other tasks. The broad idea is that we may use what we learn about how programs work to show that certain other problems cannot be solved efficiently.

  16. Hope

    Russell Impagliazzo adds two steps that would remain important even after P versus NP was resolved. First, P not equal NP would say that some instances are hard, but it would not tell us which instances are hard or how to generate them. Cryptography and security need a clearer understanding of how difficulty behaves across different distributions of instances—that is the concern of average-case complexity.

  17. Simon

    And even average-case hardness is not quite enough for a security system. You want a puzzle: the system's designer knows the answer, while an attacker who sees the puzzle does not know how to solve it. That difference lets legitimate users operate the system while making it difficult for an adversary to break in.

  18. Hope

    So the path from P versus NP to practical security has two gaps: from worst-case hardness to average-case hardness, and from average-case hard problems to puzzles with a known solution for the designer. Impagliazzo stresses that both questions remain after the central problem is solved.

  19. Simon

    Sandy Irani then explains quantum computing. The proposal is to encode information at the atomic scale—perhaps in electron spin or an atom's energy level—and manipulate it according to quantum mechanics. Large-scale quantum computers had not yet been built in the account she gives, though the underlying principles had been demonstrated experimentally on a small scale and supported a theoretical model.

  20. Hope

    A celebrated result by Peter Shor says that a quantum computer, if built, could factor numbers. Factoring is believed to be difficult for classical computers and is important to cryptography, so that capability could threaten cryptosystems in commercial use.

  21. Simon

    That leads to the natural question: could a quantum computer solve NP-complete search problems too? It is tempting to imagine using the computer's multiple quantum states to examine many possible solutions at once—for example, checking different subsets of graph nodes for a clique.

  22. Hope

    The obstacle is measurement. You cannot simply peek inside a quantum system to inspect every state; measurement changes the system and gives limited information. Even if one state contains a clique, the probability that a measurement reveals it may be very low. A theoretical result rules out the naive strategy of exploiting quantum parallelism in this way.

  23. Simon

    That does not prove quantum computers cannot help with NP-complete problems. It means we need to understand more about their structure. Factoring has structure that Shor's algorithm can exploit; whether NP-complete search problems have exploitable structure of the relevant kind remains unknown.

  24. Hope

    Ron Fagin brings in mathematical logic. He argues that scientists should spend at least some time thinking about the hardest questions in their field, and he uses logic to approach P versus NP. His best-known result, Fagin's Theorem, characterizes NP through a certain logical language.

  25. Simon

    He tells a wonderfully human story about that work: using his approach, he has at different times convinced himself that P equals NP and that P does not equal NP. One proof for P not equal NP lasted three days. Even a famous theoretician could not spot the error while Fagin still believed the proof; the flaw was a misuse of Fagin's own theorem.

  26. Hope

    Mike then asks whether P versus NP could be independent of the basic axioms of mathematics—meaning neither answer could be proved from those axioms. He compares this possibility with a question about whether an infinity lies between the size of the integers and the size of the real numbers, a problem shown to be unsolvable using the basic tools of mathematics.

  27. Simon

    But Mike does not think P versus NP is like that. The infinity question, he says, concerns something far from ordinary intuition, whereas P versus NP is down to earth. He believes the mathematical axioms are strong enough to answer it, given a sufficiently powerful idea. Known barriers show that familiar methods fail, not that every possible method must fail.

  28. Hope

    The audience asks what would happen if P versus NP were solved tomorrow. If P equals NP, Ron Fagin relays Scott Aaronson's warning that the world could be radically different: cryptography could fail, codes could be cracked easily, and privacy could be lost. The panel believes P does not equal NP, but acknowledges that this has not been proved.

  29. Simon

    What if we knew P does not equal NP? Williams says the proof would have to bring a much deeper understanding of feasible computation, with many other important consequences. The panel's joke is that we would have to be much, much smarter.

  30. Hope

    Another audience question asks whether a polynomial-time algorithm would still be practical if its degree were enormous—say, forty-two. Impagliazzo says the exact boundary between polynomial and exponential time is a convenient way to turn a quantitative question about running time into a qualitative one, but it is not the whole story.

  31. Simon

    For example, a lower bound of N to the thousandth power for a search problem would be astonishing progress, even though that is still polynomial. An upper bound of N to the log N would also be remarkable, even though it does not settle P versus NP in the standard form. In reality, the panel says, researchers are nowhere near such results: they do not even have a superlinear lower bound, such as N squared, for these problems.

  32. Hope

    When asked whether anyone believes P equals NP, Irani says the panelists would not want to go on video claiming that. Impagliazzo sees no reason to believe equality, though he allows that one could be agnostic about whether the usual belief in inequality is justified. Fagin offers a more unusual possibility: perhaps an algorithm exists for a problem such as CLIQUE, but it is so complicated that no human could understand or analyze it.

  33. Simon

    The panel also considers why people can outperform machines at pattern recognition and perception. Impagliazzo points to evolution's enormous head start: hundreds of millions of years, compared with only decades of work on these computer programs. Mike adds that we may not yet understand the brain's algorithms—or even the full capabilities of the class of algorithms we are studying.

  34. Hope

    Could an agency such as the NSA have solved P equals NP without telling anyone? The panel says it is possible in principle, and that such an agency would have strong reasons to keep it secret. But Impagliazzo points to reports of weakened encryption standards and efforts to obtain passwords as a hint that the agency may not already have a universal way to crack the relevant systems.

  35. Simon

    The final stretch considers failed proofs. Fagin recalls a highly publicized attempted proof of P not equal NP that drew close scrutiny from many researchers, including a Fields Medalist. Williams found a particularly strong reason that the approach could not work, though its author did not accept that conclusion. The attempt was still valuable because it galvanized researchers and prompted further analysis.

  36. Hope

    Irani notes that mathematical acceptance is also a social process: a proof has to be read, checked, and trusted. Editors receive many claimed proofs of both P equals NP and P not equal NP, and a proof from someone without established credibility may be especially difficult to get serious attention for—particularly if it is long and complicated.

  37. Simon

    Mike describes two recurring patterns. Claimed proofs of P equals NP often present a complicated algorithm and report that it worked quickly on one finite example, such as a particular graph. His challenge is: if the algorithm really works, use it to factor a famous large number, then bring the result back. One small successful test cannot establish the general claim.

  38. Hope

    Claims that P differs from NP often contain a step saying an algorithm for CLIQUE or satisfiability must work in some particular way. The danger is hidden in the word 'clearly': an algorithm might operate in a less obvious, devious way, so proving that the assumed form is slow does not rule out all algorithms.

  39. Simon

    Some failed attempts have nevertheless led to meaningful theorems. Papadimitriou describes researchers responding to unsuccessful algorithmic approaches by proving that whole approaches could not work. A proof that forces the field to establish an interesting barrier or lower bound can be remarkable, even when the proposed solution itself fails.

  40. Hope

    The panel also remembers early responses to a popular article about P versus NP: people sent in proposed algorithms for graph coloring and other problems. A contest for the attempt requiring the largest counterexample did not go well—the winner essentially said to solve small graphs exhaustively and then offered no workable solution for larger ones.

  41. Simon

    There is even a historically consequential false proof. Impagliazzo recalls an early attempted separation in the Soviet Union that was accepted because its author was politically influential. The episode nearly killed complexity theory there; researchers such as Leonid Levin continued their work after emigrating. The panel calls it an 'honorable separation,' but its consequences were serious.

  42. Hope

    So the episode's central lesson is not simply that P versus NP is a famous unsolved problem. It is a question about the limits of feasible computation, with implications for algorithms, security, quantum computing, and the methods of mathematics itself. Even without a solution, studying it helps us understand where current techniques fall short—and what new ideas might be needed next.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent