Complexity Theory

Total Page:16

File Type:pdf, Size:1020Kb

Complexity Theory Complexity Theory Anuj Dawar Texts The main texts for the course are: Computational Complexity. Christos H. Papadimitriou. Introduction to the Theory of Computation. Michael Sipser. Anuj Dawar Complexity Theory References Other useful references include: Computers and Intractability: A guide to the theory of NP-completeness. Michael R. Garey and David S. Johnson. P, NP and NP-completeness. Oded Goldreich. Computability and Complexity from a Programming Perspective. Neil Jones. Computational Complexity - A Modern Approach. Sanjeev Arora and Boaz Barak. Anuj Dawar Complexity Theory Outline A rough lecture-by-lecture guide, with relevant sections from the text by Papadimitriou (or Sipser, where marked with an S). • Algorithms and problems. 1.11.3. • Time and space. 2.12.5, 2.7. • Time Complexity classes. 7.1, S7.2. • Nondeterminism. 2.7, 9.1, S7.3. • NP-completeness. 8.18.2, 9.2. • Graph-theoretic problems. 9.3 Anuj Dawar Complexity Theory Outline - contd. • Sets, numbers and scheduling. 9.4 • coNP. 10.110.2. • Cryptographic complexity. 12.112.2. • Space Complexity 7.1, 7.3, S8.1. • Hierarchy 7.2, S9.1. • Descriptive Complexity 5.7, 8.3. Anuj Dawar Complexity Theory Algorithms and Problems Insertion Sort runs in time O(n2), while Merge Sort is an O(n log n) algorithm. The rst half of this statement is short for: If we count the number of steps performed by the Insertion Sort algorithm on an input of size n, taking the largest such number, from among all inputs of that size, then the function of n so dened is eventually bounded by a constant multiple of n2. It makes sense to compare the two algorithms, because they seek to solve the same problem. But, what is the complexity of the sorting problem? Anuj Dawar Complexity Theory Lower and Upper Bounds What is the running time complexity of the fastest algorithm that sorts a list? By the analysis of the Merge Sort algorithm, we know that this is no worse than O(n log n). The complexity of a particular algorithm establishes an upper bound on the complexity of the problem. To establish a lower bound, we need to show that no possible algorithm, including those as yet undreamed of, can do better. In the case of sorting, we can establish a lower bound of Ω(n log n), showing that Merge Sort is asymptotically optimal. Sorting is a rare example where known upper and lower bounds match. Anuj Dawar Complexity Theory Review The complexity of an algorithm (whether measuring number of steps, or amount of memory) is usually described asymptotically: Denition For functions f : IN ! IN and g : IN ! IN, we say that: • f = O(g), if there is an n0 2 IN and a constant c such that for all n > n0, f (n) ≤ cg(n); • f = Ω(g), if there is an n0 2 IN and a constant c such that for all n > n0, f (n) ≥ cg(n). • f = θ(g) if f = O(g) and f = Ω(g). Usually, O is used for upper bounds and Ω for lower bounds. Anuj Dawar Complexity Theory Lower Bound on Sorting An algorithm A sorting a list of n distinct numbers a1;:::; an. ai < aj ? ap < aq ? ak < al ? ? . ar < as . done done done done done To work for all permutations of the input list, the tree must have at least n! leaves and therefore height at least log2(n!) = θ(n log n). Anuj Dawar Complexity Theory Travelling Salesman Given • V a set of nodes. • c : V × V ! IN a cost matrix. Find an ordering v1;:::; vn of V for which the total cost: n−1 X c(vn; v1) + c(vi ; vi+1) i=1 is the smallest possible. Anuj Dawar Complexity Theory Complexity of TSP Obvious algorithm: Try all possible orderings of V and nd the one with lowest cost. The worst case running time is θ(n!). Lower bound: An analysis like that for sorting shows a lower bound of Ω(n log n). Upper bound: The currently fastest known algorithm has a running time of O(n22n). Between these two is the chasm of our ignorance. Anuj Dawar Complexity Theory Formalising Algorithms To prove a lower bound on the complexity of a problem, rather than a specic algorithm, we need to prove a statement about all algorithms for solving it. In order to prove facts about all algorithms, we need a mathematically precise denition of algorithm. We will use the Turing machine. The simplicity of the Turing machine means it's not useful for actually expressing algorithms, but very well suited for proofs about all algorithms. Anuj Dawar Complexity Theory Turing Machines For our purposes, a Turing Machine consists of: • Q a nite set of states; • Σ a nite set of symbols, including t and .. • s 2 Q an initial state; • δ :(Q × Σ) ! (Q [ facc; rejg) × Σ × fL; R; Sg A transition function that species, for each state and symbol a next state (or accept acc or reject rej), a symbol to overwrite the current symbol, and a direction for the tape head to move (L left, R right, or S - stationary) Anuj Dawar Complexity Theory Congurations A complete description of the conguration of a machine can be given if we know what state it is in, what are the contents of its tape, and what is the position of its head. This can be summed up in a simple triple: Denition A conguration is a triple (q; w; u), where q 2 Q and w; u 2 Σ? The intuition is that (q; w; u) represents a machine in state q with the string wu on its tape, and the head pointing at the last symbol in w. The conguration of a machine completely determines the future behaviour of the machine. Anuj Dawar Complexity Theory Computations Given a machine M = (Q; Σ; s; δ) we say that a conguration (q; w; u) yields in one step (q0; w 0; u0), written 0 0 0 (q; w; u) !M (q ; w ; u ) if • w = va ; • δ(q; a) = (q0; b; D); and • either D = L and w 0 = v and u0 = bu or D = S and w 0 = vb and u0 = u or D = R and w 0 = vbc and u0 = x, where u = cx. If u is empty, then w 0 = vbt and u0 is empty. Anuj Dawar Complexity Theory Computations The relation ? is the reexive and transitive closure of . !M !M A sequence of congurations c1;:::; cn, where for each i, ci !M ci+1, is called a computation of M. The language L(M) ⊆ Σ? accepted by the machine M is the set of strings ? acc for some and fx j (s; .; x) !M ( ; w; u) w ug A machine M is said to halt on input x if for some w and u, either ? acc or ? rej (s; .; x) !M ( ; w; u) (s; .; x) !M ( ; w; u) Anuj Dawar Complexity Theory Decidability A language L ⊆ Σ? is recursively enumerable if it is L(M) for some M. A language L is decidable if it is L(M) for some machine M which halts on every input. A language L is semi-decidable if it is recursively enumerable. A function f :Σ? ! Σ? is computable, if there is a machine M, such that for all , ? acc x (s; .; x) !M ( ;.f (x);") Anuj Dawar Complexity Theory Example Consider the machine with δ given by: . 0 1 t s s; .; R rej; 0; S rej; 1; S q; t; R q rej; .; R q; 1; R q; 1; R q0; 0; R q0 rej; .; R rej; 0; S q0; 1; L acc; t; S This machine, when started in conguration (s; .; t1n0) eventually halts in conguration (acc;. t 1n+10t;"). Anuj Dawar Complexity Theory Multi-Tape Machines The formalisation of Turing machines extends in a natural way to multi-tape machines. For instance a machine with k tapes is specied by: • Q, Σ, s; and • δ :(Q × Σk ) ! Q [ facc; rejg × (Σ × fL; R; Sg)k Similarly, a conguration is of the form: (q; w1; u1;:::; wk ; uk ) Anuj Dawar Complexity Theory Running Time With any Turing machine M, we associate a function r : IN ! IN called the running time of M. r(n) is dened to be the largest value R such that there is a string x of length n so that the computation of M starting with conguration (s; .; x) is of length R (i.e. has R successive congurations in it) and ends with an accepting conguration. In short, r(n) is the length of the longest accepting computation of M on an input of length n. Anuj Dawar Complexity Theory Complexity For any function f : IN ! IN, we say that a language L is in TIME(f ) if there is a machine M = (Q; Σ; s; δ), such that: • L = L(M); and • The running time of M is O(f ). Similarly, we dene SPACE(f ) to be the languages accepted by a machine which uses O(f (n)) tape cells on inputs of length n. In dening space complexity, we assume a machine M, which has a read-only input tape, and a separate work tape. We only count cells on the work tape towards the complexity. Anuj Dawar Complexity Theory Decidability and Complexity For every decidable language L, there is a computable function f such that L 2 TIME(f ) If L is a semi-decidable (but not decidable) language accepted by M, then there is no computable function f such that every accepting computation of M, on input of length n is of length at most f (n).
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]
  • On the Randomness Complexity of Interactive Proofs and Statistical Zero-Knowledge Proofs*
    On the Randomness Complexity of Interactive Proofs and Statistical Zero-Knowledge Proofs* Benny Applebaum† Eyal Golombek* Abstract We study the randomness complexity of interactive proofs and zero-knowledge proofs. In particular, we ask whether it is possible to reduce the randomness complexity, R, of the verifier to be comparable with the number of bits, CV , that the verifier sends during the interaction. We show that such randomness sparsification is possible in several settings. Specifically, unconditional sparsification can be obtained in the non-uniform setting (where the verifier is modelled as a circuit), and in the uniform setting where the parties have access to a (reusable) common-random-string (CRS). We further show that constant-round uniform protocols can be sparsified without a CRS under a plausible worst-case complexity-theoretic assumption that was used previously in the context of derandomization. All the above sparsification results preserve statistical-zero knowledge provided that this property holds against a cheating verifier. We further show that randomness sparsification can be applied to honest-verifier statistical zero-knowledge (HVSZK) proofs at the expense of increasing the communica- tion from the prover by R−F bits, or, in the case of honest-verifier perfect zero-knowledge (HVPZK) by slowing down the simulation by a factor of 2R−F . Here F is a new measure of accessible bit complexity of an HVZK proof system that ranges from 0 to R, where a maximal grade of R is achieved when zero- knowledge holds against a “semi-malicious” verifier that maliciously selects its random tape and then plays honestly.
    [Show full text]
  • Hierarchy Theorems
    Hierarchy Theorems Peter Mayr Computability Theory, April 14, 2021 So far we proved the following inclusions: L ⊆ NL ⊆ P ⊆ NP ⊆ PSPACE ⊆ EXPTIME ⊆ EXPSPACE Question Which are proper? Space constructible functions In simulations we often want to fix s(n) space on the working tape before starting the actual computation without accruing any overhead in space complexity. Definition s(n) ≥ log(n) is space constructible if there exists N 2 N and a DTM with input tape that on any input of length n ≥ N uses and marks off s(n) cells on its working tape and halts. Note Equivalently, s(n) is space constructible iff there exists a DTM with input and output that on input 1n computes s(n) in space O(s(n)). Example log n; nk ; 2n are space constructible. E.g. log2 n space is constructed by counting the length n of the input in binary. Little o-notation Definition + For f ; g : N ! R we say f = o(g) (read f is little-o of g) if f (n) lim = 0: n!1 g(n) Intuitively: g grows much faster than f . Note I f = o(g) ) f = O(g), but not conversely. I f 6= o(f ) Separating space complexity classes Space Hierarchy Theorem Let s(n) be space constructible and r(n) = o(s(n)). Then DSPACE(r(n)) ( DSPACE(s(n)). Proof. Construct L 2 DSPACE(s(n))nDSPACE(r(n)) by diagonalization. Define DTM D such that on input x of length n: 1. D marks s(n) space on working tape.
    [Show full text]
  • On the NP-Completeness of the Minimum Circuit Size Problem
    On the NP-Completeness of the Minimum Circuit Size Problem John M. Hitchcock∗ A. Pavany Department of Computer Science Department of Computer Science University of Wyoming Iowa State University Abstract We study the Minimum Circuit Size Problem (MCSP): given the truth-table of a Boolean function f and a number k, does there exist a Boolean circuit of size at most k computing f? This is a fundamental NP problem that is not known to be NP-complete. Previous work has studied consequences of the NP-completeness of MCSP. We extend this work and consider whether MCSP may be complete for NP under more powerful reductions. We also show that NP-completeness of MCSP allows for amplification of circuit complexity. We show the following results. • If MCSP is NP-complete via many-one reductions, the following circuit complexity amplifi- Ω(1) cation result holds: If NP\co-NP requires 2n -size circuits, then ENP requires 2Ω(n)-size circuits. • If MCSP is NP-complete under truth-table reductions, then EXP 6= NP \ SIZE(2n ) for some > 0 and EXP 6= ZPP. This result extends to polylog Turing reductions. 1 Introduction Many natural NP problems are known to be NP-complete. Ladner's theorem [14] tells us that if P is different from NP, then there are NP-intermediate problems: problems that are in NP, not in P, but also not NP-complete. The examples arising out of Ladner's theorem come from diagonalization and are not natural. A canonical candidate example of a natural NP-intermediate problem is the Graph Isomorphism (GI) problem.
    [Show full text]
  • Dspace 6.X Documentation
    DSpace 6.x Documentation DSpace 6.x Documentation Author: The DSpace Developer Team Date: 27 June 2018 URL: https://wiki.duraspace.org/display/DSDOC6x Page 1 of 924 DSpace 6.x Documentation Table of Contents 1 Introduction ___________________________________________________________________________ 7 1.1 Release Notes ____________________________________________________________________ 8 1.1.1 6.3 Release Notes ___________________________________________________________ 8 1.1.2 6.2 Release Notes __________________________________________________________ 11 1.1.3 6.1 Release Notes _________________________________________________________ 12 1.1.4 6.0 Release Notes __________________________________________________________ 14 1.2 Functional Overview _______________________________________________________________ 22 1.2.1 Online access to your digital assets ____________________________________________ 23 1.2.2 Metadata Management ______________________________________________________ 25 1.2.3 Licensing _________________________________________________________________ 27 1.2.4 Persistent URLs and Identifiers _______________________________________________ 28 1.2.5 Getting content into DSpace __________________________________________________ 30 1.2.6 Getting content out of DSpace ________________________________________________ 33 1.2.7 User Management __________________________________________________________ 35 1.2.8 Access Control ____________________________________________________________ 36 1.2.9 Usage Metrics _____________________________________________________________
    [Show full text]
  • NP-Completeness Part I
    NP-Completeness Part I Outline for Today ● Recap from Last Time ● Welcome back from break! Let's make sure we're all on the same page here. ● Polynomial-Time Reducibility ● Connecting problems together. ● NP-Completeness ● What are the hardest problems in NP? ● The Cook-Levin Theorem ● A concrete NP-complete problem. Recap from Last Time The Limits of Computability EQTM EQTM co-RE R RE LD LD ADD HALT ATM HALT ATM 0*1* The Limits of Efficient Computation P NP R P and NP Refresher ● The class P consists of all problems solvable in deterministic polynomial time. ● The class NP consists of all problems solvable in nondeterministic polynomial time. ● Equivalently, NP consists of all problems for which there is a deterministic, polynomial-time verifier for the problem. Reducibility Maximum Matching ● Given an undirected graph G, a matching in G is a set of edges such that no two edges share an endpoint. ● A maximum matching is a matching with the largest number of edges. AA maximummaximum matching.matching. Maximum Matching ● Jack Edmonds' paper “Paths, Trees, and Flowers” gives a polynomial-time algorithm for finding maximum matchings. ● (This is the same Edmonds as in “Cobham- Edmonds Thesis.) ● Using this fact, what other problems can we solve? Domino Tiling Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling Solving Domino Tiling The Setup ● To determine whether you can place at least k dominoes on a crossword grid, do the following: ● Convert the grid into a graph: each empty cell is a node, and any two adjacent empty cells have an edge between them.
    [Show full text]
  • The Complexity Zoo
    The Complexity Zoo Scott Aaronson www.ScottAaronson.com LATEX Translation by Chris Bourke [email protected] 417 classes and counting 1 Contents 1 About This Document 3 2 Introductory Essay 4 2.1 Recommended Further Reading ......................... 4 2.2 Other Theory Compendia ............................ 5 2.3 Errors? ....................................... 5 3 Pronunciation Guide 6 4 Complexity Classes 10 5 Special Zoo Exhibit: Classes of Quantum States and Probability Distribu- tions 110 6 Acknowledgements 116 7 Bibliography 117 2 1 About This Document What is this? Well its a PDF version of the website www.ComplexityZoo.com typeset in LATEX using the complexity package. Well, what’s that? The original Complexity Zoo is a website created by Scott Aaronson which contains a (more or less) comprehensive list of Complexity Classes studied in the area of theoretical computer science known as Computa- tional Complexity. I took on the (mostly painless, thank god for regular expressions) task of translating the Zoo’s HTML code to LATEX for two reasons. First, as a regular Zoo patron, I thought, “what better way to honor such an endeavor than to spruce up the cages a bit and typeset them all in beautiful LATEX.” Second, I thought it would be a perfect project to develop complexity, a LATEX pack- age I’ve created that defines commands to typeset (almost) all of the complexity classes you’ll find here (along with some handy options that allow you to conveniently change the fonts with a single option parameters). To get the package, visit my own home page at http://www.cse.unl.edu/~cbourke/.
    [Show full text]
  • University Microfilms International 300 North Zeeb Road Ann Arbor, Michigan 48106 USA St John's Road
    INFORMATION TO USERS This material was produced from a microfilm copy of the original document. While the most advanced technological means to photograph and reproduce this document have been used, the quality is heavily dependant upon the quality of the original submitted. The following explanation of techniques is provided to help you understand markings or patterns which may appear on this reproduction. 1. The sign or "target" for pages apparently lacking from the document photographed is "Missing Page(s)". If it was possible to obtain the missing page(s) or section, they are spliced into the film along with adjacent pages. This may have necessitated cutting thru an image and duplicating adjacent pages to insure you complete continuity. 2. When an image on the film is obliterated with a large round black mark, it is an indication that the photographer suspected that the copy may have moved during exposure and thus cause a blurred image. You w ill find a good image of the page in the adjacent frame. 3. When a map, drawing or chart, etc., was part of the material being photographed the photographer followed a definite method in "sectioning" the material. It is customary to begin photoing at the upper left hand corner of a large sheet and to continue photoing from left to right in equal sections with a small overlap. If necessary, sectioning is continued again — beginning below the first row and continuing on until complete. 4. The majority of users indicate that the textual content is of greatest value, however, a somewhat higher quality reproduction could be made from "photographs" if essential to the understanding of the dissertation.
    [Show full text]
  • The Correlation Among Software Complexity Metrics with Case Study
    International Journal of Advanced Computer Research (ISSN (print): 2249-7277 ISSN (online): 2277-7970) Volume-4 Number-2 Issue-15 June-2014 The Correlation among Software Complexity Metrics with Case Study Yahya Tashtoush1, Mohammed Al-Maolegi2, Bassam Arkok3 Abstract software product attributes such as functionality, quality, complexity, efficiency, reliability or People demand for software quality is growing maintainability. For example, a higher number of increasingly, thus different scales for the software code lines will lead to greater software complexity are growing fast to handle the quality of software. and so on. The software complexity metric is one of the measurements that use some of the internal The complexity of software effects on maintenance attributes or characteristics of software to know how activities like software testability, reusability, they effect on the software quality. In this paper, we understandability and modifiability. Software cover some of more efficient software complexity complexity is defined as ―the degree to which a metrics such as Cyclomatic complexity, line of code system or component has a design or implementation and Hallstead complexity metric. This paper that is difficult to understand and verify‖ [1]. All the presents their impacts on the software quality. It factors that make program difficult to understand are also discusses and analyzes the correlation between responsible for complexity. So it is necessary to find them. It finally reveals their relation with the measurements for software to reduce the impacts of number of errors using a real dataset as a case the complexity and guarantee the quality at the same study. time as much as possible.
    [Show full text]
  • Complexity Theory
    Complexity Theory Course Notes Sebastiaan A. Terwijn Radboud University Nijmegen Department of Mathematics P.O. Box 9010 6500 GL Nijmegen the Netherlands [email protected] Copyright c 2010 by Sebastiaan A. Terwijn Version: December 2017 ii Contents 1 Introduction 1 1.1 Complexity theory . .1 1.2 Preliminaries . .1 1.3 Turing machines . .2 1.4 Big O and small o .........................3 1.5 Logic . .3 1.6 Number theory . .4 1.7 Exercises . .5 2 Basics 6 2.1 Time and space bounds . .6 2.2 Inclusions between classes . .7 2.3 Hierarchy theorems . .8 2.4 Central complexity classes . 10 2.5 Problems from logic, algebra, and graph theory . 11 2.6 The Immerman-Szelepcs´enyi Theorem . 12 2.7 Exercises . 14 3 Reductions and completeness 16 3.1 Many-one reductions . 16 3.2 NP-complete problems . 18 3.3 More decision problems from logic . 19 3.4 Completeness of Hamilton path and TSP . 22 3.5 Exercises . 24 4 Relativized computation and the polynomial hierarchy 27 4.1 Relativized computation . 27 4.2 The Polynomial Hierarchy . 28 4.3 Relativization . 31 4.4 Exercises . 32 iii 5 Diagonalization 34 5.1 The Halting Problem . 34 5.2 Intermediate sets . 34 5.3 Oracle separations . 36 5.4 Many-one versus Turing reductions . 38 5.5 Sparse sets . 38 5.6 The Gap Theorem . 40 5.7 The Speed-Up Theorem . 41 5.8 Exercises . 43 6 Randomized computation 45 6.1 Probabilistic classes . 45 6.2 More about BPP . 48 6.3 The classes RP and ZPP .
    [Show full text]
  • Theory of Computation
    A Universal Program (4) Theory of Computation Prof. Michael Mascagni Florida State University Department of Computer Science 1 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) Enumeration Theorem Definition. We write Wn = fx 2 N j Φ(x; n) #g: Then we have Theorem 4.6. A set B is r.e. if and only if there is an n for which B = Wn. Proof. This is simply by the definition ofΦ( x; n). 2 Note that W0; W1; W2;::: is an enumeration of all r.e. sets. 2 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) The Set K Let K = fn 2 N j n 2 Wng: Now n 2 K , Φ(n; n) #, HALT(n; n) This, K is the set of all numbers n such that program number n eventually halts on input n. 3 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) K Is r.e. but Not Recursive Theorem 4.7. K is r.e. but not recursive. Proof. By the universality theorem, Φ(n; n) is partially computable, hence K is r.e. If K¯ were also r.e., then by the enumeration theorem, K¯ = Wi for some i. We then arrive at i 2 K , i 2 Wi , i 2 K¯ which is a contradiction.
    [Show full text]
  • CSE200 Lecture Notes – Space Complexity
    CSE200 Lecture Notes – Space Complexity Lecture by Russell Impagliazzo Notes by Jiawei Gao February 23, 2016 Motivations for space-bounded computation: Memory is an important resource. • Space classes characterize the difficulty of important problems • Cautionary tale – sometimes, things don’t work out like we expected. • We adopt the following conventions: Input tape: read only, doesn’t count. • Output tape: (for functions) write only, doesn’t count. • Work tapes: read, write, counts. • Definition 1. SPACE(S(n)) (or DSPACE(S(n))) is the class of problems solvable by deterministic TM using O(S(n)) memory locations. NSPACE(S(n)) is the class of problems solvable by nondeterministic TM using O(S(n)) memory locations. co-NSPACE(S(n)) = L L NSPACE(S(n)) . f j 2 g Definition 2. S k PSPACE = k SPACE(n ) L = SPACE(log n) NL = NSPACE(log n) Why aren’t we interested in space complexity below logaritimic space? Because on inputs of length n, we need log space to keep track of memory addresses / tape positions. Similar as time complexity, there is a hierarchy theorem is space complexity. Theorem 3 (Space Hierarchy Theorem). If S1(n) and S2(n) are space-computable, and S1(n) = o(S2(n)), then SPACE(S1(n)) SPACE(S2(n)) The Space Hierarchy theorem( is “nicer” than the Time Hierarchy Theorem, because it just needs S1(n) = o(S2(n)), instead of a log factor in the Time Hierarchy Theorem. It’s proved by a straightforward diagonalization method. 1 CSE 200 Winter 2016 1 Space complexity vs. time complexity Definition 4.
    [Show full text]