Review of Basic Computational Complexity

Similar documents
Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

satisfiability (sat) Satisfiability unsatisfiability (unsat or sat complement) and validity Any Expression φ Can Be Converted into CNFs and DNFs

De Morgan s a Laws. De Morgan s laws say that. (φ 1 φ 2 ) = φ 1 φ 2, (φ 1 φ 2 ) = φ 1 φ 2.

Time-Space Tradeoffs for SAT

Lecture 1: Course Overview and Turing machine complexity

Complexity Theory 112. Space Complexity

Could we potentially place A in a smaller complexity class if we consider other computational models?

Hierarchy theorems. Evgenij Thorstensen V18. Evgenij Thorstensen Hierarchy theorems V18 1 / 18

Lecture 22: PSPACE

The Polynomial Hierarchy

Space is a computation resource. Unlike time it can be reused. Computational Complexity, by Fu Yuxi Space Complexity 1 / 44

CS154, Lecture 17: conp, Oracles again, Space Complexity

Polynomial Time Computation. Topics in Logic and Complexity Handout 2. Nondeterministic Polynomial Time. Succinct Certificates.

Lecture 21: Space Complexity (The Final Exam Frontier?)

COMPLEXITY THEORY. PSPACE = SPACE(n k ) k N. NPSPACE = NSPACE(n k ) 10/30/2012. Space Complexity: Savitch's Theorem and PSPACE- Completeness

Time Complexity. Definition. Let t : n n be a function. NTIME(t(n)) = {L L is a language decidable by a O(t(n)) deterministic TM}

Lecture 16: Time Complexity and P vs NP

CS151 Complexity Theory. Lecture 4 April 12, 2017

Computability and Complexity CISC462, Fall 2018, Space complexity 1

CMPT 710/407 - Complexity Theory Lecture 4: Complexity Classes, Completeness, Linear Speedup, and Hierarchy Theorems

1 PSPACE-Completeness

The space complexity of a standard Turing machine. The space complexity of a nondeterministic Turing machine

Lecture 9: Polynomial-Time Hierarchy, Time-Space Tradeoffs

MTAT Complexity Theory October 13th-14th, Lecture 6

DRAFT. Diagonalization. Chapter 4

Space Complexity. Master Informatique. Université Paris 5 René Descartes. Master Info. Complexity Space 1/26

CSE200: Computability and complexity Space Complexity

CSCI 1590 Intro to Computational Complexity

Lecture 3: Reductions and Completeness

Technische Universität München Summer term 2010 Theoretische Informatik August 2, 2010 Dr. J. Kreiker / Dr. M. Luttenberger, J. Kretinsky SOLUTION

Finish K-Complexity, Start Time Complexity

Polynomial Hierarchy

P = k T IME(n k ) Now, do all decidable languages belong to P? Let s consider a couple of languages:

Lecture 20: conp and Friends, Oracles in Complexity Theory

Complete problems for classes in PH, The Polynomial-Time Hierarchy (PH) oracle is like a subroutine, or function in

CSCI 1590 Intro to Computational Complexity

conp, Oracles, Space Complexity

Outline. Complexity Theory. Example. Sketch of a log-space TM for palindromes. Log-space computations. Example VU , SS 2018

CS5371 Theory of Computation. Lecture 23: Complexity VIII (Space Complexity)

Lecture 3. 1 Terminology. 2 Non-Deterministic Space Complexity. Notes on Complexity Theory: Fall 2005 Last updated: September, 2005.

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

6.045 Final Exam Solutions

Definition: conp = { L L NP } What does a conp computation look like?

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan 9/6/2004. Notes for Lecture 3

Undirected ST-Connectivity in Log-Space. Omer Reingold. Presented by: Thang N. Dinh CISE, University of Florida, Fall, 2010

Notes on Complexity Theory Last updated: December, Lecture 2

MTAT Complexity Theory October 20th-21st, Lecture 7

Algorithms & Complexity II Avarikioti Zeta

Computational Complexity: A Modern Approach. Draft of a book: Dated January 2007 Comments welcome!

Introduction to Computational Complexity

Lecture Notes Each circuit agrees with M on inputs of length equal to its index, i.e. n, x {0, 1} n, C n (x) = M(x).

Complexity Theory Final Exam

: Computational Complexity Lecture 3 ITCS, Tsinghua Univesity, Fall October 2007

Umans Complexity Theory Lectures

PSPACE, NPSPACE, L, NL, Savitch's Theorem. More new problems that are representa=ve of space bounded complexity classes

Space and Nondeterminism

Notes on Space-Bounded Complexity

Computational Complexity Theory

Space Complexity. Huan Long. Shanghai Jiao Tong University

