Elsevier

Theoretical Computer Science

Volume 822, 24 June 2020, Pages 1-14
Theoretical Computer Science

Fully dynamic arboricity maintenance

https://doi.org/10.1016/j.tcs.2020.04.010Get rights and content

Abstract

Given an undirected graph, its arboricity is the minimum number of edge disjoint forests that its edge set can be partitioned into. We develop the first fully dynamic algorithms to determine the arboricity of a graph under edge insertions and deletions. While our insertion algorithm is based on known static algorithms to determine the arboricity, our deletion algorithm is, to the best of our knowledge, new.

Our algorithms take O(mlogn) time to insert or delete an edge where m is the number of edges in the graph while the best static algorithm to compute arboricity takes O(m3/2log(n2/m)) time [9].

We complement our upper bound with a lower bound of amortized Ω(logn) time for an update for an algorithm that maintains a forest decomposition of size arboricity of the graph under edge insertions and deletions.

Introduction

The arboricity of a graph is defined as the minimum number of edge disjoint forests that the edges of the graph can be partitioned into [15]. A decomposition of a graph of arboricity τ has τ such spanning forests and we call it an arboricity τ decomposition. Intuitively, it is a measure of sparseness of a graph. An equivalent definition [15] for an arboricity τ of a graph G=(V,E) ismax{JV,|J|2}|E(J)|/(|J|1) where E(J) is the set of edges in the subgraph induced by the vertex set JV.

For a given graph, a 2-approximation of the arboricity can be easily calculated in O(m+n) time [7], whereas more complex algorithms exist for calculating the exact arboricity in O(m3/2log(n2/m)) time [9]. Recently, a (1+ϵ) constructive approximation scheme for arboricity was computed in O(mlognlogτϵ1) time, for every ϵ>0 [3]. Planar graphs have arboricity at most 3. Grossi and Lodi [10] gave an algorithm to show how to decompose a planar graph on n vertices into three edge disjoint spanning forests in O(nlogn) time. This decomposition also follows from Schnyder's theorem [18] in O(n) time. But these algorithms cannot differentiate between a planar graph of arboricity two or three.

In the world of dynamic graph algorithms, edges are inserted or deleted over time, and the goal is to maintain some property of the graph under these modifications in time faster than the static algorithm that starts from scratch. A dynamic algorithm is fully dynamic if it is able to support both insertion and deletion of edges; if it only supports insertions, it is called an incremental algorithm and if it supports only deletions, it is called a decremental algorithm.

For dynamic graphs, the study of arboricity in the literature has been mainly through works in orienting undirected graphs. A τ-bounded orientation of a graph G is an orientation of its edges where the out-degrees of vertices are bounded by at most τ. If a graph has arboricity τ, by rooting each tree in the forest decomposition arbitrarily and orienting each edge towards the root, we can get a τ-bounded orientation. It can also be shown that any graph with a τ-bounded orientation can be decomposed into 2τ1 forests and hence this gives a 2-approximation of arboricity [7].

Study on maintaining Δ-bounded orientations of a graph under edge insertions and deletions was initiated by Brodal and Fagerberg in [4]. On insertion or deletion of an edge, the goal was to reorient the edges of the graph efficiently so that a Δ-bounded orientation or an approximation of it was maintained. There has been subsequently a number of other works in this topic [2], [11], [12], [13] but none of them maintain the exact arboricity. So it was a natural question to look at computing the exact arboricity of the graph in the dynamic setting. Erickson [8] asks “whether there are efficient algorithms to maintain graph arboricity and/or minimal forest decompositions in dynamic graphs”.

This paper is an attempt towards answering this and in the process we give a new perspective on existing static algorithmic techniques by showing that, if carefully implemented, they give a fully dynamic algorithm.

We develop a fully dynamic algorithm for computing the exact arboricity of a graph i.e. on every edge insertion or deletion of the graph we compute the exact arboricity τ of the graph by maintaining a decomposition into τ edge disjoint spanning forests.

While our insertion algorithm is based on a known static algorithm to determine the arboricity due to Roskind and Tarjan [17], we prove some invariants about the algorithm that help to maintain the arboricity under deletion as well. Both insertion and deletion take O(mlogn) time in the worst case where m is the number of edges in the graph at that time. These bounds are an improvement over the best static bounds of O(m3/2log(n2/m)) time [9] for computing arboricity.

We complement our upper bounds with a lower bound result. We give an amortized bound of Ω(logn) for the cost of answering the arboricity query under edge insertions and deletions. We then discuss a possible idea and the difficulties to improve this lower bound to Ω(n/τ). As mnτ this also implies a lower bound of Ω(m/τ2).

