Undirected ST-connectivity in logspace
The undirected ST connectivity (USTC) problem is: given an undirected graph G=(V,E) and two vertices s,t, decide whether or not s and t are in the same connected component of G. The proof that USTC is in L (deterministic logspace) makes good use of expanders.
We first reviewed what results were known about USTC and the logspace complexity classes. It was known that USTC is complete for SL, languages accepted by nondeterministic logspace machines whose transition functions are "symmetric" in a certain sense. The directed version of ST connectivity is complete for NL, while connectivity in undirected forests is complete for L.
L ⊆ SL ⊆ NL ⊆ DSPACE(log2 n)
The last inclusion is from Savitch's theorem. Showing that USTC ∈ L yields L = SL.
The algorithm for USTC proceeds roughly as follows. Given input 〈G,s,t〉:
Of course, these intermediate graphs are not computed in memory. To do the last step, we only need to be able to compute GL's rotation map in logspace. This is possible, with recursive calls to the intermediate graphs, and finally using the original G's adjacency relation as the base case.
Converting G to Greg: Assuming V(G) = {1, ..., n}, we perform a replacement product on G, where each vertex u is replaced with an n-cycle whose vertices are { 〈u,v〉 | v ∈ V(G) }. If u and v were connected in G, we connect new vertices 〈u,v〉 and 〈v,u〉. We add self-loops everywhere else so that the degree becomes D16, where D is a constant we'll define later.
We label edges in the replacement cycle as 1 & 2, and possible edges between cycles as 3. In terms of the rotation map, this looks like:
It is easy to see that this construction preserves connected components, and that this rotation map can be computed in constant space. The size of the graph increases quadratically, so logarithmic quantities in the size of Greg are also logarithmic in G.
Converting Greg to an expander: This operation uses powering and zig-zag operations, so let's review how these operations affect expander properties. We say a graph is (N, D, λ) if it has N vertices, is D-regular, and λ is its 2nd largest normalized eigenvalue magnitude.
Note especially that the graph (G z H)8 has suitable degree for us to zig-zag it again with H.
The reason for the appearance of D16 is that it is possible to show with a probabilistic argument that there exists some constant D and a graph H which is (D16, D, 1/2). This will be the value of D we'll use, and the graph H will be a constant that is hard-coded into the algorithm.
Now, we define a sequence of graphs as follows:
It follows that Gi has ND16 i vertices and degree D16. Let us now see how these operations affect the λ parameter.
Let &lambdai be the λ parameter of Gi. Using a bound on the f() function from the zig-zag product, we inductively proved a lemma that &lambdai < max{ (λ0)2i, 1/2 }. In other words, the eigenvalues of the Gi sequence decrease geometrically until they reach 1/2, after which they stay below 1/2. (Actually, the argument is more subtle. We actually apply this bound to each of Gi's connected components separately, since it is only valid for connected graphs).
We also proved a lemma that for any D-regular non-bipartite graph on N vertices, its 2nd largest normalized eigenvalue magnitude is at most 1 - 1/DN2. That is, every regular graph has a nonnegligable spectral gap. Our graph G0 is non-bipartite (it has self-loops at every vertex). So combining these two observations about the eigenvalues, we see that for L = O(log N), the graph GL has λL < 1/2. Its size is also polynomial in N. The graph GL will be our final expander.
Computing GL's rotation map in logspace:
Vertices in Gi correspond to a vertex in Gi-1 along with an edge number (which together comprise a vertex in the replacement product), and edges in Gi consist of 16 "zig-zag" edge labels (due to powering the graph to the 8th power). Once the description of such a vertex 〈v,a〉 and edge label 〈i1,...,i16〉 are written down in memory, we can compute the rotation map with very little memory overhead:
The final result is is 〈v,a〉, 〈i16,...,i1〉. Note that we use a recursive call to compute the rotation map of Gi-1, which is allowed to rewrite the memory of its argument in the same manner. Analyzing this algorithm, we see that at each level of recursion, we only need to keep track of loop variable j and our position i in the recursion, taking O(log N) space.
Putting it together:
Finally, to determine connectivity between s and t, we perform a DFS on GL starting at a representative for s and looking for a representative of t. Since it is an expander with a constant spectral gap, it has logarithmic diameter, and we can bound our DFS to O(log N) steps without loss of generality.
To keep track of our position in the DFS, we only need to keep track of the current vertex's description, and the last edge label we traversed, which takes only O(log N) bits. The symmetric nature of the rotation map allows us to "back up" in the DFS tree. When we back up, we will have the label of the edge that was just taken from the vertex, which we can increment to recurse again (or back up again if it is this vertex's last unvisited edge).
We first reviewed what results were known about USTC and the logspace complexity classes. It was known that USTC is complete for SL, languages accepted by nondeterministic logspace machines whose transition functions are "symmetric" in a certain sense. The directed version of ST connectivity is complete for NL, while connectivity in undirected forests is complete for L.
The last inclusion is from Savitch's theorem. Showing that USTC ∈ L yields L = SL.
The algorithm for USTC proceeds roughly as follows. Given input 〈G,s,t〉:
- Convert G to a regular graph Greg in a way that preserves connected components.
- Amplify Greg's expansion properties by powering operations and taking zig-zag products appropriately (again preserving connected components). Call the result GL.
- Since GL is a good expander, it has logarithmic diameter. Thus we can simply perform a bounded-depth DFS on this graph from s' to determine reachibility of t'.
Of course, these intermediate graphs are not computed in memory. To do the last step, we only need to be able to compute GL's rotation map in logspace. This is possible, with recursive calls to the intermediate graphs, and finally using the original G's adjacency relation as the base case.
Converting G to Greg: Assuming V(G) = {1, ..., n}, we perform a replacement product on G, where each vertex u is replaced with an n-cycle whose vertices are { 〈u,v〉 | v ∈ V(G) }. If u and v were connected in G, we connect new vertices 〈u,v〉 and 〈v,u〉. We add self-loops everywhere else so that the degree becomes D16, where D is a constant we'll define later.
We label edges in the replacement cycle as 1 & 2, and possible edges between cycles as 3. In terms of the rotation map, this looks like:
R( 〈u,i〉, 1 ) = ( 〈u, (i-1)%n〉, 2 )
R( 〈u,i〉, 2 ) = ( 〈u, (i+1)%n〉, 1 )
R( 〈u,v〉, 3 ) = ( 〈v,u〉, 3 ), if u and v are connected in G, and ( 〈u,v〉, 3 ) otherwise
R( 〈u,v〉, i ) = ( 〈u,v〉, i ), for i > 3
It is easy to see that this construction preserves connected components, and that this rotation map can be computed in constant space. The size of the graph increases quadratically, so logarithmic quantities in the size of Greg are also logarithmic in G.
Converting Greg to an expander: This operation uses powering and zig-zag operations, so let's review how these operations affect expander properties. We say a graph is (N, D, λ) if it has N vertices, is D-regular, and λ is its 2nd largest normalized eigenvalue magnitude.
- Powering a graph (G → Gk) changes it from a (N, D, &lambda) graph to a (N, Dk, λk) graph.
- The zig-zag product G z H, where G is a (N, D16, λ) graph, and H is a (D16, D2, α) graph, results in a graph which is (ND16, D, f(λ,α)).
- Combining these two operations, if we take G and H as above, the graph (G z H)8 is (ND16, D16, f8(λ,α)).
Note especially that the graph (G z H)8 has suitable degree for us to zig-zag it again with H.
The reason for the appearance of D16 is that it is possible to show with a probabilistic argument that there exists some constant D and a graph H which is (D16, D, 1/2). This will be the value of D we'll use, and the graph H will be a constant that is hard-coded into the algorithm.
Now, we define a sequence of graphs as follows:
- G0 = Greg
- Gi+1 = (Gi z H)8
It follows that Gi has ND16 i vertices and degree D16. Let us now see how these operations affect the λ parameter.
Let &lambdai be the λ parameter of Gi. Using a bound on the f() function from the zig-zag product, we inductively proved a lemma that &lambdai < max{ (λ0)2i, 1/2 }. In other words, the eigenvalues of the Gi sequence decrease geometrically until they reach 1/2, after which they stay below 1/2. (Actually, the argument is more subtle. We actually apply this bound to each of Gi's connected components separately, since it is only valid for connected graphs).
We also proved a lemma that for any D-regular non-bipartite graph on N vertices, its 2nd largest normalized eigenvalue magnitude is at most 1 - 1/DN2. That is, every regular graph has a nonnegligable spectral gap. Our graph G0 is non-bipartite (it has self-loops at every vertex). So combining these two observations about the eigenvalues, we see that for L = O(log N), the graph GL has λL < 1/2. Its size is also polynomial in N. The graph GL will be our final expander.
Computing GL's rotation map in logspace:
Vertices in Gi correspond to a vertex in Gi-1 along with an edge number (which together comprise a vertex in the replacement product), and edges in Gi consist of 16 "zig-zag" edge labels (due to powering the graph to the 8th power). Once the description of such a vertex 〈v,a〉 and edge label 〈i1,...,i16〉 are written down in memory, we can compute the rotation map with very little memory overhead:
- To compute RGi(〈v,a〉, 〈i1,...,i16〉):
- For j = 1 to 16 do:
- 〈a,ij〉 = RH(a,ij)
- If i is odd, then do 〈 v,a〉 = RGi-1(v,a)
- For j = 1 to 16 do:
The final result is is 〈v,a〉, 〈i16,...,i1〉. Note that we use a recursive call to compute the rotation map of Gi-1, which is allowed to rewrite the memory of its argument in the same manner. Analyzing this algorithm, we see that at each level of recursion, we only need to keep track of loop variable j and our position i in the recursion, taking O(log N) space.
Putting it together:
Finally, to determine connectivity between s and t, we perform a DFS on GL starting at a representative for s and looking for a representative of t. Since it is an expander with a constant spectral gap, it has logarithmic diameter, and we can bound our DFS to O(log N) steps without loss of generality.
To keep track of our position in the DFS, we only need to keep track of the current vertex's description, and the last edge label we traversed, which takes only O(log N) bits. The symmetric nature of the rotation map allows us to "back up" in the DFS tree. When we back up, we will have the label of the edge that was just taken from the vertex, which we can increment to recurse again (or back up again if it is this vertex's last unvisited edge).

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home