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)

Slides:



Advertisements
Similar presentations
Turing Machines Memory = an infinitely long tape Persistent storage A read/write tape head that can move around the tape Initially, the tape contains only.
Advertisements

Variants of Turing machines
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.
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.
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)
Giorgi Japaridze Theory of Computability Savitch’s Theorem Section 8.1.
Fall 2013 CMU CS Computational Complexity Lecture 5 Savich’s theorem, and IS theorems. These slides are mostly a resequencing of Chris Umans’ slides.
Peter van Emde Boas: Games and Complexity Guangzhou 2009 Complexity, Speed-up and Compression Games and Complexity Peter van Emde Boas Guangzhou 2009 ©
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Reducibility 2 Theorem 5.1 HALT TM is undecidable.
Complexity 7-1 Complexity Andrei Bulatov Complexity of Problems.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Peter van Emde Boas: Games and Computer Science 1999 Speed-up and Compression Theoretical Models 1999 Peter van Emde Boas References available at:
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Reducibility A reduction is a way of converting one problem into another problem in such a way that a solution to the second problem can be used to solve.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
Complexity 5-1 Complexity Andrei Bulatov Complexity of Problems.
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.
NP-Completeness CS 51 Summer 2008 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AA A A AAA.
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
Non Deterministic Space Avi Ben Ari Lior Friedman Adapted from Dr. Eli Porat Lectures Bar-Ilan - University.
1 Slides: Asaf Shapira & Oded Schwartz; Sonny Ben-Shimon & Yaniv Nahum. Sonny Ben-Shimon & Yaniv Nahum. Notes: Leia Passoni, Reuben Sumner, Yoad Lustig.
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.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
1 Slides: Asaf Shapira & Oded Schwartz; Sonny Ben-Shimon & Yaniv Nahum. Sonny Ben-Shimon & Yaniv Nahum. Notes: Leia Passoni, Reuben Sumner, Yoad Lustig.
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
1 Turing Machines. 2 A Turing Machine Tape Read-Write head Control Unit.
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.
Regular Model Checking Ahmed Bouajjani,Benget Jonsson, Marcus Nillson and Tayssir Touili Moran Ben Tulila
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
TM Design Macro Language D and SD MA/CSSE 474 Theory of Computation.
Recursively Enumerable and Recursive Languages
Fall 2013 CMU CS Computational Complexity Lecture 2 Diagonalization, 9/12/2013.
1 Introduction to Turing Machines
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 5 Reducibility Some slides are in courtesy.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
1 Design and Analysis of Algorithms Yoram Moses Lecture 13 June 17, 2010
Chapter 7 Introduction to Computational Complexity.
Universal Turing Machine
1 Recursively Enumerable and Recursive Languages.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
February 1, 2016CS21 Lecture 121 CS21 Decidability and Tractability Lecture 12 February 1, 2016.
Space Complexity Complexity ©D.Moshkovits.
Recursively Enumerable and Recursive Languages
Relationship to Other Classes
Turing Machines Acceptors; Enumerators
Intro to Theory of Computation
Algorithm design and Analysis
Theory of Computational Complexity
Decidable Languages Costas Busch - LSU.
Theory of Computability
Formal Languages, Automata and Models of Computation
Part II Theory of Nondeterministic Computation
Recall last lecture and Nondeterministic TMs
Time Complexity Classes
DSPACE Slides By: Alexander Eskin, Ilya Berdichevsky
More Undecidable Problems
Intro to Theory of Computation
Presentation transcript:

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) TM and a constant c>0, there exists a 1-tape c·S(n) space bounded offline TM such that L(M)=L(N). If M is deterministic then so is N. The idea is to encode the k tapes into 1 with extra symbols(1 symbol of N represents kxd matrix of d cells for each tape of M  SPACE(S(n))=SPACE(O(S(n)))

3 Linear Speedup  L is accepted by a k-tape T(n) time bounded TM M. If n є o(T(n)), then for any c>0, L is accepted by a k-tape c·T(n) time bounded TM N. If M is deterministic then so is N. Same idea we enlarge the alphabet of M. Also N simulates m moves of M in 8 moves, with mc≥16.  TIME(T(n))=TIME(O(T(N)))  TIME(O(n))=TIME((1+e)n)

4 Time and Space Constructible Functions  f(n) is time(space) constructible if there is a f(n) time(space) bounded TM M such that for each n there is some input of length n on which uses exactly f(n) steps(cells).  Fully time(space) constructible if it holds for all inputs of length n Logn only space constructible n k, 2 n, n! : time and space constructible f 1 (n)·f 2 (n), 2 f 1 (n), f 1 (n) f 2 (n)

5 Loop Detection in space bounded TM’s  Length of configuration I of TM M is the length of the work tape of M in cofiguration I  M is a S(n) TM, S(n)≥logn. There exists a constant k such that for each n and l, logn≤l≤S(n), the number of different configurations of M with length l on any input of length n is at most k l. The number of different configurations of M on any input of length n is at most k S(n)

6 Proof  If M has s states and t alphabet symbols then I consists of 1.Input head position (at most n+1) 2.Tape head position (at most l) 3.Current state (at most s) 4.Tape contents (at most t l ) M has at most (n+1)slt l different configs  There exists a k such that for all n≥1 and logn≤l≤S(n), k l ≥ (n+1)slt l For c,d constants n c d l ≤ k l

7 Savitch’s Theorem  NSPACE(S(n)) DSPACE(S 2 (n)) if S is fully space construct and S(n)≥logn Let M be a S(n) tape NDTM with s states and t tape symbols. L=L(M). From lemma on input w, |w|=n the max No of configurations is c S(n). If M accepts w there exists an accepting computation with length ≤ c S(n) wich in binary representation has length at most logc S(n) =mS(n) If M accepts w then there exists a sequence of at most 2 mS(n) ≥mS(n) moves from I 0 to I f of length at most S(n) (wich is the length limit of each intermediate configuration).

8 The Algorithm (1) Function TEST(I1,I2,i): Boolean Var I’: configuration If i=0 and (I1=I2 or I1 I2) Return true; If i≥1 then for each I’ of length at most S(n) do if TEST(I1,I’,i-1) and TEST(I’,I2,i-1) then return true; Return False; End

9 The Algorithm (2)  For each accepting config I f of length at most S(n) do  If test (I 0,I f,mS(n))  accept;  Reject;

10 S(n) 2 Space bound achieved  The active variables in a call to TEST take O(n) space Each of the configurations I1, I2, I’ require no more than O(n) space logn≤S(n), so the input head position can be written in binary in S(n) space i≤mS(n), i in binary takes ≤ O(S(n)) space  TEST uses a tape as a stack. Initial call of TEST uses depth of stack i≤mS(n)=O(S(n)) and it decreases with each recursion.  Stack size O(S 2 (n)), can be compressed to S 2 (n) space

11 The Immerman-Szelepcsényi theorem  For any S(n)≥logn, NSPACE(S(n))=co-NSPACE(S(n))  For input x on M (a S(n)≥logn bounded TM) define COUNT M (x)= the number or configurations of M that are reachable from I x 0, the initial configuration of M on input x.  We will first prove it for S(n) fully space-constructible

12 There is a NDTM transducer that computes COUNT M in space S(n)  The No of different configurations of M on any input of length n is ≤k S(n) so COUNT M (x) can be written in space O(S(n))  REACH M (x,I,d)=I is reachable from I x 0 in at most d steps.(d ≤ k S(n) ) It can be accepted nondet in S(n) space.  N(x,d)=the # of configs that are reachable from I x 0  By induction on d we show that N(x,d) can be computed nondet in space S(n).  COUNT M (x)=N(x, k S(n) )

13 There is a S(n) NDTM N’ that given x and COUNT M (x), accepts iff M doesn’t accept x  Cycle through the configs that use space S(n)  For each such config I determine if REACH M (x,I,k S(n) )  If an accepting config is found halt and reject  Every time the procedure finds an I such that REACH M (x,I,k S(n) ) is true iterates a counter  When counter reaches COUNT M (x) with no config accepting it accepts.

14 For any function S(n)≥logn (not only constructible)  We initialize a counter S for space bound to logn and increment the space bound as needed  N(x,S,d) the number of configs that are reachable within space S and d steps. It is nondet calculated  Nondet compute N(x,S+1,d+1) and N(x,S,d+1) (if N(x,S,d)≠0)  If difference is nonzero continue with N(x,S+1,d+1) else don’t increase S. We never exceed S(n) space (except by a constant) If our algorithm claims that no reachable computation is accepting then x is not in L(M)  For all S≤S(n) and all d≤k S(n) all configurations are checked