This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full 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 NLCompleteness Coming back to problems on graphs, consider the problem of directed connectivity (denoted conn ). Here we are given a directed graph on nvertices (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 NLcomplete. Proof To see that it is in NL , we need to show a nondeterministic algorithm using logspace 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 NLcomplete, assume L ∈ NL and let M L be a nondeterministic logspace machine deciding L . Our logspace 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 logspace 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. 71 We can now easily prove the following: Theorem 2 For s ( n ) ≥ log n a spaceconstructible function, nspace ( s ( n )) ⊆ time (2 O ( s ( n )) ) . Proof We can solve conn in linear time (in the number of vertices) using breadthfirst 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.
 Fall '08
 staff

Click to edit the document details