Complements of Nondeterministic Classes • from P

Complements of Nondeterministic Classes • from P

Complements of Nondeterministic Classes ² From p. 133, we know R, RE, and coRE are distinct. { coRE contains the complements of languages in RE, not the languages not in RE. ² Recall that the complement of L, denoted by L¹, is the language §¤ ¡ L. { sat complement is the set of unsatis¯able boolean expressions. { hamiltonian path complement is the set of graphs without a Hamiltonian path. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 181 The Co-Classes ² For any complexity class C, coC denotes the class fL : L¹ 2 Cg: ² Clearly, if C is a deterministic time or space complexity class, then C = coC. { They are said to be closed under complement. { A deterministic TM deciding L can be converted to one that decides L¹ within the same time or space bound by reversing the \yes" and \no" states. ² Whether nondeterministic classes for time are closed under complement is not known (p. 79). °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 182 Comments ² As coC = fL : L¹ 2 Cg; L 2 C if and only if L¹ 2 coC. ² But it is not true that L 2 C if and only if L 62 coC. { coC is not de¯ned as C¹. ² For example, suppose C = ff2; 4; 6; 8; 10;:::gg. ² Then coC = ff1; 3; 5; 7; 9;:::gg. ¤ ² But C¹ = 2f1;2;3;:::g ¡ ff2; 4; 6; 8; 10;:::gg. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 183 The Quanti¯ed Halting Problem ² Let f(n) ¸ n be proper. ² De¯ne Hf = fM; x : M accepts input x after at most f(j x j) stepsg; where M is deterministic. ² Assume the input is binary. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 184 3 Hf 2 TIME(f(n) ) ² For each input M; x, we simulate M on x with an alarm clock of length f(j x j). { Use the single-string simulator (p. 57), the universal TM (p. 118), and the linear speedup theorem (p. 64). { Our simulator accepts M; x if and only if M accepts x before the alarm clock runs out. 2 2 ² From p. 63, the total running time is O(`M kM f(n) ), where `M is the length to encode each symbol or state of M and kM is M's number of strings. 2 3 ² As `M kM = O(n), the running time is O(f(n) ), where the constant is independent of M. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 185 Hf 62 TIME(f(bn=2c)) ² Suppose TM MHf decides Hf in time f(bn=2c). ² Consider machine Df (M): if MHf (M; M) = \yes" then \no" else \yes" ² Df on input M runs in the same time as MHf on input 2n+1 a M; M, i.e., in time f(b 2 c) = f(n), where n = j M j. aA student pointed out on October 6, 2004, that this estimation omits the time to write down M; M. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 186 The Proof (concluded) ² First, Df (Df ) = \yes" ) Df ; Df 62 Hf ) Df does not accept Df within time f(j Df j) ) Df (Df ) 6= \yes" ) Df (Df ) = \no" a contradiction ² Similarly, Df (Df ) = \no" ) Df (Df ) = \yes." °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 187 The Time Hierarchy Theorem Theorem 16 If f(n) ¸ n is proper, then TIME(f(n)) ( TIME(f(2n + 1)3): ² The quanti¯ed halting problem makes it so. Corollary 17 P ( EXP. ² P ⊆ TIME(2n) because poly(n) · 2n for n large enough. ² But by Theorem 16, 2 TIME(2n) ( TIME((22n+1)3) ⊆ TIME(2n ) ⊆ EXP: ² So P ( EXP. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 188 The Space Hierarchy Theorem Theorem 18 (Hennie and Stearns (1966)) If f(n) is proper, then SPACE(f(n)) ( SPACE(f(n) log f(n)): Corollary 19 L ( PSPACE. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 189 Nondeterministic Time Hierarchy Theorems Theorem 20 (Cook (1973)) If f(n) is proper, then NTIME(nr) ( NTIME(ns) whenever 1 · r < s. Theorem 21 (Seiferas, Fischer, and Meyer (1978)) If T1(n);T2(n) are proper, then NTIME(T1(n)) ( NTIME(T2(n)) whenever T1(n + 1) = o(T2(n)). °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 190 The Reachability Method ² The computation of a time-bounded TM can be represented by a directed graph. ² The TM's con¯gurations constitute the nodes. ² Two nodes are connected by a directed edge if one yields the other. ² The start node representing the initial con¯guration has zero in degree. ² When the TM is nondeterministic, a node may have an out degree greater than one. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 191 Illustration of the Reachability Method Initial configuration yes yes °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 192 Relations between Complexity Classes Theorem 22 Suppose f(n) is proper. Then 1. SPACE(f(n)) ⊆ NSPACE(f(n)), TIME(f(n)) ⊆ NTIME(f(n)). 2. NTIME(f(n)) ⊆ SPACE(f(n)). 3. NSPACE(f(n)) ⊆ TIME(klog n+f(n)). ² Proof of 2: { Explore the computation tree of the NTM for \yes." { Speci¯cally, generate a f(n)-bit sequence denoting the nondeterministic choices over f(n) steps. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 193 Proof of Theorem 22(2) ² (continued) { Simulate the NTM based on the choices. { Recycle the space and then repeat the above steps until a \yes" is encountered or the tree is exhausted. { Each path simulation consumes at most O(f(n)) space because it takes O(f(n)) time. { The total space is O(f(n)) because space is recycled. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 194 Proof of Theorem 22(3) ² Let k-string NTM M = (K; §; ¢; s) with input and output decide L 2 NSPACE(f(n)). ² Use the reachability method on the con¯guration graph of M on input x of length n. ² A con¯guration is a (2k + 1)-tuple (q; w1; u1; w2; u2; : : : ; wk; uk): °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 195 Proof of Theorem 22(3) (continued) ² We only care about (q; i; w2; u2; : : : ; wk¡1; uk¡1); where i is an integer between 0 and n for the position of the ¯rst cursor. ² The number of con¯gurations is therefore at most (2k¡4)f(n) log n+f(n) jKj £ (n + 1) £ j§j = O(c1 ) (1) for some c1, which depends on M. ² Add edges to the con¯guration graph based on M's transition function. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 196 Proof of Theorem 22(3) (concluded) ² x 2 L , there is a path in the con¯guration graph from the initial con¯guration to a con¯guration of the form (\yes"; i; : : :) [there may be many of them]. log n+f(n) ² This is reachability on a graph with O(c1 ) nodes. ² It is in TIME(clog n+f(n)) for some c because reachability 2 TIME(nj) for some j and h ij log n+f(n) j log n+f(n) c1 = (c1) : °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 197 Space-Bounded Computation and Proper Functions ² In the de¯nition of space-bounded computations earlier, the TMs are not required to halt at all. ² When the space is bounded by a proper function f, computations can be assumed to halt: { Run the TM associated with f to produce an output of length f(n) ¯rst. { The space-bounded computation must repeat a con¯guration if it runs for more than clog n+f(n) steps for some c (p. 196). { So we can prevent in¯nite loops during simulation by pruning any path longer than clog n+f(n). °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 198 The Grand Chain of Inclusions L ⊆ NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXP: ² By Corollary 19 (p. 189), we know L ( PSPACE. ² The chain must break somewhere between L and PSPACE.a ² It is suspected that all four inclusions are proper. ² But there are no proofs yet.b aBill Gates (1996), \I keep bumping into that silly quotation at- tributed to me that says 640K of memory is enough." bCarl Friedrich Gauss (1777{1855), \I could easily lay down a mul- titude of such propositions, which one could neither prove nor dispose of." °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 199 Nondeterministic Space and Deterministic Space ² By Theorem 4 (p. 84), NTIME(f(n)) ⊆ TIME(cf(n)); an exponential gap. ² There is no proof yet that the exponential gap is inherent. ² How about NSPACE vs. SPACE? ² Surprisingly, the relation is only quadratic|a polynomial|by Savitch's theorem. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 200 Savitch's Theorem Theorem 23 (Savitch (1970)) reachability 2 SPACE(log2 n): ² Let G(V; E) be a graph with n nodes. ² For i ¸ 0, let PATH(x; y; i) mean there is a path from node x to node y of length at most 2i. ² There is a path from x to y if and only if PATH(x; y; dlog ne) holds. °c 2011 Prof. Yuh-Dauh Lyuu, National Taiwan University Page 201 The Proof (continued) ² For i > 0, PATH(x; y; i) if and only if there exists a z such that PATH(x; z; i ¡ 1) and PATH(z; y; i ¡ 1).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    38 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us