CISC 4090 Theory of Computation

Lecture 3: Nondeterminism, NP, and NP-completeness

Logarithmic space. Evgenij Thorstensen V18. Evgenij Thorstensen Logarithmic space V18 1 / 18

Introduction to Complexity Classes. Marcin Sydow

CSC 5170: Theory of Computational Complexity Lecture 4 The Chinese University of Hong Kong 1 February 2010

CSC 5170: Theory of Computational Complexity Lecture 9 The Chinese University of Hong Kong 15 March 2010

CS5371 Theory of Computation. Lecture 24: Complexity IX (PSPACE-complete, L, NL, NL-complete)

More Complexity. Klaus Sutner Carnegie Mellon University. Fall 2017

Notes on Space-Bounded Complexity

Introduction to Complexity Theory. Bernhard Häupler. May 2, 2006

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Lecture 8. MINDNF = {(φ, k) φ is a CNF expression and DNF expression ψ s.t. ψ k and ψ is equivalent to φ}

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

TIME COMPLEXITY AND POLYNOMIAL TIME; NON DETERMINISTIC TURING MACHINES AND NP. THURSDAY Mar 20

Lecture 2: Tape reduction and Time Hierarchy

Complexity Theory. Knowledge Representation and Reasoning. November 2, 2005

Theory of Computation Time Complexity

Announcements. Problem Set 7 graded; will be returned at end of lecture. Unclaimed problem sets and midterms moved!

Chapter 1 - Time and Space Complexity. deterministic and non-deterministic Turing machine time and space complexity classes P, NP, PSPACE, NPSPACE

The Immerman-Szelepcesnyi Theorem and a hard problem for EXPSPACE

Lecture 20: PSPACE. November 15, 2016 CS 1010 Theory of Computation

Space Complexity. The space complexity of a program is how much memory it uses.

Advanced Topics in Theoretical Computer Science

Lecture 7: Polynomial time hierarchy

Computational Complexity Theory. Markus Bläser Universität des Saarlandes Draft January 23, 2014 and forever

Student#: CISC-462 Exam, December XY, 2017 Page 1 of 12

6.045J/18.400J: Automata, Computability and Complexity Final Exam. There are two sheets of scratch paper at the end of this exam.

1 Circuit Complexity. CS 6743 Lecture 15 1 Fall Definitions

CS5371 Theory of Computation. Lecture 23: Complexity VIII (Space Complexity)

Theory of Computation. Ch.8 Space Complexity. wherein all branches of its computation halt on all

Lecture 11: Proofs, Games, and Alternation

Computational Complexity CSCI-GA Subhash Khot Transcribed by Patrick Lin

Complexity. Complexity Theory Lecture 3. Decidability and Complexity. Complexity Classes

Chapter 7: Time Complexity

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

On Straight Forward Approaches to P vs NP

Lecture 2 (Notes) 1. The book Computational Complexity: A Modern Approach by Sanjeev Arora and Boaz Barak;

: On the P vs. BPP problem. 30/12/2016 Lecture 11

A Short History of Computational Complexity

Umans Complexity Theory Lectures

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Transcription:

Lecture 1 Review of Basic Computational Complexity March 30, 2004 Lecturer: Paul Beame Notes: Daniel Lowd 1.1 Preliminaries 1.1.1 Texts There is no one textbook that covers everything in this course. Some of the discoveries are simply too recent. For the first portion of the course, however, two supplementary texts may be useful. Michael Sipser, Introduction to the Theory of Computation. Christos Papadimitrion, Computational Complexity 1.1.2 Coursework Required work for this course consists of lecture notes and group assignments. Each student is assigned to take thorough lecture notes no more than twice during the quarter. The student must then type up the notes in expanded form in LATEX. Lecture notes may also contain additional references or details omitted in class. A LATEXstylesheet for this will soon be made available on the course webpage. Notes should be typed, submitted, revised, and posted to the course webpage within one week. Group assignments will be homework sets that may be done cooperatively. encouraged. Credit to collaborators should be given. There will be no tests. In fact, cooperation is 1.1.3 Overview The first part of the course will predominantly discuss complexity classes above NPrelate randomness, circuits, and counting, to P, NP, and the polynomial time hierarchy. One of the motivating goals is to consider how one might separate P from classes above P. Results covered will range from the 1970 s to recent work, including tradeoffs between time and space complexity. In the middle section of the course we will cover the powerful role that interaction has played in our understanding of computational complexity and, in particular, the powerful results on probabilistically checkable proofs (PCP). These ideas were developed in the late 1980 s continuing through the 1990 s. Finally, we will look at techniques for separating non-uniform complexity classes from P. These have been applied particularly to separate classes inside P from P. The results here are from the 1980 s and early 1990 s. 1

