NP ≡ Polynomial NTM I
Polynomial verifier ⇔ polynomial NTM Idea:
“⇒” NTM by guessing certificate
“⇐” using NTM’s accepting branch as certificate Proof:
“⇒”: now we have a verifier V in time nk
NP ≡ Polynomial NTM II
Recall the definition below
A = {w | V accepts hw , ci for some strings c}
We have
|c| ≤ nk
because to handle hw , ci in nk, |c| should be bounded by nk
Use an NTM to
1 nondeterministically select c
2 run V on hw , ci
NP ≡ Polynomial NTM III
That is, run c in parallel and each is polynomial We have that for any w ∈ A, the NTM accepts it in polynomial time
“⇐”: now w is accepted by a polynomial NTM Let c be any accepting branch
Note that for polynomial NTM, each branch is polynomial
Then we have a verifier V that handles input hw , ci in polynomial time
Note: the definition of V requires only “some c.”
So finding one is sufficient
SUBSET-SUM I
Given x1, . . . , xk and t, is sum of a subset = t?
Formally
{hs, ti | s = {x1, . . . , xk} and ∃ {y1, . . . , yl} ⊂ {x1, . . . , xk} such that X
yi = t}
Example
h{4, 11, 16, 21, 27}, 25i OK as 4 + 21 = 25
SUBSET-SUM II
Note: allow repetition here
h{4, 11, 11, 16, 21, 27}, 25i We prove that this problem is NP Idea: the subset is the certificate.
Consider any input
hhs, ti, ci We
1 check if P ci = t
SUBSET-SUM III
2 check if all ci ∈ s
If both pass, accept; otherwise, reject Here
length of c < length of s
The verification can be done in polynomial time
P vs. NP I
Roughly
P: problems decided quickly NP: problems verified quickly Question: is P = NP?
This is one of the greatest unsolved problems Most believe P 6= NP
NP-completeness I
It has been shown that some problems in NP are related
For certain NP problems:
If ∃ a polynomial algorithm for one NP ⇒ P = NP These problems are called NP-complete problems They are useful to study the issue of P versus NP To prove P 6= NP: only need to focus on
NP-complete problems
To prove P=NP: need only polynomial algorithms for an NP-complete problem