CS151 Complexity Theory Lecture 4 April 8, 2004.

Slides:



Advertisements
Similar presentations
Complexity Classes: P and NP
Advertisements

CS151 Complexity Theory Lecture 4 April 11, 2013.
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Complexity Theory Lecture 3 Lecturer: Moni Naor. Recap Last week: Non deterministic communication complexity Probabilistic communication complexity Their.
Theory of Computing Lecture 18 MAS 714 Hartmut Klauck.
1 Space Complexity. 2 Def: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n)
CS151 Complexity Theory Lecture 3 April 6, CS151 Lecture 32 Introduction A motivating question: Can computers replace mathematicians? L = { (x,
Fall 2013 CMU CS Computational Complexity Lecture 5 Savich’s theorem, and IS theorems. These slides are mostly a resequencing of Chris Umans’ slides.
Umans Complexity Theory Lectures Lecture 4b: Nondeterministic Space: I-S Theorem: NL = coNL.
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
CS151 Complexity Theory Lecture 3 April 6, Nondeterminism: introduction A motivating question: Can computers replace mathematicians? L = { (x,
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
CS151 Complexity Theory Lecture 5 April 13, 2004.
Complexity ©D.Moshkovits 1 Space Complexity Complexity ©D.Moshkovits 2 Motivation Complexity classes correspond to bounds on resources One such resource.
CS151 Complexity Theory Lecture 12 May 6, CS151 Lecture 122 Outline The Polynomial-Time Hierarachy (PH) Complete problems for classes in PH, PSPACE.
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Alternating Turing Machine (ATM) –  node is marked accept iff any of its children is marked accept. –  node is marked accept iff all of its children.
Complexity 1 Mazes And Random Walks. Complexity 2 Can You Solve This Maze?
February 20, 2015CS21 Lecture 191 CS21 Decidability and Tractability Lecture 19 February 20, 2015.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
Definition: Let M be a deterministic Turing Machine that halts on all inputs. Space Complexity of M is the function f:N  N, where f(n) is the maximum.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
NPC.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Umans Complexity Theory Lectures Lecture 3d: Nondeterminism: Sparse Languages and NP Berman’s Theorem: Unary NP complete => P=NP.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Chapter 7 Introduction to Computational Complexity.
Space Complexity Guy Feigenblat Based on lecture by Dr. Ely Porat Complexity course Computer science department, Bar-Ilan university December 2008.
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
The NP class. NP-completeness
Umans Complexity Theory Lectures
Space Complexity Complexity ©D.Moshkovits.
Great Theoretical Ideas in Computer Science
Part VI NP-Hardness.
Umans Complexity Theory Lectures
NP-Completeness Yin Tat Lee
Intro to Theory of Computation
Theory of Computational Complexity
Intractable Problems Time-Bounded Turing Machines Classes P and NP
Intro to Theory of Computation
Computational Complexity
Space Complexity Costas Busch - LSU.
CS151 Complexity Theory Lecture 3 April 10, 2017.
CS21 Decidability and Tractability
CS154, Lecture 13: P vs NP.
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS21 Decidability and Tractability
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS151 Complexity Theory Lecture 12 May 10, 2019.
Instructor: Aaron Roth
Instructor: Aaron Roth
Instructor: Aaron Roth
CS151 Complexity Theory Lecture 5 April 16, 2019.
CS151 Complexity Theory Lecture 4 April 12, 2019.
Intro to Theory of Computation
Presentation transcript:

CS151 Complexity Theory Lecture 4 April 8, 2004

Introduction 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? April 8, 2004 CS151 Lecture 4

A puzzle depth n . . . . . . April 8, 2004 CS151 Lecture 4

A puzzle depth n . . . . . . April 8, 2004 CS151 Lecture 4

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) April 8, 2004 CS151 Lecture 4

Outline sparse languages and NP nondeterminism applied to space reachability Savitch’s Theorem Immerman/Szelepcsényi Theorem April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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) April 8, 2004 CS151 Lecture 4

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 φ(x1,x2,…,xn) instance of SAT April 8, 2004 CS151 Lecture 4

Sparse languages and NP self-reduction tree for φ: φ(x1,x2,…,xn) φ(0,x2,…,xn) φ(1,x2,…,xn) ... . . . φ(0,0,…,0) φ(1,1,…,1) satisfying assignment April 8, 2004 CS151 Lecture 4

Sparse languages and NP Applying reduction R: R(φ(x1,x2,…,xn)) R(φ(0,x2,…,xn)) R(φ(1,x2,…,xn)) ... . . . R(φ(0,0,…,0)) R(φ(1,1,…,1)) satisfying assignment April 8, 2004 CS151 Lecture 4

Sparse languages and NP on input of length ≤ |φ(x1,x2,…,xn)|, R produces string of length ≤ p(n) R’s different outputs are “colors” 1 color for strings not in 1* at most p(n) other colors puzzle solution  can solve SAT in poly(p(n)+1, n+1) = poly(n) time! April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

Nondeterministic space Robust nondeterministic space classes: NL = NSPACE(log n) NPSPACE = k NSPACE(nk) April 8, 2004 CS151 Lecture 4

Reachability Recall: at most nk 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: qstartx1x2x3…xn xL xL qaccept qreject qaccept qreject April 8, 2004 CS151 Lecture 4

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. April 8, 2004 CS151 Lecture 4

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 = qaccept April 8, 2004 CS151 Lecture 4

Two startling theorems Strongly believe P ≠ NP nondeterminism seems to add enormous power for space: Savitch ‘70: NPSPACE = PSPACE and NL  SPACE(log2n) April 8, 2004 CS151 Lecture 4

Two startling theorems Strongly believe NP ≠ coNP seems impossible to convert existential into universal for space: Immerman/Szelepscényi ’87/’88: NL = coNL April 8, 2004 CS151 Lecture 4

Savitch’s Theorem Theorem: STCONN  SPACE(log2 n) Corollary: NL  SPACE(log2n) Corollary: NPSPACE = PSPACE April 8, 2004 CS151 Lecture 4

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 2i */ PATH(x, y, i) if i = 0 return ( (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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

I-S Theorem want nondeterministic procedure using only O(log n) space with behavior: “yes” input “no” input qreject qaccept April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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. April 8, 2004 CS151 Lecture 4

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

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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

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 April 8, 2004 CS151 Lecture 4

Summary unary languages not NP-complete unless P = NP true for sparse languages as well (homework) nondeterministic space classes NL and NPSPACE ST-CONN NL-complete April 8, 2004 CS151 Lecture 4

Summary Savitch: NPSPACE = PSPACE NL = L? Proof: ST-CONN  SPACE(log2 n) open question: NL = L? Immerman/Szelepcsényi : NL = coNL Proof: ST-NON-CONN  NL April 8, 2004 CS151 Lecture 4