CS151 Complexity Theory Lecture 4 April 11, 2013.

Slides:



Advertisements
Similar presentations
Feeding the Content Monster: How to Repurpose Your Association's Web Content for Use in Social Media Leslie OFlahavan, Association Media.
Advertisements

Fundamental Digital Electronics Fundamental Digital Electronics.
Broadcasting in Conflict Aware Multi-Channel Networks WALCOM 2013 – Feb 14, 2013 Shahin Kamali 1 Joint work with Francisco Claude 1, Reza Dorrigiv 2, Alejandro.
COMPLEXITY THEORY CSci 5403 LECTURE VII: DIAGONALIZATION.
Complexity Theory Lecture 6
Februari Organisation 22. Februari KI´s education and research DANDERYD HOSPITAL 235 FTE students Research SEK 33 million 26 FTE employees.
Complexity Classes: P and NP
© Dr Kelvyn Youngman, March 2013 I am I said A local/local cloud by Neil Diamond in 3 minutes and 32 seconds.
Excel Tutorial 3 Calculating Data with Formulas and Functions
KLARA chemical inventory 2013 Ulrika Olsson. How do I find KLARA – alternative 1  – internwebben – Choose system/tool – Chemical index Klara.
Microsoft Office 2013 ®® Access Tutorial 2 Building a Database and Defining Table Relationships.
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.
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.
Computability and Complexity 22-1 Computability and Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
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.
Analysis of Algorithms CS 477/677
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.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
Theory of Computing Lecture 19 MAS 714 Hartmut Klauck.
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.
Fall 2013 CMU CS Computational Complexity Lecture 3 and 4 Non-determinism, NTIME hierarchy threorem, Ladner’s Proof 9/17/2013.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
CSCI 3160 Design and Analysis of Algorithms Tutorial 10 Chengyu Lin.
CSE373: Data Structures & Algorithms Lecture 22: The P vs. NP question, NP-Completeness Lauren Milne Summer 2015.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
NPC.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
Lecture. Today Problem set 9 out (due next Thursday) Topics: –Complexity Theory –Optimization versus Decision Problems –P and NP –Efficient Verification.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
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.
Umans Complexity Theory Lectures Lecture 3c: Nondeterminism: Ladner’s Theorem: If P≠ NP then ∃ NP Languages neither NP Complete nor in P.
The NP class. NP-completeness
Umans Complexity Theory Lectures
Space Complexity Complexity ©D.Moshkovits.
Computational Complexity Theory
Umans Complexity Theory Lectures
Theory of Computational Complexity
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
Umans Complexity Theory Lectures
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
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

CS151 Complexity Theory Lecture 4 April 11, 2013

2 Ladner’s Theorem Assuming P ≠ NP, what does the world (inside NP) look like? NPC P NP: NPC P NP:

April 11, Ladner’s Theorem Theorem (Ladner): If P ≠ NP, then there exists L  NP that is neither in P nor NP- complete. Proof: “lazy diagonalization” –deal with similar problem as in NTIME Hierarchy proof

April 11, Ladner’s Theorem Try to “merge”: on input x, either –answer SAT(x) –answer TRIV(x) if can decide which one in P, L  NP SATTRIV MiMi M0M0 L N0N0 NiNi :: ::... ≠ ≠ ≠ ≠

April 11, Ladner’s Theorem General scheme: f(n) slowly increasing function –f(|x|) even: answer SAT(x) –f(|x|) odd: answer TRIV(x) notice choice only depends on length of input… that’s OK L... f(|x|) SAT TRIV

April 11, Ladner’s Theorem 1 st attempt to define f(n) “eager f(n)”: increase at 1 st opportunity Inductive definition: f(0) = 0; f(n) = –if f(n-1) = 2i, trying to kill M i if  z < 1 n s.t. M i (z) ≠ SAT(z), then f(n) = f(n-1) + 1; else f(n) = f(n-1) –if f(n-1) = 2i+1, trying to kill N i if  z < 1 n s.t. N i (z) ≠ TRIV(z), then f(n) = f(n-1) + 1; else f(n) = f(n-1)

April 11, Ladner’s Theorem Problem: eager f(n) too difficult to compute on input of length n, –look at all strings z of length < n –compute SAT(z) or N i (z) for each ! Solution: “lazy” f(n) –on input of length n, only run for 2n steps –if enough time to see should increase (over f(n-1)), do it; else, stay same –(alternate proof: give explicit f(n) that grows slowly enough…)

April 11, Ladner’s Theorem Key: n eventually large enough to notice completed previous stage L f 0011kkk... MiMi input x input z < x ≠ suppose k = 2i I’m sup- posed to ensure M i is killed I finally have enough time to check input z I notice z did the job, increase f to k+1 kk

April 11, Ladner’s Theorem Inductive definition of f(n) –f(0) = 0 –f(n): for n steps compute f(0), f(1), f(2),… L f 0011kkk... input x, |x| = n got this far in n steps

April 11, Ladner’s Theorem –if k = 2i: for n steps try (lex order) to find z s.t. SAT(z) ≠ M i (z) and f(|z|) even if found, f(n) = f(n-1)+1 else f(n-1) –if k = 2i + 1: for n steps try (lex order) to find z s.t. TRIV(z) ≠ N i (z) and f(|z|) odd if found, f(n) = f(n-1)+1 else f(n-1)

April 11, Ladner’s Theorem Finishing up: L = { x | x  SAT if f(|x|) even, x  TRIV if f(|x|) odd } L  NP since f(|x|) can be computed in O(n) time

April 11, Ladner’s Theorem suppose M i decides L –f gets stuck at 2i –L  SAT for z : |z| > n o –implies SAT  P. Contradiction. suppose N i decides L –f gets stuck at 2i+1 –L  TRIV for z : |z| > n o –implies L(N i )  P. Contradiction. (last of diagonalization…)

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

April 11, A puzzle... depth n

April 11, A puzzle... depth n

April 11, 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 11, 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 11, 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 11, 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

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

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

April 11, 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!

April 11, Summary nondeterministic time classes: NP, coNP, NEXP NTIME Hierarchy Theorem: NP ≠ NEXP major open questions: P = NP NP = coNP ??

April 11, 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

April 11, Summary EXP PSPACE P L NEXP NP coNP coNEXP

April 11, Remainder of lecture nondeterminism applied to space reachability two surprises: –Savitch’s Theorem –Immerman/Szelepcsényi Theorem

April 11, 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 11, Nondeterministic space Robust nondeterministic space classes: NL = NSPACE(log n) NPSPACE =  k NSPACE(n k )

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

April 11, 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 11, 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

April 11, 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)

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

April 11, Savitch’s Theorem Theorem: STCONN  SPACE(log 2 n) Corollary: NL  SPACE(log 2 n) Corollary: NPSPACE = PSPACE

April 11, 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

April 11, 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 11, Nondeterministic space Robust nondeterministic space classes: NL = NSPACE(log n) NPSPACE =  k NSPACE(n k )

April 11, Second startling theorem Strongly believe NP ≠ coNP seems impossible to convert existential into universal for space: Immerman/Szelepscényi ’87/’88: NL = coNL

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

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

April 11, 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 11, 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 11, 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 11, 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 11, 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 11, 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