CS151 Complexity Theory. Lecture 4 April 12, 2017

Similar documents
Complexity Theory 112. Space Complexity

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

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

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

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

CSCI 1590 Intro to Computational Complexity

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

Space and Nondeterminism

Review of Basic Computational Complexity

6.045 Final Exam Solutions

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

1 PSPACE-Completeness

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

Advanced topic: Space complexity

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

CS151 Complexity Theory

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

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

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

Umans Complexity Theory Lectures

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

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

Theory of Computation Space Complexity. (NTU EE) Space Complexity Fall / 1

Notes on Space-Bounded Complexity

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

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

Lecture 8: Complete Problems for Other Complexity Classes

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

Notes on Space-Bounded Complexity

CSCI 1590 Intro to Computational Complexity

Introduction to Computational Complexity

CSE200: Computability and complexity Space Complexity

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

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

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

Umans Complexity Theory Lectures

Lecture 17. In this lecture, we will continue our discussion on randomization.

Lecture 3: Reductions and Completeness

Space Complexity. then the space required by M on input x is. w i u i. F ) on. September 27, i=1

CS256 Applied Theory of Computation

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).

6.840 Language Membership

The Immerman-Szelepcesnyi Theorem and a hard problem for EXPSPACE

Lecture 7: The Polynomial-Time Hierarchy. 1 Nondeterministic Space is Closed under Complement

Lecture 22: PSPACE

CS278: Computational Complexity Spring Luca Trevisan

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

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

Time and space classes

Lecture 16: Time Complexity and P vs NP

Lecture 3: Nondeterminism, NP, and NP-completeness

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

Circuits. Lecture 11 Uniform Circuit Complexity

Theory of Computation CS3102 Spring 2015 A tale of computers, math, problem solving, life, love and tragic death

SOLUTION: SOLUTION: SOLUTION:

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

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

The Polynomial Hierarchy

Lecture 5: The Landscape of Complexity Classes

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

Lecture 20: conp and Friends, Oracles in Complexity Theory

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

Space Complexity. Huan Long. Shanghai Jiao Tong University

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

A.Antonopoulos 18/1/2010

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

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

conp, Oracles, Space Complexity

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

Ma/CS 117c Handout # 5 P vs. NP

Lecture 9: PSPACE. PSPACE = DSPACE[n O(1) ] = NSPACE[n O(1) ] = ATIME[n O(1) ]

More Complexity. Klaus Sutner Carnegie Mellon University. Fall 2017

Lecture 19: Finish NP-Completeness, conp and Friends

P vs. NP Classes. Prof. (Dr.) K.R. Chowdhary.

Friday Four Square! Today at 4:15PM, Outside Gates

Computability and Complexity CISC462, Fall 2018, Space complexity 1

CS21 Decidability and Tractability

Lecture 6: Oracle TMs, Diagonalization Limits, Space Complexity

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

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

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

CS5371 Theory of Computation. Lecture 19: Complexity IV (More on NP, NP-Complete)

Complexity Theory Part II

Finish K-Complexity, Start Time Complexity

Lecture 11: Proofs, Games, and Alternation

Lecture 7: Polynomial time hierarchy

CSCI 1590 Intro to Computational Complexity

Lecture 8: Alternatation. 1 Alternate Characterizations of the Polynomial Hierarchy

COMPLEXITY THEORY. Lecture 17: The Polynomial Hierarchy. TU Dresden, 19th Dec Markus Krötzsch Knowledge-Based Systems

Chapter 7: Time Complexity

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

ECE 695 Numerical Simulations Lecture 2: Computability and NPhardness. Prof. Peter Bermel January 11, 2017

BBM402-Lecture 11: The Class NP

Universal Algebra and Computational Complexity Lecture 1

CS151 Complexity Theory. Lecture 13 May 15, 2017

Week 2: Defining Computation

CS154, Lecture 13: P vs NP

U.C. Berkeley CS278: Computational Complexity Professor Luca Trevisan August 30, Notes for Lecture 1

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

1 Deterministic Turing Machines

Transcription:

CS151 Complexity Theory Lecture 4

A puzzle A puzzle: two kinds of trees depth n...... cover up nodes with c colors promise: never color arrow same as blank determine which kind of tree in poly(n, c) steps?

A puzzle depth n......

A puzzle depth n......

Introduction Ideas depth-first-search; stop if see how many times may we see a given arrow color? at most n+1 pruning rule? if see a color > n+1 times, it can t be an arrow node; prune # nodes visited before know answer? at most c(n+2)

Sparse languages and NP We often say NP-compete languages are hard More accurate: NP-complete languages are expressive lots of languages reduce to them

Sparse languages and NP Sparse language: one that contains at most poly(n) strings of length n not very expressive can we show this cannot be NP-complete (assuming P NP)? yes: Mahaney 82 (homework problem) Unary language: subset of 1* (at most n strings of length n)

Sparse languages and NP Theorem (Berman 78): if a unary language is NP-complete then P = NP. Proof: let U 1* be a unary language and assume SAT U via reduction R φ(x 1,x 2,,x n ) instance of SAT

Sparse languages and NP self-reduction tree for φ: φ(x 1,x 2,,x n ) φ(0,x 2,,x n ) φ(1,x 2,,x n ) φ(0,0,,0)... satisfying assignment. φ(1,1,,1)

Sparse languages and NP applying reduction R: R(φ(x 1,x 2,,x n )) R(φ(0,x 2,,x n )) R(φ(1,x 2,,x n )) R(φ(0,0,,0))... satisfying assignment. R(φ(1,1,,1))

