A decision problem is NL-complete when and every language has a deterministic logarithmic space many-one reduction to .
The directed graph reachability problem is the standard example. It lies in NL because a machine stores the current vertex and a counter, nondeterministically guesses at most successive edges, and accepts upon reaching ; this uses space. For hardness, given an NL machine and input , construct its configuration graph. Its configurations have logarithmic length, adjacency can be computed in logarithmic space, andAdding one target joined from every accepting configuration gives the required logarithmic-space reduction.
It suffices to recognize non-reachability in NL, since directed reachability is NL-complete. Let be the number of vertices reachable from by a directed path of length at most . Clearly . The inductive counting argument computes and verifies from using logarithmic space.
For each vertex , reachability within steps has an NL certificate: guess such a path. Non-reachability within steps can be certified relative to the trusted value by enumerating vertices , exhibiting paths of length at most to exactly distinct vertices, and checking that none is or has an edge to . Because there are exactly reachable vertices, this list cannot omit a reachable predecessor. Counters, vertex names and one guessed path need only logarithmic space. Repeating this check in a fixed vertex order and counting the positive cases produces the exact .
After rounds, the procedure knows the number of all vertices reachable from . It accepts non-reachability of after certifying, by the same complete enumeration, that is absent. Thus the complement of directed reachability belongs to NL. Since every NL language reduces to reachability and log-space reductions are closed under complementation, this proves the Immerman–Szelepcsényi theorem
Membership follows from . A directed graph is not strongly connected exactly when there is a pair for which is not reachable from . Guessing the pair and using the NL procedure for non-reachability puts non-strong-connectivity in NL, hence strong connectivity is in co-NL and therefore in NL.
For NL-hardness, reduce directed reachability. Given , form by retaining all edges of , adding for every vertex , and adding for every vertex . If is reachable from in , then any reaches any in alongConversely, if is strongly connected then reaches . A simple -to- path cannot use an added edge out of before arriving at , and every added edge into merely returns the path to its starting vertex; deleting the resulting cycle leaves an -to- path made from edges of . The construction is computable in logarithmic space, so deciding strong connectivity is
Articles by others on the same topic
There are currently no matching articles.