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

Depth-first search (DFS) is a well-known graph traversal algorithm and can be performed in <inline-formula> <math display="inline"> <semantics> <mrow> <mi>O</mi> <mo>(</mo> <mi>n</mi> <mo>+</mo> <mi>m</mi>...

Full description

Bibliographic Details
Main Authors: Kengo Nakamura, Kunihiko Sadakane
Format: Article
Language:English
Published: MDPI AG 2019-02-01
Series:Algorithms
Subjects:
Online Access:https://www.mdpi.com/1999-4893/12/3/52
id doaj-6707b004512846e485f83a22a6b7644b
record_format Article
spelling doaj-6707b004512846e485f83a22a6b7644b2020-11-24T20:44:29ZengMDPI AGAlgorithms1999-48932019-02-011235210.3390/a12030052a12030052Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>Kengo Nakamura0Kunihiko Sadakane1Department of Mathematical Informatics, Graduate School of Information Science and Technology, The University of Tokyo, Tokyo 113-8656, JapanDepartment of Mathematical Informatics, Graduate School of Information Science and Technology, The University of Tokyo, Tokyo 113-8656, JapanDepth-first search (DFS) is a well-known graph traversal algorithm and can be performed in <inline-formula> <math display="inline"> <semantics> <mrow> <mi>O</mi> <mo>(</mo> <mi>n</mi> <mo>+</mo> <mi>m</mi> <mo>)</mo> </mrow> </semantics> </math> </inline-formula> time for a graph with <i>n</i> vertices and <i>m</i> edges. We consider the dynamic DFS problem, that is, to maintain a DFS tree of an undirected graph <i>G</i> under the condition that edges and vertices are gradually inserted into or deleted from <i>G</i>. We present an algorithm for this problem, which takes worst-case <inline-formula> <math display="inline"> <semantics> <mrow> <mi>O</mi> <mo>(</mo> <msqrt> <mrow> <mi>m</mi> <mi>n</mi> </mrow> </msqrt> <mo>&#183;</mo> <mi>polylog</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>)</mo> </mrow> <mo>)</mo> </mrow> </semantics> </math> </inline-formula> time per update and requires only <inline-formula> <math display="inline"> <semantics> <mrow> <mo>(</mo> <mn>3</mn> <mi>m</mi> <mo>+</mo> <mi>o</mi> <mo>(</mo> <mi>m</mi> <mo>)</mo> <mo>)</mo> <mi>log</mi> <mi>n</mi> </mrow> </semantics> </math> </inline-formula> 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.https://www.mdpi.com/1999-4893/12/3/52dynamic graphdepth-first searchbiconnectivity2-edge-connectivity
collection DOAJ
language English
format Article
sources DOAJ
author Kengo Nakamura
Kunihiko Sadakane
spellingShingle Kengo Nakamura
Kunihiko Sadakane
Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
Algorithms
dynamic graph
depth-first search
biconnectivity
2-edge-connectivity
author_facet Kengo Nakamura
Kunihiko Sadakane
author_sort Kengo Nakamura
title Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
title_short Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
title_full Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
title_fullStr Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
title_full_unstemmed Space-Efficient Fully Dynamic DFS in Undirected Graphs <sup>†</sup>
title_sort space-efficient fully dynamic dfs in undirected graphs <sup>†</sup>
publisher MDPI AG
series Algorithms
issn 1999-4893
publishDate 2019-02-01
description Depth-first search (DFS) is a well-known graph traversal algorithm and can be performed in <inline-formula> <math display="inline"> <semantics> <mrow> <mi>O</mi> <mo>(</mo> <mi>n</mi> <mo>+</mo> <mi>m</mi> <mo>)</mo> </mrow> </semantics> </math> </inline-formula> time for a graph with <i>n</i> vertices and <i>m</i> edges. We consider the dynamic DFS problem, that is, to maintain a DFS tree of an undirected graph <i>G</i> under the condition that edges and vertices are gradually inserted into or deleted from <i>G</i>. We present an algorithm for this problem, which takes worst-case <inline-formula> <math display="inline"> <semantics> <mrow> <mi>O</mi> <mo>(</mo> <msqrt> <mrow> <mi>m</mi> <mi>n</mi> </mrow> </msqrt> <mo>&#183;</mo> <mi>polylog</mi> <mrow> <mo>(</mo> <mi>n</mi> <mo>)</mo> </mrow> <mo>)</mo> </mrow> </semantics> </math> </inline-formula> time per update and requires only <inline-formula> <math display="inline"> <semantics> <mrow> <mo>(</mo> <mn>3</mn> <mi>m</mi> <mo>+</mo> <mi>o</mi> <mo>(</mo> <mi>m</mi> <mo>)</mo> <mo>)</mo> <mi>log</mi> <mi>n</mi> </mrow> </semantics> </math> </inline-formula> 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.
topic dynamic graph
depth-first search
biconnectivity
2-edge-connectivity
url https://www.mdpi.com/1999-4893/12/3/52
work_keys_str_mv AT kengonakamura spaceefficientfullydynamicdfsinundirectedgraphssupsup
AT kunihikosadakane spaceefficientfullydynamicdfsinundirectedgraphssupsup
_version_ 1716817310862278656