1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith.

Slides:



Advertisements
Similar presentations
Reductions Complexity ©D.Moshkovitz.
Advertisements

Measuring Time Complexity
Part VI NP-Hardness. Lecture 23 Whats NP? Hard Problems.
Complexity Theory Lecture 6
Variants of Turing machines
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)
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
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)
The class NP Section 7.3 Giorgi Japaridze Theory of Computability.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Concept of Completeness and hardness for a complexity class Definition.
NL equals coNL Section 8.6 Giorgi Japaridze Theory of Computability.
CSCI 4325 / 6339 Theory of Computation Zhixiang Chen.
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Complexity 15-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 11-1 Complexity Andrei Bulatov Space Complexity.
Complexity 13-1 Complexity Andrei Bulatov Hierarchy Theorem.
Complexity 18-1 Complexity Andrei Bulatov Probabilistic Algorithms.
Computability and Complexity 13-1 Computability and Complexity Andrei Bulatov The Class NP.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
P and NP Sipser (pages ). CS 311 Fall Polynomial time P = ∪ k TIME(n k ) … P = ∪ k TIME(n k ) … TIME(n 3 ) TIME(n 2 ) TIME(n)
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
More Turing Machines Sipser 3.2 (pages ). CS 311 Fall Multitape Turing Machines Formally, we need only change the transition function to.
1 Introduction to Computability Theory Lecture11: Variants of Turing Machines Prof. Amos Israeli.
Computability and Complexity 19-1 Computability and Complexity Andrei Bulatov Non-Deterministic Space.
NP-complete and NP-hard problems Transitivity of polynomial-time many-one reductions Definition of complexity class NP –Nondeterministic computation –Problems.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY Read sections 7.1 – 7.3 of the book for next time.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
NP-Complete Problems Problems in Computer Science are classified into
Computability and Complexity 20-1 Computability and Complexity Andrei Bulatov Class NL.
NP-complete and NP-hard problems
CS Master – Introduction to the Theory of Computation Jan Maluszynski - HT Lecture NP-Completeness Jan Maluszynski, IDA, 2007
Non-Deterministic Space is Closed Under Complementation Neil Immerman Richard Szelepcsenyi Presented By: Subhajit Dasgupta.
חישוביות וסיבוכיות Computability and Complexity Lecture 7 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A AAAA.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
1 Design and Analysis of Algorithms Yoram Moses Lecture 11 June 3, 2010
ATM, Halting Problem, P vs. NP Chapter 4, 5 & 7. Russel’s Paradox An Index is a book that lists other books in.
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.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 7 Time complexity Contents Measuring Complexity Big-O and small-o notation.
The Classes L and NL Section 8.4 Giorgi Japaridze Theory of Computability.
Alternation Section 10.3 Giorgi Japaridze Theory of Computability.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
Given this 3-SAT problem: (x1 or x2 or x3) AND (¬x1 or ¬x2 or ¬x2) AND (¬x3 or ¬x1 or x2) 1. Draw the graph that you would use if you want to solve this.
Complexity ©D.Moshkovitz 1 Our First NP-Complete Problem The Cook-Levin theorem A B C.
Theory of Computational Complexity Yuji Ishikawa Avis lab. M1.
Chapter 7 Introduction to Computational Complexity.
Theory of Computational Complexity TA : Junichi Teruyama Iwama lab. D3
Space Complexity Guy Feigenblat Based on lecture by Dr. Ely Porat Complexity course Computer science department, Bar-Ilan university December 2008.
 2005 SDU Lecture14 Mapping Reducibility, Complexity.
Chapters 11 and 12 Decision Problems and Undecidability.
P & NP.
Time complexity Here we will consider elements of computational complexity theory – an investigation of the time (or other resources) required for solving.
Part VI NP-Hardness.
Busch Complexity Lectures: Reductions
Reductions.
Theory of Computability
Theory of Computational Complexity
Non-Deterministic Finite Automata
CSC 4170 Theory of Computation The class NP Section 7.3.
Time Complexity Classes
CSC 4170 Theory of Computation The class NP Section 7.3.
Our First NP-Complete Problem
Variants of Turing machines
Theory of Computability
Intro to Theory of Computation
CS151 Complexity Theory Lecture 4 April 8, 2004.
Presentation transcript:

1 Nondeterministic Space is Closed Under Complement Presented by Jing Zhang and Yingbo Wang Theory of Computation II Professor: Geoffrey Smith

2 Definition of L and NL  L is the class of languages that are decidable in logarithmic space on a deterministic TM. L=SPACE(logn) NL is the class of languages that are decidable in logarithmic space on a nondeterministic TM. NL=NSPACE(logn)

3 NL-Completeness  Analogous to the question of whether P=NP, we have the question of whether L=NL.  We can exhibit certain languages that are NL-complete.  NL-complete language is the one which is in NL and any other language in NL is reducible.

4 Reducing Problems We have seen that polynomial time reducibility is a very useful concept for classifying problems in NP. In particular, it allowed us to identify the class of the hardest problems in NP - NP complete problems  But we will see this concept is not suitable for classifying problems in NL  So we need a weaker version of reducibility……..

5 Log Space Reducibility  Log Space Transducer  A log space transducer is a TM with a read-only input tape a write-only output tape and a read/write work tape that may contain O(logn) symbols  A log space transducer M computes a function f:∑* → ∑* where f(w) is the string remaining on the output tape after M halts when it started with w on the input tape.  In this case f is said to be Log space computable function

6 Log Space Reduction  Definition: Language L1 is log space reducible to L2, denoted L1≤ L L2, if a log-space computation function f exists such that x∈L1 ⇔ f(x)∈L2  Recall that a TM that uses f(n) space runs in time. So a function computable in log space is computable in polynomial time,so L1≤ L L2 ⇒ L1≤ L2

7 Definition of PATH  PATH={ | G is a directed graph that has a directed 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.

8 Definition of NL-Completeness  Like the definition of NP-complete  A language B is NL-complete if 1. B ∈ NL, and 2. every A in NL is log space reducible to B

9 Theorem: PATH is NL-Complete  Proof Idea:  We have showed PATH is in NL, we only need to show PATH is NL-hard.  For any nondeterministic log-space machine, and any input w, construct, in log space, a graph G whose nodes are the possible configurations, and whose edges are the possible transitions.  Then the machine accepts w iff some path from the node corresponding to the start configuration leads to the node corresponding to the accepting configuration.

10 Definition of coNL  coNL is the class of all languages L such that belongs to NL.  Trivially, all deterministic complexity classes are closed under complementation. With nonderterministic complexity classes, the situation is complicated.  NL?=coNL

11 Theorem: NL=coNL  Proof Idea:  Exactly as for NP and coNP, we have: if L is NL complete then is coNL complete if a coNP complete problem belongs to NL then NL=coNL.  We already proves PATH is NL complete, so it suffices to show is in NL.  Must find a nondeterministic algorithm which uses log space, and which has an accepting computation whenever the input graph G does not contain a path from s to t.

12 Proof:

13

14 Construct M: Calculate c We’re going to do this inductively, Define A(i) = the collection of nodes reachable from s in i steps, c(i) = |A(i)|. Now the c we’re looking for is 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)| v u A(i)

15 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).

16 How M runs after obtaining c? Is u verified reachable from s? Yes No Is u = t? reject Increase d, Go to next node Yes No Is d = c? Accept Reject Yes No

17 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.

18 Algorithm  On input  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.

19 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. Conclusion: NL= coNL

20 Questions?