Complements of Nondeterministic Classes • from P

Total Page:16

File Type:pdf, Size:1020Kb

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).
Recommended publications
  • Complexity Theory Lecture 9 Co-NP Co-NP-Complete
    Complexity Theory 1 Complexity Theory 2 co-NP Complexity Theory Lecture 9 As co-NP is the collection of complements of languages in NP, and P is closed under complementation, co-NP can also be characterised as the collection of languages of the form: ′ L = x y y <p( x ) R (x, y) { |∀ | | | | → } Anuj Dawar University of Cambridge Computer Laboratory NP – the collection of languages with succinct certificates of Easter Term 2010 membership. co-NP – the collection of languages with succinct certificates of http://www.cl.cam.ac.uk/teaching/0910/Complexity/ disqualification. Anuj Dawar May 14, 2010 Anuj Dawar May 14, 2010 Complexity Theory 3 Complexity Theory 4 NP co-NP co-NP-complete P VAL – the collection of Boolean expressions that are valid is co-NP-complete. Any language L that is the complement of an NP-complete language is co-NP-complete. Any of the situations is consistent with our present state of ¯ knowledge: Any reduction of a language L1 to L2 is also a reduction of L1–the complement of L1–to L¯2–the complement of L2. P = NP = co-NP • There is an easy reduction from the complement of SAT to VAL, P = NP co-NP = NP = co-NP • ∩ namely the map that takes an expression to its negation. P = NP co-NP = NP = co-NP • ∩ VAL P P = NP = co-NP ∈ ⇒ P = NP co-NP = NP = co-NP • ∩ VAL NP NP = co-NP ∈ ⇒ Anuj Dawar May 14, 2010 Anuj Dawar May 14, 2010 Complexity Theory 5 Complexity Theory 6 Prime Numbers Primality Consider the decision problem PRIME: Another way of putting this is that Composite is in NP.
    [Show full text]
  • Chapter 24 Conp, Self-Reductions
    Chapter 24 coNP, Self-Reductions CS 473: Fundamental Algorithms, Spring 2013 April 24, 2013 24.1 Complementation and Self-Reduction 24.2 Complementation 24.2.1 Recap 24.2.1.1 The class P (A) A language L (equivalently decision problem) is in the class P if there is a polynomial time algorithm A for deciding L; that is given a string x, A correctly decides if x 2 L and running time of A on x is polynomial in jxj, the length of x. 24.2.1.2 The class NP Two equivalent definitions: (A) Language L is in NP if there is a non-deterministic polynomial time algorithm A (Turing Machine) that decides L. (A) For x 2 L, A has some non-deterministic choice of moves that will make A accept x (B) For x 62 L, no choice of moves will make A accept x (B) L has an efficient certifier C(·; ·). (A) C is a polynomial time deterministic algorithm (B) For x 2 L there is a string y (proof) of length polynomial in jxj such that C(x; y) accepts (C) For x 62 L, no string y will make C(x; y) accept 1 24.2.1.3 Complementation Definition 24.2.1. Given a decision problem X, its complement X is the collection of all instances s such that s 62 L(X) Equivalently, in terms of languages: Definition 24.2.2. Given a language L over alphabet Σ, its complement L is the language Σ∗ n L. 24.2.1.4 Examples (A) PRIME = nfn j n is an integer and n is primeg o PRIME = n n is an integer and n is not a prime n o PRIME = COMPOSITE .
    [Show full text]
  • Succinctness of the Complement and Intersection of Regular Expressions Wouter Gelade, Frank Neven
    Succinctness of the Complement and Intersection of Regular Expressions Wouter Gelade, Frank Neven To cite this version: Wouter Gelade, Frank Neven. Succinctness of the Complement and Intersection of Regular Expres- sions. STACS 2008, Feb 2008, Bordeaux, France. pp.325-336. hal-00226864 HAL Id: hal-00226864 https://hal.archives-ouvertes.fr/hal-00226864 Submitted on 30 Jan 2008 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. Symposium on Theoretical Aspects of Computer Science 2008 (Bordeaux), pp. 325-336 www.stacs-conf.org SUCCINCTNESS OF THE COMPLEMENT AND INTERSECTION OF REGULAR EXPRESSIONS WOUTER GELADE AND FRANK NEVEN Hasselt University and Transnational University of Limburg, School for Information Technology E-mail address: [email protected] Abstract. We study the succinctness of the complement and intersection of regular ex- pressions. In particular, we show that when constructing a regular expression defining the complement of a given regular expression, a double exponential size increase cannot be avoided. Similarly, when constructing a regular expression defining the intersection of a fixed and an arbitrary number of regular expressions, an exponential and double expo- nential size increase, respectively, can in worst-case not be avoided.
    [Show full text]
  • NP As Games, Co-NP, Proof Complexity
    CS 6743 Lecture 9 1 Fall 2007 1 Importance of the Cook-Levin Theorem There is a trivial NP-complete language: k Lu = {(M, x, 1 ) | NTM M accepts x in ≤ k steps} Exercise: Show that Lu is NP-complete. The language Lu is not particularly interesting, whereas SAT is extremely interesting since it’s a well-known and well-studied natural problem in logic. After Cook and Levin showed NP-completeness of SAT, literally hundreds of other important and natural problems were also shown to be NP-complete. It is this abundance of natural complete problems which makes the notion of NP-completeness so important, and the “P vs. NP” question so fundamental. 2 Viewing NP as a game Nondeterministic computation can be viewed as a two-person game. The players are Prover and Verifier. Both get the same input, e.g., a propositional formula φ. Prover is all-powerful (but not trust-worthy). He is trying to convince Verifier that the input is in the language (e.g., that φ is satisfiable). Prover sends his argument (as a binary string) to Verifier. Verifier is computationally bounded algorithm. In case of NP, Verifier is a deterministic polytime algorithm. It is not hard to argue that the class NP of languages L is exactly the class of languages for which there is a pair (Prover, Verifier) with the property: For inputs in the language, Prover convinces Verifier to accept; for inputs not in the language, any string sent by Prover will be rejected by Verifier. Moreover, the string that Prover needs to send is of length polynomial in the size of the input.
    [Show full text]
  • Simple Doubly-Efficient Interactive Proof Systems for Locally
    Electronic Colloquium on Computational Complexity, Revision 3 of Report No. 18 (2017) Simple doubly-efficient interactive proof systems for locally-characterizable sets Oded Goldreich∗ Guy N. Rothblumy September 8, 2017 Abstract A proof system is called doubly-efficient if the prescribed prover strategy can be implemented in polynomial-time and the verifier’s strategy can be implemented in almost-linear-time. We present direct constructions of doubly-efficient interactive proof systems for problems in P that are believed to have relatively high complexity. Specifically, such constructions are presented for t-CLIQUE and t-SUM. In addition, we present a generic construction of such proof systems for a natural class that contains both problems and is in NC (and also in SC). The proof systems presented by us are significantly simpler than the proof systems presented by Goldwasser, Kalai and Rothblum (JACM, 2015), let alone those presented by Reingold, Roth- blum, and Rothblum (STOC, 2016), and can be implemented using a smaller number of rounds. Contents 1 Introduction 1 1.1 The current work . 1 1.2 Relation to prior work . 3 1.3 Organization and conventions . 4 2 Preliminaries: The sum-check protocol 5 3 The case of t-CLIQUE 5 4 The general result 7 4.1 A natural class: locally-characterizable sets . 7 4.2 Proof of Theorem 1 . 8 4.3 Generalization: round versus computation trade-off . 9 4.4 Extension to a wider class . 10 5 The case of t-SUM 13 References 15 Appendix: An MA proof system for locally-chracterizable sets 18 ∗Department of Computer Science, Weizmann Institute of Science, Rehovot, Israel.
    [Show full text]
  • Lecture 10: Space Complexity III
    Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Lecture 10: Space Complexity III Arijit Bishnu 27.03.2010 Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Outline 1 Space Complexity Classes: NL and L 2 Reductions 3 NL-completeness 4 The Relation between NL and coNL 5 A Relation Among the Complexity Classes Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Outline 1 Space Complexity Classes: NL and L 2 Reductions 3 NL-completeness 4 The Relation between NL and coNL 5 A Relation Among the Complexity Classes Definition for Recapitulation S c NPSPACE = c>0 NSPACE(n ). The class NPSPACE is an analog of the class NP. Definition L = SPACE(log n). Definition NL = NSPACE(log n). Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Space Complexity Classes Definition for Recapitulation S c PSPACE = c>0 SPACE(n ). The class PSPACE is an analog of the class P. Definition L = SPACE(log n). Definition NL = NSPACE(log n). Space Complexity Classes: NL and L Reductions NL-completeness The Relation between NL and coNL A Relation Among the Complexity Classes Space Complexity Classes Definition for Recapitulation S c PSPACE = c>0 SPACE(n ). The class PSPACE is an analog of the class P. Definition for Recapitulation S c NPSPACE = c>0 NSPACE(n ).
    [Show full text]
  • A Short History of Computational Complexity
    The Computational Complexity Column by Lance FORTNOW NEC Laboratories America 4 Independence Way, Princeton, NJ 08540, USA [email protected] http://www.neci.nj.nec.com/homepages/fortnow/beatcs Every third year the Conference on Computational Complexity is held in Europe and this summer the University of Aarhus (Denmark) will host the meeting July 7-10. More details at the conference web page http://www.computationalcomplexity.org This month we present a historical view of computational complexity written by Steve Homer and myself. This is a preliminary version of a chapter to be included in an upcoming North-Holland Handbook of the History of Mathematical Logic edited by Dirk van Dalen, John Dawson and Aki Kanamori. A Short History of Computational Complexity Lance Fortnow1 Steve Homer2 NEC Research Institute Computer Science Department 4 Independence Way Boston University Princeton, NJ 08540 111 Cummington Street Boston, MA 02215 1 Introduction It all started with a machine. In 1936, Turing developed his theoretical com- putational model. He based his model on how he perceived mathematicians think. As digital computers were developed in the 40's and 50's, the Turing machine proved itself as the right theoretical model for computation. Quickly though we discovered that the basic Turing machine model fails to account for the amount of time or memory needed by a computer, a critical issue today but even more so in those early days of computing. The key idea to measure time and space as a function of the length of the input came in the early 1960's by Hartmanis and Stearns.
    [Show full text]
  • Complexity Theory
    Complexity Theory Jan Kretˇ ´ınsky´ Chair for Foundations of Software Reliability and Theoretical Computer Science Technical University of Munich Summer 2019 Partially based on slides by Jorg¨ Kreiker Lecture 1 Introduction Agenda • computational complexity and two problems • your background and expectations • organization • basic concepts • teaser • summary Computational Complexity • quantifying the efficiency of computations • not: computability, descriptive complexity, . • computation: computing a function f : f0; 1g∗ ! f0; 1g∗ • everything else matter of encoding • model of computation? • efficiency: how many resources used by computation • time: number of basic operations with respect to input size • space: memory usage person does not get along with • largest party? Jack James, John, Kate • naive computation James Jack, Hugo, Sayid • John Jack, Juliet, Sun check all sets of people for compatibility Kate Jack, Claire, Jin • number of subsets of n Hugo James, Claire, Sun element set is2 n Claire Hugo, Kate, Juliet • intractable Juliet John, Sayid, Claire • can we do better? Sun John, Hugo, Jin • observation: for a given set Sayid James, Juliet, Jin compatibility checking is easy Jin Sayid, Sun, Kate Dinner Party Example (Dinner Party) You want to throw a dinner party. You have a list of pairs of friends who do not get along. What is the largest party you can throw such that you do not invite any two who don’t get along? • largest party? • naive computation • check all sets of people for compatibility • number of subsets of n element set is2 n • intractable • can we do better? • observation: for a given set compatibility checking is easy Dinner Party Example (Dinner Party) You want to throw a dinner party.
    [Show full text]
  • Randomized Computation and Circuit Complexity Contents 1 Plan For
    CS221: Computational Complexity Prof. Salil Vadhan Lecture 18: Randomized Computation and Circuit Complexity 11/04 Scribe: Ethan Abraham Contents 1 Plan for Lecture 1 2 Recap 1 3 Randomized Complexity 1 4 Circuit Complexity 4 1 Plan for Lecture ² Randomized Computation (Papadimitrou x11.1 - x11.2, Thm. 17.12) ² Circuit Complexity (Papadimitrou x11.4) 2 Recap Definition 1 L 2 BPP if 9 a probabilistic polynomial-time Turing Machine M such that ² x 2 L ) Pr [M(x)accepts] ¸ 2=3 ² x2 = L ) Pr [M(x)rejects] · 1=3. We also recall the following lemma: Lemma 2 (BPP Amplification Lemma) If L 2 BPP, then for all poly- nomials p, L has a BPP algorithm with error probability · 2¡p(n). 1 3 Randomized Complexity 3.1 Bounds on BPP What do we know? ² P ⊆ RP; P ⊆ co-RP ² RP ⊆ NP; RP ⊆ BPP ² co-RP ⊆ BPP; co-RP ⊆ co-NP What don’t we know? ² We don’t know the relationship between BPP and NP. ² We don’t even know that BPP 6= NEXP. This is downright insulting. However, we do have the following theorem, that gives some bound on how large BPP can be: Theorem 3 (Sipser) BPP ⊆ Σ2P \ Π2P Based on our knowledge of the polynomial hierarchy, we have the following immediate corollary: Corollary 4 P = NP ) BPP = P ) BPP 6= EXP, so either P 6= NP or BPP 6= EXP. Proof of Theorem (Lautemann): Suppose L 2 BPP. By the BPP Amplification Lemma, we can assume that L has a BPP algorithm with error probability 2¡n.
    [Show full text]
  • P-And-Np.Pdf
    P and NP Evgenij Thorstensen V18 Evgenij Thorstensen P and NP V18 1 / 26 Recap We measure complexity of a DTM as a function of input size n. This complexity is a function tM(n), the maximum number of steps the DTM needs on the input of size n. We compare running times by asymptotic behaviour. g 2 O(f) if there exist n0 and c such that for every n > n0 we have g(n) 6 c · f(n). TIME(f) is the set of languages decidable by some DTM with running time O(f). Evgenij Thorstensen P and NP V18 2 / 26 Polynomial time The class P, polynomial time, is [ P = TIME(nk) k2N To prove that a language is in P, we can exhibit a DTM and prove that it runs in time O(nk) for some k. This can be done directly or by reduction. Evgenij Thorstensen P and NP V18 3 / 26 Abstracting away from DTMs Let’s consider algorithms working on relevant data structures. Need to make sure that we have a reasonable encoding of input. For now, reasonable = polynomial-time encodable/decodable. If we have such an encoding, can assume input is already decoded. For example, a graph (V; E) as input can be reasoned about in terms of 2 jVj, since jEj 6 jVj Evgenij Thorstensen P and NP V18 4 / 26 Algorithm: 1. Mark s 2. While new nodes are marked, repeat: 2.1. For each marked node v and edge (v, w), mark w 3. If t is marked, accept; if not, reject.
    [Show full text]
  • CS 2401 - Introduction to Complexity Theory Lecture #3: Fall, 2015
    CS 2401 - Introduction to Complexity Theory Lecture #3: Fall, 2015 CS 2401 - Introduction to Complexity Theory Instructor: Toniann Pitassi Lecturer: Thomas Watson Scribe Notes by: Benett Axtell 1 Review We begin by reviewing some concepts from previous lectures. 1.1 Basic Complexity Classes Definition DTIME is the class of languages for which there exists a deterministic Turing machine. We define it as a language L for which their exists a Turing machine M that outputs 0 or 1 that is both correct and efficient. It is correct iff M outputs 1 on input x and efficient if M runs in the time O(T (jxj)). The formal definition of this is as follows: DTIME(T (n)) = fL ⊆ f0; 1g∗ : 9 TM M (outputting 0 or 1) s.t. 8x : x 2 L , M(x) = 1 and M runs in time O(T (jxj))g Definition The complexity class P is the set of decision problems that can be solved in polynomial c DTIME. Formally: P = [c≥1DTIME(n ) Definition NTIME is the class of languages for which there exists a non-deterministic Turing machine (meaning the machine can make guesses as to a witness that can satisfy the algorithm). We define this as: NTIME(T (n)) = fL ⊆ f0; 1g∗ : 9 TM M (outputting 0 or 1) s.t. 8x : x 2 L , 9w 2 f0; 1gO(T (jxj))M(x; w) = 1 and M runs in time O(T (jxj))g There are two definitions of NTIME. Above is the external definition where a witness is passed to the machine.
    [Show full text]
  • E0 224: Computational Complexity Theory Chandan Saha
    E0 224: Computational Complexity Theory Chandan Saha Lecture 7 Abhijat Sharma Indian Institute of Science Bangalore, India 27 August 2014 1 Class co − NP If L ⊆ f0; 1g∗ is any language, we denote the complement of L by L¯. That is, L¯ = f0; 1g∗ n L. Hence, we can define: Definition 1. The complexity class co − NP consists of all the languages L, such that L¯ 2 NP. For example, SAT = fφ: φ is not satisfiable g It can also be equivalently defined as follows: Definition 2. A language L belongs to the complexity class co − NP if there exists a polynomial function q(), and a deterministic polynomial-time TM M, such that x 2 L iff 8u 2 f0; 1gq(x);M(< x; u >) = 1: One can also define co−NP−completeness in a way similar to NP−completeness under polynomial- time reduction: Definition 3. A language L is said to be co − NP − complete iff 1. L 2 co − NP 0 2. Every other language L 2 co − NP is polynomial-time Karp reducible to L For example, SAT 2 co − NP − complete. Also, observe the following language: T AUT OLOGY = fφ: φ is true for all possible assignments g It can be easily verified that T AUT OLOGY 2 co − NP − complete. NOTE Therefore, similar to co − NP, we can define a complexity class co-C for every class C. co − C = fL: L¯ 2 Cg From this definition, it is easy to observe that P = co − P . 1 But, it is important to realise the difference between the classes C¯ and co − C.
    [Show full text]