Chapter 7 Introduction to Computational Complexity.

Slides:



Advertisements
Similar presentations
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Advertisements

1 Savitch and Immerman- Szelepcsènyi Theorems. 2 Space Compression  For every k-tape S(n) space bounded offline (with a separate read-only input tape)
Lecture 24 MAS 714 Hartmut Klauck
1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.
Lecture 24 Time and Space of NTM. Time For a NDM M and an input x, Time M (x) = the minimum # of moves leading to accepting x if x ε L(M) = infinity if.
Resource-Bounded Computation Previously: can it be done? Now: how efficiently can it be done? Goal: conserve computational resources: Time, space, other.
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.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
Complexity class NP Is the class of languages that can be verified by a polynomial-time algorithm. L = { x in {0,1}* | there exists a certificate y with.
Umans Complexity Theory Lectures Lecture 4b: Nondeterministic Space: I-S Theorem: NL = coNL.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
Complexity ©D.Moshkovitz 1 Turing Machines. Complexity ©D.Moshkovitz 2 Motivation Our main goal in this course is to analyze problems and categorize them.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
Complexity ©D.Moshkovits 1 Space Complexity Complexity ©D.Moshkovits 2 Motivation Complexity classes correspond to bounds on resources One such resource.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Complexity 1 The Padding Argument. Complexity 2 Motivation: Scaling-Up Complexity Claims space + non-determinism We have: space + determinism can be simulated.
CS 310 – Fall 2006 Pacific University CS310 P vs NP the steel cage death match Section 7.2 November 29, 2006.
CS151 Complexity Theory Lecture 2 April 3, Time and Space A motivating question: –Boolean formula with n nodes –evaluate using O(log n) space?
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.
Chapter 11: Limitations of Algorithmic Power
CS151 Complexity Theory Lecture 2 April 1, CS151 Lecture 22 Time and Space A motivating question: –Boolean formula with n nodes –evaluate using.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
CS 461 – Nov. 21 Sections 7.1 – 7.2 Measuring complexity Dividing decidable languages into complexity classes. Algorithm complexity depends on what kind.
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.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
Theory of Computing Lecture 15 MAS 714 Hartmut Klauck.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Theory of Computing Lecture 17 MAS 714 Hartmut Klauck.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
CS848: Topics in Databases: Foundations of Query Optimization Topics covered  Review of complexity.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
Measuring complexity Section 7.1 Giorgi Japaridze Theory of Computability.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 7 Time Complexity Some slides are in courtesy.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
Umans Complexity Theory Lectures Lecture 1c: Robust Time & Space Classes.
Chapter 11 Introduction to Computational Complexity Copyright © 2011 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1.
Chapter 15 P, NP, and Cook’s Theorem. 2 Computability Theory n Establishes whether decision problems are (only) theoretically decidable, i.e., decides.
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
NP-complete Languages
Lecture 2 Time and Space of DTM. Time of DTM Time M (x) = # of moves that DTM M takes on input x. Time M (x) < infinity iff x ε L(M).
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
CSCI 2670 Introduction to Theory of Computing November 15, 2005.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Space Complexity Complexity ©D.Moshkovits.
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
Part VI NP-Hardness.
HIERARCHY THEOREMS Hu Rui Prof. Takahashi laboratory
Theory of Computational Complexity
Intro to Theory of Computation
Space Complexity Costas Busch - LSU.
Theory of Computability
Part II Theory of Nondeterministic Computation
Turing Machines Complexity ©D.Moshkovitz.
CS21 Decidability and Tractability
Umans Complexity Theory Lectures
CS151 Complexity Theory Lecture 4 April 12, 2019.
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

Chapter 7 Introduction to Computational Complexity

Complexity of Computation Growth Rates: linear polynomial exponential Well-behaved functions that are used to dominate resource consumption. SPACE: # of tape cells (invariant of # of tapes) vs. input: S(n) TIME: # of steps (≥ 2 tapes, (T²(n) for one tape)) vs. input: T(n) Constant factor speedups (by grouping symbols into blocks) means that only asymptotic behavior is important. So constant factors are irrelevant. n2n²2n²n² + 3n + 7n³n³2ⁿ2ⁿ ,  10¹ ⁵ 10020,00010,307100,  10³ ⁰ 10002,000,0001,003,0071,000,000,  10³ ⁰ ¹

Tape-Compression Definition: L is computable in space S(n) if it is accepted by a DTM which never requires more than S(|w|) cells on any input w. (Don’t include read-only input tape.) Lemma: If L is computable in space S(n), then L is computable in space cS(n) for any c > 0. Proof (sketch): Let M be an S(n) space-bounded machine accepting L. Represent the contents of two adjacent cells of M’s work tape by a single symbol (square size of work tape alphabet). Using an enhanced finite control, keep track of individual moves within each pair of cells. This uses only half the space, ½S(n). Continue by induction to obtain any c.

Speed-Up Definition: L is computable in time T(n) if it is accepted by a DTM which never requires more than T(|w|) steps on any input w. (Let’s insist than T is at least linear, i.e. T(n) ≥ n.) Lemma: If L is computable in super-linear time T(n), then L is computable in time cT(n) for any c > 0. Proof (sketch): Let M be a T(n) time-bounded machine accepting L. Compress the contents of two cells of the input tape to the work tape in one pass. (Using a larger alphabet, as before). When entering this cell pair from the right or left, anticipate in an enhanced finite control the finitely many behaviors of M on the pair, and which direction it exits from.

Space and Time Hierarchies If S₁(n) ≥ log n and lim S₁(n) ∕ S₂(n) = 0 as n → ∞, then 1.DSPACE(S₁(n)) ⊊ DSPACE(S₂(n)) 2.NSPACE(S₁(n)) ⊊ NSPACE(S₂(n)) If T₁(n) ≥ n and inf T₁(n) log T₁(n) ∕ T₂(n) = 0 as n → ∞, then 1.DTIME(T₁(n)) ⊊ DTIME(T₂(n)) 2.NTIME(T₁(n)) ⊊ NTIME(T₂(n)) REG = DSPACE(1) ⊈ DTIME(n) CFL ⊆ DTIME(n³)

Relationships Between Deterministic and Non- Deterministic Classes Time(f(n)) ⊆ NTime(f(n)) ⊆ Space(f(n)) ⊆ NSpace(f(n)) ⊆ Time(c f(n) ) trivial Fact: NTime(f(n))  Space(f(n)): Proof (sketch): Each branch in the computation tree has length at most f(n), so we can reuse the space f(n) to simulate each possible run. Can be depth-first because of bound f(n). Fact: NSpace(f(n))  Time(c f(n) ): Proof (sketch): Draw configuration graph – the size will be exponential in the space bound f(n). Search for a path from the start vertex to a halting configuration. This single source reachability problem is linear in the number of nodes.

Complexity Classes Resource-bounded classes closed under nesting (subroutines), not just composition (pipelines). polynomials – n k : polytime = Ptime = P logarithms – log k n : logspace = Lspace = L Introduce non-determinism: NCSPACE NPSPACE CSPACE ⊊ L ⊆ NL ⊆ P ⊆ NP ⊆ PSPACE = = finite automaton Savitch’s Theorem follows from c log(n) = n k corollary

Scale Invariance Fact: Only polynomials p satisfy p[O(n)] = O(p(n)) where p[O(n)] = {p(f(n)) : for any f(n) ∈ O(n)}. Proof: A polynomial f(n) is O(n d ) for its degree d, so f[O(n)] = [O(n)] d = [O(cn) d ] = [O(c d n d )] = O(n d ). For the other direction, let f(n) = n h(n) and show that h(n) = log n f(n) is O(1).

Known and Unknown Results L = computable by a log-space machine SL = computable by a symmetric L-machine NL = non-deterministically computable in L Completeness: hardest problem in each class SL:undirected graph reachability NL:directed graph reachability Known!: NL = co-NL; SL = L Unknown:NL = L?NP = co-NP?P = NP? Reduction: relative hardness for problems

Reductions and Completeness Definition: L ≤ L' means L is reducible to L' x ∈ L ⇔ f(x) ∈ L', where f is ‘easy’ Facts:L' ∈ P ⇒ L ∈ P L' ∈ NP ⇒ L ∈ NP Define: L′ is NP-hard if for all L ∈ NP, L ≤ L′ Define: L′ is NP-complete if L′ is also in NP Fact: If L is NP-complete and L ∈ P, then P = NP

Problems with Unknown Status Primality ∈ NP ∩ co-NP, but actually in P! Factoring ∈ NP ∩ co-NP. Is it in P? Transitive closure ∈ NL = co-NL. Is it in L? Isomorphism: when are two graphs the same Canonization: to compute a unique invariant Quantum computation: any effect?