Space-Efficient DFS and Applications: Simpler, Leaner, Faster
Abstract
The problem of space-efficient depth-first search (DFS) is reconsidered. A particularly simple and fast algorithm is presented that, on a directed or undirected input graph G=(V,E) with n vertices and m edges, carries out a DFS in O(n+m) time with n+Σv∈ V 32(dv-1) +O( n) n+m+O( n) bits of working memory, where dv is the (total) degree of v, for each v∈ V, and V 3=\v∈ V dv 3\. A slightly more complicated variant of the algorithm works in the same time with at most n+(4/5)m+O( n) bits. It is also shown that a DFS can be carried out in a graph with n vertices and m edges in O(n+m*\! n) time with O(n) bits or in O(n+m) time with either O(n(4+m/n)) bits or, for arbitrary integer k 1, O(n(k)\! n) bits. These results among them subsume or improve most earlier results on space-efficient DFS. Some of the new time and space bounds are shown to extend to applications of DFS such as the computation of cut vertices, bridges, biconnected components and 2-edge-connected components in undirected graphs.
Turn this paper into a lesson
ArcXiv compiles a structured reading guide from this paper's metadata: plain-English importance, contributions, prerequisite concepts, which sections to read first, flashcards, and a quiz. Grounded in the abstract, never invented.