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.

Slides:



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

Based on Powerpoint slides by Giorgi Japaridze, Villanova University Space Complexity and Interactive Proof Systems Sections 8.0, 8.1, 8.2, 8.3, 10.4.
JAYASRI JETTI CHINMAYA KRISHNA SURYADEVARA
Complexity Theory Lecture 3 Lecturer: Moni Naor. Recap Last week: Non deterministic communication complexity Probabilistic communication complexity Their.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
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)
 2004 SDU Lecture17-P,NP, NPC.  2004 SDU 2 1.Decision problem and language decision problem decision problem and language 2.P and NP Definitions of.
Giorgi Japaridze Theory of Computability Savitch’s Theorem Section 8.1.
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 14-1 Computability and Complexity Andrei Bulatov Cook’s 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)
NP-completeness Sipser 7.4 (pages 271 – 283). CS 311 Fall The classes P and NP NP = ∪ k NTIME(n k ) P = ∪ k TIME(n k )
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.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
Submitted by : Estrella Eisenberg Yair Kaufman Ohad Lipsky Riva Gonen Shalom.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Time Complexity.
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.
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
PSPACE-Completeness Section 8.3 Giorgi Japaridze Theory of Computability.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
The Class NP Lecture 39 Section 7.3 Mon, Nov 26, 2007.
A Problem That Is Complete for PSPACE (Polynomial Space) BY TEJA SUDHA GARIGANTI.
NP-completeness Class of hard problems. Jaruloj ChongstitvatanaNP-complete Problems2 Outline  Introduction  Problems and Languages Turing machines and.
Hierarchy theorems Section 9.1 Giorgi Japaridze Theory of Computability.
Computability NP complete problems. Space complexity. Homework: [Post proposal]. Find PSPACE- Complete problems. Work on presentations.
CS 3813: Introduction to Formal Languages and Automata Chapter 14 An Introduction to Computational Complexity These class notes are based on material from.
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.
Alternation Section 10.3 Giorgi Japaridze Theory of Computability.
Complexity 24-1 Complexity Andrei Bulatov Interactive Proofs.
NP-complete Languages
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSCI 2670 Introduction to Theory of Computing December 7, 2005.
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.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
NP-Completeness A problem is NP-complete if: It is in NP
Space Complexity Complexity ©D.Moshkovits.
Part VI NP-Hardness.
Turing Machines Acceptors; Enumerators
Theory of Computational Complexity
Space Complexity Costas Busch - LSU.
CSC 4170 Theory of Computation Space complexity Chapter 8.
CSC 4170 Theory of Computation The class NP Section 7.3.
Theory of Computability
Time Complexity Classes
Instructor: Aaron Roth
Instructor: Aaron Roth
Space Complexity and Interactive Proof Systems
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

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 number of tape cells that M scans on any input of length n. For any function f:N  N, we define: SPACE(f(n))={L | L is a language decided by an O(f(n)) space DTM} NSPACE(f(n))={L | L is a language decided by an O(f(n)) space NTM}

Low Space Classes: Definitions (logarithmic space classes): L = SPACE(logn) NL = NSPACE(logn)

 If M is a deterministic Turing machine that halts on an inputs, then the value of spacereq(M) is the function f(n) defined so that, for any natural number n,f(n) is the maximum number of tape squares that M reads on any input of length n.  If M is a nondeterministic Turing machine all of whose computational paths halt on all inputs, then the value of spacereq(M) is the function f(n) defined so that, for any natural number n,f(n) is the maximum number of tape squares that M reads on any path that it executes on any input of length n.

SAT is NP-complete. SAT can be solved in linear(O(m)) space. M 1 =“On input, where  is a Boolean formula: 1.For each truth assignment to the variables x 1,…x m of . 2.Evaluate  on that truth assignment. 3.If  ever evaluate to 1, ACCEPT; if not, REJECT.” 000 … 0 x 1 x 2 x 3 … x n

Theorem : Given a Turing machine M = (K, 2:., r, 8, s, H) and assuming that spacereq(M) ~ n, the following relationships hold between M's time and space requirements: spacereq(M) < timereq(M) E o (cspacereq(M) ) Proof: Spacereq(M) is bounded by timereq(M) since M must use at least one time step for every tape square it visits. The upper bound on timereq(M) follows from the fact, since M halts, the number of steps that it can execute is bounded by the number of distinct configurations that it can enter. That number is given by the function MaxConfigs(M), as described above. Since MaxConjigs(M) E O(cspacereq(M»), timereq(M) E O(cspacereq(M»).

Proof: Suppose language A can be decided by an NTM in k f(n) space, for some constant k. We shall show that it can be decided by a DTM in O((f(n))2) space. Let  be an input string to N. t: integer; c 1,c 2 : configurations of N on . Theorem For any function f: N  R +, where f(n)  n, we have NSPACE(f(n))  SPACE(f 2 (n)).

