Algorithms (Feb 2019)

Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>

  • Kengo Nakamura,
  • Kunihiko Sadakane

DOI
https://doi.org/10.3390/a12030052
Journal volume & issue
Vol. 12, no. 3
p. 52

Abstract

Read online

Depth-first search (DFS) is a well-known graph traversal algorithm and can be performed in O ( n + m ) time for a graph with n vertices and m edges. We consider the dynamic DFS problem, that is, to maintain a DFS tree of an undirected graph G under the condition that edges and vertices are gradually inserted into or deleted from G. We present an algorithm for this problem, which takes worst-case O ( m n · polylog ( n ) ) time per update and requires only ( 3 m + o ( m ) ) log n bits of space. This algorithm reduces the space usage of dynamic DFS algorithm to only 1.5 times as much space as that of the adjacency list of the graph. We also show applications of our dynamic DFS algorithm to dynamic connectivity, biconnectivity, and 2-edge-connectivity problems under vertex insertions and deletions.

Keywords