ellipsis said:
'P' stands for polynomial, while 'NP' stands for non-polynomial. Problems in the class P have been proven to have polynomial-time algorithms, while problems in NP have been proven not to have polynomial-time algorithms.
This is a common misconception. P=NP would be kind of a trivial question if that were true as polynomial and non-polynomial are obviously disjoint. In fact, NP stands for non-deterministic polynomial which stems from the formal most low level definition which uses deterministic and or non-deterministic Turing machines as abstract computational models. Essentially a problem is in NP if there exists a Deterministic Turing machine that, given a proposed solution, if correct, can verify it's correctness in polynomial time. Moreover, the size of the solution encoded as a "string" must also be polynomial bounded with respect to the problem's size.
Turing machines are special, because it's conjectured that a Turing machine can compute anything which is computable. It turns out that most programming languages are Turing complete ( that is they have the same power as a Turing machine ). In practice it is common to just come up with algorithms in pseudo-code to construct proofs rather than work with TM's. directly.
Anyways, a problem is in NP if there exists an algorithm that can verify a correct solution in polynomial time.
Does P=NP, is a question that asks whether a problem, in which a correct solution can be verified to be correct in polynomial time, can also be solved in polynomial time.
There are two other related sets of problems, NP hard, and NP complete. A problem is NP hard if all problems in NP can be reduced, in polynomial time, to it, and in NP complete if it's in NP and its in NP hard.
There are a few famous NP complete problems that have very clever direct proofs. One is SAT, which is the problem of determining if an assignment to a boolean expression can satisfy ( make the expression true ) it. This problem is also reducible to a special form 3-SAT, in which you have the expression in the form, ( a or b or c ) and ( d or e or f ) ... This problem is sort of a main starting point for proving NP hardness. Once a problem is shown to be NP hard, you can show another is also NP hard by reducing the first to the new problem. So you have a sort of chain, or domino effect, reducing one problem to another, and then to another, and so on..., and as you go, you keep adding to the set of known NP hard problems.
In other words, NP complete problems can essentially be generalized to solve any problem in NP.
To prove P=NP, you could construct a polynomial time algorithm for any NP complete problem ( emphasis on complete ). If you could do this, then you could also convert this algorithm in polynomial time to a form that can solve any problem in NP.
This is a big deal in cryptography because we rely on the ability to use a key to quickly decrypt a cypher, while assuming that deciphering the code without the key will take far too long to be feasible. But if P=NP, then any code that can be deciphered quickly with the key, could also be cracked quickly without a key.
I recommend Introduction to
The Theory of Computation by Michael Sipser if you would like to dig deeper. Theoretical computer science is a very fascinating subject.
Here is an example problem from one of my home works, where it is shown that the problem D, of determining if a polynomial has an integer root is NP hard by giving an algorithm to polynomial time reduce 3SAT to it.
3SAT \leq_p D ( reads 3SAT polynomial time reduces to D )
Given a forumla \phi \in 3SAT, you can convert it to an equation \beta \in D using the following construction.
Each clause in \phi is mapped to a term in \beta such that if a variable v is complimented in the clause, it is converted to a factor of (v - 1)^2 as a factor in the corresponding term of the polynomial, otherwise v is converted to itself squared as a factor in the corresponding term of the polynomial.
Example:
f( "( x \vee \overline{y} \vee z ) ( \overline{a} \vee y \vee \overline{c} )( \overline{x} \vee z \vee a )" ) = "x^2(y-1)^2z^2 + (a-1)^2y^2(c-1)^2+(x-1)^2z^2a^2"
Because each term is non-negative, the polynomial can only evaluate to 0, after plugging in values for it's variables, if each term also evaluates to 0. We want that if a truth assignment on \phi satisfies \phi, then all terms of \beta, for some assignment on it's variables, evaluate to 0. And if such an assignment on \beta does not exist, then \phi is not satisfiable.
If a clause is satisfiable in \phi, you can make it's corresponding term equal 0 in beta by assigning 0's for variables in beta that are assignmed true in \phi, and 1 for corresponding falses. Then if a variable is assigned a value that makes a particular clause true in the \phi, a factor of 0 will be introduced to the corresponding term in \beta. If under a given assignment, some clause in \phi is not satisfied, then some term in \beta will be non-zero, and then \beta will not be satisfiable.