Slides By: Alexander Eskin, Ilya Berdichevsky - PowerPoint PPT Presentation

About This Presentation
Title:

Slides By: Alexander Eskin, Ilya Berdichevsky

Description:

DSPACE ( s(n) ) is the class of all the languages that can be decided ... Check: every 1 in Xm 0 in Xm 1. Check: the 1st 0 in Xm 1 in Xm 1. 12/10/09. DSPACE. 13 ... – PowerPoint PPT presentation

Number of Views:49
Avg rating:3.0/5.0
Slides: 26
Provided by: alexande152
Category:

less

Transcript and Presenter's Notes

Title: Slides By: Alexander Eskin, Ilya Berdichevsky


1
DSPACE
  • Slides By Alexander Eskin, Ilya Berdichevsky
  • (From the Course Computational Complexity by
    Ely Porat)

2
Agenda
  • Definition of DSPACE
  • DSPACE(s(n)) ? DTIME(2O(s(n)))
  • DSPACE(O(1)) DFA
  • DSPACE(o(logn)) ? DSPACE(O(1))
  • DSPACE(o(loglogn)) DSPACE(O(1))

3
Definition of DSPACE
  • Let M be a deterministic Turing Machine with 3
    tapes Input, Space (work) and Output.
  • DSPACE ( s(n) )
  • L ? M M(x) ?L(X) ? ?n Space(M) ?
    s(n)

4
Explanation
  • Input tape is read-only.
  • Work tape is read-write.
  • Space(M) is measured by the bounds of the
    machines position on this tape.
  • Output tape is write-only.
  • DSPACE ( s(n) ) is the class of all the languages
    that can be decided deterministically using s(n)
    work space.

5
Theorem DSPACE(s(n)) ? DTIME(2O(s(n)))
  • Proof
  • Let M be a Turing Machine s.t. L(M) ?
    DSPACE(s(n)) ? Space(M) s(n)
  • ? 0, 1, ? number of states for the work
    tape is ? Space 3 s(n)
  • The number of possible head positions in the work
    tape is s(n).
  • The number of possible head positions in the
    input tape is n.
  • The number of the states of M is QM.

6
  • This entails
  • The number of the possible configurations of M is
    s(n) ? 3s(n) ? n ? QM 2O(s(n))
  • Claim M cannot do more than 2O(s(n)) steps
  • Otherwise, M will go through the same
    configuration at least twice, entering an
    infinite loop.
  • Therefore, M has to run in time ? 2O(s(n))

7
Explanation
  • If M will go through the same configuration
    twice, it will enter an infinite loop, since
  • The same configuration Ci ? the same head
    position in the input tape and the same state.
  • But M is deterministic, so in both cases it will
    move to the same configuration Ci1 etc.
  • Since after the first time M entered Ci , it
    returned there one more time, it would do so
    after the second time and so on.

8
Theorem DSPACE(O(1)) DFA
  • Proof
  • Claim DSPACE(O(1)) TWA (Two way automata)
  • Claim TWA DFA
  • Claims 1, 2 entail DSPACE(O(1)) DFA

9
Explanation
  • Proof of Claim 1
  • Let M be a Turing machine. Space(M) O(1) ?
    there is constant number of possible contents of
    the work tape, say y. There are Q states ? M
    can be simulated by TWA with Q?y states (still
    constant of states).
  • The proof of Claim 2 is beyond the scope of this
    course.

10
Theorem DSPACE(o(logn)) ? DSPACE(O(1))
  • Proof
  • We will show
  • DSPACE(log log(n)) ? DSPACE(O(1))
  • Let L be a language
  • ?(L) 0, 1,
  • L w 00001001011 ?k ? N
    the l-th substring of w delimited by has length
    k and is the binary representation
    of l-1, 0 ? l lt 2k
  • Claim L is not regular.

11
  • Lemma L ? DSPACE(log log(n))
  • Proof Let M be a Turing Machine, doing the
    following
  • Check that every block delimited by is
    k-length. This takes log(k) space.
  • Check the 1st block is all 0s and the last block
    is all 1s. This takes O(1) space.
  • For each two consecutive sub-strings, verify that
    they are xx1.

12
Explanation
  • The claim that L is not regular can be easily
    proved by the Pumping Lemma
  • Step 3 above (for each two consecutive
    sub-strings, verify that they are xx1) is done
    as follows
  • Start from the LSB (right-to-left)
  • Check every 1 in Xm ? 0 in Xm1
  • Check the 1st 0 in Xm ? 1 in Xm1

