320 likes | 352 Views
Part II Theory of Nondeterministic Computation. Edmonds Conjecture in 1965. Traveling Salesman Problem cannot be solved in polynomial time. Cook introduced NP class in 1971. NP: Nondeterminastic Polynomial-time class. Extended Church-Turing Thesis.
E N D
Edmonds Conjecture in 1965 • Traveling Salesman Problem cannot be solved in polynomial time. Cook introduced NP class in 1971 • NP: Nondeterminastic Polynomial-time class.
Extended Church-Turing Thesis • A function computable in polynomial time in any reasonable computational model using a reasonable time complexity measure is computable by a DTM in polynomial time. • Is Nondeterministic TM a reasonable computational model?
Nondeterministic TM (NTM) • There are multiple choices for each transition. • For each input x, the NTM may have more than one computation paths. • An input x is accepted if at least one computation path leads to the final state. • L(M) is the set of all accepted inputs.
How many choices? # of states # of tape-symbols
A function f(x) is computed by an NTM M if for every x ε L(M), M gives output f(x) whenever it reaches the final state. Theorem. A function can be computed by an NTM iff it is Turing-computable. Proof.Idea: Enumerate all possible computation paths of certain length from small to large. Implement: set a tape to do the following enumeration.
Suppose for each transition, there are at most c choices. Then on the enumeration tape, the DTM enumerate all strings on alphabet {a1, a2, …, ac}: ε, a1, a2, …, ac, a1a2, a1a3, …. • When a string ai1ai2∙∙∙aim is written on the enumeration tape, the DTM simulates the NTM by making the ij –th choice at the j-th move. • DTM halts iff it found a computation path of NTM which halts.
Question: How many moves does a DMT needs to simulate t moves of a NTM?
Time • For a NDM M and an input x, TimeM(x) = the minimum # of moves leading to accepting x if x ε L(M) = infinity if x not in L(M)
Time Bound A NTM M is said to have a time bound t(n) if for sufficiently large n and every x ε L(M) With |x|=n, TimeM(x) < max {n+1, t(n)} .
Complexity Classes NTIME(t(n)) = {L(M) | M is a NTM with time bound t(n)} NP = U c > 0 NTIME(n ) c
Relationship • P NP • NP ≠ EXP • NP EXPOLY
Theorem • Speed Up Theorem still holds. • Hierarch Theorem
Space For a NTM M and an input x, SpaceM(x) = the minimum space, over all computation paths, on input x if x ε L(M) = infinity otherwise
Space bound • A NTM M is said to have a space bound s(n) if sufficiently large n and every input x with |x|=n, SpaceM(x) ≤ max{k, s(n)} k = # of work tapes
Complexity Classes • NSPACE(s(n)) = {L(M) | M is a NTM with space bound s(n)} • NPSPACE = Uc>0 NSPACE(n ) c
Relationship • NP NPSPACE • PSPACE = NPSPACE (why?)
Savich’s Theorem • If s(n) ≥ log n, then NSPACE (s(n)) DSPACE(s(n) ) The proof will be given later! 2
Theorems • Compression Theorem holds. • Hierarchy Theorem holds.
Translation Lemma • Let s1(n), s2(n) and f(n) be fully space-constructible functions with s2(n) > n and f(n)> n. Then NSPACE(s1(n)) NSPACE(s2(n)) implies NSPACE(s1(f(n))) NSPACE(s2(f(n)))
Hierarchy 4 8 • NSPACE(n ) DSPACE(n ) DSPACE(n ) NSPACE(n ) • For r > 1 and a > 0, NSPACE(n ) ≠ NSPACE (n ) 9 ≠ 9 r+a r
Savich’s Theorem If s(n) ≥ log n, then NSPACE (s(n)) DSPACE(s(n) ) 2 Proof.
How many configurations of M exist within space s(n)? Input tape x2 x1 xn Work tape
Input tape (read only) working tapes Output tape (possibly, write only)
P NP PSPACE P EXP EXPOLY PSPACE EXPOLY