Download presentation

Presentation is loading. Please wait.

Published byRaymundo Farnam Modified about 1 year ago

1
1 Savitch and Immerman- Szelepcsènyi Theorems

2
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
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
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
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
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
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
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
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
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
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
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
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
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

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google