andrewducker (
andrewducker) wrote2010-08-13 09:31 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
A simple explanation to P and NP
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
A "P" problem is one that is easily solved through a series of steps, without trying every single combination - such as "sort a bunch of names into alphabetical order". You don't have to try every single possible list of names in order to sort a list of names, you can just use a series of comparisons to shuffle them up and down until they're sorted.
An non-P problem is one that has no known efficient set of steps for producing an answer, and thus requires you to try possibilities until you find one that's right. A common example of one that is thought to be hard is The Travelling Salesman problem - "given a bunch of cities and a bunch of roads connecting them, what is the shortest route that will take the salesman to each city exactly once?" There's no known solution to this problem other than "start trying solutions and keep going until you've found one." (although there are ways of excluding obviously wrong answers quickly).
NP is the superset of all problems that are easy to check, P is the smaller subset of all problems that are easy to solve, and proving that they are the same thing would mean that all problems that are easy to check are also easy to solve.
One of the reasons this is important is that pretty much all of the security methods we use online rely on things like "integer factorization" not being P - the fact that we can multiply two large numbers together to get an answer very quickly, but breaking that large number back into the two component parts requires every possibility to be checked (which takes years/decades for very large numbers).
The recent fuss is because of a paper that was published claiming that P!=NP - i.e. that there are definitely problems that are easy to check, but not easy to solve. This would mean, for example, that there is no simple way to convert the big number back into its two components, and thus that all of our security is safe (from that particular direction, anyway).
no subject
(no subject)
(no subject)
(no subject)
no subject
No, an NP problem is any problem where you can efficiently check the answer. All problems in P are in NP, for example. What's known about a problem doesn't affect what complexity class it's in.
(no subject)
(no subject)
(no subject)
(no subject)
no subject
Doing that is a set of steps for producing an answer! You probably meant to say "no efficient set of steps" here, or some such.
Also, technically, NP is a superset of P – there's no implication that "an NP problem" doesn't have a polynomial-time solution. Colloquial usage is to only describe problems as NP if they aren't (known to be) in P, on the pragmatic basis that if they were easier than that you'd have said so, but that's not what it really means.
I think the major thing I would add to this explanation is a paragraph explaining why the question is open, along the lines of:
(no subject)
(no subject)
(no subject)
no subject
And in cryptography, it's not worst-case hardness that matters - it's average case hardness.
If P turns out to equal NP, cryptography will have big problems - we'll be on the search for problems where the polynomial describing their hardness has a big exponent - but if we prove P != NP we'll still be a long way from having a cryptosystem we can prove good things about without making any assumptions about hardness.
(no subject)
(no subject)
(no subject)
no subject
"Dude. One way to measure P vs. NP's importance is this. If NP problems were feasible, then mathematical creativity could be automated. The ability to check a proof would entail the ability to find one. Every Apple II, every Commodore, would have the reasoning power of Archimedes or Gauss. So by just programming your computer and letting it run, presumably you could immediately solve not only P vs. NP, but also the other six Clay problems. (Or five, now that Poincaré is down.) "