P != NP question

不问归期 提交于 2019-12-09 15:18:22

问题


Not a 'pure' programming question, but since it is deeply involved in programming theory, I thought it best to ask here.

Regarding the P NP problem, this excerpt from http://en.wikipedia.org/wiki/P_versus_NP_problem : "In essence, the question P = NP? asks: Suppose that yes answers to a yes or no question can be verified quickly. Then, can the answers themselves also be computed quickly?"

I am left wondering, how is the speed of verifying an answer related to the speed of generating a solution?


回答1:


Essentially, in the set of NP, or Nondeterministic Polynomial time, problems, the answer can be verified in polynomial time. The question is whether all such problems can be determined in polynomial time.

If P=NP is true, and such algorithms are discovered many problems that are hard to solve but easy to verify the solution, such as proofs, become as easy to solve as to verify.




回答2:


Suppose you had tremendous parallelism -- however much you wanted. You could then simultaneously generate all possible solutions, check which of these were correct, and output a correct solution. In the presence of infinite parallelism, this is a method of generating a solution. The set of problems in NP are those for which this procedure would work quickly, because the only interesting computational step it is performing is checking whether solutions are correct, and this can be done efficiently for problems in NP. Note that for some other problems, even this parallelism would not allow us to find solutions quickly, since it requires that checking solutions is easy.

But we don't have infinite parallelism. Can we somehow simulate it, with only a polynomial amount of overhead? If so, we could imagine running the above procedure, and efficiently finding solutions for every problem for which verification was easy. This is the P vs. NP question.

Intuitively, it seems clear that the answer is "no" (i.e. P != NP). How could we possibly simulate infinite parallelism? This is what almost every expert believes. But it is a mystery how to prove it, and one that is worth $1,000,000 in prize money.




回答3:


Let's assume I am handed a solution to a "hard" problem by a magician, and I can easily verify if this solution is correct or not. BUT, can I compute this solution myself easily? (polynomial time)

This is exactly the question.




回答4:


It may or may not be related.

People care about NP problems because we want to solve them quickly and all the time, but so far we have not found a way to solve them quickly. We want to know if there a quick way to solve them or if we should give up trying.




回答5:


This problem has been solved today!

(Possibly.)




回答6:


P is the class of all languages that can be computed in polynomial time by a deterministic Turing machine. A modern computer is very much like a deterministic Turing machine, except that a Turing machine essentially has infinite memory. This distinction is generally ignored for practical purposes.

NP is the class of all languages that can be computed in polynomial time by a non-deterministic Turning machine. A nondeterministic Turing machine does not correspond to any real-world device.

It is a basic fact of computational complexity that NP is equivalent to the class of languages whose verification problems are in P. In fact, NP is sometimes defined as this class; the two definitions are interchangeable, and the verification definition has the benefit of direct relevance to the deterministic-Turing-machine-like computers in the real world.

So NP is the class of problems that are verifiable in poly-time on a "real" machine and solvable in poly-time on a very similar theoretical machine. Thus, the questions of solvability and verifiability are linked.

Now, most computer scientists believe that P and NP are not equivalent; that is, that there exist languages computable in poly-time by a nondeterministic Turing machine but not by a deterministic Turing machine, or equivalently that are not solvable in poly-time by a deterministic Turing machine but whose solutions can be verified in poly-time by a deterministic Turing machine.




回答7:


There isn't a direct relation here though. There may be an intuitive feel that verifying an answer is easier than generating an answer as part of any generation would be to ensure the answer is correct. Thus, one could take a brute force approach to try different solutions but this tends to lead to exponential complexities that are beyond P, or so that is what I recall from Complexity class years ago.




回答8:


Whether they're related or not is one of the Claypool Foundation's "Millenium Problems", and they'll give a million dollars to somebody providing an appropriate proof that hold up under a few years of intense examination.

The types of questions are more related than they look, since another definition of an NP problem is one that can be solved efficiently with an arbitrarily parallel computer.

One thing that really interests people is the lack of a proof. There are proofs for similar-looking questions, but not this one. That intrigues people, especially mathematicians, since a proof is likely to bring a lot of insight into other things. That is apparently the case for Perelman's proof of the Poincare Conjecture, another of the Millenium Problems.

Another issue is the impact this could have. Right now, few people believe that there is an efficient method for solving NP-complete problems, so a discovery that P!=NP would have little practical impact. A discovery of an efficient way to solve NP-complete problems would revolutionalize a lot of computer science. It would make a lot of things much easier, and would destroy cryptography as we know it by making decryption easy.



来源:https://stackoverflow.com/questions/3461980/p-np-question

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!