Lecture7 - Notes on Complexity Theory Last updated September 2011 Lecture 7 Jonathan Katz 1 Configuration Graphs and the Reachability Method 1.1 NL

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Notes on Complexity Theory Last updated: September, 2011 Lecture 7 Jonathan Katz 1 Configuration Graphs and the Reachability Method 1.1 NL and NL-Completeness Coming back to problems on graphs, consider the problem of directed connectivity (denoted conn ). Here we are given a directed graph on n-vertices (say, specified by an adjacency matrix) and two vertices s and t , and want to determine whether there is a directed path from s to t . Theorem 1 conn is NL-complete. Proof To see that it is in NL , we need to show a non-deterministic algorithm using log-space that never accepts if there is no path from s to t , and that sometimes accepts if there is a path from s to t . The following simple algorithm achieves this: if s = t accept set v current := s for i = 1 to n : guess a vertex v next if there is no edge from v current to v next , reject if v next = t , accept v current := v next if i = n and no decision has yet been made, reject The above algorithm needs to store i (using log n bits), and at most the labels of two vertices v current and v next (using O (log n ) bits). To see that conn is NL-complete, assume L ∈ NL and let M L be a non-deterministic log-space machine deciding L . Our log-space reduction from L to conn takes input x ∈ { , 1 } n and outputs a graph (represented as an adjacency matrix) in which the vertices represent configurations of M L ( x ) and edges represent allowed transitions. (It also outputs s = start and t = accept , where these are the starting and accepting configurations of M ( x ), respectively.) Each configuration can be represented using O (log n ) bits, and the adjacency matrix (which has size O ( n 2 )) can be generated in log-space as follows: For each configuration i : for each configuration j : Output 1 if there is a legal transition from i to j , and 0 otherwise (if i or j is not a legal state, simply output 0) Output start , accept The algorithm requires O (log n ) space for i and j , and to check for a legal transition. 7-1 We can now easily prove the following: Theorem 2 For s ( n ) ≥ log n a space-constructible function, nspace ( s ( n )) ⊆ time (2 O ( s ( n )) ) . Proof We can solve conn in linear time (in the number of vertices) using breadth-first search, and so conn ∈ P . By the previous theorem, this means NL ⊆ P (a special case of the theorem)....
View Full Document

This note was uploaded on 01/13/2012 for the course CMSC 652 taught by Professor Staff during the Fall '08 term at Maryland.

Page1 / 4

Lecture7 - Notes on Complexity Theory Last updated September 2011 Lecture 7 Jonathan Katz 1 Configuration Graphs and the Reachability Method 1.1 NL

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online