13
  • Back to the proof of the lemma
  • Verifying that each two consecutive sub-strings
    are xx1 (step 3) takes log(k) space, since each
    time we compare 1 bit only, and need a log(k)
    counter to count k bits forward
  • Steps 1-3 take together O(log(k)) space, which is
    O( log log(n) )
  • We have shown L ? DSPACE(log log(n))
  • But L is not regular ? DSPACE(log log(n)) ?
    DSPACE(O(1)) ? DSPACE(o(log(n)) ? DSPACE(O(1))

14
  • Theorem DSPACE(o(loglogn)) DSPACE(O(1))
  • Proof
  • Claim DSPACE(o(loglogn)) ? DSPACE(O(1))
  • Lemma DSPACE(o(loglogn)) ? DSPACE(O(1))
  • DSPACE(o(loglogn)) DSPACE(O(1)) (entailed by 1.
    and 2. above)

15
Explanation
  • Claim
  • DSPACE(o(loglogn)) ? DSPACE(O(1))
  • Proof
  • o(loglogn)) ? O(1) ?
  • DSPACE(o(loglogn)) ? DSPACE(O(1))

16
  • Claim
  • Given input x x n such that M accepts x,
    then M can be on every cell on the input tape at
    most k times
  • k 2S(n) ? S(n) ? QM O(2S(n))
  • Proof
  • k is number of possible different configuration
    of the machine.
  • If M were on the cell more than k times then it
    would be in the same configuration twice and thus
    never terminate.

17
Explanation
  • k is the number of possible different
    configurations of the machine
  • 2S(n) number of possible contents of the
    work-tape.
  • S(n) number of possible locations for the r/w
    head on the work-tape.
  • QM - set of states of M.
  • If M were on the cell more than k times then it
    would be in the same configuration twice.
  • The second time in the same configuration the
    machine will perform exactly as the first time ?
    endless loop.

18
  • Lemma DSPACE(o(loglogn)) ? DSPACE(O(1))
  • Proof
  • Definition
  • semi-configuration is a configuration with
    position on the input tape replaced by the symbol
    at the current input tape position configuration
    of the machine
  • For every location i on the input tape we
    consider all possible semi-configuration of M
    when passing location I
  • The sequence of such a configurations is
    Ci Ci1,Ci2 Cir then it length is bounded
    by O(2S(n)) ? r

19
  • Proof of Lemma (contd.)
  • The number of possible different sequences of
    semi-configurations of M, associated with any
    position on input tape is bounded by
  • S(n) o(log log n)
  • ? n0?N such that ?n ? n0,
  • Well show that ?n ? n0 S(n) S(n0), thus
    L?DSPACE(S(n0)) ? DSPACE(S(1)) proving the
    theorem.

20
  • Proof of Lemma (contd.)
  • Assume to the contrary that there exists n such
    that S(n) gt S(n0)
  • Let
    and let x1?0,1n1 be such that
    SpaceM(x1) gt S(n0)
  • x1 is the shortest input on which M uses more
    space then S(n0).
  • The number of sequences of semi-configurations at
    any position in the input tape is
  • Labeling n1 positions on the input tape by at
    most sequences means there must be at least
    three positions with the same sequence of
    semi-configurations.

21
  • Without loss of generality say x1 ?a?a?a?
  • Each of the position with symbol a has the same
    sequence of semi-configurations attached.
  • Claim
  • The machine produces the same final
    semi-configuration with either ?a or ?a
    eliminated from the input.

22
Explanation
  • Proof of the Claim
  • Consider cutting a?, leaving x1 ?a?a?
  • On x1 M proceeds on the input exactly as with x1
    until it first reaches the a.
  • M will make the same decision to go right or left
    on x1 as it did on x1 since all the information
    stored in the machine at the current head
    position is identical.
  • If the machine goes left then its computation
    will proceed identically because it still did not
    see difference on both inputs.

23
Explanation (contd.)
  • Proof of the claim (contd.)
  • If the machine goes right
  • Say this is the ith time at the first a.
  • Since the semi-configuration is the same in both
    cases then on input x1 the machine M also went
    right on the ith time seeing the second a.
  • The machine proceeded and either terminated or
    came back for the (i1)th time to the second a.
  • In either case on input x1 the machine M is
    going to do the same thing but now on the first a.

24
Explanation (contd.)
  • Proof of the claim (contd.)
  • As the machine proceeds through the sequence of
    semi-configurations we see that the final
    semi-configuration on x1 will be same as for x1
  • arguing each time that on x1 we will have the
    same sequence of semi-configurations.
  • The case in which ?a is eliminated is identical.

25
  • Proof of the Lemma (contd.)
  • Let x2 ?a?a? and x3 ?a?a?
  • If the worst case of space usage processing x1
    was in ?a then WM(x1) WM(x2) WM(x3)
  • If the worst case of space usage was in ?a then
    WM(x1) WM(x2)?WM(x3)
  • If the worst case of space usage was in a? then
    WM(x1) WM(x3)?WM(x2)
  • Chose x1?x2,x3 to maximize WM(x1) ? WM(x1)
    WM(x1) and x1 lt x1
  • Contradiction to assumption that x1 is minimal
    length string using more then S(n0) space ? no
    such x1 exists.
Write a Comment
User Comments (0)
About PowerShow.com