We show that the reachability problem for directed graphs that are either K 3,3 -free or K 5 -free is in unambiguous log-space, UL ∩ coUL. This significantly extends the result of Bourke, Tewari, and Vinodchandran that the reachability problem for directed planar graphs is in UL ∩ coUL.Our algorithm decomposes the graphs into biconnected and triconnected components. This gives a tree structure on these components. The non-planar components are replaced by planar components that maintain the reachabilty properties. For K 5 -free graphs we also need a decomposition into fourconnected components. A careful analysis finally gives a polynomial size planar graph which can be computed in log-space.We show the same upper bound for computing distances in K 3,3 -free and K 5 -free directed graphs and for computing longest paths in K 3,3 -free and K 5 -free directed acyclic graphs.
IntroductionIn this paper we consider the reachability problem which is defined as follows. Given is a graph G and vertices s, t, is there a path connecting s with t. It is a widely studied problem in the complexity theory, especially in the space setting. It characterizes complexity classes, for example L or NL when considering edges as undirected or directed, respectively. It also has its importance in the graph theory.For undirected graphs, the reachability problem is L-complete [Rei05]. For general graphs, reachability is NL-complete. Bourke, Tewari and Vinodchandran [BTV07] proved that reachability on planar graphs is in UL ∩ coUL and is hard for L. They built on work of Reinhard and Allender [RA00] and Allender, Datta, and Roy [ADR05]. A more direct proof is given by Kulkarni [Kul09]. Jacoby and Tantau [JT07] showed for series-parallel graphs that reachability is complete for L. They also showed that the problem to compute distances between vertices or longest paths are complete for L. Thierauf and Wagner [TW08] proved that the distance problem for planar graphs is in UL ∩ coUL. For general graphs and even undirected * Supported by DFG grant TO 200/2-2.