LECTURE 1. REVIEW OF BASIC COMPUTATIONAL COMPLEXITY 2 1.2 Basic Complexity Classes For this course we will use the following standard basis for defining complexity classes using multitape (offline) Turing machines. Definition 1.1. An (offline) Multitape Turing Machine is a Turing machine that consists of Finite state control, A read-only input tape, and Multiple read-write storage tapes (The read-only input tape will only be required for the definitions of space complexity.) Whenever we use the terminology Turing machine, or TM, we assume a multitape offline Turing machine unless otherwise specified; similarly for NTM in the nondeterministic case. The two main parameters for measuring resources used by a computation are Time = # of steps of the Turing machine, and Space = largest numbered cell accessed on any storage tape. Note that this is a small change from the definitions in the Sipser text which defines complexity classes in (a nonstandard way) using single tape Turing machines. Use of multiple tapes is important to distinguish between different subclasses in P. A single tape requires a Turing machine to move back and forth excessively, where a multitape Turing machine might be able to solve the problem much more efficiently. Lemma 1.1. For T (n) n, if language A can be decided in time T (n) by a multitape TM then a 1-tape TM can decide A in time O(T 2 (n)) time. The following example shows that this is tight. Consider the language PALINDROME = {x {0, 1} x = x R }. It is fairly straightforward to see how a multitape Turing machine could decide the language in linear time O( x ) by copying its input string in reverse onto a second tape and then comparing the two tapes character by character. It can also be shown that a single tape Turing machine must take longer: Theorem 1.2 (Cobham). PALINDROME requires time Ω(n 2 ) on 1-tape Turing machines. Proof. Exercise. One can simulate any multitape TM with only 2 tapes with a much smaller slowdown. Lemma 1.3 (Hennie-Stearns). For T (n) n, if language A can be decided in time T (n) by a multitape TM then a 1-tape TM can decide A in time O(T (n) log T (n)) time. The proof of this fact is much more involved and we will look at this proof in a more general context.

LECTURE 1. REVIEW OF BASIC COMPUTATIONAL COMPLEXITY 3 1.2.1 Time Complexity Definition 1.2. For T : N R +, TIME(T (n)) = {A {0, 1} A can be decided by a multitape TM M in O(T (n)) time}, and NTIME(T (n)) = {A {0, 1} A can be decided by a multitape NTM M in O(T (n)) time}. Definition 1.3. Recall the following derived time complexity classes, P = k TIME(n k ) NP = k NTIME(n k ) EXP = k TIME(2 nk ) NEXP = k NTIME(2 nk ) E = k TIME(k n ) = k TIME(2 kn ) NE = k NTIME(k n ) = k NTIME(2 kn ). Note that E and NE which we may encounter will be seen to be somewhat different from the others because they are not closed under polynomial-time reductions. 1.2.2 Polynomial-time Reductions Many-one/Karp/Mapping reductions Definition 1.4. A p m B iff there is a polynomial-time computable f such that x A f(x) B Turing/Cook/Oracle reductions Definition 1.5. An oracle TM M? is an ordinary Turing machine augmented with a separate read/write oracle query tape, oracle query state, and 2 oracle answer states, Y and N. When furnished with an oracle B, whenever M? enters the oracle query state, and enters state Y or N depending on whether or not the contents of the oracle query tape is in language B. Cost for an oracle query is a single time step. If answers to oracle queries are given by membership in B, then we refer to the oracle TM as M B. Definition 1.6. A p T B iff there is a polynomial-time oracle TM M? such that A = L(M B ) In other words, M can decide A in polynomial time given a subroutine for B that costs one time step per call. 1.2.3 NP-completeness Definition 1.7. L is NP-complete iff: 1. L NP