Sparse languages and NP on input of length m = φ(x 1,x 2,,x n ), R produces string of length p(m) R s different outputs are colors 1 color for strings not in 1 * at most p(m) other colors puzzle solution can solve SAT in poly(p(m)+1, n+1) = poly(m) time!

Summary nondeterministic time classes: NP, conp, NEXP NTIME Hierarchy Theorem: NP NEXP major open questions:?? P = NP NP = conp

Summary NP- intermediate problems (unless P = NP) technique: delayed diagonalization unary languages not NP-complete (unless P = NP) true for sparse languages as well (homework) complete problems: circuit SAT is NP-complete UNSAT is conp-complete succinct circuit SAT is NEXP-complete

Summary NEXP conexp EXP PSPACE NP conp P L

Remainder of lecture nondeterminism applied to space reachability two surprises: Savitch s Theorem Immerman/Szelepcsényi Theorem

Nondeterministic space NSPACE(f(n)) = languages decidable by a multi-tape NTM that touches at most f(n) squares of its work tapes along any computation path, where n is the input length, and f :N! N

Nondeterministic space Robust nondeterministic space classes: NL = NSPACE(log n) NPSPACE = k NSPACE(n k )

Reachability Recall: at most n k configurations of given NTM M running in NSPACE(log n). easy to determine if C yields C in one step configuration graph for M on input x: q start x 1 x 2 x 3 x n x L x L q accept q reject q accept q reject

Reachability Conclude: NL P and NPSPACE EXP S-T-Connectivity (STCONN): given directed graph G = (V, E) and nodes s, t, is there a path from s to t? Theorem: STCONN is NL-complete under logspace reductions.

Reachability Proof: in NL: guess path from s to t one node at a time given L NL decided by NTM M construct configuration graph for M on input x (can be done in logspace) s = starting configuration; t = q accept

Two startling theorems Strongly believe P NP nondeterminism seems to add enormous power for space: Savitch 70: NPSPACE = PSPACE and NL SPACE(log 2 n)

Two startling theorems Strongly believe NP conp seems impossible to convert existential into universal for space: Immerman/Szelepscényi 87/ 88: NL = conl

Savitch s Theorem Theorem: STCONN SPACE(log 2 n) Corollary: NL SPACE(log 2 n) Corollary: NPSPACE = PSPACE

Proof of Theorem input: G = (V, E), two nodes s and t recursive algorithm: /* return true iff path from x to y of length at most 2 i */ PATH(x, y, i) if i = 0 return ( x = y or (x, y) E ) /* base case */ for z in V if PATH(x, z, i-1) and PATH(z, y, i-1) return(true); return(false); end

Proof of Theorem answer to STCONN: PATH(s, t, log n) space used: (depth of recursion) x (size of stack record ) depth = log n claim stack record: (x, y, i) sufficient size O(log n) when return from PATH(a, b, i) can figure out what to do next from record (a, b, i) and previous record

Nondeterministic space Robust nondeterministic space classes: NL = NSPACE(log n) NPSPACE = k NSPACE(n k )

Second startling theorem Strongly believe NP conp seems impossible to convert existential into universal for space: Immerman/Szelepscényi 87/ 88: NL = conl

I-S Theorem Theorem: ST-NON-CONN NL Proof: slightly tricky setup: input: G = (V, E), two nodes s, t s s yes no t t

I-S Theorem want nondeterministic procedure using only O(log n) space with behavior: s s yes input no input t t q accept q reject q accept q reject

I-S Theorem observation: given count of # nodes reachable from s, can solve problem for each v V, guess if it is reachable if yes, guess path from s to v if guess doesn t lead to v, reject. if v = t, reject. else counter++ if counter = count accept

I-S Theorem every computation path has sequence of guesses only way computation path can lead to accept: correctly guessed reachable/unreachable for each node v correctly guessed path from s to v for each reachable node v saw all reachable nodes t not among reachable nodes

I-S Theorem R(i) = # nodes reachable from s in at most i steps R(0) = 1: node s we will compute R(i+1) from R(i) using O(log n) space and nondeterminism computation paths with bad guesses all lead to reject

I-S Theorem Outline: in n phases, compute R(1), R(2), R(3), R(n) only O(log n) bits of storage between phases in end, lots of computation paths that lead to reject only computation paths that survive have computed correct value of R(n) apply observation.

I-S Theorem computing R(i+1) from R(i): R(i) = R(2) = 6 Initialize R(i+1) = 0 For each v V, guess if v reachable from s in at most i+1 steps

I-S Theorem if yes, guess path from s to v of at most i+1 steps. Increment R(i+1) if no, visit R(i) nodes reachable in at most i steps, check that none is v or adjacent to v for u V guess if reachable in i steps; guess path to u; counter++ KEY: if counter R(i), reject at this point: can be sure v not reachable

I-S Theorem correctness of procedure: two types of errors we can make (1) might guess v is reachable in at most i +1 steps when it is not won t be able to guess path from s to v of correct length, so we will reject. easy type of error

I-S Theorem (2) might guess v is not reachable in at most i+1 steps when it is then must not see v or neighbor of v while visiting nodes reachable in i steps. but forced to visit R(i) distinct nodes therefore must try to visit node v that is not reachable in i steps won t be able to guess path from s to v of correct length, so we will reject. easy type of error

Summary nondeterministic space classes NL and NPSPACE ST-CONN NL-complete

Summary Savitch: NPSPACE = PSPACE Proof: ST-CONN SPACE(log 2 n) open question: NL = L? Immerman/Szelepcsényi : NL = conl Proof: ST-NON-CONN NL