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 with vertices and edges, carries out a DFS in time with $n+\sum_{v\in V_{\ge 3}}\lceil{\log_2(d_v-1)}\rceil +O(\log n)\le n+m+O(\log n)d_v$ is the (total) degree of , for each , and $V_{\ge 3}={v\in V\mid d_v\ge 3}$. A slightly more complicated variant of the algorithm works in the same time with at most bits. It is also shown that a DFS can be carried out in a graph with vertices and edges in time with bits or in time with either bits or, for arbitrary integer , 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.

生成讲解博客的中文版本

生成AI智能校验的中文版本