• date post

21-Dec-2015
• Category

## Documents

• view

215

1

TAGS:

Embed Size (px)

### Transcript of Non Deterministic Space Avi Ben Ari Lior Friedman Adapted from Dr. Eli Porat Lectures Bar-Ilan -...

• Slide 1
• Non Deterministic Space Avi Ben Ari Lior Friedman Adapted from Dr. Eli Porat Lectures Bar-Ilan - University
• Slide 2
• Agenda Definition of NSPACE, NSPACE On, NSPACE Off, NL, NL-COMPLETE, CONN PROBLEM. We will prove that :
• Slide 3
• Agenda (cont) We will prove that : DSPACE(O(S)) NSPACE(O(S)) We will prove that : NSPACE(O(S)) DSPACE(O(S 2 )) We will prove that : CONN NL-Complete
• Slide 4
• NSPACE Definition For any function S:N N NSPACE(S) = { | NDTM (M) s.t for any input,M(x) accepts, and M uses at most S(|x|) space.}. Where NDTM - a Turing Machine with a non- deterministic transition function, having a work tape, a read only tape and a unidirectional write-only output tape. The machine is said to accept input X if there exists a computation ending in an accepting state
• Slide 5
• NSPACE Explanation We use the term NSPACE(s) to measure the space complexity of a language. We talk about all the languages which have a NDTM that accept the language, and does so without using too much space. The amount of space allowed is determined by S and is of course dependant on the length of the input of a specific word.
• Slide 6
• NSPACE Off Definition NSPACE Off (S) offline TM - is a Turing machine with a work tape,a read-only tape, a two-way read-only guess tape and a unidirectional write-only output tape. The machine is said to accept input X if there exists contents to the guess tape (a guess string Y) such that when the machine starts working with X in the input tape and Y in the guess tape it eventually enter an accepting state })( ),( ),(|{ * ** * spacexSmostatusesMyLx acceptsyxMyx MTMofflineL off
• Slide 7
• NSPACE Off Explanation This definition is based on the guess approach to non determinism Turing machine. As we replace the non deterministic transition function with a guess we use this in the definition of NSPACE Off. Since the space the machine use is of importance we limit the access to the guess tape as read only and by that we dont give extra space to the machine.
• Slide 8
• NSPACE On Definition NSPACE On online TM - A Turing machine with a work tape,a read- only input tape, a unidirectional read-only guess tape and a unidirectional write-only output tape. Again, the machine is said to accept input X if there exists a guess Y such that when the machine working on (X,Y) will eventually enter an accepting state
• Slide 9
• NSPACE On Explanation By limiting the machine to be unidirectional we get a process by which in each step the machine has to choose which way to go (similar to online decisions) and the only way to remember past decisions is by recording them on the work tape. We will show that the two definitions of NSPACE On and NSPACE Off are different.
• Slide 10
• The relation between NSPACE On and NSPACE claim (1): Where: M is an NDTM. M is an online TM.
• Slide 11
• Claim (1) - Proof Given M we can easily transform it to the online M in the following way: M simulate M, whenever M has several option in the transition function M decides which option to take according to the guess tape (and than move to the following cell on the guess tape). we can limit the guess tape alphabet to be (0,1) only since every multiple decision can be composed of several two way decision.
• Slide 12
• Claim (1) Proof (Cont) Given the online M we transform it to M : M states =, S(M) are the states of M. the transition function of M: M is in state (s,a) and reads b,c on the work,input tapestranslate to M is in state (s), reading a,b,c on the guess,work and input tapes. In this case we know the new state (s) of M and : If the guess head doesnt move M new state is (s,a). If the guess head moves M new state is chosen non deterministically from (s,e) where e can be every symbol in the alphabet
• Slide 13
• Explanation The conclusion from Claim (1) is that the families NSPACE and NSPACE On are actually the same. Since for any problem in NSPACE we can build an online machine that will use the same space (and time). This fact is very important and we will use this to prove the following theorem.
• Slide 14
• Theorem 1 Definition - configuration. A configuration is a full description of a state in the computation of a TM on a given input On a NDTM it is defined as: The Content of the Work Tape. The Position of the head on the work tape. The Position of the head on the input tape. The state of the machine.
• Slide 15
• Theorem 1 (Cont) Next we want to bound the the number of different configuration (#Conf(M,x)). We know that: where : is the number of possibilities of the work tape content. is the maximal length of the work tape. is the length of the input tape. is the number of state M has. And since we conclude that
• Slide 16
• Theorem 1 (Cont) The last thing we need to show is the following claim (2) : If there exists an accepting computation of a NDTM M on input x then there exists such a computation in which no configuration appears more than once. And because #Conf(M,x)< and each step we go to a different configuration. The number of steps (and time) <
• Slide 17
• Claim (2) - Proof Let c 0,c 1,.,c n be a description on an accepting computation. suppose: c 0,c 1,..c k, cl+1 .,c n is also an accepting computation. To prove that we will show: 1.The first configuration c 0 is an initial state of M. 2.Every configuration c i is followed by a configuration that is possible in the sense that M may move in one step from c i to c i+1. 3.The last configuration c n is in an accepting state of M.
• Slide 18
• Claim (2) Proof (Cont) Clearly properties 1 and 3 does not change by the removal of the specified configurations. Property 2 still holds since c l+1 is possible after c l and therefore possible after c k. We can iterate through this process to achieve a computation with no identical configurations.
• Slide 19
• Theorem 1- Explanation To conclude the proof of theorem (1) we combine claim (2) with the fact the the number of possible different configuration is bound, and therefore the time of the computation of machine M is bounded. By using claim (1) we know that each NDTM M has an equivalent online machine M that uses the same space and therefore we have proven the theorem.
• Slide 20
• The relation between NSPACE On and NSPACE Off Theorem (2): S is at least logarithmic. Proof : Let M on be a TM that uses S space. We define M off to do:
• Slide 21
• Theorem (2) Proof 1.M off will guess the computation of M on on a given input x. 2.M off verify the guessed computation. Verification of a computation: As in claim 2 we show that properties 1-3 holds. To verify properties 1 and 3 we only need to look at the first and last block and make sure that they stands for an initial and an accepting states of M. this can be done in O(1) Space.
• Slide 22
• Theorem (2) Proof (Cont) To verify Property 2 we need look at two blocks and check: The content of the work space is the same except perhaps the cell on which M head was on. The position of the heads of both the input tape and the work tape had not moved by more than one cell. The new state and the positions of the heads of M are possible under the transition function of M. This can be done using a fixed number of counters.
• Slide 23
• Theorem (2) Proof (Cont) A counter to Z needs log(Z) space. The counters we use count to Max(|x|,|configuration|). A configuration is: The content of the work tape O(S(x)) The location of the work head log(O(S(x))) The state of the machine O(1). The location of the input head O(log(x)). Since S is at least log(x) |configuration| = O(S(x)) for a single counter we need only log(S(x)) space
• Slide 24
• Theorem (2) Proof-Explanation We showed that we can build an offline machine that guess and verify the computation of an NDTM using only log(O(S(x))) space. The only thing we omitted is that the guess length is bounded by the number of different configuration the machine has. This is true as we showed in claim (2) that if M accepts x there is a computation which is composed of different configurations. And we also showed a bound on these number.
• Slide 25
• The relation between NSPACE Off and NSPACE On Theorem (3): S is at least logarithmic. Claim (3) : The number of time during an accepting computation of M off in which the guess tape head visits a specified cell
• Slide 26
• Claim (3) - Proof Definition: A CWG - is a configuration of an offline machine without the guess tape content and the guess head location. Again the combinatorial analysis shows that: If M off visits the same guess cell twice the same CWG the entire computational state is the same. Since M off transition function is deterministic M off is in an infinite loop
• Slide 27
• Theorem 3 (cont) Claim (4): If Than Proof Lets look at the guess tape cells c 0,c 1,c n and their content g 0,g 1,g n where n=|y|. For c i,in a computation on x, m off have visited it more than once each time with a different CWG.
• Slide 28
• Claim (4) - Proof We will call the sequence of these CWGs the visiting sequence of c i. Suppose that for k
• 1. x v (given at the input) 2. counter |V| 3. repeat 4. counter -- 5. gue