LECTURE 1. REVIEW OF BASIC COMPUTATIONAL COMPLEXITY 4 2. A NP, A p m L Theorem 1.4 (Cook). SAT = { ϕ ϕ is a satisfiable propositional logic formula} is NP-complete. Definition 1.8. For any complexity class C, define coc = {L L C}. For example, the class conp is the set of all languages whose complements are in NP. The following languages are both conp-complete: UNSAT = { ϕ φ is an unsatisfiable propositional logic formula } TAUT = { ϕ ϕ is a propositional logic tautology } SAT since Turing reductions don t distinguish between languages and their comple- Note: UNSAT P T ments. Definition 1.9. Define k and k as quantifiers over {0, 1} k the set of binary strings of length at most k. Using this notation we have an alternative characterization of NP in terms of polynomial-time verifiers. A NP there is some R P and polynomial p : N N such that A = {x p( x ) y (x, y) R}; or in functional rather than set form there is some polynomial-time computable R such that A = {x p( x ) y R(x, y)}. A conp there is some R P and polynomial p : N N such that A = {x p( x ) y (x, y) R}. 1.2.4 Space Complexity Definition 1.10. For S : N R +, define SPACE(S(n)) = {A {0, 1} A is decided by a multitape (offline) TM using storage O(S(n))} NSPACE(S(n)) = {A {0, 1} A is decided by a multitape (offline) NTM using storage O(S(n))} Definition 1.11. PSPACE = k SPACE(n k ) L = SPACE(log n) NL = NSPACE(log n) Theorem 1.5. For S(n) log n, (a) [Savitch] NSPACE(S(n)) SPACE(S 2 (n)), (b) [Immerman-Szelepcsenyi] NSPACE(S(n)) = co NSPACE(S(n)). Savitch s theorem implies that PSPACE could equally well have been defined using nondeterministic space complexity. Theorem 1.6. For S(n) log n, NSPACE(S(n)) TIME(2 O(S(n)) ). Proof idea. An NSPACE(S(n)) computation accepts an input x iff there is a computation path from the starting configuration s to a unique accepting configuration t in the graph of all possible configurations with input x, which there are 2 O(S(n)) nodes. This can be solved in time linear in the size of the graph using BFS or DFS.

LECTURE 1. REVIEW OF BASIC COMPUTATIONAL COMPLEXITY 5 Theorem 1.7. NTIME(T (n)) SPACE(T (n)). Proof idea. Each computation of the NTM of length ct (n) visits at most ct (n) + 1 cells on each storage tape. The algorithm successively generates all possible sequences of nondeterministic choices of length ct (n) and exhaustively tries each sequence. Corollary 1.8. L NL P NP conp PSPACE EXP NEXP. Definition 1.12. A language L is PSPACE-complete iff 1. L PSPACE, and 2. A PSPACE, A p m L. Definition 1.13. Define TQBF = { Ψ k, Q 1, Q 2,..., Q k {, } such that Ψ = Q 1 x 1... Q k x k ϕ, where ϕ is a propositional logic formula in x 1, x 2,..., x n, and Ψ evaluates to true }. Theorem 1.9. TQBF is PSPACE-complete. 1.2.5 Complexity Class Hierarchy Theorems Definition 1.14. T (n) is time-constructable iff there is a TM running in time T (n) that computes 1 n T (n), where T (n) is expressed in binary. S(n) is space-constructable iff there is a TM running in space S(n) that computes the function 1 n S(n), where S(n) is expressed in binary. Theorem 1.10. 1. If g(n) log(n) is space-constructable and f(n) is o(g(n)) then SPACE(f(n)) SPACE(g(n)), and NSPACE(f(n)) NSPACE(g(n)). 2. If g(n) n is time constructable and f(n) log f(n) is o(g(n)) then TIME(f(n)) TIME(g(n)). Proof Sketch. The general idea of all of these theorems is to diagonalize over all TM s with time (space) bounded by f(n). In order to do this one diagonalizes over all Turing machines but with an extra clock (in the case of time) or space limiter (in the case of space) to make sure that the machine involved won t take too many resources. In the case of the space hierarchy, this diagonalization must be done by a single Turing machine so in order to simulate other Turing machines with larger alphabets there must be a constant-factor slowdown in the simulation. The Immerman-Szelepcsenyi theorem allows the complementation to take place in the case of nondeterministic space. For the time hierarchy the proof in the multitape case is very different from the single tape case given in Sipser s text despite the fact that the claim is the same. In the single tape case, the O(log f(n)) factor is due to the requirement to update the clock (and shift it along the tape) at each step. In the multitape case, the O(log f(n)) factor slowdown is due the requirement of having a machine with a fixed number of tapes simulate machines with arbitrary numbers of tapes. Corollary 1.11. NL PSPACE; P EXP.

LECTURE 1. REVIEW OF BASIC COMPUTATIONAL COMPLEXITY 6 1.2.6 Relativized Complexity Classes Definition 1.15. Given a language A, we can define P A = {B B p T A}. That is, to obtain the languages in P A we can take any polynomial-time oracle TM M?, plug in A as the oracle and look at what language the machine accepts. This yields an alternate version of the definition that can also be extended to nondeterministic Turing machines. Definition 1.16. For any language A define P A = {L(M A ) M? is a polynomial-time oracle TM } and NP A = {L(M A ) M? is a polynomial-time oracle NTM }. For any complexity class C define P C = A C PA, NP C = A C NPA, Remark. Note that P SAT = P NP by the fact that SAT is NP-complete under polynomial-time Turing reductions.