Let G be a graph of arboricity τ given with the arboricity τ decomposition of its edges, to which an edge (u,v) is to be inserted. If u and v are in different trees of a forest in the decomposition, then we have nothing more to do than adding that edge to that forest. Otherwise, first we try adding this to a forest of the decomposition and remove an edge that is part of the cycle formed and try inserting that edge into another forest. This process is repeated until the endpoints of a new edge belong to two trees of a forest or somehow we can conclude that the existing decomposition is not good enough to take this new edge and that the arboricity of the graph increases. This process has the flavor of finding an augmenting path in matchings. This idea of iterative updates that use augmenting sequences dates back to the classical static algorithm to find arboricity due to Nash-Williams [14], [15] and Tutte [20].

The problem of decomposing the edges into as few forests is a special instance of the matroid partitioning problem. In this problem, the goal is to partition the elements of a matroid into a minimum number of independent sets. In our setting, edges of the given graph form the universe of the matroid and the forests of the graph form the independent sets. This matroid is usually known as graphic matroid. The known algorithms for the matroid partitioning problem, given an independence oracle for the matroid, also uses the idea of augmenting sequences in an appropriate auxiliary graph [5], [6]. Some of the steps of our dynamic algorithm for maintaining arboricity do extend to the dynamic variant of the matroid partitioning problem, but we restrict ourselves to graphic matroids, as it allows us to use some additional structural properties.

In Section 2.3, we give a brief description of the insertion algorithm by casting this algorithm as an algorithm to find a specific path in an auxiliary graph whose vertex set is the edge set of the given graph. We use this auxiliary graph terminology for the insertion and deletion algorithm we describe later. A naive implementation as in Section 2.3 results in an O(m2) insertion algorithm where m is the number of edges in the original graph. In Section 3, we use ideas from the static algorithm of Roskind and Tarjan [17] to improve the insertion time to O(mlogn). Deletion of an edge involves checking after deleting the said edge, whether the arboricity of the graph decreases. In Section 4, we give a fully dynamic algorithm that supports insertion and deletion in O(mlogn) time, by first modifying the insertion algorithm of Section 3 slightly. In Section 5, we give a lower bound of Ω(logn) for the cost of insertion into a graph with arboricity τ. In Section 6 we discuss a possible idea to extend this lower bound to Ω(n/τ), leaving this bound as a conjecture. Section 7 ends with some open questions.

Section snippets

Preliminaries

The following lemma follows easily from the alternate definition of arboricity (expression (1) in the introduction), and we use it extensively in some of our algorithms. The proof of the lemma below is discussed in Roskind and Tarjan [17].

Lemma 1

[17] Let τ be the arboricity of the given graph G(V,E). Given a decomposition of the edges of G into τ edge disjoint forests, the arboricity of G(u,v) for some (u,v)E increases if there is a subset SV containing both u and v such that S forms a subtree in

Insertion in O(mlogn) time

Roskind and Tarjan [17] gave a faster static algorithm which, translated in the language of our auxiliary graph, meant using a modification of Ged where the neighbors of a vertex pair (u,v) are the edges which form a cycle with (u,v) but just in the next forest, i.e. if (u,v)G and Fi, the ith forest (in some arbitrary ordering of the forests), then there is a directed edge from (u,v) to (x,y) if (x,y)Fi+1 and is part of the cycle formed if (u,v) is inserted in Fi+1. If (u,v)G and Fτ which

Fully dynamic algorithm

To perform the deletion efficiently, we modify the insertion algorithm slightly so that a specific invariant (described below) is maintained.

We modify the auxiliary graph Grt1, calling it Grt2 and pay attention to the order in which we visit the neighbors of a vertex in the BFS of Grt2 to implement our new insertion algorithm.

Note that the way we defined Grt1 in Section 3, the edges in the ‘last’ forest has neighbors in the first forest. So, as edges are inserted, the ‘last’ forest itself

An Ω(logn) lower bound

We now give an amortized lower bound of Ω(logn) for answering arboricity queries under edge insertions and deletions. For this, we use a lower bound on fully dynamic connectivity as stated below given by Patrascu [16] to give a reduction.

Theorem 6

[16] Consider any dynamic data structure that performs a sequence of n edge insertions and deletions that maintain the forest structure starting from an edgeless graph. Suppose the structure also supports queries of the form whether a pair of vertices are in

Towards a better lower bound

Brodal and Fagerberg [4], in their paper on maintaining orientations of dynamic graphs (see Introduction for a problem description), gave the first non-trivial lower bound for the problem of maintaining τ-bounded orientations of a graph on insertion or deletion of edges from a graph. They exhibited a graph on n vertices that is decomposable into τ spanning paths.

In particular, they show that,

Theorem 8

[4] Let A be an algorithm maintaining orientations of edges during insertion and deletion of edges in a

Conclusion

We have initiated a study to compute arboricity in fully dynamic graphs. We have recast two of the existing algorithms in the language of an auxiliary graph of the given graph and augmenting paths. It is an interesting open question as to whether one can bridge the gap between an O˜(m) upper bound and an Ω(logn) lower bound. One way to approach this is to extend our ideas given in Section 6. We need to show that the ideas hold true for all decompositions of a given graph to show a lower bound

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

References (20)

There are more references available in the full text version of this article.

A preliminary version of the paper appeared in COCOON, 2019 [1].

View full text