1 / 23

Non-Deterministic Space is Closed Under Complementation

Non-Deterministic Space is Closed Under Complementation. Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta. Background. 1960: Myhill first defined the Linear Bounded Automata (LBA) Chomskey defined the formal languages:

reuel
Download Presentation

Non-Deterministic Space is Closed Under Complementation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta

  2. Background • 1960: Myhill first defined the Linear Bounded Automata (LBA) • Chomskey defined the formal languages: Regular, Context-Free, Context-Sensitive and Recursively Enumerable • 1962: CFL are exactly the languages accepted by non-deterministic push down automata • 1963: Landweber showed every set of languages accepted by deterministic Linear Bounded Automata was a CSL • 1964: Kuroda’s Theorem; CSL=NSPACE[n]

  3. LBA Problem: • Are the languages accepted by deterministic and Non-Deterministic LBA the same ? DCSL=NDCSL ? II. If So  Is family of CSL is closed under Complementation?

  4. NSPACE • Complexity classes correspond to bounds on resources • One such resource is space: the number of tape cells a TM uses when solving a problem • For any function f(n), we define: SPACE(f(n))={ L : L is decidable by deterministic O(f(n)) space TM} NSPACE(f(n))={ L : L is decidable by a non-deterministic O(f(n)) space TM}

  5. Immerman-Szelepcsenyi Theorem • NSPACE{f(n)} is closed under complementation for f(n)≥log{n) • Settles the question raised by Kuroda The family of CSL is closed under complementation • NSPACE=DSPACE ?

  6. Steps to Theorem Lemma1 • Suppose we are given an NSPACE[s(n)] machine M, a size s(n), initial configuration, START, and the exact number N of configurations of size s(n) reachable by M from START. Then We can test in NSPACE[s(n)] if M rejects Lemma 2 • Given START, as in Lemma 1, we calculate N – the total number of configurations of size s(n) reachable by M from START – in NSPACE[s(n)]. Theorem • For any s(n)≥log(n), NSPACE[s(n)] =co-NSPACE[s(n)]

  7. Proof Idea • For any nondeterministic log-space machine, and any input x, construct, in log space, a graph G whose nodes are the possible configurations, and whose edges are the possible transitions. • Then the machine accepts x iff some path from the node corresponding to the start configuration leads to the node corresponding to the accepting configuration. Call This problem PATH. • Show PATH NSPACE[log(n)], clearly PATH is NSPACE[log(n)] complete.

  8. …Proof Idea • Define PATH • Then the machine accepts x iff there is no path from the node corresponding to the start configuration to any of the nodes s to the node corresponding to the accepting configurations. • Show PATH NSPACE[log(n)]

  9. Configuration Graph A Computation of a NTMM on an input x can be described by a graph GMx: the accepting configuration the start configuration t s A vertex per configuration (u,v)E if M can move from u to v in one step

  10. PATH • Instance: A directed graph G and two vertices s,tV. • Problem: To decide if there is any path from s to t. • PATH NL • Proof Idea: we prove it by showing a nondeterministic log space algorithm for PATH • This TM starts at node s and nondeterministically guesses the steps of a path form s to t. • It records only the position of the current node at each step on the work tape, not entire path and nondeterministically selects the next node from among those pointed at by the current node. • Repeat this action until reaches node t and accepts, or until it has gone on for m steps and rejects.

  11. Algorithm • Start at s • For i = 1, .., |V| { • Non-deterministically choose a neighbor and jump to it • Accept if you get to t } • If you got here – reject

  12. PATH • Instance: A directed graph G and two vertices s,tV. • Problem: To decide if there is no path from s to t. • Clearly, PATH is co-NL Complete. (Because PATH is NL-Complete) • If we can show it is also in NL, then NL=co-NL

  13. Algorithm • We’re going to do this inductively, • Define A(i) = the collection of nodes reachable from s in i steps, c(i) = |A(i)|. We are looking for c(m) where m is the number of nodes in the graph • Base case: A(0) = {s} and c(0) = 1. • For each node v in G • Go through all nodes and guess whether each node is in A(i) • For each u verified to be in A(i), test if (u, v) is an edge of G. If it is, v is in A(i+1) • Count nodes number verified to be in A(i), computation branch rejects if is not c(i). • Repeat until we get c(m) = |A(m)|

  14. From c(i) to c(i+1) • For every node v in G, • Go through all the nodes of G and guess whether each one is in A(i). For each node u that is guessed to be in A(i), verify it by guessing a path from s to u in i steps. If the verification fails, reject that branch of the computation. • Count all nodes verified to be in A(i). If the number counted is not c(i), which means not all of A(i) have been found, then reject this branch of the computation. • Now we find all the nodes in A(i), count them, and check whether each on has an edge to v. • We keep a running tally of the nodes in A(i) and compare each one with v as we go, deleting each one before writing the next, and somewhere keeping a number of how many of the nodes of G we’ve checked for membership in A(i).

  15. Yes Yes Is u = t? reject Is u verified reachable from s? No reject No Increase d, Go to next node Accept Yes Is d = c? No Reject

  16. Construct M: Guess reachable nodes from s • for each node u in G, M non-deterministically guesses if u is reachable from s. • If it guesses it is, then it verifies by guessing a path of length m from s to u. If the verification fails, reject that computation branch. • If, at any point, we guess that t is reachable from s, we reject. • Keep counting how many nodes have been verified as d • – again, we have to delete them after checking them to avoid linear space. • After checking and guessing all nodes of G, we compare d with c. If d is not equal to c, we did not guess all reachable nodes from s, so we reject this branch of computation. • If d = c, and t has not been guessed, then we have guessed all the nodes reachable from s on the graph G, and t was not among them, so we accept.

  17. Algorithm • On input <G, s, t> • Let c(0) = 1 • For I = 0 to m – 1: • Let c(i+1)=0 • Let d=0 • For each node v in G: • For each node u in G • Nondeterministically either perform or skip these steps: • Nondeterministically follow a path of length i from s and if none of the nodes encountered are u, reject. • Increment d • If (u, v) is an edge of G, increment c(i + 1). Repeat for next node v • If d is not equal with c(i), reject • For each node u in G: • Nondeterministically either perform or skip these steps: • Nondeternimistically follow a path of length m from s and if none of the nodes encountered are u, reject • If u = t, the reject • Increment d • If d is not equal with c(m), reject; otherwise, accept.

  18. Space Complexity • At any time, this algorithm only needs to store c(i), d, i, m and a pointer to the head of a path. • It runs in log space.

  19. Corollary 1 • The Class of Context Sensitive Language is closed under Complementation Proof: According to Kuroda’s theorem CSL=NSPACE[n], for all L CSL Now, NSPACE[s(n)]=CO-NSPACE[s(n)] For all s(n)≥log(n) => CSL is closed under complementation

  20. Corollary 2 • NSPACE[log(n)]= (FO+pos TC) = (FO+TC) • Any formula in (FO+TC) may be expressed in the form TC[ ](0,max), where is the quantifier free first order formula and 0 and max are constants. Proof. It follows from an earlier proof where the same author proved: • NL=(FO+pos TC) and • NL can be expressed in the form TC[ ](0,max), FO=First Order Logic TC=Transitive Closure (FO+pos TC)=set of properties expressible using positive applications of TC, i.e. not using any negation sign

  21. Reference [1]Neil Immerman, “Non-deterministic Space is closed under complementation” [2] J.Hartmanis and H.B. Hunt, III, “The LBA Problem” [3] Neil Immerman, “Languages that Capture Complexity Classes” [4] S.Y. Kuroda, “Classes of Languages and Linear-Bounded Automata”

  22. Questions

  23. Assignment How FO and (FO+TC) is related to NL complexity. Please explain.

More Related