I just want to add some things to all the well-said things so far.
2sin54 said:
As the title says, what makes a decision problem NP complex? Is it application of the definition (as in: solvable in polynomial time by a non-deterministic Turing machine)?
A
time-bounded TM is one that, given an input of length n, always halts in ##T(n)## moves and it is said to be ##T(n)## time bounded. The TM can be multi-tape and sometimes it can be deterministic. Now, if a DTM is ##T(n)## time bounded for some polynomial ##T(n)## then we say that this TM is
polynomial time bounded. Then, its language ##L(m)## is said to be in the class
P - it's the same thing to talk about the class P of
problems or
languages. The class
NP is problems that can be solved by a TM that is non-deterministic but has a time bound along each branch. Now, as already noted, if for a NTM its time bound i.e. its running time (= maximum number of steps taken along any branch) is polynomial then this NTM is said to be
polynomial - time bounded and its language is said to be in NP.
2sin54 said:
Also, if P does not equal NP, does it mean that NP problems can only be solved in O(exp(n)) time/steps?
Regarding the P = NP open question, there are various ways to address it. One such way is through
NP - complete problems. An NP - complete problem (defined formally via poly-time reductions) has the property that it is in NP and if it is in P, then every problem in NP is also in P. It turns out that almost every problem that is known to be in NP
but it is not known to be in P, is NP - complete. There is only one well known exception:
graph isomorphism. Also, there are thousands of problems that are in NP but
appear not to be in P. Unfortunately, no proof that they are not really in P.
Now, regarding problem reduction, an example of a problem definitely in NP is the
Knapsack Problem. A dynamic-programming algorithm which maintains a table of all the differences that can be achieved by partitioning the first
i integers, could seem to solve the problem in polynomial time but there is the subtlety of measuring the input size. But if we redefine the problem by representing integers in unary - that is
pseudo-knapsack, then this problem is in P.