It must then show that every other language in L can be reduced to STRONGLY-CONNECTED in log space. This is accomplished by setting PATH to STRONGLYCONNECTED. Consider the reduction below.
“On input (G, s, t)
- Copy the entire file G to the output tape..
- Furthermore, for each node i in G,
- Output an edge from i to s.
- Output an edge from t to i.
If a path exists from s to t, the resulting graph is truly strongly connected, because every node may now reach every other node via the s-t path. Because the only additional edges in the produced graph go into s and out of t, there can't be any new methods to travel from s to t if there is not a path from s to t, the constructed graph is not tightly connected.
Finally, we must confirm that a log space transducer can truly do the reduction. Indeed, despite the fact that the output has a size of , the only space required to accomplish the reduction is that which was previously utilised to keep a record of the node number i in the for loop.
Thus, from the above discussion it is clear that STRONGLY-CONNECTEDis NL-complete.