On Packing Edge-Disjoint Cycles in Digraphs and Its Applications in Connectivity Problems ()
1. Introduction
We consider the following fundamental problem in algorithmic graph theory. Given a digraph
, how many edge-disjoint directed cycles can be packed into
? Throughout the paper, a cycle in a digraph always means a directed cycle. Problems concerning packing edge-disjoint or vertex-disjoint directed cycles in directed graphs have been studied extensively [1]-[4]. It is well-known that computing the maximum size of a set of arc-disjoint directed cycles is an NP-hard problem. More broadly, understanding how degree constraints and degree sequences dictate structural properties in directed graph models—from random geometric digraphs [5] to general network topologies—remains a central theme in digraph theory.
In this paper, we consider the special cases when indegree and outdegree of every node of digraph
is (i) ≥2, (ii) ≥3. For the first case, we show that there are at least three edge-disjoint cycles in
. For the second case, we are interested not just in any cycles but in cycles of size ≥3. We show that in this case there are at least four edge-disjoint cycles of size ≥3 in
. We also give bad case examples where three and four edge-disjoint cycles, for cases (i) and (ii) correspondingly, are the best we can achieve.
In a related work, Alon et al. [6] showed that a
-regular directed graph contains a collection of at least
edge-disjoint cycles. For
, like our result, this gives three directed cycles. However, the digraphs considered in our case are more general and do not have the nice property of being regular. For
, the number of cycles in [6] is 5.5 versus 4 n our result. But the cycles found in our case are of size ≥3 which is motivated by the application discussed later; and again, we consider digraphs which are more general than 3-regular digraphs.
We also apply our results to node connectivity problems. We consider the problem of finding a minimum-weight 2-node-connected (3-node-connected) subgraph of a digraph where the indegrees and outdegrees of the nodes are ≥2 (≥3). The node connectivity problems are NP-hard, and we show that our results of finding edge-disjoint cycles lead to approximation algorithms for those problems.
The paper is organized as follows. In Sections 2 and 3, we give the algorithms of finding edge-disjoint directed cycles and the worst case examples. In Section 4, these results are used to find approximation algorithms for the node connectivity problems.
2. Packing Cycles in Digraphs with Minimum Degree 2
In this section we show that in any digraph
such that the outdegree and the indegree of any node is at least two (particularly, in any 2-node-connected digraph) there are at least three edge-disjoint directed cycles.
Definition 1 A trip is a traversal along the arcs of a directed path such that no arc in the path belongs to any previously constructed directed cycle. A trip is called forward if we traverse each arc
from
to
; it is called backward if each
is traversed from
to
.
Unless specified differently, by a trip we will mean a forward trip.
Definition 2 A digraph is called balanced if
for any node
.
Because every node has an indegree and outdegree of at least two, taking two trips in
yields two edge-disjoint directed cycles. Let
and
be those two cycles. Let
be the number of common nodes of
and
. We show the existence of the third cycle by induction on
.
Suppose
, and
is the only common node. Three cases are possible:
if
is balanced, i.e.,
, then we can get a third cycle by starting a trip from any node
.
if
then taking a forward trip from
will give a third cycle.
if
then taking a backward trip from
will give a third cycle.
Inductive step. Suppose a third cycle exists whenever
and
have less than
common nodes (
). Let’s show it for the case of
common nodes. Let
be the common nodes indexed in the order we meet them while traversing
starting from
.
Two cases are possible.
1) While traversing
starting from
we meet the common nodes in the same order as in
.
2) We meet them in a different order.
Case 1:
For any successive common nodes
and
we have paths
and
. Note that we can use these two paths interchangeably for
and
. Let
denote the set of internal nodes of
and
. We have
since
and
can’t be the same. Let
.
Start a forward trip
from
. Based on the definition of a trip,
is a directed path that does not include any arcs from
and
. Consider cases.
Subcase 1.1. The trip results in a cycle
before hitting any node from
. In this case
is the third cycle.
Subcase 1.2. We are not in subcase 1. Suppose the first node of
hit by the trip is
. Let
be the last node from
visited before
in trip
. Then the path
can serve as a shortcut for one of the original cycles, say
(see Figure 1). The new cycle
does not contain
, and thus
has less than
common nodes with
. Then by induction we have a third cycle.
Figure 1. Example of Subcase 1.2 in the proof for the third cycle.
path
.
Starting a backward trip
from
will result in similar three subcases. In
the first two subcases we will get a third cycle. In the third subcase a path
will be obtained.
After having these forward and backward trips for any
:
that even if some of these paths use the same arcs, the union of all the paths forms a strongly connected subgraph from which a directed cycle can be obtained.
Case 2:
Note that the number of common nodes of
and
is at least three in this case. For some common nodes
,
which are successive on
we have
(always can achieve this by reindexing). So
creates a shortcut for
, i.e.,
is a directed cycle such that
(see Figure 2).
Figure 2. Example of Case 2.
Consider the graph
. In this graph, each node on cycle
contributes exactly 1 to both its indegree and outdegree via
, and the same is true for
. Therefore, indegree equals outdegree for every node in
, so
is balanced. Now consider the graph
. It is obtained from graph
by removing the arcs of the directed cycle
. Since removing
decreases both the indegree and outdegree of its incident nodes by exactly 1, balance is preserved, and
is also balanced.
Note that
has indegree and outdegree 2 in
, as it lies on both
and
but not on
. In
, we initiate a forward trip
from
along one of its outgoing arcs. Because
is balanced, entering any node for the first time guarantees an unused outgoing arc to continue
. Since
has a finite number of nodes,
must eventually revisit a node, forming a directed cycle
. Removing
yields a balanced graph
. (The argument is the same as the one given for
in the previous paragraph.) Because
had outdegree 2 in
, its outdegree in
is at least 1. We can therefore initiate a second trip
from
in
, which similarly (as in case of
) yields a directed cycle
. Thus,
contains at least three edge-disjoint cycles
and
.
Note that in a worst-case scenario three cycles is the best we can achieve. To illustrate that, consider the following simple example. Let
be a 3-node complete digraph:
,
. In this graph we can find at most three edge-disjoint directed cycles:
,
,
.
3. Packing Cycles in Digraphs with Minimum Degree 3
In this section we show that in any digraph
such that the outdegree and the indegree of any node is at least three (particularly, in any 3-node-connected digraph) there are at least four edge-disjoint directed cycles of size ≥3.
As before, by having a trip we will mean traversing the arcs of a directed path which doesn’t include arcs from previous trips (since we want to get edge-disjoint cycles). A trip is called forward if we traverse each arc
from
to
; it is called backward if each
is traversed from
to
. Unless specified differently, by a trip we will mean a forward trip.
A digon is a pair of opposite arcs. If a digraph consists only of digons, and ignoring the directions will make it an undirected tree, then the digraph is called digon-tree. For an example of a digon-tree see subgraph
of Figure 3.
Lemma 1 Every strongly connected directed graph
is either a digon-tree or contains a directed cycle of length at least 3.
Proof: We consider two exhaustive cases based on the symmetry of the arcs in
.
Case 1: Every arc in
belongs to a digon. That is, for every pair of vertices
, the arc
if and only if
. Let
be the undirected graph obtained by replacing each digon
in
with a single undirected edge
. Since
is strongly connected,
is connected.
If
is an undirected tree, then by definition
is a digon-tree.
If
is not a tree, it contains an undirected cycle
of length at least 3. Because every edge in
corresponds to a digon in
,
induces two orientation-opposite directed cycles in
, each of length at least 3.
Case 2: There exists an arc
such that
. Since
is strongly connected, there exists a directed path
from
to
in
. Because
, the path
must contain at least two arcs. Concatenating the arc
with
yields a directed cycle
of length at least 3.
3.1. Existence of Three Directed Cycles
In this subsection we will show that in any digraph
such that the outdegree and the indegree of any node is at least three, there are at least three edge-disjoint directed cycles of size ≥3.
To obtain the first cycle, start a forward trip
from any node
. The strategy for building
is to avoid returning to the node visited immediately before the current node (i.e.,
). This is always possible because every node has an outdegree of at least 3. Because the total number of nodes in
is finite,
cannot visit new nodes indefinitely and must eventually revisit a previously visited node. Let
(with
) be the first repeated node. The subtrip
forms a simple directed cycle
. Since immediate backtracking was prohibited,
, ensuring
has size at least 3.
To obtain the second cycle, delete the arcs
from
. Because
is a simple cycle, removing its arcs decreases both the indegree and outdegree of each node on
by exactly 1. Thus, every node in
retains an indegree and outdegree of at least 2. We then start a second trip
in
using the same non-backtracking rule (
), which remains possible since the outdegree is at least 2. By finiteness,
must close a loop to form a simple directed cycle
. Avoiding immediate backtracking again guarantees that
has size at least 3, and by construction,
is arc-disjoint from
.
To get a third cycle start a trip from any node using the same strategy as before: if possible do not return to the node visited right before the current node. This time it is not always possible since
and
might have used two outgoing arcs of some nodes. Let
be the set of those nodes.
Suppose at some point of our trip we do not yet have the third cycle and we are stuck at some node
, i.e., all the outgoing arcs of
have been used before.
Partition the whole trip
into two parts
and
where
is the subtrip up to the first visit to
and
is the subtrip after that point on. Note that
is a strongly-connected balanced subgraph. Since
does not contain any directed cycles of size ≥3 then it is a digon-tree, based on Lemma 1 (see Figure 3).
Figure 3. Partitioning the trip to
and
.
Note that the only common node of
and
is
; otherwise,
would contain a cycle of size ≥3. Then any leaf
of the digon-tree
is from
; otherwise, based on our strategy we wouldn’t return from
to the node visited right before it (if
is a leaf of
then
, otherwise we would not be stuck at
). Thus,
contains at least two nodes from
, and so at least two nodes
from
. Let
such that
. Then
and
are edge-disjoint cycles of size
≥3 (see Figure 4).
Figure 4. Getting the third cycle.
So we have three edge-disjoint directed cycles of size ≥3:
,
and
.
3.2. Existence of the Fourth Directed Cycle
Let
,
and
be the first three edge-disjoint cycles and
be the number of their common nodes. We show the existence of the fourth cycle by induction on
.
. The arguments to get the third cycle in subsection 3.1 are still valid in this case to get a fourth cycle. Here
is defined as the set of the nodes shared by exactly two of the three cycles. Note that any two nodes from
are on the same cycle
for some
.
Suppose
, and
is the only common node. This time
is defined as the set of the nodes shared by two or three cycles. Three cases are possible:
◇ if
is balanced, i.e.,
, then we can get a fourth cycle by starting a trip from any node
and applying the arguments of subsection 3.1.
◇ if
then taking a forward trip from
will give a fourth cycle.
◇ if
then taking a backward trip from
and applying arguments dual to those in subsection 3.1 will give a fourth cycle.
. Suppose a fourth cycle exists whenever
,
and
have less than
common nodes. Let’s show it for the case of
common nodes. Let
be the set of the common nodes.
Two cases are possible.
1) While traversing
and
starting from
we meet the common nodes in the same order as in
.
2) We meet them in a different order.
Case 1:
Subcase 1.1:
does not have any intersection with
for
,
. Then let
denote the set of internal nodes of
.
Start a forward trip
from a node
.
Suppose we get stuck in
before hitting any node outside it. If we get a cycle of size ≥3 inside
, then we have a fourth cycle. Suppose we do not have a cycle and get stuck in node
, by getting a digon at the end of the trip. Then
is visited more than once, and the subtrip of
after visiting
the first time is a digon-tree
(could be just a digon like in Figure 5). Note that each leaf of the digon-tree belongs to two of the three cycles, based on our strategy of avoiding digons in the trips. Take two nodes
and
on
such that (i) each of them belongs to two of the three cycles, (ii) no other node on the
-path connecting them belongs to two cycles. Then one of the three cycles, say
, contains both
and
. If there are other nodes on the
-path connecting
and
that belong to
, then we can replace
and
with other nodes on
that belong to
and the
-path connecting them does not have nodes from
. Suppose we encounter
before
while traversing cycle
from
to
. Then we can replace
with cycle
which has size ≥3 (see Figure 5).
Next, we show that
share no common nodes. Any node on the path
belongs to
and to at most one of
and
; thus, replacing
with
cannot create a node common to all three cycles
. Furthermore, by the construction of
(part (ii) above), no interior node of
belongs to more than one of
. More specifically, each interior node of
(if any exist) belongs to exactly one of
and
. Consequently, after replacing
with
, each interior node of
will belong to
and to exactly one of
and
. In summary,
have no common nodes, allowing us to apply the induction hypothesis.
Figure 5. Example of Subcase 1.1.
Suppose we hit a node outside
, and the first node of
hit by the trip is
. This is a situation similar to subcase 1.2 of Section 2: trip
will give a shortcut for one of the three cycles. Let
be the last node from
visited before
in trip
. Then the path
can serve as a shortcut for one of the original
cycles, say
. The new cycle
does not contain
.
By construction, the path
contains the exact same set of common nodes
as before, with the exception of
, which is excluded because
.
Furthermore, the interior of the path
contains no nodes from
. Consequently, the number of nodes common to
,
, and
is strictly less than
(specifically,
), allowing us to obtain a fourth cycle by induction.
Suppose we hit a node outside
, and the first node of
hit by the trip is
. This case is handled like subcase 1.3 of Section 2. If the forward trip
hits
and the backward trip
hits
for all
, then the union of all forward and backward trips will give a fourth cycle.
Figure 6. Example of Subcase 1.2 in the proof for the fourth cycle.
Subcase 1.2:
has intersection with
for
,
. Let
,
, and
is an intersection node. Then define two new
cycles:
,
(see Figure 6).
Number of common nodes of cycles
is less than the number of common nodes of cycles
. Particularly,
are not common nodes now.
On the other hand, no new common nodes are created. For instance, if the path
in
intersects the path
in
as well as
, then any such intersection would also be a common node of
,
, and
. Furthermore, since
is a simple directed cycle, the path
in
cannot share any vertices with the paths
(except for
) or with
in
. The arguments for the remaining pairs of paths, one from
and the other from
, are identical.
Even in the case when
coincides with
and
coincides with
, the number of common nodes will go down by two.
Thus, we can apply induction in this case.
Case 2:
’s are encountered in different order while traversing the three cycles. Note that in this case the number of common nodes is at least three.
Subcase 2.1: The order of
’s is
or
(the opposite order of
) for the cycles. Let
and
have the same order
while
has order
.
If
has intersection with
for
, then we can apply the idea of Subcase 1.2.
Otherwise we can interchange
and
for any
. Let
and
.
and
are strongly-connected balanced digraphs. For given
,
and
cannot be both digon-trees since
and
are different. For every
, interchange
and
so that
contains a directed cycle
of size ≥3. We have at least three edge-disjoint
’s obtained this way because the number of common nodes of
is at least three in this case. Since we also have
, then the number of directed cycles of size ≥3 is at least four.
Subcase 2.2: Two of the three cycles have neither the same nor the opposite directions. Let
and
be those two cycles. Let
be the order we encounter the common nodes on cycle
. Then for some
, the node following
on cycle
is neither
nor
. Suppose that node is
(see Figure 7).
Figure 7. Example of Subcase 2.2.
Let
and
.
and
are strongly-connected balanced graphs. Since
,
cannot be a digon-tree and contains a directed cycle
of size ≥3. Similarly, since
,
cannot be a digon-tree and contains a directed cycle
of size ≥ 3.
Note that the set
of common nodes of
,
,
is a subset of
. But
. Thus,
,
and taking
,
and
as the first three cycles we will get a fourth cycle by induction.
3.3. Worst-Case Example
Note that in a worst-case scenario four cycles is the best we can achieve. To illustrate that, consider the following example. Let
be a complete digraph on a 4-node set
. In this graph we can find at most four edge-disjoint directed cycles of size ≥3:
,
,
,
. This is not surprising since the total number of edges is only 12 in this example.
4. Approximation Algorithms for k-Vertex-Connectivity Problems
Connectivity is a fundamental problem to the study of graphs and graph algorithms. In this paper we consider uniform connectivity problems in directed graphs. A strongly connected graph is said to be
-vertex-connected (or simply
-connected) if the deletion of at most
vertices still leaves the graph strongly connected. A set of paths from vertice
to vertice
is said to be openly disjoint if they do not share any internal vertices. This definition is extended to the case when
or
is replaced by a set of vertices as follows: a set of
paths from
to a set of vertices
(from
to
) with
is openly disjoint if the paths are all vertex-disjoint, except for sharing the endpoint
(or
), and each of the
paths ends (starts) at a distinct vertex of
. If
(
) then we find
openly disjoint paths from
to the vertices in
(from the vertices in
to
).
The
-vertex-connectivity problem in directed graphs is the following. The input is an integer
, a
-connected digraph
and a weight function
on the edges of
. The goal is to find a minimum-weight
-connected spanning subgraph of
.
The practical motivation to study the problem is the following. Let
be a collection of all possible links for a proposed a telecommunications network. The weight
of edge
represents the cost of building and including
in the network. A minimum spanning tree in
is the cheapest network that will allow all the sites in
to communicate. But such a network is highly susceptible to failures, since it cannot survive a failure of a single link or site. For more reliable communication, higher connectivities of the sites are necessary. A
-vertex-connected allows communication between functioning sites even after as many as
sites have failed.
The
-vertex-connectivity problem is known to be NP-hard. Approximation algorithms have been developed for many related NP-hard connectivity problems [7]. We will discuss those problems where triangle inequality holds for edge weights.
For the
-vertex-connectivity problem in undirected graphs, Khuller and Raghavachari [8] gave an approximation algorithm which has an approximation factor of
. Kortsarz and Nutov [9] obtained a
-approximation algorithm for the
-vertex-connectivity problem in directed graphs. In this paper, we combine some ideas from [8] with our results from sections 2 and 3 to obtain approximation algorithms for the
-vertex-connectivity problem in directed graphs when
and
.
4.1. Basic Technique
The main algorithm given in this subsection is similar to the one given in [8] for the undirected case.
First consider the following related problem. The input is a directed graph
with nonnegative weights on the edges, a root vertex
and an integer
. The goal is to find a minimum-weight directed subgraph
of
, such that for each vertex
there are
openly disjoint paths from
to
(alternately, from
to
for each
) in the subgraph
. Frank and Tardos [10] gave an algorithm which solves this problem in polynomial time. We will use that algorithm as a subroutine for solving our problem.
In the algorithm for solving the
-vertex-connectivity problem, using a set of root vertices
plays an important role. Below we will discuss two subroutines that use root vertices. Those are called ROOT-VERTICES-IN (
) and ROOT-VERTICES-OUT (
). The input of both subroutines is a
-vertex-connected directed graph
, a nonnegative weight function
defined on the edges, and a set
of
vertices. The output of ROOT-VERTICES-IN (
) (ROOT-VERTICES-OUT (
)) is an approximate minimum-weight subgraph of
in which there are
openly disjoint paths from any vertex
to
(from
to any vertex
). Note that
could be in
, in which case we find
paths from
to the remaining vertices in
(from remaining vertices of
to
).
The algorithm ROOT-VERTICES-OUT (
) works as follows. Augment
by adding a new vertex
and add
new directed edges of weight 0 from
to each vertex in
. Use the algorithm of [10] on this graph with
as the root and find a minimum-weight subgraph
with
openly disjoint paths from
to any vertex of
. Since these disjoint paths go through the vertices of
, for any vertex
in
, there are
openly disjoint paths from
to
in
.
The algorithm ROOT-VERTICES-IN (
) works similarly. Augment
by adding a new vertex
and add
new directed edges of weight 0 from each vertex in
to
. Use the algorithm of [10] on this graph with
as the root and find a minimum-weight subgraph
with
openly disjoint paths from any vertex of
to
. Since these disjoint paths go through the vertices of
, for any vertex
in
, there are
openly disjoint paths from
to
in
.
Let
and
be the subgraphs of
obtained from correspondingly
and
by deleting
and its adjacent edges.
Lemma 2 There are
openly disjoint paths from
to
in
. For any
, there are
openly disjoint paths from
to
in
. There are
openly disjoint paths from
to
in
. For any
, there are
openly disjoint paths from
to
in
.
Lemma 3 The weight of
(
) is not more than the weight of a minimum-weight
-vertex-connected spanning subgraph of
.
Proof: We will give the proof for
; the proof for
is similar. Let
be a minimum-weight
-vertex-connected spanning subgraph of
. Add the zero-weight edges from
to the vertices of
to obtain a new subgraph
.
has
openly disjoint paths from
to each vertex of
. Since the algorithm of [10] returns a minimum-weight solution
satisfying that property, we have that
.
4.2. The Main Algorithm
The algorithm for the
-vertex-connectivity problem first finds a subset
of
vertices such that the complete graph induced on
is relatively low-weight. Then it calls ROOT-VERTICES-IN(
) and ROOT-VERTICES-OUT(
) to obtain subgraphs
and
of
. The algorithm returns
as its output, where
is the complete subgraph on
.
First, we show that the output of the algorithm is
-vertex-connected, regardless how we find
.
Lemma 4 The subgraph
is
-vertex-connected.
Proof: The proof by contradiction. Assume that the graph contains a vertex cut
with
, i.e., the removal of
breaks
into strongly-connected components
, where
. Since
is a complete subgraph of
, all vertices of
remaining after the removal of
belong to
for some
. Consider a vertex
for some
. By lemma 2 there must be
openly disjoint paths from
to
and
openly disjoint paths from
to
in
. Thus, the removal of less than
nodes will leave
strongly connected to the remaining nodes of
. This is a contradiction since
.
The key of getting a good approximation factor is to find a low-weight
. Next, we will show how to achieve that for
by using our results in sections 2 and 3.
4.3. Approximation Factor for
For
, the subset
is chosen as the nodes of the minimum-weight digon in
. It can be found in
time since there are
possible digons.
Theorem 1 The total weight of
is at most
times the optimum.
Proof: Let
be a minimum-weight 2-vertex-connected spanning subgraph of
. Based on the result of section 2,
has at least three edge-disjoint directed cycles:
. Since each digon is itself a cycle,
Based on lemma 3,
4.4. Approximation Factor for
For
, the subset
is chosen as the nodes of the minimum-weight directed
cycle
of size 3 in
. It can be found in
time since there are
possible directed cycles of size 3.
Theorem 2 The total weight of
is at most
times the optimum.
Proof: Let
be a minimum-weight 3-vertex-connected spanning subgraph of
. Based on the result of section 3,
has at least four directed cycles of size ≥3:
. For any
, let
be a directed cycle of size 3 obtained from
by taking shortcuts if necessary. Based on the triangle inequality,
, for
. Therefore, since
is the minimum-weight directed cycle of size 3,
, for
.
Thus,
(1)
Let
be the cycle of the opposite orientation to
, that is, if
then
. Based on the triangle inequality,
Adding up the left and right hand sides of the above three inequalities will result in
. (2)
That is, the weight of the cycle of the opposite orientation to
is no more than twice the weight of
. Based on (1) and (2),
.
Using also the results of lemma 3,
4.5. Complexity Analysis
The total running time of the algorithm is dominated by finding the set
and executing the two calls to the Frank–Tardos subroutine, ROOT-VERTICES-IN (
) and ROOT-VERTICES-OUT (
). For an input digraph
with
and
:
Root Set Identification: For
, finding the minimum-weight digon requires
time by inspecting all
vertex pairs. For
, finding the minimum-weight directed 3-cycle takes
time by inspecting all
candidate 3-cycles.
Subroutine Executions: For constant
, the subroutines ROOT-VERTICES-IN or ROOT-VERTICES-OUT have
running time [10].
Since
in strongly connected digraphs, the
subroutine phase bounds the total execution time. Thus, the main algorithm achieves an overall time complexity of
for both
and
.
5. Future Directions
Getting similar results in digraphs of minimum degree
for general
would be interesting. That result could be used to get approximation algorithms for general
-vertex-connectivity problems.
Furthermore, it would be natural to extend these cycle-packing techniques to more refined network resilience metrics. In particular, investigating whether degree-constrained cycle packings can yield structural bounds for super connectivity [11] or approximation guarantees for
-robustness in networks [12] presents a promising direction for future research.
Another interesting question is whether the cycle packing properties could be used to obtain approximation algorithms for other network design problems.