CANYIELD(c 1,c 2,t) accept if starting from c 1 N has a branch entering configuration c 2 in t steps; o/w rejects. CANYIELD=“On input c 1,c 2 and t: 1.If t=1, test whether c 1 =c 2 or c 1 ├ c 2, then accept; else reject. 2.If t>1, then for each configuration c m of N on  using space f(n). 3.Run CANYIELD(c 1,c m, ) 4.Run CANYIELD(c m,c 2, ) 5.If 3 & 4 both accept, then accept; else reject.”

c accept : accept configuration. c start : start configuration of N on . Select a constant d so that N has no more than 2 df(n) configurations using f(n) tape space, n=|  |. M=“On input  output the result of CANYIELD(c start, c accept, 2 df(n) ).” CANYIELD is a recursive procedure: Recursive depth:log 2 2 df(n) =O(f(n)) Each recursive call of CANYIELD use O(f(n)) space. Thus, it uses O(f 2 (n)) space.

boolean PATH(a,b,d) { if there is an edge from a to b then return TRUE else { if (d=1) return FALSE for every vertex v (not a,b) { if PATH(a,v,  d/2  ) and PATH(v,b,  d/2  ) then return TRUE } return FALSE }

PSPACE is the class of languages (or problems) that are decidable in polynomial space on a det. TM. Similarly we can define NPSPACE to be the class of languages that are decidable in polynomial space by a NTM. So, what is the relationship between PSPACE and NPSPACE?

PSPACE = NPSPACE Theorem: PSPACE = NPSPACE Proof : If L is in PSPACE, then it must also be in NPSPACE because the deterministic Turing machine that decides it in polynomial time is also a nondeterministic Turing machine that decides it in polynomial time. It is an important corollary of Savitch's Theorem.

Definition: A language B is PSPACE-Complete if 1. B  PSPACE 2. For every A  SPACE, A  P B. If B is just satisfies Condition 2, we say B is PSPACE-hard

Theorem: P ⊆ PSPACE Proof: If a language is decided by some DTM M in f(n) time, M cannot see more than f(n) cells. Thus, TIME(f(n)) ⊆ SPACE(f(n)), So that P ⊆ PSPACE

Proof: If a language is decided by some DTM M in f(n) space (where f(n) >=n), M can visit at most f(n) 2 O(f(n)) configurations (why?) Thus, M must run in f(n) 2 O(f(n)) time. In other words, SPACE(f(n)) ⊆ TIME(2O(f(n))), so that PSPACE ⊆ EXPTIME. P ⊆ NP ⊆ P SPACE ⊆ EXPTIME

Mathematical statements usually involve quantifiers: 8 (for all) and 9 (there exists) E.g., 8x F(x) means for every value of x, the statement F(x) is TRUE E.g., 9x F(x) means there exists some value of x such that F(x) is TRUE Boolean formulas with quantifiers are called quantified Boolean formulas E.g., 9y ( y = x+1) and 8x (9y ( y  x)) are quantified Boolean formulas

All of the following are quantified Boolean expressions. (P 1\,R)~S 3P «P 1\,R) ~ S) \iR (3P «P 1\,R) ~ S» \iS (\iR (3P «P 1\,R) ~ S»). All quantified Boolean expressions are in prenex normal form.

Theorem: TQBF is PSPACE-Complete Proof:    (s,t,|V|) is TRUE iff there is a path from s to t.  is constructible in poly-time. Thus, any PSPACE language is poly-time reducible to TQBF, i.e. TQBF is PSPACE-hard. Since TQBF  PSPACE, it’s PSPACE-Complete.

PSPACE-complete: The generalized version of some common games we play are PSPACE-complete: Game of the Amazons Tic-Tac-Toe

Generalized Geography : Each city chosen must begin with the same letter that ended the previous city name.

L=SPACE(log n) NL=NSPACE(log n) E.G : PATH={ | G is a directed graph that has a directed path from s to t}. NL Completeness : A language B is NL-Complete if 1. B  NL 2. For every A  NL, A  L B.

Deterministic Space-Complexity Classes are Closed Under Complement Theorem: For every function f(n), dspace(f( n)) = co-dspace(f(n)). Proof: If L is a language that is decided by some deterministic Turing machine M, th en the deterministic Turing machine M' that is identical to M except that the halting states y and n are reversed decides ~L. spacereq(M' ) = spacereq(M). So, if L E dspace(f( n)), so is ~L.

space complexity people.cs.nctu.edu.tw/~sctsai/fc/notes/SpaceComplexity.ppt 3/csc544/lecture-notes/18-space-complexity.pdf 2008 Elaine A Rich, Automata, Computability And Complexity, Theory And Application (CHAPTER 29)