Pis a class of deterministic Turing (hereinafter referred to as Turing) in polynomial time (
Polynomial time) resolves problems within the collection.NPis a class that can be passed through a non-deterministic Turing (
NOn-deterministic Turing machine) in polynomial time (
Polynomial time) Resolves a set of decision issues within thePIsNP, which means that any problem that can be solved by a Turing in polynomial time can be solved by a non-deterministic Turing. Now, let's talk.NPThe most difficult problem in theNp-complete。 It is defined as follows if a decision problem L isNp-complete, then L has the following two properties: 1) L YesNP(Given a solutionNp-completeScenario (solution, interested readers can think about the difference between solution and answer) and can quickly verify that it is possible, but there is no known-efficient solution. ) 2)NPcan be converted to L within polynomial time. andNp-hardOnly need to haveNp-completeOf the second nature, soNp-completeIsNp-hardSubset of the. The relationships of the four are as follows (assuming P!=NP):
Simple understanding of NP, P, Np-complete and Np-hard