definiendum | L∈NP |
inclusion | L⊆{0,1}∗ |
range | M … polynomial time 2-tape Turing machine |
range | p:N→N … polynomial |
range | x,u∈{0,1}∗ … bit string |
postulate | ∃M,p. ∀x. x∈L⇔∃u. (M(x,u)=1∧|u|=p(|x|)) |
todo: Requirements Polynomial time Turing machine
The definition says that a language L is in NP under the following condition: You don't necessarily have to be able to decide x∈L via a real algorithm, but at least you must be able to confirm x∈L would you have a post-Turing machine, which for every individual x, is allowed to cleverly adopt the behavior of it's transition function via input u from an extra tape. The additional input, called certificate, is allowed to depend on each individual x, although is has to be at worst polynomially longer (otherwise the machine couldn't even read the second tape in reasonable time).
The machine M still depends on the input x in a computational manner, because for x∉L it is not allowed for there to be any misleading certificate resulting in the M(x,u)=1. In fact, for x∉L the machine doesn't tell you anything (the class is defined by that predicate is called NP). If u also knew if x∉L, then it could just be a yes/no answer and any language could be decided this way. Instead, the above definition permits the interpretation M to be the verifier.
A problem in NP is the Boolean satisfiability problem. Finding out if a circuit, given via x, can be satisfied is hard. But as u is allowed to be a string among the right inputs, having M be the machine which tests u on a given circuit which returns a positive answer if it works directly answers the initial question.
In any case, it turns out that there are no languages which are decidable using a certificate but not by a normal Turing machine. However it seems that the magical machine would at least allow one to calculate problems in polynomial time, which aren't in P. Or is P=NP?
The set NP can also be defined by introducing the non-deterministic Turing machine (NDTM) which is the post-Turing machine trying several computations at once. Formally it's a machine with two transition functions δ0,δ1 and at any time step the configuration is doubled and both possibilities are considered. Hence computation branches exponentially in time and the machine terminates as soon as any branch returns a result.
We define NP (?? is this right?) exactly like NTIME, only with NDTM's instead of TM's. Then
NP=⋃k∈NNTIME(nk)