Slashdot Mirror


Forty Years of P=NP?

An anonymous reader writes "In the afternoon of May 4, 1971, at the Stouffer's Somerset Inn in Shaker Heights, Ohio, Steve Cook presented his STOC paper proving that Satisfiability is NP-complete and Tautology is NP-hard. 'The theorems suggest that Tautology is a good candidate for an interesting set not in [P] and I feel it is worth spending considerable effort trying to prove this conjecture. Such a proof would be a major breakthrough in complexity theory.' And thus Cook formulated what was soon to be called the P versus NP problem. The rest is history. Here's the 1971 STOC Program (there were 143 attendees) and what that sacred ground looks like today."

27 of 222 comments (clear)

  1. Actual origins are even earlier by Anonymous Coward · · Score: 2, Informative

    Alan Cobham wrote a paper defining the complexity classes L and L+. These are exactly P and NP. He may also have originated the concept of defining the complexity of an algorithm as a function of the input size.

    Alan did not however show that there were a large number of problems which were in reducible to L+

  2. P=PN by jjohn · · Score: 2, Interesting

    15 years of developing software and I still don't know what P vs. NP means.

    Sad, sad old hacker.

    1. Re:P=PN by betterunixthanunix · · Score: 3, Informative

      Perhaps you should read a textbook on computational complexity, or an algorithms text, or just take a course on theoretical computer science?

      In simple terms, problems in P can be solved in a polynomial number of operations on a computer with one processor (or with a constant number of processors), and problems in NP can be solved in a polynomial number of operations on a computer with an unbounded number of processors (or in other words, a computer which can explore an unbounded number of solutions at the same time). This is not the most rigorous definition of the classes, but it is one of the more intuitive.

      The problem is this: is P a proper subclass of NP, or are there problems in NP which are not in P? The Cook-Levin theorem established the existence of "NP complete" problems, which are those which are in P if and only if P = NP.

      --
      Palm trees and 8
    2. Re:P=PN by Yold · · Score: 5, Informative

      My computer science is rusty, but essentially it wants to know if polynomial time solution algorithms (n^2, n^3, ..., n^c: where c is constant) exist for EVERY problem that is verifiable (solution checkable) ALSO in polynomial time.

      Classic example, traveling salesman problem. Imagine you have to visit 5 cities, find the ordering of visits that yields the lowest total distance traveled. This problem is NP hard, thus it requires exhaustive search ( 5! solutions => n! time) to find an optimal solution. Verification of an optimal solution can be done in polynomial time (i.e. you already have the answer).

      The cool part about P=NP, is that if ONE algorithm is found that solves an NP hard problem in polynomial time, ALL problems are solvable. You can map one sort of NP problem (e.g. traveling salesman), to another sort (e.g. 3-SAT), and have it remain NP. So if for one NP hard problem, you find a solution in P, it follows that ALL NP problems are solvable in P.

      So basically it boils down to finding a holy grail of algorithms.

      P.S. Apologies in advance, I haven't touched my Sipser book in 3 years.

    3. Re:P=PN by Anonymous Coward · · Score: 2, Informative

      First of all, your example is flawed. The optimization problem of TSP is _not_ polynomial time verifiable. However, if the question is "is there a path on less than k visiting every city", for some k, then the problem is polynomial time verifiable. Also, there are algorithms solving TSP in less than n! time by dynamic programming O(2^n * n^2) or something like that.

      But yes, it is mainly the question that "if a solution to the problem P is _verifiable_ in polynomial, can we make an algorithm solving P in polynomial time?".

    4. Re:P=PN by Anonymous Coward · · Score: 2, Informative

      No, NP-hard means that all problems in NP are (polynomial-time) reducible to it. Therefore if there is a polynomial time solution for an NP-hard problem all problems in NP are solvable in polynomial time.

      NP-complete means that a problem is NP-hard and is also known to be in NP. While finding a polynomial time solution to an NP-complete problem would also give a polynomial time solution to everything in NP it is a weaker result, although sufficient to show P=NP.

    5. Re:P=PN by razberry636 · · Score: 4, Informative
      You're really close!

      For NP-complete you need a slight modification of the traveling salesman problem. An example would be that you need to visit 5 cities, but you need to travel less than 50 miles. Is there a route that will get you through all 5 cities in less than 50 miles?

      To find a solution need to search through all the permutations (factorial time), but to verify that you have a solution is polynomial time.

      However, your original traveling salesman problem is NP-hard because there is no way to verify that you have the shortest route without calculating all of the routes.

      I probably have an advantage here because read the Sipser book less than a year ago. Let's see what I remember in another three years. ;)

    6. Re:P=PN by Missing.Matter · · Score: 4, Informative

      I think you're using NP, NP Hard, and NP Complete interchangeably, when they are very different.

      B is in NP Hard if every A in NP polynomially reduces to B, even if B isn't in NP.

      B is in NP Complete if B is NP and also, every A in NP is polynomially reducible to A.

      B is in NP if B can be decided in polynomial time by a nondeterministic Turing Machine.

    7. Re:P=PN by betterunixthanunix · · Score: 3, Informative

      Except that complexity theory does actually matter in the real world, and a solution to the P=NP problem would have broad implications in applied CS. There are quite a few situations in which we use heuristics where exact solutions would be significantly better (register allocation comes to mind, as does the place and route step for FPGAs), simply because finding an exact solution involves solving an NP-complete problem.

      That most programmers do not really need to deal with complexity is really a result of most programmers not working on interesting programs.

      --
      Palm trees and 8
    8. Re:P=PN by Missing.Matter · · Score: 2
      The GP has probably only been working on problems that are in P, and in fact there are a lot of those. However, there are also a LOT of problem which are in NP we would like to solve.

      Scenario 1: The classic example. You work for a presidential political campaign and your candidate asks you to plan the best possible trip to 1000 counties for the next year. The optimal trip will visit the same city only once, and in total take the least distance. This is known as the traveling salesman problem problem is NP Hard.

      Scenario 2: Your boss asks you to write a program that, given a boolean formula, determines if there is an assignment of variables that makes it true. This is known as SAT, and is NP Complete.

      What's more, there are even HARDER problems than these... things that take more than Polynomial space, so you would need more atoms than are in the entire universe to store the data.

      And then there are problems that are IMPOSSIBLE to solve with current computers, given an infinite amount of time and space. Suppose you're writing a compiler, and you would like to warn the user that the program he wrote contains an infinite loop. This program is not Turing recognizable.

      Or pretend you're an instructor for a programming course. You would like to write a program that takes in a student's homework, and compares it against a solution program, and determines if the two programs do the same thing. This would be the most amazing program in the world, but it's not even Turing recognizable!

      Knowing these facts may seem academic, but if you know your problem reduces to TSP or SAT or CLIQUE, you can tell your boss this is not feasible for our input size, so we either need to relax the problem or approximate the solution. If you don't know this you're going to waste your time writing a program that takes 4 years to calculate the answer.

    9. Re:P=PN by Kamiza+Ikioi · · Score: 2

      Sounds right to me. It's most well known as the Knapsack Problem. It's also known as the mail carrier problem, finding the most efficient route to deliver mail.

      Little did they know in 1971 that the answer was "Hire cheap labor from foreign countries". For P=NP, if P=customer service, NP = India.

      --
      I8-D
    10. Re:P=PN by Novus · · Score: 2

      if you know your problem reduces to TSP or SAT or CLIQUE, you can tell your boss this is not feasible for our input size, so we either need to relax the problem or approximate the solution. If you don't know this you're going to waste your time writing a program that takes 4 years to calculate the answer.

      I think you mean: "you know TSP or SAT or CLIQUE reduces to your problem". By reducing one problem to another (quickly enough; polynomial time is good for NP-completeness proofs), you can show that the problem you have reduced to is at least as hard as the one you reduced from. Lots of easy problems reduce to SAT, but SAT doesn't reduce to them. In other words, "I can reduce SAT to my problem in polynomial time. Hence, if I can solve my problem in polynomial time, I can solve SAT in polynomial time, proving P=NP. Since nobody's been able to do that in 40 years, I wouldn't bet my career on doing it."

    11. Re:P=PN by morgaen · · Score: 2

      Let's hope it's not your last one!

  3. Re:So? by Ambitwistor · · Score: 4, Informative
  4. Re:P = NP? by vlm · · Score: 4, Insightful

    Can anyone explain what all the fuss is about ?

    Its strongly related to the "CS" vs "IT" division amongst "computer people". Its hard to find a topic that more strongly shows the separation.

    The "IT" guys simply don't care (look at many of the posts in this article) but for the "CS" guys its proof would be pretty close to the ultimate "super bowl win" or "moon landing" or "date with a girl" moment.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  5. What has happened since then by JoshuaZ · · Score: 3, Informative

    So, what's happened since then? We're still a long way from resolving P ?= NP. There's been a lot of success showing some techniques won't work. The fact that P^A != NP^A for some oracle A and P^B = NP^B for some other oracle B shows that a lot of possible paths simply won't work. Thus for example, there can't be any clever but essentially straightforward reduction of NP problems to P because then we would have P^A=NP^A for all oracles. Similar remarks apply to the so-called natural proof barrier.

    There's been more success with related problems. In the last few years, the apparent size of P has grown. Thus, Agrawal et. al. showed that primality testing is in P http://en.wikipedia.org/wiki/AKS_algorithm and there's been a lot of success with taking randomized algorithms that lie in BPP and producing non-randomized versions that are in P. This had lead many to suspect that in fact P=BPP. Most recently there's been some very good work with circuit bounds. Ryan Williams has done very recent technical work showing that NEXP and ACC are not equal. This work seems to get around the natural proof barriers. There's also been some work relating complexity questions to algebraic geometry and the permanent of a matrix. ( No, that's not a typo- http://en.wikipedia.org/wiki/Permanent ). So there's a lot of interesting work going on, but it seems that we're pretty far from actually resolving whether P != NP. I suspect that we'll prove the weaker result that P != PSPACE before we resolve the stronger claim that P != NP.

  6. Re:P = NP? by betterunixthanunix · · Score: 2

    The P = NP problem is one of the most important open questions in complexity theory, and a solution to it would have broad implications. For example, if P!=NP, then we would have provably secure cryptography without having to assume as much as we currently do (in layman's terms: cryptography would be a bit easier to "get right"). If P=NP, then a lot of important problems could be solved efficiently (e.g. the travelling salesman problem, the place-and-route problems, etc.). Additionally, a P!=NP proof would likely involve yet-unknown techniques of proving lower bounds on the complexity of problems, as well as providing a straightforward method of proving lower bounds on the complexity of some problems.

    --
    Palm trees and 8
  7. Just finished a final exam on Theory of Automata by Missing.Matter · · Score: 2

    There was a question, in a round about and not obvious way, asked us to prove P = NP. Dirtiest most evil trick question I've ever encountered.

  8. Re:Just finished a final exam on Theory of Automat by betterunixthanunix · · Score: 2

    When I took a graduate level compilers course, the professor gave a quiz early in the semester on writing CFGs. One of the questions was essentially to write a CFG for this language:

    a^n b^n c^n

    Quite a few people had trouble finding the right answer...

    --
    Palm trees and 8
  9. Wow Slashdot has gone downhill... by DNS-and-BIND · · Score: 4, Interesting

    I looked in to this discussion just because I wanted to see what the hardcore science/math nerds were saying, and instead I get a dozen posts asking, "What the hell is P=NP, LOL." Time was, you could look into math threads on Slashdot and see graduate students talking shop. Even if I didn't understand half of what they said, it was still enlightening.

    --
    Shutting down free speech with violence isn't fighting fascism. It IS fascism!
    1. Re:Wow Slashdot has gone downhill... by Abstrackt · · Score: 2

      Back when I started reading Slashdot (1999), being a "nerd" meant that science/math and "zomg computers are magic!" were your life so it made sense that the articles catered that crowd. Nowadays, being a "nerd" has come to mean so many different things, most of them not as nerdy as us old guys remember when we had to punch cards uphill both ways so it makes sense that this site would change accordingly.

      --
      They say a little knowledge is a dangerous thing, but it's not one half so bad as a lot of ignorance. - Terry Pratchett
    2. Re:Wow Slashdot has gone downhill... by dominious · · Score: 2

      "What the hell is P=NP, LOL."

      maybe LOL = OL^2 but im not sure what O and L stand for in this context...

  10. Re:P = NP? by vlm · · Score: 2

    Its the basis of the argument that our CS people gave us as to why a natural language recognition system could not be developed. So a couple of flight control (mechanical) engineers sat down and wrote one.

    An excellent example of science "vs" engineering.

    The scientists say a theoretically perfect system cannot be made. Also true that the abstract concept of a metal cube exactly one inch on a side cannot exist, because of various quantum and thermodynamic reasons there will always exist a variation somewhere deep in the decimal points.

    The engineers, however, are perfectly able to make ones that "work well enough".

    The hop from theory to engineering that happens with P=NP is almost as funny/interesting to talk about as the second hop on the same topic from engineering to mass media.

    --
    "Science flies us to the moon. Religion flies us into buildings." - Victor Stenger
  11. Re:Just finished a final exam on Theory of Automat by betterunixthanunix · · Score: 2

    It was a trick question meant to test how many people were paying attention in their theoretical CS courses.

    --
    Palm trees and 8
  12. Sadly the difference is more like ... by Nicolas+MONNET · · Score: 2

    This is a real world example I've seen a dozen times. Given a spec that requires a parser, the CS type will come up with a complicated (to outsiders) solution that few people can understand but works perfectly. The IT type will not recognize that it is a parser, does not know what a parser is, and will implement a very buggy "solution" with regexps (cf. the MySpace XSS fiasco from a few years back).

    Oh who am I kidding; there is no such thing as a spec. I've never seen an actual one in the enterprise.

  13. Re:So? by mark-t · · Score: 2

    Every time there is a P vs NP story on slashdot, invariably there is at least one person to make a comment like this... and every time, I see comments like this modded up as amusing. Am I the only person on slashdot who has long since ceased to find it funny?

    'P' stands for "polynomial", and 'N' stands for non-deterministic. Neither side of the equals sign actually represents any single value... rather, they each represent what are typically considered to be separate classes of problems.

    To assert that P = NP is to assert that problems which are provably NP hard can actually be solved in polynomial time on the same architecture on which they are supposed to be NP, and therefore NP does not, in strictest sense, exist.

    It would spell the end of virtually all currently used forms of encryption, but would open up entirely new types of problems that we could get computers to solve that are currently considered wholly infeasible.

    Please... how hard is it to Google?

  14. Re:P = NP? by hey! · · Score: 3, Interesting

    I've been in this business since the 1980s. When I started, there were proportionately a lot more math geeks in software than there are today, but by the early 90s there wouldn't have been enough math geeks in all the world to do the work that needed to be done. The people who came into the business had the attitude that complexity and computation theory were just a lot of ivory tower rubbish.

    There was a certain validity to this attitude. There was ton of work to be done, but almost all of it amounted to assembling endless variations of the same old kinds applications but in new contexts. It was like snapping together different Lego projects. The mathematically difficult work had already been done for the people engaged in that work, and so their intellectual focus shifted to issues of craft and project management, which were by no means trivial things. Some of us kept algorithm books handy for that odd job where the library routines didn't quite do, but we didn't really need much math. We just needed a rough grasp of O notation and the ability to translate pseudocode into C. Most software guys didn't even go that far. They didn't have *any* math books or references on their shelves, just big, fat tutorial books on vendor provided solutions or architectural philosophy.

    Then came the Internet.

    A lot of Internet related software falls into the Lego Architecture class, but given a world of data that are interconnected, there's more need than ever for people who can create *new* algorithms that can squeeze gems of value out of that mountain of data quicker than the Universe will perish from heat death. Companies like Google or Facebook or LinkedIn can't just slap a Java front end onto an Oracle database. They have to create new ways to structure and process volumes of data magnitudes beyond anything that existed in the early 1990s.

    Fundamental (in the sense of "foundational" rather than "beginner's") CS is once again very practical knowledge to have.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.