Contents

Computing the (k+2)-Edge-Connected Components in k-Edge-Connected Digraphs in Subquadratic Time

The project

Showcase

All papers

Loukas Georgiadis, Evangelos Kipouridis, Evangelos Kosinas, Charis Papadopoulos and Nikos Parotsidis

ICALP 2026 (LIPIcs, vol. 374)DOI 10.4230/LIPIcs.ICALP.2026.95Theoretical computer science: Algorithms, complexity and games

  • article
  • showlabels
  • fullpage
  • wrapfig
  • algorithm2e

CC BY 4.0, published at drops.dagstuhl.de. “Computing the (k+2)-Edge-Connected Components in k-Edge-Connected Digraphs in Subquadratic Time” by Loukas Georgiadis, Evangelos Kipouridis, Evangelos Kosinas, Charis Papadopoulos, Nikos Parotsidis, arXiv:2604.27474v1 (published in ICALP 2026, LIPIcs vol. 374, 10.4230/LIPIcs.ICALP.2026.95). Licensed under CC BY 4.0. Typeset here by reflowtex from the authors' source.

Computing the (k + 2)-Edge-Connected Components in k-Edge-Connected Digraphs in Subquadratic Time

Loukas Georgiadis∗ Evangelos Kipouridis† Evangelos Kosinas‡ Charis Papadopoulos§ Nikos Parotsidis¶

Abstract

Computing edge-connected components in directed and undirected graphs is a fundamental and well-studied problem in graph algorithms. In a very recent breakthrough, Korhonen [STOC 2025] showed that for any fixed k, the k-edge connected components of an undirected graph can be computed in linear time. In contrast, the directed case remains significantly more challenging: linear-time algorithms are only known for k ≤ 3, and for any fixed k > 3, the best known bound for sparse or moderately dense graphs is still the O(mn)-time algorithm of Nagamochi and Watanabe (1993).

In this paper, we break the O(mn) barrier for all k = o(n1/4/√log n). We present a randomized algorithm that computes the (k + 2)-edge-connected components of a k-edge-connected directed graph in O(k2m√n log n) time, for any k. This constitutes the first improvement over the classic Nagamochi–Watanabe bound for any constant k > 3. Our approach introduces new structural insights into directed edge-cuts and combines these with both new and existing techniques. A central contribution of our work is a substantial simplification and generalization of the framework introduced in [21], which achieved an O(m√m) bound for computing the 3-edge-connected components of a digraph. In addition, we develop a variant of our algorithm that achieves the same O(m√n log n) running time for computing the 4-edge-connected components of a general directed graph.

Contents

1 Introduction

1.1 Our results

1.2 Related work

1.3 Overview of our techniques

1.4 Comparison to previous work

2 Technical Overview

2.1 Preliminaries and notation

2.2 (k + 1)-edge-connected component decomposition

2.3 Computing the (k + 2)-edge-connected components through the minimum (k + 1)-out sets

2.4 Sampling for large M-sets and computing good partitions

2.5 Proof of the main theorem

2.6 Computing the 4-edge-connected components

3 Basic definitions

3.1 The operator of local edge connectivity

3.2 Minimum (k + 1)-out sets

3.3 Latest mincuts

4 Finding good partitions induced by the large M-sets

4.1 Proof of Proposition 9 (using the Picard-Queyranne graph)

4.2 Proof of Proposition 10

5 Edge-connected components decompositions

5.1 (k + 1)-ECC decomposition of a k-edge connected digraph

5.1.1 First phase

5.1.2 Second phase

5.1.3 Correctness proof

5.1.4 Running time

5.2 3-edge-connected component decomposition of a general digraph

5.2.1 3-ECC decomposition of a 2CLG

5.2.2 First phase

5.2.3 Second phase

5.2.4 Correctness proof

5.2.5 Running time

6 Local search for M-sets

6.1 Deterministic local search

6.2 Randomized local search

7 Extending to (k + 3)-edge-connected components

1 Introduction

Computing edge-connected components in directed and undirected graphs is a fundamental problem in graph algorithms, motivated by several applications (see, e.g., [35]), and has been extensively studied. Before discussing related work and our contributions, we begin with the necessary definitions.

Let G = (V, E) be a strongly connected directed graph (digraph) with n vertices and m edges. A set of edges C ⊆ E is called a cut if the graph G \ C is not strongly connected. If |C| = k, we refer to C as a k-cut of G. For any pair of vertices v, w ∈ V, we say that a cut C separates v from w if there is no v–w path in G \ C; in this case, we call C a (v, w)-cut. We denote by λ(v, w) the size of a minimum (v, w)-cut. A digraph G is said to be k-edge-connected if it has no cuts of size at most k − 1, that is, if λ(v, w) ≥ k for all pairs of vertices v, w ∈ V.

Figure 1: A k-edge-connected digraph. The weight on each edge corresponds to its multiplicity. Vertices u and v are (k + 1)-edge-connected but not (k + 2)- edge-connected (e.g., (v, u) and the k edges (x, s) form a (k + 1)-cut separat- ing v from u). We say that two vertices v and w are k-edge-connected, denoted by v ↔k w, if there exist k edge-disjoint directed paths from v to w and k edge-disjoint directed paths from w to v. See Figure 1. (Note that a path from v to w and a path from w to v need not be edge-disjoint.) By Menger’s theorem [32], v ↔k w if and only if the removal of any set of at most k − 1 edges leaves v and w in the same strongly connected component. A k-edge-connected component of a digraph G = (V, E) is a maximal subset U ⊆ V such that u ↔k v for all u, v ∈ U. The k-edge-connected components of G form a partition of V, since the relation ↔k is an equivalence relation [19]. The same definition applies analogously to undirected graphs.

For undirected graphs, the problem of computing the k-edge-connected components is very well understood. Until recently, linear-time algorithms were known only for k ≤ 5 [14, 16, 17, 25, 30, 33, 34, 40, 43]. In a significant recent breakthrough, Korhonen [29] introduced an algorithm with running time O(m + kO(k2)n) for computing the k-edge-connected components of an undirected graph, which is linear in the number of edges for any fixed k.

The directed case remains more challenging. Until recently, linear-time algorithms were known only for k ≤ 2 [40, 20]. GKPP [21] presented a randomized (Monte-Carlo) algorithm that computes the 3-edge-connected components of a digraph with m edges in O(m3/2) time.1 Their algorithm applies an involved extension of the framework of [12, 37] for deciding whether a digraph is (k + 1)-edge-connected. It is based on a local search procedure [8, 12], initiated from sampled vertices, which identifies 2-out sets or 2-in sets, that is, vertex sets S that have 2 outgoing edges to V \ S or 2 entering edges from V \ S. After finding such a set S, [21] applies an efficient graph operation for replacing S with a gadget of small size that preserves the pairwise connectivity among the vertices of V \ S. Georgiadis, Italiano, and Kosinas [18] later presented a deterministic linear-time algorithm for computing the 3-edge-connected components of a digraph. This result is based on an adaptation of the minset-poset technique of Gabow [15] for identifying minimal k-in sets in (k − 1)-edge-connected digraphs, combined with a characterization of 2-in sets using the concept of strongly divergent spanning trees [22].

1The O(·) notation hides polylogarithmic factors.

For any fixed k > 3, the best known bound for computing the k-edge-connected components of a sparse or moderately dense digraph remains O(mn), as given by the algorithm of Nagamochi and Watanabe [36]. Unfortunately, both approaches proposed in [21] and [18] appear difficult to extend to the case k > 3. Specifically, [21] applies a graph transformation that replaces a 2-in set or a 2-out set S with a small gadget that preserves the pairwise connectivity of the vertices in V \ S. The fast construction of this gadget relies crucially on the simple structure of 1-cuts. In contrast, [18] computes minimal 2-in set sets by exploiting properties of two strongly divergent spanning trees rooted at a designated vertex s. Extending this technique to k > 3 would require, at minimum, an efficient method for computing k − 1 spanning trees with similar properties. However, Huck [27] showed that such spanning trees do not always exist: there are k-vertex-connected digraphs where, for a fixed start vertex s, do not have such collection of spanning trees.

1.1 Our results

In this paper, we present the first improvement over the classical bound of Nagamochi and Watanabe [36] for any constant k > 3 in k-edge-connected directed graphs. Specifically, we develop a novel randomized algorithm that computes the (k + 2)-edge-connected components of a k-edge-connected digraph in O(k2m√n log n) time, for any k. Hence, we break the O(mn) barrier for k = o(n1/4/√log n). Our first main result is summarized in the following theorem.

Theorem 1. Let G be a k-edge-connected digraph, and let δ be a parameter with 0 < δ < 1. There exists a randomized algorithm that runs in O(k2m√n log(n/δ)) time and outputs a partition P of V(G) satisfying the following guarantees:

• Every two (k + 2)-edge-connected vertices of G belong to the same set of P.

• With probability at least 1 − δ, every two vertices of G that are not (k + 2)-edge-connected are separated by P.

Hence, we achieve a significant improvement over the O(mn) bound of Nagamochi and Watanabe for all graph densities. Our approach introduces new structural insights into directed edge-cuts and combines these with both new and existing techniques. A key contribution of our work is a substantial simplification and generalization of the framework proposed in [21], which achieved an O(m√m ) bound for computing the 3-edge-connected components of a digraph. We also give an extension of our algorithm that computes the (k + 3)-edge-connected components of a given (k + 2)-edge-connected component S of G in O(k3m|S| log(|S|/δ)) time.

Furthermore, we develop a variant of our algorithm that achieves O(m√n log n) running time for computing the 4-edge-connected components of a general directed graph.

Theorem 2. Let G be a digraph, and let δ be a parameter with 0 < δ < 1. There exists a randomized algorithm that runs in O(m√n log(n/δ)) time and outputs a partition P of V(G) satisfying the following guarantees:

• Every two 4-edge-connected vertices of G belong to the same set of P.

• With probability at least 1 − δ, every two vertices of G that are not 4-edge-connected are separated by P.

Note that Theorem 2 is not subsumed by Theorem 1, as we do not require the input digraph G to be 2-edge-connected. We also remark that all our results apply to multigraphs, that is, the input graph may contain parallel directed edges.

Our algorithm loosely follows the framework of GKPP [21] in that it repeatedly performs local searches from sampled vertices. However, it replaces certain bottleneck computations of [21] by exploiting new structural insights into directed edge-cuts and combines both new and existing techniques, as detailed below.

1.2 Related work

Connectivity-related problems are known to be much more difficult in directed graphs than in undirected graphs (see, e.g., [15, 24, 28]). Cuts in undirected graphs can be represented compactly by the Gomory-Hu tree (or cut tree), which can be used to identify the k-edge-connected components of undirected graphs, for any k. Furthermore, many efficient algorithms for computing Gomory-Hu trees are available (see e.g., [1, 2, 3, 9, 23, 31]). An O(m + nk3)-time algorithm for computing the restricted version of the Gomory-Hu tree, that captures edge-cuts of size at most k, was presented by Hariharan, Kavitha, and Panigrahi [23]. In a breakthrough result, Korhonen [29] showed how to compute the k-edge-connected components of an undirected graph in O(m + kO(k2)n) time.

On the contrary, in directed graphs, edge cuts have a more complicated structure, and it was proved by Benczúr [7] that in this case, cut trees do not even exist. Linear-time algorithms for finding the 2-edge-connected components are given in [19, 20], and for finding the 3-edge-connected components in [18]. Schnorr [39] showed how to compute the minimum of flow(u, v) and flow(v, u), for all pairs of vertices u and v of a weighted digraph, using O(n log n) max-flow computations. By computing k-bounded max-flow (i.e., the value min{k, flow(u, v)}) using k iterations of Ford-Fulkerson, this approach gives an O(mnk log n)-time algorithm for computing the k-edge-connected components of a digraph. If we use the O(m1+o(1)) max-flow algorithm of CKLPGS [9], we obtain an O(m1+o(1)n)-time algorithm, for any k. Nagamochi and Watanabe [36] presented an algorithm that computes the k-edge-connected components of a digraph in O(mn min{k, n, √m}) time. This remains the best bound for fixed k > 4 and for sparse or moderately dense graphs. Cheung, Lau, and Leung [10] presented an algorithm that computes the edge connectivity between all pairs of vertices (i.e., λ(u, v) for all vertex pairs u, v) in O(mω) time, where ω < 2.371339 is the matrix multiplication exponent [6]. Subsequently, Akmal and Jin [5] developed an O((kn)ω)-time algorithm for computing the k-bounded edge connectivities between all vertex pairs, that is, the values min{k, λ(u, v)} for all u, v ∈ V (see also [4]). Note that knowing all k-bounded edge connectivities is sufficient to determine the i-edge-connected components of the graph for every i ≤ k.

Very recently, Hoppenworth, Saranurak, and Wang [26] established near-optimal bounds for a k-connectivity preserver of a directed graph G, that is, a subgraph H of G such that, for all i ≤ k, the i-edge-connected components of G and H coincide. They showed that any digraph with n vertices admits a k-connectivity preserver with O(k4kn log n) edges. Hence, a fast algorithm for constructing such a preserver would directly improve the running time bounds for computing k-edge-connected components. Still, the fast construction of these preservers remains an important open problem.

1.3 Overview of our techniques

A k-out set S is a set of vertices of G such that there are k edges from S to V \ S. Following [21], we base our algorithm on the notion of minimal (k + 1)-out sets. Let G be the input digraph, and let U ⊆ V(G) be a set of (k + 1)-edge-connected vertices. We denote by λ(x, y) the size of the minimum (x, y)-cut in G. Let s ∈ U be a fixed vertex of G. Then, for any v ∈ U, we have λ(v, s) ≥ k + 1. If there is a (k + 1)-out set S with v ∈ S and s / ∈ S, then we let M(v) denote the (inclusion-wise) minimum such (k + 1)-out set. Otherwise, we let M(v) = ⊥. Then, for any vertex v ∈ U that is not (k + 2)-edge-connected with s, the (k + 2)-edge-connected component containing v is a subset of M(v). We use “MR” to denote the same concept as “M” in the reverse graph GR. We show that these M-sets are sufficient to determine the (k + 2)-edge-connectivity relation for the vertices in U. Moreover, if the M-set of a vertex exists, we show how to compute it in time proportional to its volume using a variant of the local search procedure of [8].

We emphasize that the condition λ(v, s) ≥ k + 1 for every v ∈ U is essential in order to correctly partition U into its (k + 2)-edge-connected components. Consider, for example, Figure 1. Suppose we wish to determine whether vertices u and v are (k + 2)-edge-connected by examining their minimum cuts to a reference vertex s. In this case, the minimum (u, s)-cut and the minimum (v, s)-cut coincide, which implies that considering these cuts alone is insufficient to distinguish the connectivity between u and v. Therefore, when refining a (k + 1)-edge-connected component S into its constituent (k + 2)-edge-connected components, we must carefully select a reference vertex s ∈ S. We address this issue by introducing the following decomposition.

(k + 1)-edge-connected-component decomposition. We begin by computing, a decomposition of the input digraph G, into a collection H1, . . . , Ht of directed graphs that preserve the (k + 2)-edge-connected components of G. Each graph Hi contains two types of vertices, ordinary and auxiliary, where the ordinary vertices in Hi form a (k + 1)-edge-connected component of G. Moreover, any two vertices u and v of G are (k + 2)-edge-connected if and only if u and v are (k + 2)-edge-connected ordinary vertices of a graph Hi.

Here, we present a randomized O(k2m)-time algorithm that computes the (k + 1)-edge-connected-component ((k + 1)-ECC) decomposition of a k-edge-connected digraph, for any value of k. In addition, we provide a deterministic near-linear-time algorithm that computes the 3-edge-connected-component (3-ECC) decomposition of a general digraph. In both decompositions, the total size of the resulting graphs H1, . . . , Ht is O(m). To achieve this, we exploit the computation of the nodes corresponding to a poset representation of the minimal k-out sets [15, 18] combined with a contraction operation for the (k + 1)-ECC decomposition and the gadget substitution operation of [21] for the 3-ECC decomposition. Now, our goal is to partition the ordinary vertices in each graph Hi into (k + 2)-edge-connected components.

Local search. A (≤ k)-out set S is a set of vertices of G such that there are at most k edges from S to V \ S. The volume of a vertex set S, denoted by vol(S), is the number of edges (v, w) whose tail v is in S. CHILP [8] considered the problem of computing a (≤ k)-out set with the following restrictions: Given a graph G, a vertex v, and two integers ∆ and k such that ∆ ≥ k ≥ 1, the goal is to identify a (≤ k)-out set S such that v ∈ S, all vertices in S \ v are reachable from v in G[S], and vol(S) ≤ ∆, or to conclude that no such set S exists. CHILP [8] described a deterministic algorithm, LocalSearch(G, v, k, ∆), with O(∆ · k2k) running time, for the following relaxation of the problem: (i) if there exists a (≤ k)-out set S such that v ∈ S, all vertices in S \ v are reachable from v in G[S], and vol(S) ≤ ∆, then LocalSearch(G, v, k, ∆) returns a (≤ k)-out set S′ such that v ∈ S′, all vertices in S′ \ v are reachable from v in G[S′], and vol(S′) ≤ (2k)k+2∆, and (ii) otherwise it concludes that no such set S exists. Note that if a set S satisfying the constraints exists, then in this relaxed version, procedure LocalSearch(G, v, k, ∆) returns a set S′ which satisfies all constraints except the bound on the volume of S′, which can be larger by a factor of (2k)k+2. Later on, FNYSY [12] presented a randomized algorithm for the relaxed version of the problem with O(∆ · k2) running time.

Notice that the algorithms of [8, 12] are useful for ∆ < m/k, as otherwise the whole vertex set V(G) may be returned. Here, we introduce a slight variant of the local search procedure of CHILP [8], that we refer to as LocalSearchForMSet(G, v, s, k, ∆),which guarantees that the returned set S′ does not contain s. We make use of the following two simple observations: (i) the additional condition, s ∈ S′, implies that we can use the local search procedure without any restriction on the volume ∆, i.e., it is not necessary to have ∆ < m/k, and (ii) if λ(v, s) = k and vol(M(v)) ≤ ∆, then LocalSearchForMSet(G, v, s, k, ∆) is guaranteed to return S′ = M(v).

Sampling for large M-sets. We say that an M-set M(v) is “small” if its volume is at most m/√n, and “large” otherwise. Using our modified local search from each vertex v = s, we can afford to compute all small M-sets. In order to account for the partition of the ordinary vertices due to large M-sets, we sample the edges uniformly at random. Specifically, by sampling O(√n) edges, we can guarantee that for every M-set U with volume more than m/√n, we have sampled at least one edge (v, w) whose tail v is in U with high probability.

Good partitions. Since we cannot afford to compute all large M-sets explicitly, we must instead find a way to exploit the set M(v) associated with each sampled vertex v, i.e., the tail of a sampled edge (v, w). To this end, we define a partition P of V to be good for v if:

• P maintains the (k + 2)-edge-connected components, and

• for every ordinary vertex u such that v ∈ M(u), the partition P separates any ordinary vertex w / ∈ M(u) from u.

We show that it suffices to compute a partition that is good for each sampled vertex v. To construct such partitions efficiently, we distinguish two cases depending on whether λ(v, s) > k or λ(v, s) ≤ k. In the former case, we exploit the directed acyclic graph (DAG) representation of all minimum cuts introduced by Picard and Queyranne [38]; in the latter, we leverage structural properties of latest minimum cuts. (A latest minimum (x, y)-cut is defined as an inclusion-wise maximum λ(x, y)-out set S such that x ∈ S and y / ∈ S.)

1.4 Comparison to previous work

The linear-time algorithm of Georgiadis, Italiano, and Kosinas [18] relies on the concept of strongly divergent spanning trees [22], which is defined only for pairs of trees. Extending this approach to compute k-edge-connected components for k > 3 would require k − 1 spanning trees with analogous edge- and vertex-disjointness properties. However, the result of Huck [27] implies that it may not be possible to find more than two spanning trees with these properties.

At a high level, our algorithm follows a framework similar to that of [21], but with several fundamental differences, which we highlight below.

Improved running time. The framework in [21] required time O(m√m); the √m factor appears by balancing the need to hit each component of interest (via random sampling) multiple times, and the time spent on the subsequent backward searches (that depended on the number of times each component was hit). In our framework, we overcome the need for backward searches and achieve a significant improvement in the running time, namely O(m√n) for any constant k.

Lack of gadgets. The algorithm of GKPP [21] repeatedly detects 2-out sets and 2-in sets, which are then replaced by connectivity-preserving gadgets of sufficiently small size. These gadgets possess the crucial property of reducing the (out- or in-)volume of the replaced component by a constant factor. This property enables GKPP to perform Ω(n) local searches, each with a worst-case running time of Θ(m), without incurring a total cost of Ω(mn). Whenever a sequence of local searches becomes expensive, the corresponding gadget replacement significantly reduces the size of the graph, thereby ensuring a smaller amortized cost. For k ≥ 4, however, no analogous gadget construction is known that would provide similar guarantees, making it unclear how to afford the time required for Ω(n) local searches.

No recursions. The algorithm of GKPP [21] refines the current partition of the ordinary vertices after detecting an 2-out set or an 2-in set S, by simply separating the vertices inside S from those outside S. However, vertices inside S that are not 3-edge-connected can only be further separated through a recursive call that replaces V \ S with a gadget. A key technical difficulty of this approach is that the same edge may participate in multiple recursive calls, making the analysis tedious and heavily dependent on properties specific to the case k = 3, which do not extend to k ≥ 4. In contrast, our new framework leverages the structural properties of minimal k-out sets, eliminating the need for recursion entirely.

No triggered or backward searches. Another major complication in [21] arises from handling intersecting 2-out sets. Consider a local search initiated from a sampled vertex v that identifies a large 2-out set S. There may exist several 2-out sets S1, . . . , Sk that intersect S, such that the ordinary vertices in different sets Si are not 3-edge-connected. To separate these vertices, it is necessary to identify all such sets S1, . . . , Sk; however, this cannot be achieved through sampling alone, since Si \ S may be very small. To address this issue, GKPP [21] employ a sequence of triggered and backward searches, that is, local searches initiated from specific vertices of previously identified 2-out set sets. Through a complex analysis, they show that it suffices to search for sets of volume O(√m), resulting in an overall running time of O(m√m). In contrast, our framework completely avoids this complication by exploiting the structural properties of minimal k-out sets.

Simplicity. Perhaps the two most technically involved contributions of GKPP [21] for the k = 3 case were the gadget-substitution procedure and the backward searches. Our framework eliminates the need for both, giving an overall significantly simpler algorithm.

Extension for general k. Although achieving an o(mn)-time algorithm for computing the k-edge-connected components of a general digraph, for any fixed constant k > 4, remains out of reach, we believe that our techniques provide a promising step toward this goal. The main obstacles to attaining such a bound within our framework are the lack of (i) a fast decomposition of a general digraph into (k − 1)-edge-connected components, and (ii) an efficient algorithm for computing a good partition for a vertex v with λ(v, s) ≤ k − 2.

2 Technical Overview

In this section, we provide a high-level description of our algorithm and present the proof of our main result.

2.1 Preliminaries and notation

Let G be a strongly connected graph with n vertices and m edges. In everything that follows, we assume that we work on the graph G, and all graph elements (e.g., vertices, edges, cuts, etc.) refer to G.

Let S be a set of vertices. Every edge of the form (x, y) with x ∈ S and y / ∈ S is called an outgoing edge of S. The number of all outgoing edges of S is denoted as out(S). If out(S) = k, then S is called a k-out set. The tail of every outgoing edge of S is called a boundary point of S, and the head of every outgoing edge of S is called an exit point of S. We let vol(S) denote the volume of S: i.e., the number of edges whose tail is in S. When we say that an edge e lies in a vertex set U, we mean that both endpoints of e are in U. Otherwise, we say that e does not lie in U.

Let X and Y be two disjoint sets of vertices. Then, every set of vertices S with X ⊆ S and S ∩ Y = ∅ is called an (X, Y)-cut. (Notice that the order of X and Y here is important.) We may also say that S separates X and Y (where, again, the order of X and Y in this expression is important). If X or Y consists of a single vertex, we may substitute it with the vertex that it consists of, and so we may speak of (x, Y)-cuts, or (x, y)-cuts, or (X, y)-cuts, where x and y are vertices. We denote by λ(X, Y) the size of the minimum (X, Y)-cut in G.

Let P be a partition of V. If two vertices x and y belong to different sets from P, then we say that P separates x and y. We say that P maintains the (k + 2)-edge-connected components if every two (k + 2)-edge-connected vertices of G are in the same set of P.

2.2 (k + 1)-edge-connected component decomposition

Our main approach is to exploit the notion of minimal (k + 1)-out sets, defined with respect to a fixed source vertex s. To make this scheme work, we must ensure that every other ordinary vertex is (k + 1)-edge-connected to s. We achieve this via the following decomposition.

Theorem 3 ((k + 1)-Edge-Connected Component ((k + 1)-ECC) Decomposition). Let G be a k-edge-connected digraph with n vertices and m edges. In O(k2m) time we can construct a collection H1, . . . , Ht of graphs such that:

• All graphs H1, . . . , Ht are k-edge-connected.

• The graphs H1, . . . , Ht have O(n) vertices and O(m) edges in total.

• The vertices V(Hi) of each graph Hi are partitioned into two sets of vertices, ordinary and auxiliary.

• For each i ∈ {1, . . . , t}, the ordinary vertices of V(Hi) are (k + 1)-edge-connected.

• For every vertex of G, there is exactly one graph among H1, . . . , Ht that contains it as an ordinary vertex.

• Every two vertices u and v of G are (k + 2)-edge-connected if and only if there is an i ∈ {1, . . . , t} such that u and v are (k + 2)-edge-connected ordinary vertices of Hi.

The algorithm is randomized and returns a correct decomposition with probability at least 1 − δ, where δ ∈ (0, 1) is a parameter specified by the user. If the algorithm fails to compute the correct decomposition, it detects this event and reports an error.

We note that for any constant k, we can avoid the use of randomization in the algorithm of Theorem 3. Hence, we obtain a deterministic near-linear-time algorithm that computes a (k + 1)-edge-connected-component ((k + 1)-ECC) decomposition of a k-edge-connected digraph, for any constant k. Our algorithm exploits the computation of the nodes corresponding to a poset representation of the minimal k-out sets [15] combined with a contraction operation.

For k = 2, we give a deterministic near-linear-time algorithm that computes a 3-edge-connected-component decomposition of a general digraph.

Theorem 4 (3-Edge-Connected Component (3-ECC) Decomposition). Let G be a digraph with n vertices and m edges. In O(m + n) time, we can construct a collection H1, . . . , Ht of graphs such that:

• All graphs H1, . . . , Ht are strongly connected.

• The graphs H1, . . . , Ht have O(m) edges in total.

• The vertices V(Hi) of each graph Hi are partitioned into two sets of vertices, ordinary and auxiliary.

• For each i ∈ {1, . . . , t}, the ordinary vertices of V(Hi) are 3-edge-connected.

• For every vertex of G, there is exactly one graph among H1, . . . , Ht that contains it as an ordinary vertex.

• Every two vertices u and v of G are 4-edge-connected if and only if there is an i ∈ {1, . . . , t} such that u and v are 4-edge-connected ordinary vertices of Hi.

Similarly to the (k + 1)-ECC decomposition, we take advantage of the computation of the nodes corresponding to a poset representation of the minimal 2-out sets [18] combined with the gadget substitution operation of [21]. The details are provided in Section 5.

2.3 Computing the (k + 2)-edge-connected components through the minimum (k + 1)-out sets

Theorem 3 implies that the computation of the (k + 2)-edge-connected components of G reduces to that of the (k + 2)-edge-connected components of the graphs H1, . . . , Ht. Thus, from now on we may assume that the input graph G satisfies the property that its vertex set can be partitioned into two kinds of vertices: ordinary and auxiliary. The ordinary vertices of G are (k + 1)-edge-connected, and the goal is to compute a partition P of V(G) such that two ordinary vertices are (k + 2)-edge-connected if and only if they belong to the same set in P.

We achieve our goal through a randomized algorithm which may have a one-sided error: with probability at most δ (for any fixed δ > 0 specified by the user), it may be that two ordinary vertices of G that are not (k + 2)-edge-connected belong to the same set in P. However, if two ordinary vertices are (k + 2)-edge-connected, then it is certain that they appear in the same set in P. The precise formulation of our main result is given in the following (where we assume that k is a fixed constant):

Theorem 5. Let δ be a number with 0 < δ < 1. There is an algorithm (see Algorithm 1) that runs in O(m√n log(n/δ)) time, where n is the number of the ordinary vertices of G, and outputs a partition P of V(G) with the following guarantees:

• Every two (k + 2)-edge-connected ordinary vertices of G are in the same set from P.

• With probability at least 1 − δ, every two ordinary vertices of G that are not (k + 2)-edge-connected are separated by P.

In order to establish Theorem 5, we utilize the concept of the minimum (k + 2)-out sets. Specifically, we first fix an arbitrary ordinary vertex s of G. Then, for every ordinary vertex v such that there is a (k + 1)-out set that separates v and s, we let M(v) denote the (inclusion-wise) minimum (k + 1)-out set that contains v but not s. (The uniqueness of M(v) is guaranteed by Corollary 13.) If for an ordinary vertex v no such (k + 1)-out set exists, then we let M(v) = ⊥. (In particular, we have M(s) = ⊥.) We use “MR” to denote the same concept as “M” in the reverse graph GR (where we have fixed the same ordinary vertex s in GR).

It should be clear that, if two ordinary vertices u and w are (k + 2)-edge-connected, then we have M(u) = M(w) and MR(u) = MR(w). On the other hand, if u and w are not (k + 2)-edge-connected, then Lemma 14 implies that either M(u) = M(w) or MR(u) = MR(w).

Thus, our approach is the following. First, we want to compute a partition P1 of V(G) with the property that two ordinary vertices have the same M-set if and only if they belong to the same set in P1. Then, we want to compute a partition P2 of V(GR) with the property that two ordinary vertices have the same MR-set if and only if they belong to the same set in P2. Then, the output P is the common refinement of P1 and P2. The computation of P1 and P2 is performed independently on G and GR, using the same procedure. Thus, it is sufficient to describe the idea for computing P1.

Now we distinguish two types of M-sets w.r.t. their volume. We call a vertex set “small” if it has volume at most m/√n. Otherwise, we call it “large”. The small M-sets can be computed explicitly using the following local search based procedure (which follows from an adaptation of techniques from [8]):

Proposition 6. Let v be a vertex with v = s and λ(v, s) ≥ k + 1, and let ∆ ≥ 1 be an integer. There is an algorithm LocalSearchForMSet(G, v, s, k + 1, ∆) which runs in O(2k(k + 1)!∆) time and returns a set of vertices S (which may be ∅) with the following guarantees:

• If S = ∅, then S = M(v).

• If S = ∅, then either M(v) = ⊥ or vol(M(v)) > ∆.

Proof. See Section 6.

Assuming that k is a fixed constant for our problem, we can use Proposition 6, in order to find all small M-sets in time O(n · (m/√n)) = O(m√n). Thus, we get a first partition of V(G) with the property that two ordinary vertices have the same small M-set if and only if they belong to the same set of that partition.

Notice that the dependency of the running time on k is exponential, but this can be improved to a polynomial dependence by using a randomized algorithm to perform the local searches (although this will incur a polylogarithmic overhead on the running time, in order to guarantee a sufficiently high probability of success).

Proposition 7. Given that λ(v, s) ≥ k, there is a procedure (shown in Algorithm 5) that has a running time of O(k2∆) and returns a (possibly empty) set of vertices S with the following guarantees:

• If S = ∅, then S = M(v).

• If λ(v, s) = k and vol(M(v)) ≤ ∆, then, with probability at least 1/2, S = ∅.

Proof. See Section 6.2.

For a randomized version of the local search, see Section 6.2. We note that the local search procedure of choice can be plugged in as a black-box in Line 3 of Algorithm 1.

The case of the large M-sets is highly involved, because we cannot afford to compute all of them explicitly. We discuss how to handle those sets in the following section.

2.4 Sampling for large M-sets and computing good partitions

In order to account for the partition of the ordinary vertices due to the large M-sets, we rely on structural properties of the (k + 1)-edge cuts of the graph. Our first step is to sample enough edges of the graph (uniformly at random, with repetitions allowed), so that, with sufficiently high probability, for every large M-set U, we have sampled at least one edge whose tail is in U. For this purpose, it is sufficient to sample ˜O(√n) edges, due to the large volume of the large M-sets (see proof of Theorem 5).

Now, for every tail v of every sampled edge, we distinguish two possibilities: either λ(v, s) = k + 1, or λ(v, s) ≤ k. (In the case λ(v, s) > k + 1 we do nothing, because this implies that v is not included in a (k + 1)-out set that separates v and s.)

In each of those cases, our goal is to provide a partition P of V(G) with the property that (1) it maintains the (k + 2)-edge-connected components, and (2) for every ordinary vertex u with M(u) = ⊥ and v ∈ M(u), and every ordinary vertex w / ∈ M(u), we have that u and w are separated by P. More formally, we have:

Definition 8 (Good Partition). Let v be any vertex such that λ(v, s) ≤ k + 1. A partition P of V is good for v if it satisfies the following properties:

• P maintains the (k + 2)-edge-connected components.

• For every ordinary vertex u with v ∈ M(u), and every ordinary vertex w / ∈ M(u), we have that u and w are separated by P.

We provide a linear-time algorithm for computing a good partition when λ(v, s) = k + 1, by exploiting the DAG representation of all minimum cuts introduced by Picard and Queyranne [38].

Proposition 9. Let v be a vertex with λ(v, s) = k + 1. Then there is an algorithm that runs in O(km) time and returns a good partition for v.

To obtain Proposition 10, we construct the Picard–Queyranne DAG representation of all minimum v-s cuts. This representation corresponds to the residual graph obtained after computing any maximum (v, s)-flow—which has value k + 1, since λ(v, s) = k + 1—and contracting its strongly connected components (SCCs). The resulting SCCs define a partition of V, which we show satisfies Definition 8. The connection between the Picard–Queyranne DAG and the M-sets follows from a simple observation: for any ordinary vertex u with λ(u, s) = k + 1, if v ∈ M(u), then M(u) is also a minimum v-s cut, and is therefore represented in the DAG. Full details are provided in Section 4.1.

The case where λ(v, s) = k is more involved. In this setting, we leverage structural properties of latest minimum cuts.

Proposition 10. Let v be a vertex with λ(v, s) = k. Then there is an algorithm that runs in O(k2m) time and returns a good partition for v.

Let S be the latest mincut that separates v and s. This is the (inclusion-wise) maximum λ(v, s)-out set that separates v and s. The reason that we consider the latest mincut is that, first, this can be computed in linear time, and second, it captures the notion of having made the utmost progress before increasing the edge-connectivity. (This idea is made precise in Lemma 19.)

Note that S contains only auxiliary vertices (that is, λ(x, s) = k for all x ∈ S), so we may contract S into a single auxiliary vertex z with out-degree k. Now consider a set M(u) such that v ∈ M(u), and let U = M(u) ∪ S. For any ordinary vertex w / ∈ M(u), we also have w / ∈ U. To separate u and w, we distinguish two cases: (1) all k outgoing edges e1, . . . , ek of z belong to E(U, V \ U); or (2) at least one outgoing edge ei of z lies inside U. In the former case, it suffices to compute the 2-edge-connected components of G \ {e1, . . . , ek}, which can be done in linear time [19, 20]. In the latter case, we can contract ei, thereby reducing the problem to the case λ(v, s) = k + 1.

2.5 Proof of the main theorem

We now present the proof of our first main result, stated in Theorem 1. We begin with the case where k is a fixed constant. In this setting, we can apply the deterministic version of the (k + 1)-ECC-decomposition (see the paragraph right after the statement of Theorem 3), which runs in O(m) time.

After this decomposition, we can consider a k-edge-connected graph G with n vertices and m edges, that consists of two kinds of vertices: ordinary and auxiliary. The ordinary vertices of G are (k + 1)-edge-connected. We prove the following:

Theorem 5. Let δ be a number with 0 < δ < 1. There is an algorithm (see Algorithm 1) that runs in O(m√n log(n/δ)) time, where n is the number of the ordinary vertices of G, and outputs a partition P of V(G) with the following guarantees:

• Every two (k + 2)-edge-connected ordinary vertices of G are in the same set from P.

• With probability at least 1 − δ, every two ordinary vertices of G that are not (k + 2)-edge-connected are separated by P.

Proof. Let s be a fixed ordinary vertex of G. First, we compute all M-sets with volume at most m/√n. Specifically, for every ordinary vertex v = s, we apply the algorithm LocalSearchForMSet(G, v, s, k + 1, ∆), whose guarantees are stated in Proposition 6. Thus, we get a vertex set S(v) such that, if M(v) = ⊥ and vol(M(v)) ≤ m/√n, then S(v) = M(v). Otherwise, we may still get M(v), or ∅. (In any case, we will not get a non-empty output which is distinct from M(v).) Since we apply this procedure for every ordinary vertex v = s (and the number of such ordinary vertices may be as large as n − 1), by Proposition 6 we get an O((n − 1) · m/√n) = O(m√n) time bound for this step. The total output is a collection of O(n) sets of vertices with O(m/√n) vertices in each set. We can sort those sets in O(n · m/√n) = O(m√n) time with bucket sort, and determine the partition P1 of the ordinary vertices that have the same M-set with volume O(m/√n). To be more precise, if for two distinct ordinary vertices v and v′ we have S(v) = S(v′), then we put v and v′ in the same set in P1. (And we can put all auxiliary vertices of G in a single set in this partition.) Thus, if two ordinary vertices are (k + 2)-edge-connected, then they appear in the same set in P1.

Now we have to consider the separations induced by the M-sets of ordinary vertices with volume larger than m/√n. To do this, we first sample enough edges (uniformly, with repetitions allowed) so that, with probability at least 1 − δ, we have that, for every such “large” M-set U, we have sampled at least one edge whose tail is in U. Thus, it is sufficient to sample N = ⌈√n log2(n/δ)⌉ edges. To see this, consider an M-set U with volume more than m/√n. This means that there are more than m/√n edges whose tail is in U. Then, the probability that a randomly chosen edge does not have its tail in U is less than 1 − (m/√n)/m = 1 − 1/√n. Thus, the probability that, after N samples, we have not sampled an edge whose tail is in U is less than

(1 − 1/√n)N ≤ 2−N/√n ≤ 2−√n log2(n/δ)/√n = 2− log2(n/δ) = δ/n.

Thus, since n is a trivial upper bound on the number of distinct M-sets, by the union bound we have that: the probability that there is an M-set U with volume more that m/√n for which we have not sampled an edge whose tail is in U is less than δ.

Thus, from now on, we may assume that: for every M-set U with volume more than m/√n, we have sampled at least one edge whose tail is in U (∗).

Now, for every tail v of an edge that we have sampled, we do the following. First, we perform at most k + 2 iterations of Ford-Fulkerson’s algorithm, in order to determine whether λ(v, s) ≤ k, or λ(v, s) = k + 1, or λ(v, s) > k + 1. (This takes time O(km).) In the first and second case, we apply Proposition 10 and Proposition 9, respectively, on v, in order to get a partition P(v) of V(G) with the guarantess provided by the respective proposition. (Again, this step takes O(m) time.) In the third case (i.e., if λ(v, s) > k + 1), we do nothing. Thus, we get a collection of O(N) partitions of V(G) in total time O(Nm) = O(√n log(n/δ)m). We compute the common refinement P2 of those partitions with bucket sort, and this takes time O(nN). Then, we return the common refinement of P1 and P2, which takes O(n) time to be computed. This is how we get a partition Q. Notice that, by the guarantees of Propositions 9 and 10, we have that Q maintains the (k + 2)-edge-connected components of G.

Now we repeat the same process on the reverse graph GR, with the same fixed vertex s, and thus we get a partition QR. Our final output is the common refinement of Q and QR.

In order to establish correctness, it remains to show that: if two ordinary vertices u and w are not (k + 2)-edge-connected, then they appear in distinct sets in the final output. So let u and w be two ordinary vertices that are not (k + 2)-edge-connected. Then, by Lemma 14 we have that either M(u) = M(w) or MR(u) = MR(w). Let us assume, w.l.o.g., that M(u) = M(w). Now, if either vol(M(u)) ≤ m/√n or vol(M(w)) ≤ m/√n, then u and w are separated by P1, and thus by the final output. Otherwise, for each of u and w we have that its M-set is either ⊥, or it has volume more than m/√n, but they cannot both be ⊥. Now, since M(u) = M(w), by Lemma 15 we have that either M(u) = ⊥ and w / ∈ M(u), or M(w) = ⊥ and u / ∈ M(w). Thus, we may assume, w.l.o.g., that M(u) = ⊥ and w / ∈ M(u). Now, since vol(M(u)) > m/√n, our assumption (∗) implies that we have sampled at least one edge whose tail v is in M(u). Then, we obviously have that λ(v, s) ≤ k + 1, and therefore one of Propositions 9 and 10 (depending on whether λ(v, s) ≤ k or λ(v, s) = k + 1, respectively), implies that P(v) separates u and w. Thus, u and w are separated by the final output.

(Notice that our assumption (∗) holds on G with probability more than 1 − δ. However, we want the same assumption to hold simultaneously for G and GR with probability more than 1 − δ. Thus, we should have chosen δ to be half of the desired probability of failure, so that, by the union bound, this assumption is satisfied simultaneously in G and GR with the desired probability of success.)

Algorithm 1: Compute the (k + 2)-edge-connected components of G, with probability at least 1 − δ 1fix an ordinary vertex s 2foreach ordinary vertex v = s do 3apply procedure LocalSearchForMSet(G, v, s, k + 1, m/√n), and let S(v) be the output // See Proposition 6 4end 5let P1 be the partition of V that is formed by the clusters of vertices that have the same S set computed in the previous step (let S(u) = ∅ for every auxiliary vertex u) 6sample ⌈√n log2(2n/δ)⌉ edges (uniformly, with repetitions allowed) 7foreach tail v of a sampled edge do 8if λ(v, s) = k + 1 then 9apply the algorithm described in Proposition 9, and let P(v) be the output partition of V 10end 11else if λ(v, s) ≤ k then 12apply the algorithm described in Proposition 10, and let P(v) be the output partition of V 13end 14end 15let P2 be the common refinement of all partitions of the form P(v) computed in the previous step 16let Q be the common refinement of P1 and P2 17let QR be the result of applying the same procedure on GR 18return the common refinement of Q and QR

If we drop the assumption that k is a fixed constant, then, by relying throughout on the deterministic local search procedure of Proposition 6, there is an exponential dependency on k in the time bound for computing the (k + 2)-edge-connected components. We can improve this dependency to polynomial, by using instead the randomized local search procedure of Proposition 7. The local search procedure is used in two different places in our framework: in the algorithm for computing the (k + 1)-ECC-decomposition (Theorem 3), and in the search for small M-sets in Line 3 of Algorithm 1.

In particular, if we want to have the same guarantees for Algorithm 1 as in the statement of Theorem 5, but with a running time of O(k2m√n log(n/δ)), then we must replace the local search procedure in Line 3 with that provided by Proposition 7, and repeat it for ⌈log (4n/δ)⌉ times for every vertex v = s. This is in order to get a δ/(4n) bound on the probability of failure for every vertex v = s, for the search for small M-sets in each direction (i.e., in G and in GR), so that the union bound gives a δ/2 bound on the probability of failure for this search in both directions. Furthermore, we must increase the sampling rate in Line 6 from ⌈√n log2(2n/δ)⌉ to ⌈√n log2(4n/δ)⌉, in order to also get a δ/2 bound on the probability of failure for the search for large M-sets (in both directions). Thus, by the union bound, the total probability of failure of Algorithm 1 can be bounded by δ.

Overall, in order to establish Theorem 1, we need as input the graph G, and the parameters k and δ. First, we employ the randomized decomposition of Theorem 3, which runs in O(k2m) time and produces a correct decomposition H1, . . . , Ht with probability at least 1 − δ/2. Then, for each graph Hi, we apply Algorithm 1 with bound δ/(2n) on the probability of failure. This is because: first, there are at most n graphs Hi on which we apply this algorithm, and second, each of those graphs has at most n ordinary vertices (that correspond to vertices of the original graph). Thus, the union bound establishes the δ bound on the probability of failure for computing the (k + 2)-edge-connected components of the original graph G.

2.6 Computing the 4-edge-connected components

In order to establish Theorem 2, we use the same framework that we applied in order to establish Theorem 1, with some crucial differences that we will discuss here. (Notice that Theorem 2 is not an immediate consequence of Theorem 1, because here we assume that the input graph G is any general digraph, i.e., not necessarily k-edge-connected.)

First, Theorem 4 implies that the computation of the 4-edge-connected components of G reduces to that of the 4-edge-connected components of the graphs (of the 3-ECC decomposition) H1, . . . , Ht. Thus, from now on we may assume that the input graph G is strongly connected and has two kinds of vertices: ordinary and auxiliary, where the ordinary vertices are 3-edge-connected. The goal is to compute a partition P of V(G) such that two ordinary vertices are 4-edge-connected if and only if they belong to the same set in P.

Now we fix an ordinary vertex s, and we apply Algorithm 1, with the following modification in Line 12: instead of using Proposition 10, we use Proposition 11. This is because here we may have λ(v, s) ∈ {1, 2} (whereas with the assumption that the graph is k-edge-connected, only the case λ(v, s) = k can arise).

Proposition 11. Let G be a strongly connected graph that has two kinds of vertices: ordinary and auxiliary, where the ordinary vertices are 3-edge-connected. Let s be an ordinary vertex, and let v be a vertex with λ(v, s) ≤ 2. Then there is an algorithm that runs in O(m) time and returns a partition P of V(G) with the following properties:

• P maintains the 4-edge-connected components of G.

• For every two ordinary vertices u and w with v ∈ M(u) and w / ∈ M(u), we have that u and w are separated by P.

(Here “M(u)” is the minimum 3-out set that separates u from s.)

We note that Line 12 is the only place in which the use of Algorithm 1 for the computation of the 4-edge-connected components differs from that for the computation of the (k + 2)-edge-connected components. In particular, in Lines 3, 8 and 11, we just replace “k” with “2”. The analysis is the same as in Sections 2.3 and 2.5, where the “M” sets here have the meaning of minimal 3-out sets that separate ordinary vertices from s. The proof of Proposition 11 is discussed in Section 4.2.

3 Basic definitions

3.1 The operator of local edge connectivity

Let X and Y be two disjoint sets of vertices. If there is a k-out set S with X ⊆ S and S ∩ Y = ∅, then we say that S is a k-cut that separates X and Y. (We note that the order of X and Y here is important.) Furthermore, if there is no k′-out set S′ with k′ < k such that X ⊆ S′ and S′ ∩ Y = ∅, then we say that S is an (X, Y)-mincut. If there is an (X, Y)-mincut S with out(S) = k, then we write λ(X, Y) = k. (We note that the operator λ does not necessarily act symmetrically on sets of vertices.)

If either of X and Y consists of a single vertex, then we may substitute it in the expression “λ(X, Y)” with the vertex that it consists of. (E.g., if X = {x}, then we may denote λ(X, Y) simply as λ(x, Y).) Furthermore, we may write “λG” instead of just “λ”, if we want to specify the reference graph G.

Lemma 12. Let X and Y be two disjoint sets of vertices with λ(X, Y) = k, and let S and S′ be two k-out sets that separate X and Y. Then, both S ∪ S′ and S ∩ S′ are k-out sets.

Proof. Due to the submodularity of the cut function, we have out(S ∩ S′) + out(S ∪ S′) ≤ out(S) + out(S′), and therefore out(S ∩ S′) + out(S ∪ S′) ≤ 2k. Notice that both S ∩ S′ and S ∪ S′ are cuts that separate X and Y. Thus, since λ(X, Y) = k, we have out(S ∩ S′) ≥ k and out(S ∪ S′) ≥ k. Therefore, we have 2k ≤ out(S ∩ S′) + out(S ∪ S′), and thus we infer that out(S ∩ S′) = k and out(S ∪ S′) = k.

We will be using the following corollary throughout, without explicitly invoking it.

Corollary 13. Let X and Y be two disjoint sets of vertices with λ(X, Y) = k. Then there is an inclusion-wise minimum k-out set that separates X and Y. Furthermore, there is an inclusion-wise maximum k-out set that separates X and Y.

Proof. Consider the collection S of all k-out sets that separate X and Y. Then, Lemma 12 implies that S is a k-out set that separates X and Y. Similarly, Lemma 12 implies that S is a k-out set that separates X and Y.

Let Z be a set of vertices of G, and let GZ be the graph that is formed by contracting Z into a single vertex z. If X is a set of vertices of GZ, then we let X′ denote X if z / ∈ X, and (X \ {z}) ∪ Z otherwise. (I.e., X′ is the “uncontraction” of X in G.) Then it is easy to see that, for every set of vertices S of GZ, we have outGZ(S) ≥ outG(S′). This implies that, for every two disjoint sets of vertices X and Y of GZ, we have λGZ(X, Y) ≥ λG(X′, Y′). (I.e., the process of contracting vertices can only increase the edge connectivity.)

3.2 Minimum (k + 1)-out sets

In everything that follows, we will use “s” to denote a fixed ordinary vertex of G. We will use s in order to consider minimum (k + 1)-out sets that separate vertices from it. Specifically, let v be a vertex with λ(v, s) ≥ k + 1. If there is a (k + 1)-out set S with v ∈ S and s / ∈ S, then we let M(v) denote the (inclusion-wise) minimum such (k + 1)-out set. Otherwise, we let M(v) = ⊥. We use “MR” to denote the same concept as “M” in the reverse graph GR.

The reason that we consider the M-sets is twofold. First, those sets are sufficient in order to determine the relation of (k + 1)-edge-connectivity, as shown in Lemma 14.2 And second, if the M-set of a vertex exists, then it can be computed in time proportional to its volume using a local search procedure (see Proposition 6).

2A similar observation was utilized in [18], in order to compute the 3-edge-connected components in linear time. Specifically, [18] also uses a concept of M-sets, which are the minimum 2-in sets that separate s from a vertex. Lemma 14 is analogous to Proposition III.5 in [18].

Lemma 14. Let u and w be two ordinary vertices that are not (k + 2)-edge-connected. Then, either M(u) = M(w), or MR(u) = MR(w).

Proof. Since u and w are not (k + 2)-edge-connected (but they are (k + 1)-edge-connected), we may assume, w.l.o.g., that there is a (k + 1)-cut S that separates u and w. Now there are two possibilities: either s / ∈ S, or s ∈ S. Let us first consider the case that s / ∈ S. Then, S is a (k + 1)-cut that separates u and s, and therefore M(u) exists and M(u) ⊆ S. Then, since w / ∈ S, we have w / ∈ M(u). Therefore, we infer that either M(w) does not exist, or M(w) = M(u) (because, if M(w) exists, it satisfies w ∈ M(w)). Now let us assume that s ∈ S. Then, V \ S is a (k + 1)-cut in GR that separates w and s. Thus, we have MR(w) ⊆ V \ S, and u / ∈ MR(w). Therefore, we infer, as previously, that either MR(u) does not exist, or MR(u) = MR(w).

Lemma 15. Let u and w be two ordinary vertices such that M(u) = M(w). Then, either M(u) = ⊥ and w / ∈ M(u), or M(w) = ⊥ and u / ∈ M(w).

Proof. Since M(u) = M(w), we cannot have M(u) = ⊥ and M(w) = ⊥. Thus, we may assume, w.l.o.g., that M(u) = ⊥. Now, if w / ∈ M(u), then we are done. So let us assume that w ∈ M(u). Then, M(u) is a (k + 1)-out set that separates w and s, and therefore M(w) = ⊥. Then, due to the minimality of M(w), we have M(w) ⊆ M(u). Now, if we assume that u ∈ M(w), then, due to the minimality of M(u), we get M(u) ⊆ M(w), and therefore we have M(u) = M(w), which contradicts the assumption in the statement of the lemma. Thus, we conclude that u / ∈ M(w).

In order to compute M-sets of “small” volume (and, later on, separations of vertices induced by M-sets of “large” volume), we rely on the following local search procedure.

Proposition 6. Let v be a vertex with v = s and λ(v, s) ≥ k + 1, and let ∆ ≥ 1 be an integer. There is an algorithm LocalSearchForMSet(G, v, s, k + 1, ∆) which runs in O(2k(k + 1)!∆) time and returns a set of vertices S (which may be ∅) with the following guarantees:

• If S = ∅, then S = M(v).

• If S = ∅, then either M(v) = ⊥ or vol(M(v)) > ∆.

(Notice that the guarantees of Proposition 6 imply that if M(v) = ⊥ and vol(M(v)) ≤ ∆, then the output S will be M(v).)

We note that Proposition 6 follows from a straightforward adaptation of ideas contained in [8], for computing minimal sets of vertices with a bounded number of outgoing edges, through a local search procedure. In order to understand the relation between Proposition 6 and the local search procedure of [8], we recall the following concept from [8]. Let u be a vertex of a graph G, and let k ≥ 0 be an integer. Then, a set of vertices S is called a k-edge-out component of u if u ∈ S and out(S) ≤ k, and there is no set of vertices S′ with u ∈ S′ ⊂ S such that out(S′) ≤ out(S). The number of edges of G[S] is called the volume of S. Now, given a vertex u and two integers k and ∆, we have the following:

Lemma 16 ([8]). In O((2k)k+1 · ∆) time we can find a (k − 1)-edge-out component of u with volume less than (2k − 1)(∆ + 1), or determine that there is no (k − 1)-edge-out component of u with volume at most ∆.

The idea behind Lemma 16 is roughly the following. If there is a (k − 1)-edge-out component S of u with volume at most ∆, then there is a DFS-based procedure, that starts from u, explores O(k∆) edges, and finds a set of O(k) paths with the property that at least one of them starts from u and ends outside of S. Then, by reversing the direction of the edges of such a path, S becomes a (k − 2)-edge-out component in the resulting graph. Thus, if we repeat this process O(k) times, in the end it is sufficient to just explore the reachability set of u in the resulting graph, and this provides S.

There is an obvious similarity between the guarantees of Lemma 16 for k = k + 2 and Proposition 6. Specifically, it is easy to see that, if we have a vertex v = s with λ(v, s) = k + 1, then M(v) is a (k + 1)-edge-out component of v. Therefore, if G[M(v)] has volume at most ∆, then Lemma 16 will be able to identify a (k + 1)-edge-out component of v in O(∆) time. However, the (k + 1)-edge-out component of v returned by Lemma 16 may have less than k + 1 outgoing edges. This is because there may exist a k′-out set with k′ < k + 1 that contains both v and s and has sufficiently small volume. (In fact, the whole graph is a 0-edge-out component of v, and thus for sufficiently large ∆ we just get the whole graph as output.) But here it helps precisely that we know that s is outside of M(v). Thus, whenever we happen to meet s during the (DFS-based) local search procedure, we can immediately pick and reverse the discovered path from v to s. This is the crux of the adaptation that we had to make to the local search procedure from [8]. The full proof of Proposition 6 is given in Section 6.

3.3 Latest mincuts

Let s and t be two distinct vertices with λ(s, t) = k. By Corollary 13, there is an inclusion-wise maximum k-out set S that separates s and t. We call S the latest (s, t)-mincut. (We note that the order of s and t is important.)

The intuitive reason that we consider latest mincuts is because these are the furthest that we can cut, without exceeding the value of the minimum cut; a precise formulation of this property is provided in Lemma 19. Furthermore, the latest mincuts for pairs of vertices with bounded edge-connectivity can be computed in linear time, as shown in the following lemma. We note that the notion of the latest (s, t)-mincut was introduced by Ford and Fulkerson [11], who showed how to compute it using the residual graph of the corresponding flow problem. For completeness—and because we will later use similar arguments—we provide a self-contained proof that does not rely on flow-based techniques.

Lemma 17. Let s and t be two distinct vertices of G with λ(s, t) = k. Then, the latest (s, t)-mincut can be computed in O(km) time.

Proof. Let S be the latest (s, t)-mincut. Now we apply the following procedure (essentially k iterations of Ford-Fulkerson’s algorithm for computing an (s, t)-maxflow). First, we compute a path P1 in G0 := G from s to t. Then we reverse the direction of the edges of P1, and let G1 be the resulting graph. Now suppose that we have computed a path Pi from s to t in Gi−1 and a graph Gi using the same process, for some i ∈ {1, . . . , k − 1}. Then, we compute a path Pi+1 from s to t in Gi, we reverse the direction of the edges of Pi+1 in Gi, and let Gi+1 be the resulting graph. Finally, we compute the set of vertices S′ of Gk that cannot reach t. Obviously, this whole procedure can be completed in O(km) time.

Our goal is to show that S′ = S. First, a repeated application of Lemma 58 implies that outGk(S) = 0. Thus, no vertex from S can reach t in Gk, and therefore S ⊆ S′. Since S′ is an (s, t)-cut and S is the inclusion-wise maximum k-out set in G that separates s and t, we infer that outG(S′) ≥ k. Now, a repeated application of Lemma 58 implies that outGk(S′) = outG(S′) − k. Due to the definition of S′, we have outGk(S′) = 0. This implies that outG(S′) = k. Therefore, due to the maximality of S, we conclude that S′ = S.

Lemma 18. Let s and t be two distinct vertices, and let S be an (s, t)-mincut (not necessarily the latest). Then, every boundary point of S in G is reachable by s through a path in G[S].

Proof. Let R be the set of vertices that are reachable by s in G[S]. Thus, we have s ∈ R and R ⊆ S. Therefore, R is an (s, t)-cut, and therefore outG(R) ≥ λ(s, t). Furthermore, by the definition of R we have that every outgoing edge of R in G is an outgoing edge of S in G. Thus, outG(R) ≤ outG(S). Then, since outG(S) = λ(s, t), we infer that outG(R) = λ(s, t). This shows that the set of the outgoing edges of R in G coincides with the set of the outgoing edges of S in G. We conclude that R includes the tails of the outgoing edges of S in G (i.e., the boundary points of S).

For convenience, we use the following notation. Let v be a vertex of a graph H. Then reachH(v) denotes the set of vertices that are reachable from v. In other words, reachH(v) consists of every vertex x of H for which there exists a path that starts from v and ends in x.

Lemma 19. Let s and t be two distinct vertices, let S be the latest (s, t)-mincut, let R = reachG[S](s), and let x be an exit point of S with x = t. Then λ(R ∪ {x}, t) > out(S).

Proof. Notice that R ∪ {x} is an (s, t)-cut, and therefore λ(R ∪ {x}, t) ≥ out(S). Now let us suppose, for the sake of contradiction, that λ(R ∪ {x}, t) = out(S). This implies that there is an (R ∪ {x}, t)-cut R′ with out(R′) = out(S). Our goal is to show that S ∪ R′ is an (s, t)-cut with out(S ∪ R′) = out(S), which contradicts the fact that S is the latest (s, t)-mincut (because S ∪ R′ is strictly larger than S, since it contains x). Throughout this proof, whenever we speak of an outgoing edge of a set of vertices, we mean an outgoing edge in G.

Let U be the set of vertices from S that are unreachable by s in G[S]. (I.e., U = S \ R.) Then, we have S = R ∪ U. Notice that every outgoing edge of U has its head in R. (Otherwise, there exists an edge (z, w) with z ∈ U and w / ∈ S. Thus, (z, w) is an outgoing edge of S. But then, since S is an (s, t)-mincut, by Lemma 18 we have that s can reach z in G[S], in contradiction to the definition of U.)

Now, since S = R ∪ U and R ⊂ R′, we have S ∪ R′ = U ∪ R′. Let (z, w) be an outgoing edge of S ∪ R′. Then, either z ∈ U or z ∈ R′. If z ∈ U, then (z, w) is an outgoing edge of U, and so w ∈ R. But R ⊂ R′, and so (z, w) cannot be an outgoing edge of S ∪ R′. Thus, we have z ∈ R′. Then, (z, w) is an outgoing edge of R′. This shows that the set of the outgoing edges of S ∪ R′ is a subset of the set of the outgoing edges of R′. Thus, we have out(S ∪ R′) ≤ out(R′). But since out(R′) = out(S), this implies the desired contradiction.

4 Finding good partitions induced by the large M-sets

In this section we assume that G is a strongly connected graph, where some of its vertices are designated as “ordinary” and they are (k + 1)-edge-connected. Let s be a fixed ordinary vertex. For every ordinary vertex u with λ(u, s) = k + 1, we let M(u) denote the inclusion-wise minimum (k + 1)-out set that separates u and s.

Our goal is to establish the following three propositions.

Proposition 9. Let v be a vertex with λ(v, s) = k + 1. Then there is an algorithm that runs in O(km) time and returns a good partition for v.

Proposition 10. Let v be a vertex with λ(v, s) = k. Then there is an algorithm that runs in O(k2m) time and returns a good partition for v.

Proposition 11. Let G be a strongly connected graph that has two kinds of vertices: ordinary and auxiliary, where the ordinary vertices are 3-edge-connected. Let s be an ordinary vertex, and let v be a vertex with λ(v, s) ≤ 2. Then there is an algorithm that runs in O(m) time and returns a partition P of V(G) with the following properties:

• P maintains the 4-edge-connected components of G.

• For every two ordinary vertices u and w with v ∈ M(u) and w / ∈ M(u), we have that u and w are separated by P.

(Here “M(u)” is the minimum 3-out set that separates u from s.)

The proofs of Propositions 9 and 10 are provided in Sections 4.1 and 4.2, where they appear as Proposition 22 and Proposition 24, respectively, because the corresponding properties of the computed partitions are explained formally in their statements. The proof of Proposition 11 is discussed in Section 4.2, because this is established by using the same techniques as in Proposition 24.

4.1 Proof of Proposition 9 (using the Picard-Queyranne graph)

Let a and b be two distinct vertices of G. If G is a multigraph, then we consider it as a simple capacitated graph, with capacity function c : E(G) → N, where c(e) for every edge e equals the multiplicity of e in the original graph. Let us define an (a, b)-flow f as a function f : E(G) → Z with the following two properties:

1. 0 ≤ f(e) ≤ c(e), for every edge e of G. (I.e., the flow passing through every edge cannot exceed its capacity.)

2. e=(u,v) f(e) = e=(v,u) f(e), for any vertex v ∈ V(G) \ {a, b}. (I.e., the amount of flow entering any vertex v / ∈ {a, b} equals the amount of flow exiting v.)

Without loss of generality, we may assume that no flow enters the source vertex a and no flow leaves the sink vertex b, i.e., f(e) = 0 for any edge e = (v, s) and any edge e = (t, v).

We call e=(a,u) f(e) the value of f. (I.e., the value of f is the amount of flow exiting a.) It is well known that an (a, b)-flow with value λ(a, b) exists, and this is in fact the maximum value of any (a, b)-flow. We call such a flow an (a, b)-maxflow.

Definition 20 (Picard-Queyranne graph). Let f be an (a, b)-maxflow of G. Then we define a graph PQ with V(PQ) = V(G) as follows. For every edge e = (x, y) of G, there is an edge (x, y) in PQ if f(e) < c(e), and an edge (y, x) if f(e) > 0. PQ is called the Picard-Queyranne graph that corresponds to f.

Figure 2: Top: A directed graph G with source vertex s, such that λ(z, s) = 6, for all vertices z = s. The M-sets of G are M(v) = M(u) = {v, u}, M(w) = {w}, M(y) = {y}, and M(x) = {x, y, u, v, w}. Bottom: A maximum (v, s)-flow and the corresponding Picard-Queyranne graph PQ. We have x, y, w ∈ M(u), so these vertices are not strongly connected with u in PQ.

We note that, since G is strongly connected, it is not difficult to see that a is reachable by all vertices in PQ, and b reaches all vertices in PQ. (Thus, if we contract every strongly connected component of PQ into a single vertex, then the node containing b is the only source, and the node containing a is the only sink in the resulting DAG.)

Picard and Queyranne [38] have provided the following characterization of the (a, b)-mincuts of G:

Proposition 21 (Theorem 1 in [38]). A set of vertices X of G is an (a, b)-mincut if and only if: it contains a, it does not contain b, and it is closed w.r.t. the reachability relation in PQ (i.e., for every x ∈ X, we have reachPQ(x) ⊆ X).

We will prove the following. (See Figure 2.)

Proposition 22. Let v be a vertex with λ(v, s) = k + 1. There is an algorithm that runs in O(km) time and returns a partition P of V(G) with the following properties:

• P maintains the (k + 2)-edge-connected components of G.

• For every two ordinary vertices u and w with v ∈ M(u) and w / ∈ M(u), we have that u and w are separated by P.

Remark 23. We note that the second point holds even if we replace “M(u)” with “a (k + 1)-out set U that separates u and s”. The proof is precisely the same (i.e., every instance of “M(u)” is just replaced with “U”).

Proof. First we perform k + 1 iterations of Ford-Fulkerson’s augmenting paths algorithm (e.g. using BFS), in order to find a maximum (v, s)-flow. Then we construct the corresponding graph PQ as described in Definition 20, and we let P be the collection of the strongly connected components (viewed as vertex-sets) of PQ. Thus, the computation of P takes O(km) time.

Now let u and w be two vertices of G that are separated by P. Then, at least one of those vertices is unreachable by the other in PQ. Thus, we may assume w.l.o.g. that u cannot reach w in PQ. This implies that u cannot reach the strongly connected component of s in PQ (because s reaches all vertices of PQ), and therefore X = reachPQ(u) is a (v, s)-mincut of G. Since λ(v, s) = k + 1, we have that X is a (k + 1)-out set of G. Furthermore, X separates u and w. Thus, u and w are not (k + 2)-edge-connected in G. This establishes the property that P maintains the (k + 2)-edge-connected components of G.

Now let u and w be two ordinary vertices of G with v ∈ M(u) and w / ∈ M(u). This implies that M(u) is a (k + 1)-out set that separates u and s. Therefore, since v ∈ M(u), we have that M(u) is a (v, s)-mincut. According to Proposition 21, this implies that reachPQ(u) ⊆ M(u). Thus, since w / ∈ M(u), we have that u cannot reach w in PQ, and therefore u and w are separated by P.

4.2 Proof of Proposition 10

We will prove the following.

Proposition 24. Let v be a vertex with λ(v, s) = k. There is an algorithm that runs in O(k2m) time and returns a partition P of V(G) with the following properties:

• P maintains the (k + 2)-edge-connected components of G.

• For every two ordinary vertices u and w with v ∈ M(u) and w / ∈ M(u), we have that u and w are separated by P.

Proof. We apply the procedure shown in Algorithm 2. Thus, first we compute the latest (v, s)-mincut S. By Lemma 17, this takes O(km) time. Notice that S does not contain any ordinary vertex of G (because the ordinary vertices are (k + 1)-edge-connected, and S is a k-out set).

Then, we contract S into a single vertex z, and let G be the resulting graph. It is easy to establish the following two facts: (i) for every two vertices x and y of G with x, y / ∈ S, we have λG(x, y) ≥ λG(x, y), and (ii) the out-degree of z in G is k. Let {e1, . . . , ek} be the set of the outgoing edges of z in G.

Now, as shown in Line 4, we first remove all outgoing edges of z from G, and we compute the partition Q0 of the 2-edge-connected components of the resulting graph, that we denote by G′. By [19], this takes linear time. Let P0 be the partition of V(G) that corresponds to Q0. (I.e., every set of Q0 is a set of P0, except for the set U ∈ Q0 that contains z, which is replaced by (U \ {z}) ∪ S.) Let x and y be two vertices of G with x, y / ∈ S and λG(x, y) ≥ k + 2. Then, by (i) we infer that λG′(x, y) ≥ 2. Thus, P0 maintains the (k + 2)-edge-connected components of G.

Then, for every i ∈ {1, . . . , k} such that the head xi of ei is not s, we contract z with xi into a single vertex zi, and let Gi be the resulting graph (derived from G). Notice that Gi is essentially the same graph as if we had contracted the vertex set S ∪ {xi} of G into zi. Thus, it is not difficult to see that Lemma 19 implies that λGi(zi, s) > λG(v, s) = k. (To be precise, Lemma 19 implies that λG(R ∪ {xi}, s) > k, where R = reachG[S](v). But then, since R ∪ {xi} ⊆ S ∪ {xi}, we have λG(R ∪ {xi}, s) ≤ λG(S ∪ {xi}, s). Thus, we get λG(S ∪ {xi}, s) > k, which implies that λGi(zi, s) > k.) Now, if λGi(zi, s) = k + 1, then we can apply Proposition 22 on Gi (with v = zi), in order to get a partition Qi. By Proposition 22, we have that Qi maintains the (k + 2)-edge-connected components of Gi. Then, since Gi is essentially derived from G by contracting S ∪ {xi} into a single vertex, we have that the partition Pi of V(G) that corresponds to Qi maintains the (k + 2)-edge-connected components of G.

The output of Algorithm 2 is the partition P which is the common refinement of P0 and all Pi, for i ∈ {1, . . . , k} such that the head xi of ei is not s and λG(S ∪ {xi}, s) = k + 1. Therefore, so far we have established that P maintains the (k + 2)-edge-connected components of G.

Now let u and w be two ordinary vertices of G such that v ∈ M(u) and w / ∈ M(u). Consider the set of vertices U = M(u) ∪ S. As w is an ordinary vertex, we have w / ∈ U. We will show that outG(U) = k + 1. By the submodularity of the cut function we have

outG(M(u) ∩ S) + outG(M(u) ∪ S) ≤ outG(M(u)) + outG(S).

We have outG(M(u)) = k + 1 and outG(S) = k. On the other hand, we have outG(M(u) ∩ S) ≥ k (because M(u) ∩ S is a (v, s)-cut), and outG(M(u) ∪ S) ≥ k + 1 (because M(u) ∪ S is a (u, s)-cut). Thus, we infer that outG(M(u) ∪ S) = k + 1.

Now consider the projection U of U from G into G. Then, since S ⊂ U, we have outG(U) = outG(U), and therefore U is a (k + 1)-out set of G. Notice that u, z ∈ U and w / ∈ U. Now, if the outgoing edges of z in G are outgoing edges of U, then their removal from G drops the connectivity from u to w to 1. Thus, u and w are separated by Q0, and therefore by P0, and therefore by P. Otherwise, we have that at least one outgoing edge ei of z in G lies entirely within U. Then, since we contract z with the head of ei into a vertex zi in order to get Gi, it is easy to see that the projection of U into Gi is a (k + 1)-out set of Gi that contains zi, and does not contain w or s. Then, by Proposition 22 we infer that u is separated from w by Pi, and therefore by P.

Notice that we get the O(k2m) time bound because we apply at most k times the algorithm that establishes Proposition 22 on graphs that have at most as many edges as G.

In order to establish Proposition 11, we can use Algorithm 2 with the following modifications (and the proof of correctness is similar to that of Proposition 24). First, if λ(v, s) = 2, then we just apply this algorithm with k = 2. However, if λ(v, s) = 1, then the vertex z, that appears in Line 2 (and is the contraction of the latest (v, s)-mincut S), has a unique outgoing edge e1. Thus, in Line 4 we perform a computation of the 3-edge-connected components of G \ {e1}. This can be performed in linear time, by [18]. Then, we have λ′ = λG(S ∪ {x1}, s) > 1, where x1 is the head of e1. And now, if λ′ ≤ 3, we work similarly as in Lines 8 to 10. The only difference is that, if λ′ = 2, then we apply again Proposition 11, instead of Proposition 22.

Algorithm 2: The procedure that establishes Proposition 24. // input is a vertex v with λ(v, s) = k 1compute the latest (v, s)-mincut S 2contract S into a vertex z, and let G be the resulting graph 3let {e1, . . . , ek} be the outgoing edges of z in G 4compute the partition Q0 of the 2-edge-connected components of G \ {e1, . . . , ek} 5let P0 be the partition of V(G) that corresponds to Q0 (via the inverse of the quotient map from G to G) 6foreach i ∈ {1, . . . , k} do 7if the head xi of ei is not s and λG(S ∪ {xi}, s) = k + 1 then 8let Gi be the graph obtained from G by contracting z and xi into a vertex zi 9let Qi be the partition that is returned by applying Proposition 22 on Gi, with v := zi 10let Pi be the partition of V(G) that corresponds to Qi 11end 12else 13let Pi be {V(G)} 14end 15end 16return P0 refined by P1, . . . , Pk

5 Edge-connected components decompositions

Our main algorithm (Algorithm 1) in Section 2.5 assumes that the ordinary vertices of the input digraph are (k + 1)-edge-connected. In this section, we justify this assumption by proving Theorem 3 and Theorem 4. To this end, we leverage the computation of the nodes corresponding to a poset representation of the minimal k-out sets [15, 18], in an appropriate order, combined with either a contraction operation for the (k + 1)-ECC decomposition or the gadget substitution operation of [21] for the 3-ECC decomposition.

5.1 (k + 1)-ECC decomposition of a k-edge connected digraph

Let G = (V, E) be a k-edge-connected digraph. Let s be an arbitrarily selected vertex of G. Recall that a k-out set (resp., k-in set) S is a set of vertices such that out(S) = k (resp., in(S) = k). For any ordinary vertex v, we let µ(v) denote the minimal k-out set that contains v but not s.3 It follows from Lemma 12 that if any k-out set separating v from s exists, then there also exists a minimum one, contained in every other such set (notice that v, s are k-edge-connected, therefore λ(u, s) ≥ k). If v is not contained in any such set then we let µ(v) = ⊥.

3We use the notation µ(v) to denote the minimal k-out sets, in order to distinguish it from M(v), which denotes the minimal (k + 1)-out sets.

Let [v] denote the set of ordinary vertices that have the same minimal k-out set in G, i.e., [v] = {u : µ(v) = µ(u)}. Similarly, [v]R denotes the set of ordinary vertices that have the same minimal k-out set in GR. Note that the [v]-sets form a partition of the vertices of G. In particular, v ∈ [s] implies µ(v) = ⊥, i.e., there is no cut of size at most k that separates all paths from v to s.

Proposition 25. Let G be a k-edge-connected digraph with a fixed start vertex s. Then, any two vertices u and v are (k + 1)-edge-connected if and only if [u] = [v] and [u]R = [v]R.

Proof. Follows immediately from Lemma 14 and the definition of the sets [v] and [v]R,

Definition 26. An ordering ≺ of the sets [v] is proper if, for all vertices x, y, µ(x) ⊂ µ(y) implies [x] ≺ [y].

Proposition 27. The sets [v] can be computed in proper order in O(km log n) time.

Proof. The sets [v] correspond to the strongly connected components (SCCs) of the labeling graph LG introduced by Gabow [15]. This graph satisfies the property that u ∈ µ(v) if and only if u is reachable from v in LG. Moreover, its SCCs can be computed in topological order in O(m) time (Lemma 2.16 in [15]). The labeling graph LG is defined with respect to a complete k-intersection of a k-edge-connected digraph, which can be constructed in O(km log n) time [13].

Let C1, . . . , Cq be the (k + 1)-edge-connected components of G. Our plan is to compute, for each component Ci, a graph Gi, where the vertices in Ci are ordinary, that satisfies Theorem 3. We construct this decomposition in two phases, where the first phase processes the sets [v], corresponding to the minimal k-out sets of G, in proper order, while the second phase processes the sets [v]R, corresponding to the minimal k-out sets of GR in proper order.

Definition 28. Let S be an k-out set of a k-edge-connected digraph G. The contraction of S, denoted by ⟨S⟩, is the operation that contracts all vertices in S into a single vertex vS. Specifically:

• every edge (u, v) entering S, where u / ∈ S and v ∈ S, is replaced by an edge (u, vS);

• every edge (v, w) leaving S, where v ∈ S and w / ∈ S, is replaced by an edge (vS, w);

• all edges with both endpoints in S are deleted.

We denote by G⟨S⟩ the graph obtained from G after the contraction of S.

Our goal is to show that the contraction of a k-out set S in G maintains the pairwise connectivity of the remaining vertices in ¯S = V \ S. For convenience, we will work with a modified version of G, where we split the outgoing edges of S by introducing auxiliary intermediate vertices. More formally, we have the following.

Definition 29. Let S be a k-out set of a k-edge-connected digraph G, with outgoing edges C = E(S, V \ S) = {(x1, y1), . . . , (xk, yk)}. The splitting operation on C introduces, for each edge ei = (xi, yi) ∈ C, a new vertex x(ei), and replaces ei with the two edges (xi, x(ei)) and (x(ei), yi). We denote by split(G, C) the resulting graph obtained after performing this operation.

Lemma 30. Let S be a k-out set of a k-edge-connected digraph G. Let u and v be any two vertices of G. Then, for any ℓ ≥ k, u and v are ℓ-edge-connected in G if and only if u and v are ℓ-edge-connected in split(G, E(S, V \ S)).

Proof. The lemma holds since splitting an edge (xi, yi) does not affect the local edge connectivity λ(u, v) between any two vertices u and v of G.

Lemma 31. Let S be a k-out set of a k-edge-connected digraph G, with outgoing edges C = E(S, V \ S) = {(x1, y1), . . . , (xk, yk)}. Also, let G′ = split(G, C) and let X = {x(e1), . . . , x(ek)} be the set of vertices introduced by the splitting operation. Then, for any vertex v ∈ S, the minimum (v, X)-cut in G′[S ∪ X] has size at least k.

Proof. Suppose, for contradiction, that the claim is not true. Let C′ be a minimum (v, X)-cut in G′[S ∪ X] with size |C′| = k′ < k. Let R be the set of vertices that v reaches in G′[S ∪ X] \ C. Then, R is a k′-out set in G′ containing v and, which contradicts Lemma 30 and the fact that G is k-edge-connected.

Observation 32. Let S be a k-out set of a k-edge-connected digraph G. Also, let G′ = split(G, E(S, V \ S)) and let S′ = S ∪ X, where X = {x(ei) : ei ∈ E(S, V \ S)} is the set of vertices introduced by the splitting operation. Then, S′ is a k-out set of G′ and G⟨S⟩ = G′⟨S′⟩.

Now we are ready to prove that the contraction of a k-out set S in G maintains the pairwise connectivity of the remaining vertices in ¯S = V \ S.

Lemma 33. Let S be a k-out set of a k-edge-connected digraph G. Then, for any ℓ ≥ k, any two vertices u, v ∈ S are ℓ-edge-connected in G if and only if u and v are ℓ-edge-connected in G⟨S⟩.

Proof. For any graph H, let λH(u, v) denote the size of the minimum u-v cut in H. We show that λG(u, v) = λG⟨S⟩(u, v). Define X, S′ and G′ as in Observation 32. By Lemma 30, λG(u, v) = λG′(u, v) and by Observation 32, λG⟨S⟩(u, v) = λG′⟨S′⟩(u, v). Hence, it suffices to argue that λG′(u, v) = λG′⟨S′⟩(u, v).

Let P′ = {p1, p2, . . . , pζ} be a maximum set of edge-disjoint u-v paths in G′. By Menger’s theorem [32], ζ = λG′(u, v). Clearly, each path pi ∈ P has a corresponding u-v path qi in G′⟨S′⟩. Moreover, it is easy to observe that Q = {q1, q2, . . . , qζ} is a set of edge-disjoint u-v paths in G′⟨S′⟩. Hence, λG′⟨S′⟩(u, v) ≥ λG′(u, v).

Now, we argue that λG′⟨S′⟩(u, v) ≤ λG′(u, v). Let Q = {q1, q2, . . . , qξ} be a maximum set of edge-disjoint u-v paths in G′⟨S′⟩, so ξ = λG′⟨S′⟩(u, v). Assume, without loss of generality, that Q′ = {q1, q2, . . . , qη} is the subset of Q consisting of the paths that contain the vertex vS′ into which S′ was contracted (Definition 28). Then, any path pi ∈ Q′ has the edges (ui, vS′) and (vS′, yi), where yi is an exit point of S′. Hence, η ≤ k. Let (ui, vi) and (x(ei), yi) be the edges of G′ that correspond to (ui, vS′) and (vS′, yi), respectively. We claim that the minimum (vi, {x(ei), . . . , x(eη)})-cut in G′[S′] has size at least k. Suppose, for contradiction, that the claim is not true. Let C be a (vi, {x(ei), . . . , x(eη)})-cut in G′[S′] with size |C| = k′ < k. Let R be the set of vertices that vi reaches in G′[S′] \ C. Then, R is a k′-out set in G′, which, by Lemma 30, contradicts the fact that G is k-edge-connected. This implies λG′({v1, . . . , vη}, {y1, . . . , yη}) ≥ k. By Menger’s theorem, G′ therefore contains at least η edge-disjoint u–v paths passing through S′, corresponding to the set of paths Q′ in G′⟨S′⟩. Since the paths in Q \ Q′ remain unchanged in G′, we conclude that λG′⟨S′⟩(u, v) ≤ λG′(u, v).

5.1.1 First phase

Let G be the given k-edge-connected digraph. We choose an arbitrary vertex s as a start vertex and compute the sets [v], for all ordinary vertices v, corresponding to the minimal k-out sets µ(v), in proper order (Definition 26 and Proposition 27).

Now, given a proper order of the sets [v], our goal is to compute, for each set [v], an auxiliary graph G[v], satisfying the following:

Definition 34 (First-phase auxiliary graph). An auxiliary graph G[v] is k-edge-connected and contains two types of vertices, ordinary and auxiliary, such that:

1. The ordinary vertices are precisely the vertices of [v].

2. An auxiliary vertex x is not (k + 1)-edge-connected with any other vertex y, ordinary or auxiliary, in G[v].

3. Any two ordinary vertices u and v of G[v] are ℓ-edge-connected in G[v], for ℓ ≥ k, if and only if they are ℓ-edge-connected in G.

In the first phase of our algorithm, we construct auxiliary graphs G[v] for all sets [v], with a total number of vertices O [v] |V(G[v])| = O(|V(G)|) and a total number of edges O [v] |E(G[v])| = O(|E(G)|).

We construct the graphs G[v] by applying the contraction operation of Definition 28. This ensures that the connectivity of ordinary vertices is preserved (Lemma 33) and that the resulting graph is a k-edge-connected.

We maintain an evolving graph G′ = (V′, E′), where we apply the contraction of each k-out set that we identify. Initially, G′ = G. We process the sets [v] in proper order, which means that if µ(u) ⊂ µ(v) then [u] is computed before [v].

When we process the next set [v], we wish to identify the minimal k-out set µ′(v) in the current graph G′ that corresponds to µ(v) and contains all ordinary vertices of [v]. To process the next set [v], we execute the randomized local search Algorithm 5 (presented in Section 6) for exponentially increasing ∆ = 2i, i ∈ {0, . . . , ⌈log2 m⌉}.4 For constant k, we can use the local search Algorithm 4 instead, in order to obtain a deterministic decomposition. Henceforth, we will assume that the local searches have successfully identified each set µ′(v). (Note that this is easy to verify, since for any [v] = [s] we have µ′(v) = ∅.)

4Even though it is not necessary, one could make the following modification in lines 2 and 9 of Algorithm 3: one can return the DFS-tree path as soon as we reach any ordinary vertex w ∈ [v]. This is because any such w has not been contracted into an auxiliary vertex.

When we initiate a local search from an ordinary vertex v in the evolving graph G′, we find a minimal k-out set S = µ′(v). At this point, we need to (i) create the auxiliary graph G[v], by performing a contraction of V(G′) \ S, and (ii) update the evolving graph G′, by performing a contraction of S.

To enable the fast execution of tasks (i) and (ii), we maintain, for each vertex in V(G′), a list of incoming edges and a list of outgoing edges, organized in circular doubly-linked lists. This allows us to delete an edge from a list and merge two lists in constant time. Also, we assume that for each instance of an edge e = (u, v), we maintain a pointer to the location of e in the adjacency lists of u and v.

When we apply a contraction for a k-out set (resp., k-in set) S, we introduce a new auxiliary vertex vS with out(vS) = k (resp., in(vS) = k), that represents the vertices (ordinary and auxiliary) in S. We refer to such a vertex vS as a k-out auxiliary vertex (resp., k-in auxiliary vertex).

Construction of G[v]. Let S = µ′(v) be the next minimal k-out set found in G′, and let ¯S = V(G′) \ S. Also, let C = E(S, ¯S) = {e1 = (x1, y1), . . . , ek = (xk, yk)} be the edges of the k-cut that defines S. (Note that x1, . . . , xk ∈ S and y1, . . . , yk ∈ ¯S). We apply the contraction operation for ¯S, which replaces G′[¯S] (the subgraph of G′ induced by ¯S) with a k-in auxiliary vertex v¯S. Then, we let G′ = G′⟨¯S⟩.

Given S, it is straightforward to construct G′ in O(vol(S) + in(S)) time, which is not fast enough for our purposes. Fortunately, we can apply the following reduction rule to obtain a construction with O(vol(S)) time and space.

Reduction Rule: For each vertex u ∈ S do the following.

• Let ρ = E(¯S, u), i.e., the number of edges entering u from ¯S. Then, in G′ we keep min{k, ρ} copies of the edge (v¯S, u).

The correctness of this reduction rule follows directly from the observation that, for any two vertices u, w ∈ S, there exist at most k edge-disjoint u–w paths that traverse ¯S.

To complete the construction of G[v], we let G[v] = G′⟨¯S⟩, for S = µ′(v), where we execute the reduction rule.

Lemma 35. Given a k-out set S = µ′(v) of the evolving graph G′, we can construct G[v] in O(vol(S)) time, plus O(m) time for all G[v] graphs constructed through the algorithm.

Proof. To construct G[v], we first create a copy of each vertex in v ∈ S, and also copy the list of outgoing edges of v in G′. This takes O(vol(S)) time. Then, we introduce the k-in auxiliary vertex v¯S of ¯S, and replace each entering edge (xi, yi) ∈ E(S, ¯S) with (xi, v¯S).

Next, we need to add the necessary outgoing edges (v¯S, u), for u ∈ S, according to the Reduction Rule. To that end, for each vertex v ∈ S, we scan its list of entering edges in G′, and we count the number ρ of edges (z, u) such that z ∈ ¯S. We stop as soon as we find k such edges, or reach the end of the list of entering edges of v. Hence, we add min{k, ρ} copies of the edge (v¯S, u) to the list of outgoing edges of v¯S. Since we access at most k edges entering u from ¯S, the overall time to scan all lists is bounded by O(vol(S) + k|S|) = O(vol(S)), as claimed. This bound also includes the time to construct the list of entering edges for each vertex of G[v].

Updating G′. After we have constructed G[v], we need to update the evolving graph by setting G′ = G′⟨S⟩. Recall that S = µ′(v) is a k-out set of the evolving graph G′. We apply the contraction operation for S, which replaces G′[S] (the subgraph of G′ induced by S) with a k-out auxiliary vertex vS. This replacement procedure is analogous to the one applied for the construction of G[v], but slightly different since we operate directly on G′. The important difference with respect to the contraction procedure of ¯S for G[v], is that here we do not construct a new graph from scratch, but modify G′. Also, we do not need (and cannot afford) to apply the Reduction Rule.

To perform the contraction of S into vS, we need to update the head of the edges (w, v), where w ∈ ¯S. We do that indirectly with a disjoint set-union (DSU) data structure [42, 41], which we use to contract all the vertices of S. The DSU data structure supports the operation unite(u, v), which unites the sets of two given vertices u and v, and makes u the representative of the new set. It also supports the query find(v), which returns the representative vertex of the set containing v. To perform the contraction of S, we chose a vertex r ∈ S as representative, and execute unite(r, v) for all vertices v ∈ S \ r. Hence, whenever we need to traverse an edge (w, v), we traverse (w, find(v)) instead.

Next, we update the list of outgoing and entering edges of v. To do this fast, we assume that we have stored a list L(S) of the edges with both endpoints in S, which we can do in O(vol(S)) time. Next, we delete each edge (u, v) ∈ L(S), both from the list of outgoing edges of u and from the list of entering edges of v. Then, for every vertex v ∈ S \ r, we merge the list of entering edges of v with the list of entering edges of r. Finally, we update the list of outgoing edges of r, so that it consists of the k outgoing edges of S.

The proof that G[v] satisfies Definition 34 is deferred to a later subsection. We proceed to analyze the running time of the procedure.

Lemma 36. Given a k-out set S = µ′(v) of the evolving graph G′, we can update G′ in O(vol(S)) time, plus the time required for the DSU data structure.

Proof. Our procedure receives as input a list of the vertices in S. It computes a list L(S) of the edges with both endpoints in S in O(vol(S)) time. Then, we can remove all edges in L(S) from the adjacency lists of G′ in O(|L(S)|) time, and update the list of outgoing edges of r, so that it consists of the k outgoing edges of S. Finally, we can merge the list of entering edges of each vertex v ∈ S \ r with that of r, in a total of O(|S|) time. Thus, the total update time is O(|L(S)| + |S|) = O(vol(S)), plus the time required by the DSU data structure.

After processing all sets [v], such that s ∈ [v], we set G[s] = G′. The ordinary vertices of G[s] are the ordinary vertices v ∈ V(G) for which µ(v) = µ′(v) = ⊥.

5.1.2 Second phase

The second phase completes the construction of the (k + 1)-ECC decomposition H1, . . . , Ht, where each Hi corresponds to a unique (k + 1)-edge-connected component Ci of G. To that end, we process each auxiliary graph G[v] of the first phase as follows. Recall that if s ∈ [v], G[v] is the graph that results from the contraction of the k-in set S = V(G′) \ µ′(v). Since s ∈ µ′(v), the k-out auxiliary vertex vS represents the contraction of S = V(G′) \ µ′(v), which contains the start vertex s. Hence, we set vS as the start vertex of G[v], and apply the same procedure as the first phase, for G′ = (G[v])R. For G[s], we apply the procedure of the first phase for G′ = (G[s])R with start vertex s.

5.1.3 Correctness proof

First, we will prove the correctness of our construction, under the assumption that the local searches have successfully identified each set µ′(v). Then, we will bound the probability of failure.

In the following, we prove that in each of the graphs created, the ordinary vertices are all (k + 1)-edge-connected. The rest of the properties of Theorem 3 follow directly from our algorithm and the fact that contractions preserve the connectivity of ordinary vertices (Lemma 33).

Let C1, . . . , Cq be the (k + 1)-edge-connected components of a k-edge-connected G.

Lemma 37. The graphs G[v] constructed during the first phase of the algorithm satisfy Definition 34.

Proof. We only need to prove Property 1 of Definition 34, as the remaining properties follow immediately from the correctness of the contraction operation (Lemma 33).

To prove Property 1, consider the local search that identified µ′(v) in G′. All vertices of the induced subgraph of the minimum k-out set of any ordinary vertex v are reachable from v (otherwise we could remove the non-reachable vertices and get a smaller set). Then, when we process [v], for all vertices in [v], the evolving graph contains a k-out set S′ whose ordinary vertices are exactly the remaining ordinary vertices of µ(v) in G′. By induction, if there exists any u with µ(u) ⊂ µ(v), the ordinary vertices of µ(u) have already been processed and thus are no longer ordinary vertices in the evolving graph (this is why we need the proper ordering on the sets [v]). Furthermore, the ordinary vertices u of µ(v) have µ(u) ⊆ µ(v) (otherwise by Lemma 12 the set µ(u) ∩ µ(v) is k-out and separates u from s, contradicting the minimality of µ(u)). We conclude that the ordinary vertices of S′ are exactly the vertices of [v].

As our local search avoids s by construction, and s ∈ [v], it follows that s is not in the aforementioned set. Therefore, the existence of S′ shows that the ordinary vertices of the minimum k-out set we find contains a subset of the remaining ordinary vertices of [v] and no other ordinary vertices.

We now argue that the minimum k-out set µ′(v) we find contains all vertices of [v]. If this was not true, then it would contain some v1 ∈ [v] but not some v2 ∈ [v], and also not s (by construction of the local search algorithm). But the contraction operation on the evolving graph guarantees that such a set would exist in the original graph (as we prove in the following claim), which contradicts the definition of [v]. Therefore, it suffices to prove:

Claim 38. Let u, v be two ordinary vertices in the evolving graph G′, and suppose there exists a k-out (resp. k-in) set S containing u but not v, s. Then, there exists a k-out (resp. k-in) set in the original graph, containing u but not v, s.

Proof. Let G′′ be the evolving graph at some point during the first phase when we found a k-out set S′′ and contracted it into vS′′, so that G′ = G′′⟨S′′⟩. It suffices to prove that in G′′ there exists a k-out or k-in set S containing u but not v, s, as we can repeat the argument to reach the original graph. Note that S′′ does not contain u, v, s, as these vertices are ordinary in G′.

The contraction operation in the evolving graph does not remove any edge with at most one endpoint in S′′. Therefore, if S does not contain vS′′, then S exists as is in G′′, with the same number of incoming and outgoing edges.

On the other hand, if S contains vS′′, then let Y = (S \ {vS′′}) ∪ S′′. If S is a k-out set, then Y is also a k-out set that contains u (because u ∈ S) but not v, s. Similarly, if S is a k-in set, then Y is also a k-in set that contains u but not v, s. In either case the result follows.

This concludes the proof for all sets except for [s]. However, as the sets [v] form a partition, and after the first phase is done we put all remaining ordinary vertices of the evolving graph in G[s], the result follows.

Now we focus on the second phase.

Lemma 39 (Refined Cuts). Let S be a k-out set of a k-edge-connected digraph G that contains two distinct vertices x and y. If there is no (≤ k)-out set S′ ⊂ S that separates x and y, then any k-out set that separates x and y must contain all vertices in V \ S.

Proof. Let X be a k-out set that contains x but not y. Then, out(S ∩ X) > k, since otherwise S ∩ X would be a (≤ k)-out set contained in S that separates x and y. By submodularity out(S) + out(X) ≥ out(S ∪ X) + out(S ∩ X), and since out(S) = out(X) = k, we have out(S ∪ X) < k. Thus, since G is k-edge-connected, S ∪ X must contain all vertices of G, and so V \ S ⊆ X.

Corollary 40. Let x and y two vertices in [v] that are not (k + 1)-edge-connected in G. Then, there is a k-out set X in GRs that separates x and y that does not contain any vertex in V \ µ(v). In particular, X does not contain s.

Proof. We apply Lemma 39 for S = µ(v). By the definition of [v], and the fact that x, y ∈ [v], we have that there is no k-out set S′ ⊂ µ(v) that separates x and y. Since x and y are not (k + 1)-edge-connected, we have x ∈ µR(y) or y ∈ µR(x) (Lemma 14). Assume, without loss of generality, that x ∈ µR(y). Then, X = V \ µR(y) is a k-in set in GR that contains x but not y. Hence, X is a k-out set in G that separates x and y, so by Lemma 39, it contains all vertices of V \ µ(v). Then, µR(y) is a k-out set in GRs that separates x and y that does not contain any vertex in V \ µ(v).

We are now ready to show that the ordinary vertices in the graphs constructed during the second phase of the algorithm are (k + 1)-edge-connected.

Lemma 41. Let u, v be ordinary vertices in a graph Hi constructed during the second phase of the algorithm. Then u, v are (k + 1)-edge-connected.

Proof. If u, v are not (k + 1)-edge-connected and are not splitted by the first phase of the algorithm, then [u] = [v] by Lemma 37. Corollary 40 implies that there exists a k-out set X in GRs that w.l.o.g. contains u and does not contain v, s. Hence, G[v] contains a k-out set S′ containing u but not v, s. As the second phase is the same as the first phase in the graph G[v] instead of G, by Lemma 37 we conclude that, in the end, u is in a different graph Hi from v.

We complete the proof of correctness by bounding the probability of error.

Proposition 42. The graphs constructed during the second phase of the algorithm satisfy Theorem 3 with probability at least 1 − δ, where δ is a parameter with 0 < δ < 1.

Proof. From the analysis above, the graphs constructed during the second phase of the algorithm satisfy Theorem 3, provided that each local search correctly identifies the corresponding µ′(v) set. Consider the next set S = µ′(v) that the algorithm attempts to find in the evolving graph G′ during the first phase. Let 2i−1 < vol(S) ≤ 2i. By Proposition 7 and the use of exponentially increasing ∆, the execution of Algorithm 5 with ∆ = 2i fails to identify µ′(v) (i.e., incorrectly returns ∅) with probability at most 1/2.

Note that in this setting, it is straightforward to verify whether a failure has occurred. Indeed, for any [v] = [s], we have µ′(v) = ∅. Therefore, if the local search for S = µ′(v) either returns S = ∅ or succeeds only when the volume parameter satisfies ∆ ≥ 2 vol(S), we can immediately terminate the execution and report a failure. (This property will also be used to bound the overall running time of the construction.)

To amplify the success probability, we repeat Algorithm 5 N = ⌈log2(2n/δ)⌉ times. Then, the probability that all N repetitions fail is at most (1/2)N ≤ δ 2n. Since the algorithm identifies fewer than 2n distinct µ′(v) sets in total (less than n in each of the two phases), a union bound implies that the probability that any local search fails is at most δ. Hence, with probability at least 1 − δ, all searches succeed, completing the proof.

5.1.4 Running time

Now we bound the running time of our construction and the total size of the constructed auxiliary graphs. We only analyze the construction of the first phase, since the second phase executes the same construction on the reverse graph of each first-phase auxiliary graph.

Lemma 43. The total time to identify all µ′(v) sets and maintain the evolving graph G′ during the first phase of the algorithm is O(k2m log2 (n/δ)), plus the time to perform O(m) operations on the DSU data structure.

Proof. Directly by our algorithm and the running time of our local search, we have that the time to find an µ′(v) is O(k2 log2 (n/δ) ⌈log2 vol(µ′(v))⌉i=0 2i) = O(k2 log2 (n/δ)vol(µ′(v))). The contraction operation removes all vertices in a k-out set, and introduces a new vertex with k outgoing edges; as we perform at most n contractions, the extra edges added this way are at most kn = O(m).

We conclude that the running time to identify all µ′(v) sets is at most k2 log2 (n/δ) times the sum of out-degrees of all vertices of G, plus O(m), which gives the desired O(k2m log2 (n/δ)) bound. The lemma then directly follows from Lemma 36.

Lemma 44. The total size of all constructed graphs during the first phase of the algorithm is O(m), and the total number of vertices is O(n). The total time to construct all auxiliary graphs G[v] = G′⟨V′\µ′(v)⟩ during the first phase of the algorithm is O(k2m).

Proof. By Lemma 36, when we identify the next minimal k-out set µ′(v) in the evolving graph G′, we create G[v] = G′⟨V′\µ′(v)⟩ in O(vol(µ′(v))) time (plus O(m) time in total, which is negligible). So, the total size of all auxiliary graphs G[v] is bounded by the time to construct them, as they are all explicitly constructed. This is O([v] vol(µ′(v))) = O(m), exactly as argued in Lemma 43. To bound the total number of vertices, we observe that whenever we identify a minimal k-out set S in the evolving graph G′, we introduce two auxiliary vertices: a k-out vertex vS in G′ and a k-in vertex v¯S in G[v]. Since this process can occur at most n times (once per [v] set), we introduce a maximum of 2n auxiliary vertices. Therefore, the total number of vertices in all generated graphs remains O(n).

The running time is dominated by Lemma 43. It is O(k2m), using, e.g., the DSU data structure of [41] or of [42].

5.2 3-edge-connected component decomposition of a general digraph

In this section we describe the decomposition of Theorem 4. Here we take advantage of the 2-connectivity-light graph (2CLG) decomposition, introduced in [21] and also exploited in [18].

Definition 45 ([21]). A strongly connected digraph G is called a 2-connectivity-light graph (2CLG) if V(G) can be partitioned into two sets of vertices, ordinary and auxiliary, such that:

1. All ordinary vertices are 2-edge-connected.

2. Every auxiliary vertex has out-degree or in-degree 1.

3. For every two vertices u and v with out(u) > 1 and in(v) > 1, there are two edge-disjoint paths from u to v.

4. If u is an auxiliary vertex with out(u) = 1 (resp., in(u) = 1), then, for every ordinary vertex v, the unique outgoing edge from u (resp., the unique incoming edge to u) is the only bridge that appears in every path from u to v (resp., from v to u).

Our 3-ECC decomposition utilizes the following result.

Theorem 46 (2CLG Decomposition [21], Lemma 3.2). Let G be a strongly connected digraph. In linear time, we can explicitly construct a collection H1, . . . , Ht of 2CLG graphs such that:

• For every vertex of G, there is exactly one graph among H1, . . . , Ht that contains it as an ordinary vertex.

• Every two vertices u and v of G are k-edge-connected, for k ≥ 2, if and only if there is an i ∈ {1, . . . , t} such that u and v are k-edge-connected ordinary vertices of Hi.

Given Theorem 46, we may assume that our input graph G is a 2CLG, which we wish to decompose into a collection of graphs as stated in Theorem 4. The general idea is to exploit the algorithm of [18] that computes a compact representation of the minimal 2-out sets of G in linear time.

5.2.1 3-ECC decomposition of a 2CLG

Let G = (V, E) be a 2CLG with at least two ordinary vertices. Let Gs be the corresponding flow graph with start vertex s, where s is an arbitrarily selected ordinary vertex of G. Recall that a 2-out set (resp., 2-in set) S is a set of vertices such that out(S) = 2 (resp., in(S) = 2). We will consider only 2-out sets and 2-in sets that contain at least one ordinary vertex.

For any ordinary vertex v, we let µ(v) denote the minimal 2-out set that contains v but not s. It follows from Lemma 12 that if any 2-out set separating v from s exists, then there also exists a minimum one, contained in every other such set (notice that v, s are 2-edge-connected, therefore λ(u, s) ≥ 2, by the properties of 2CLGs). If v is not contained in any such set then we let µ(v) = ⊥.

Let [v] denote the set of ordinary vertices that have the same minimal 2-out set in G, i.e., [v] = {u : µ(v) = µ(u)}. Similarly, [v]R denotes the set of ordinary vertices that have the same minimal 2-out set in GR. Note that the [v]-sets form a partition of the ordinary vertices of G. In particular, v ∈ [s] implies µ(v) = ⊥, i.e., there is no cut of size at most 2 that separates all paths from v to s. In [18] it is proven (Proposition III.5) that the 3-edge-connected components are equivalent with the partitions induced by the sets [v] ∩ [v]R. Then, the linear-time algorithm of [18] computes the sets [v] in proper order (Definition 26), which means that if µ(u) ⊂ µ(v) then [u] is computed before [v].

Let C1, . . . , Ck be the 3-edge-connected components of G. Our plan is to compute, for each component Ci, a graph Gi, where the vertices in Ci are ordinary, that satisfies Definition 45. Similarly to the (k + 1)-ECC decomposition, we construct the 3-ECC decomposition in two phases, where the first phase processes the sets [v], corresponding to the minimal 2-out sets of G, in proper order, while the second phase processes the sets [v]R, corresponding to the minimal 2-out sets of GR in proper order.

5.2.2 First phase

Let G be the given 2CLG. We choose an arbitrary ordinary vertex s as a start vertex and compute the sets [v], for all ordinary vertices v, corresponding to the minimal 2-out sets µ(v), in proper order.

Given a proper order of the sets [v], our goal is to compute, for each set [v], an auxiliary graph G[v], satisfying the following:

Definition 47 (First-phase auxiliary graph). An auxiliary graph G[v] contains two types of vertices, ordinary and auxiliary, such that:

1. The ordinary vertices are precisely the vertices of [v].

2. An auxiliary vertex x is not 3-edge-connected with any other vertex y, ordinary or auxiliary, in G[v].

3. Any two ordinary vertices u and v of G[v] are k-edge-connected in G[v], for k ≥ 3, if and only if they are k-edge-connected in G.

In the first phase of our algorithm, we construct auxiliary graphs G[v] for all sets [v], of total size [v] |V(G[v])| + |E(G[v])| = O(|V(G)| + |E(G)|). We construct the graphs G[v] by applying the gadget substitution of [21]. This ensures that the connectivity of ordinary vertices is preserved (Lemma 3.6 of [21]) and the resulting graph is a 2CLG (Lemma 3.5 of [21]). For completeness, we describe the construction of the gadgets and compute the running time.

We maintain an evolving graph G′ = (V′, E′), where we apply the gadget substitution for each 2-out set that we identify. Initially, G′ = G. Since we process the sets [v] in proper order, µ(u) ⊂ µ(v) implies that [u] is computed before [v].

When we process the next set [v], we wish to identify the minimal 2-out set µ′(v) in the current graph G′ that corresponds to µ(v) and contains all ordinary vertices of [v]. We do that, by executing the local search Algorithm 4, as in Section 5.1. When we initiate a local search from an ordinary vertex v in the evolving graph G′, we find a minimal 2-out set S = µ′(v). At this point, we need to (i) create the auxiliary graph G[v], by performing a gadget substitution for V(G′) \ S, and (ii) update the evolving graph G′, by performing a gadget substitution for S. To enable the fast execution of tasks (i) and (ii), we use the same data structures for maintaining the lists of incoming and outgoing edges as in Section 5.1.

When we apply a gadget substitution for a 2-out set (resp., 2-in set) S, we introduce a new auxiliary vertex s′ with out(s′) = 2 (resp., in(s′) = 2), that represents the vertices (ordinary and auxiliary) v ∈ S with out(v) ≥ 2 (resp., in(v) ≥ 2). We refer to such a vertex s′ as a 2-out auxiliary vertex (resp., 2-in auxiliary vertex).

Construction of G[v]. Let S = µ′(v) be the next minimal 2-out set found in G′, and let ¯S = V(G′) \ S. Also, let C = {e1 = (x1, y1), e2 = (x2, y2)} be the edges of the 2-cut that defines S. (Note that x1, x2 ∈ S and y1, y2 ∈ ¯S). We apply the gadget replacement operation for ¯S, which replaces G′[¯S] (the subgraph of G′ induced by ¯S) with a 2-connectivity light gadget Gin(¯S), as follows:

1. Gin(¯S) contains a central vertex s′, which is a 2-in auxiliary vertex that represents the ordinary and auxiliary vertices v ∈ ¯S with in(v) ≥ 2.

2. The gadget contains 2 entering edges C′ = {e′1 = (x1, y′1), e′2 = (x2, y′2)} corresponding to the edges of the 2-cut C. We refer to the set {y′1, y′2} as the set of boundary points of Gin(¯S).

3. If yi, i ∈ {1, 2} is an auxiliary vertex with in(yi) = 1, then let y′i be a copy of yi and insert the edge (y′i, s′) into Gin(¯S). Otherwise, we let y′i = s′. (Note that we can have y′1 = y′2.)

4. For each auxiliary vertex z ∈ ¯S \ {y1, y2} with in(z) = 1, such that G′ has an edge (z, w) for some w ∈ S, Gin(¯S) contains a corresponding auxiliary vertex z′ with in(z′) = 1, and the edge (s′, z′).

5. Let G′<¯S> be the graph that results from G′ after the following modifications. We replace G′[¯S] and its entering edges C with Gin(¯S) and C′ respectively. Also, we replace each edge (z, w) directed from ¯S to S in G′, with a corresponding edge (z′, w) in G′<¯S>.

We also apply the following reduction rule, in order to construct G′<¯S> in O(vol(S)) time and space.

Reduction Rule: For each vertex u ∈ S do the following.

• If u has at least two entering edges (z1, u), (z2, u) from ¯S such that z1 = z2 or z1 = z2 = z and in(z) ≥ 2, then we insert into G′<¯S> two copies of the edge (s′, u).

• Otherwise, u has a unique entering edge (z, u) such that z ∈ ¯S, where in(z) = 1. If z is not a boundary point of ¯S, then we insert into G′<¯S> a copy of z, together with the edge (s′, z). (If z is a boundary point, then it is already included in G′<¯S>.) Finally, we add a copy of the edge (z, u).

To complete the construction of G[v], we let G[v] = G′<¯S>, for S = µ′(v), where we execute the reduction rule during Steps 4 and 5 of the gadget replacement procedure.

Lemma 48. Given a 2-out set S = µ′(v) of the evolving graph G′, we can construct G[v] in O(vol(S)) time, plus O(m) time for all G[v] graphs constructed through the algorithm.

Proof. To construct G[v], we first create a copy of each vertex in v ∈ S, and also copy the list of outgoing edges of v in G′. This takes O(vol(S)) time. Then, we introduce the central vertex s′ of Gin(¯S) and, for i ∈ {1, 2}, we add a boundary vertex y′i together with the edge (y′i, s′) if y′i = s′.

Next, we need to add the necessary auxiliary vertices of ¯S and edges from ¯S to S, according to the Reduction Rule. To that end, for each vertex v ∈ S, we scan its list of entering edges in G′, and we store the edges (z, u) such that z ∈ ¯S. We stop as soon as we find two such edges, or reach the end of the list of entering edges of v (note that if we access multiple copies of an edge from the same vertex v with in(v) = 1, we can merge these copies in the evolving graph (and add the multiplicities of the two copies); the time to do this contributes to the O(m) overall bound, as we remove one copy of an edge from the evolving graph). If we find two edges entering u from ¯S, then we add two copies of the edge (s′, u) to the list of outgoing edges of s′. Suppose, now, that we find a single edge (z, u). If z is neither a boundary point of ¯S nor s′, then we add a copy of z in Gin(¯S). Finally, we add a copy of (z, u) to the list of outgoing edges of z. Since we access at most two edges entering u from ¯S, the overall time to scan all lists is bounded by O(vol(S)), as claimed. This bound also includes the time to construct the list of entering edges for each vertex of G[v].

Updating G′. After we have constructed G[v], we need to update the evolving graph by setting G′ = G′<S>. Recall that S = µ′(v) is a 2-out set of the evolving graph G′. Let {x1, x2} be the boundary points of S, and let C = {e1 = (x1, y1), e2 = (x2, y2)} be the cut edges defined by S. We apply the gadget replacement operation for S, which replaces G′[S] (the subgraph of G′ induced by S) with a 2-connectivity light gadget Gout(S). This replacement procedure is analogous to the one applied for the construction of G[v], but slightly different since we operate directly on G′.

1. The gadget Gout(S) contains a central vertex s′, which is a 2-out auxiliary vertex that represents the ordinary and auxiliary vertices v ∈ S with out(v) ≥ 2.

2. The gadget Gout(S) has two outgoing edges C′ = {e′1 = (x′1, y1), e′2 = (x′2, y2)} corresponding to the edges of the 2-cut C. We refer to the set {x′1, x′2} as the set of boundary points of Gout(S).

3. If xi, i ∈ {1, 2} is an auxiliary vertex with out(xi) = 1, then let x′i = xi and insert the edge (s′, xi) into Gout(S). Otherwise, we let x′i = s′. (Note that we can have x′1 = x′2 or x′i = s for some i ∈ {1, 2}.)

4. For each auxiliary vertex z ∈ S \ {x′1, x′2} with out(z) = 1, such that G′ has an edge (w, z) for some w ∈ ¯S, Gout(S) contains z and the edge (w, z).

5. Let G′<S> be the graph that results from G′ after the following modifications. We replace G′[S] and its entering edges C with Gout(S) and C′ respectively.

The important difference with respect to the replacement procedure for G[v], is that here we do not construct a new graph from scratch, but modify G′. Also, we do not need (and cannot afford) to apply the Reduction Rule.

After Step 1, we need to update the head of the edges (w, v), where w ∈ ¯S and v is an ordinary or an auxiliary vertex with out(v) ≥ 2. To do that, we apply a DSU data structure, as in Section 5.1. Next, we update the list of outgoing and entering edges of v. To do this fast, we assume that we have stored a list L(S) of the edges with both endpoints in S, which we can do in O(vol(S)) time. Next, we delete each edge (u, v) ∈ L(S), both from the list of outgoing edges of u and from the list of entering edges of v. Then, we insert the edges (s′, x1) and (s′, x2), and an edge (z, s′) for each auxiliary vertex z ∈ S \ {x1, x2} with out(z) = 1 that has an entering edge from ¯S. Finally, for every vertex v ∈ S \ r with out(v) ≥ 2, we merge the list of entering edges of v with the list of entering edges of r.

The proof that G[v] satisfies Definition 47 is deferred to a later subsection. We proceed to analyze the running time of the procedure.

Lemma 49. Given a 2-out set S = µ′(v) of the evolving graph G′, we can update G′ in O(vol(S)) time, plus the time required for the DSU data structure.

Proof. Our procedure receives as input a list of the vertices in S. It computes a list L(S) of the edges with both endpoints in S in O(vol(S)) time. Then, we can remove all edges in L(S) from the adjacency lists of G′ in O(|L(S)|) time. Also, we can find the auxiliary vertices in z ∈ S \ {x1, x2} with out(z) = 1 that have an entering edge from ¯S in O(|S|) time, since it suffices to check if in(z) ≥ 1. Finally, we can merge the list of entering edges of each vertex v ∈ S \ r with that of r, for all vertices with out(v) ≥ 2, in a total of O(|S|) time. Thus, the total update time is O(|L(S)| + |S|) = O(vol(S)), plus the time required by the DSU data structure.

After processing all sets [v], such that s ∈ [v], we set G[s] = G′. The ordinary vertices of G[s] are the ordinary vertices v ∈ V(G) for which µ(v) = µ′(v) = ⊥.

5.2.3 Second phase

The second phase completes the construction of the 3-ECC decomposition H1, . . . , Ht, where each Hi corresponds to a unique 3-edge-connected component Ci of G. To that end, we process each auxiliary graph G[v] of the first phase as follows. Recall that if s ∈ [v], G[v] is the graph that results from the gadget substitution of the 2-in set V(G′) \ µ′(v). Since s ∈ µ′(v), the central vertex sv of Gin(V(G′) \ µ′(v)) represents the set of ordinary vertices and the 2-in auxiliary vertices in V(G′) \ µ′(v), which includes s. Hence, we set sv as the start vertex of G[v], and apply the same procedure as the first phase, for G′ = (G[v])R. For G[s], we apply the procedure of the first phase for G′ = (G[s])R with start vertex s.

5.2.4 Correctness proof

In the following, we prove that in each of the graphs created, the ordinary vertices are all 3-edge-connected. The rest of the properties of Theorem 4 follow directly from our algorithm and the fact that gadget replacements preserve the connectivity of ordinary vertices (Lemma 3.6 of [21]).

Let C1, . . . , Ck be the 3-edge-connected components of a 2CLG G, consisting of the ordinary vertices of G (no component contains both auxiliary and ordinary vertices, because auxiliary vertices have either only 1 incoming or only 1 outgoing edge).

Lemma 50. The graphs G[v] constructed during the first phase of the algorithm satisfy Definition 47.

Proof. We only need to prove Property 1, as the remaining properties follow immediately from the gadget construction and the correctness of the gadget substitution (Lemma 3.6 of [21]).

To prove Property 1 of Definition 47, consider the local search that identified µ′(v) in G′. All vertices of the induced subgraph of the minimum 2-out set of any ordinary vertex v are reachable from v (otherwise we could remove the non-reachable vertices and get a smaller set). Therefore, we can apply Lemma 6.5 of [21]. When we process [v], this lemma implies that for all vertices in [v], the evolving graph contains a 2-out set S′ whose ordinary vertices are exactly the remaining ordinary vertices of µ(v) in G′. By induction, if there exists any u with µ(u) ⊂ µ(v), the ordinary vertices of µ(u) have already been processed (due to the proper ordering of the sets [v], provided by the algorithm in [18]) and thus are no longer ordinary vertices in the evolving graph. Furthermore, the ordinary vertices u of µ(v) have µ(u) ⊆ µ(v) (otherwise, by Lemma 12 the set µ(u) ∩ µ(v) is 2-out and separates u from s, contradicting the minimality of µ(u)). We conclude that the ordinary vertices of S′ are exactly the vertices of [v].

As our local search avoids s by construction, and s ∈ [v], it follows that s is not in the aforementioned set. Therefore the existence of S′ shows that the ordinary vertices of the minimum 2-out set we find contains a subset of the remaining ordinary vertices of [v] and no other ordinary vertices.

We now argue that the minimum 2-out set µ′(v) we find contains all vertices of [v]. If this was not true, then it would contain some v1 ∈ [v] but not some v2 ∈ [v], and also not s (by construction of the local search algorithm). But our gadget replacement procedure on the evolving graph guarantees that such a set would exist in the original graph (as we prove in the following claim), which contradicts the definition of [v]. Therefore it suffices to prove:

Claim 51. Let u, v, s be two ordinary vertices in the evolving graph G′, and suppose there exists a 2-out (resp. 2-in) set S containing u but not v, s. Then, there exists a 2-out (resp. 2-in) set in the original graph, containing u but not v, s.

Proof. Let G′′ be the evolving graph at some point during the first phase when we found a 2-out set S′′ and replaced it with a gadget such that G′ = G′′<S>. It suffices to prove that in G′′ there exists a 2-out (resp. 2-in) set containing u but not v, s, as we can repeat the argument to reach the original graph. Note that S′′ does not contain u, v, s, as these vertices are ordinary in G′.

The gadget replacement in the evolving graph does not remove any edge with at most one endpoint in S′′ (thus if S does not contain any vertex from the gadget, then the result follows). The gadget replacement only contracts vertices in S′′ with out-degree at least 2, and with out-degree 1 that do not have an edge from vertices not in S′′ (let us call X the set of all these vertices that are contracted, and s′ the new vertex formed by the contractions), and removes edges from s′ to non-boundary vertices of S′′ with out-degree 1 that have at least one edge from vertices not in S′′ (in case of a boundary vertex with out-degree 1 that have at least one edge from vertices not in S′′, it keeps exactly one edge from s′).

Now let us assume that S does not contain s′. Then, from the above discussion, S exists as is in G′′, with the same number of outgoing edges. If S is 2-out, the result follows. However, it may have more incoming edges, because of vertices of S′′ with out-degree 1 having edges from X. Notice that the outgoing edges of such non-boundary vertices only point to vertices in X; if we remove these vertices from S (which does not contain any vertex in X) then the in-degree of the resulting set does not increase. Similarly for boundary vertices, if we remove them the resulting set loses at least one incoming edge (the one from s′ to the boundary vertex removed), and may have at most one more new incoming edge (the one outgoing from the boundary vertex). We conclude that the resulting set in G′′ has the same number of incoming edges as S in G. Therefore if S is 2-in, the result again follows.

Finally, if S contains s′, then let Y = (S \ {s′}) ∪ X. Now notice that if S is 2-in, then Y is 2-in as the only edges “missing” in G′ compared to G′′ are edges from vertices in X; but as X ⊆ Y, these are not counted in the incoming edges to Y. We can now assume that S is 2-out. If Y is not 2-out, it is because there exists at least one edge from a vertex in X to a vertex of S′′ with out-degree 1 that has at least one edge from vertices not in S′′. Then let Y′ be the extension of Y that includes these vertices with out-degree 1 that have at least one edge from vertices not in S′′. Y′ is 2-out, because the new vertices are either non-boundary, meaning they only have edges to vertices in S′′ (but as G′′ is a 2CLG, these must be edges to vertices with out-degree at least 2, which are already in Y and thus in Y′), or boundary, meaning that they only contribute one more outgoing edge, but the edges from X to them are no longer contributing (recall that S in G′ had an outgoing edge from s′ to each such vertex). As Y′ contains u (because u ∈ S) but not v, s, the result follows.

This concludes the proof for all sets except for [s]. However, as the sets [v] form a partition, and after the first phase is done we put all remaining ordinary vertices of the evolving graph in G[s], the result follows.

Now we focus on the second phase.

Lemma 52 (Refined Cuts). Let S be a 2-out set of a 2CLG G that contains two distinct ordinary vertices x and y. If there is no (≤ 2)-out set S′ ⊂ S that separates x and y, then any 2-out set that separates x and y must contain all ordinary and 2-in auxiliary vertices in V \ S.

Proof. Let X be a 2-out set that contains x but not y. Then, out(S ∩ X) > 2, since otherwise S ∩ X would be a (≤ 2)-out set contained in S that separates x and y. By submodularity out(S) + out(X) ≥ out(S ∪ X) + out(S ∩ X), and since out(S) = out(X) = 2, we have out(S ∪ X) < 2. Thus, S ∪ X must contain all ordinary and 2-in auxiliary vertices of G; otherwise, V \ (S ∪ X) contains a vertex w with in(w) > 1, but there are no two paths from x to w, contradicting the definition of a 2CLG. Therefore, X must contain all ordinary and 2-in auxiliary vertices in V \ S.

Corollary 53. Let x and y be two ordinary vertices in [v] that are not 3-edge-connected in G. Then, there is a 2-out set X in GRs that separates x and y that does not contain any ordinary or 2-in auxiliary vertex in V \ µ(v). In particular, X does not contain s.

Proof. We apply Lemma 52 for S = µ(v). By the definition of [v], and the fact that x, y ∈ [v], we have that there is no 2-out set S′ ⊂ µ(v) that separates x and y. Since x and y are not 3-edge-connected, we have x ∈ µR(y) or y ∈ µR(x) (Proposition III.5 of [18]). Assume, without loss of generality, that x ∈ µR(y). Then, X = V \ µR(y) is a 2-in set in GR that contains x but not y. Hence, X is a 2-out set in G that separates x and y, so by Lemma 52, it contains all ordinary and 2-in auxiliary verteices of V \ µ(v). Then, µR(y) is a 2-out set in GRs that separates x and y that does not contain any ordinary or 2-in auxiliary vertex in V \ µ(v).

We are now ready to show that the ordinary vertices in the graphs constructed during the second phase of the algorithm are 3-edge-connected.

Lemma 54. Let u, v be ordinary vertices in a graph Hi constructed during the second phase of the algorithm. Then u, v are 3-edge-connected.

Proof. If u, v are not 3-edge-connected and are not splitted by the first phase of the algorithm, then [u] = [v] by Lemma 50. Corollary 53 implies that there exists a 2-out set X in GRs that w.l.o.g. contains u and does not contain v, s. Therefore the minimum 2-out set of u in GRs that does not include s also does not include v. Notice that u reaches everything in this minimum 2-out set, as otherwise we could remove the unreachable vertices and create an even smaller 2-out set separating u from s. Therefore we can apply Lemma 6.5 of [21] which implies that G[v] contains a 2-out set S′ containing u but not v, s; in turn this means that the minimum 2-out set of u in G[v] does not contain v, s. As the second phase is the same with the first phase in the graph G[v] instead of G, by Lemma 50 we get that in the end u is in a different graph Hi from v.

This completes the proof of correctness.

Corollary 55. The graphs constructed during the second phase of the algorithm satisfy Theorem 4.

5.2.5 Running time

Now we bound the running time of our construction and the total size of the constructed auxiliary graphs. We only analyze the construction of the first phase, since the second phase executes the same construction on the reverse graph of each first-phase auxiliary graph.

Lemma 56. The total time to identify all µ′(v) sets and maintain the evolving graph G′ during the first phase of the algorithm is O(m + n), plus the time to perform O(m + n) operations on the DSU data structure.

Proof. Directly by our algorithm and the linear running time of our local search, we have that the time to find an µ′(v) is O(⌈log2 vol(µ′(v))⌉i=0 2i) = O(vol(µ′(v))). Furthermore, vol(µ′(v)) ≤ 2 u∈µ′(v),out(u)>1 out(u), by Lemma 6.10 of [21]; intuitively, this means we can ignore vertices with only one outgoing edge (because we anyway account for an incoming edge to them, as there cannot be two consecutive vertices with out-degree 1 in a 2CLG). The gadget replacement operation removes all vertices with at least 2 out-edges, and introduces a new vertex with 2 outgoing edges; as we perform at most n gadget replacements, the extra edges added this way are at most 2n.

We conclude that the running time to identify all µ′(v) sets is at most a constant times the sum of out-degrees of all vertices of G, plus O(n), which gives the desired O(m + n). The lemma then directly follows from Lemma 49.

Lemma 57. The total size of all constructed graphs during the first phase of the algorithm is O(m + n). The total time to construct all auxiliary graphs G[v] = G′<V′\µ′(v)> during the first phase of the algorithm is O(m + n).

Proof. By Lemma 48, when we identify the next minimal 2-out set µ′(v) in the evolving graph G′, we create G[v] = G′<V′\µ′(v)> in O(vol(µ′(v))) time (plus O(m) time in total, which is negligible). So, the total size of all auxiliary graphs G[v] is bounded by the time to construct them, as they are all explicitly constructed. This is O([v] vol(µ′(v))) = O(m + n), exactly as argued in Lemma 56.

The running time is dominated by Lemma 56. It is O(m + n), using e.g. the DSU data structure of [41] or of [42].

6 Local search for M-sets

6.1 Deterministic local search

In this section, we prove Proposition 6, which provides a deterministic local search algorithm. We note that it is a straightforward modification of the local search algorithm in [8]. The main difference here is that we want our local search to avoid a specific vertex s5.

5One could prove the same result using a black-box reduction, by modifying the original graph so that vertex s has very large out-degree. This would force the black-box local search algorithm to avoid s. For our purposes, it was sufficient to modify the existing algorithm from [8], which also allowed us to only use the original graph.

Lemma 58. Let S be a set of vertices, let P be a path that starts from a vertex in S, and let G′ be the graph that is formed by reversing the direction of the edges of P. Then we have the following:

• If the end of P is in S, then volG′(S) = volG(S) and outG′(S) = outG(S).

• If the end of P is outside of S, then volG′(S) = volG(S) − 1 and outG′(S) = outG(S) − 1.

Proof. We prove both statements together using induction on the length of P (defined as the number of edges that is uses). For the basis of our induction, let us assume that P consists of a single edge (x, y). Thus, we have x ∈ S, and we distinguish two cases, depending on whether y ∈ S and y / ∈ S. In either case, G′ is formed by simply replacing (x, y) with (y, x). Now, if y ∈ S, then it is obvious that the volume of S and its number of outgoing edges have not changed in G′. Similarly, if y / ∈ S, then it is also obvious that the volume of S, and its number of outgoing edges, have been reduced by one in G′.

Now let us assume that both statements are true for all paths that start from S and have length l, for some l ≥ 1. Now consider a path P with length l + 1 that starts from S. Let (x, y) be the last edge used by P, let P′ be the initial segment of length l of P, let G′ be the graph that is formed by reversing the edges of P′, and let G′′ be the graph that is formed by reversing the edges of P.

First, let us assume that y ∈ S. If x ∈ S, then, by the inductive hypothesis, we have volG′(S) = volG(S) and outG′(S) = outG(S). Since G′′ is formed by reversing (x, y) in G′, it is then easy to see that volG′′(S) = volG′(S) and outG′′(S) = outG′(S). Therefore, we have volG′′(S) = volG(S) and outG′′(S) = outG(S). If x / ∈ S, then, by the inductive hypothesis, we have volG′(S) = volG(S) − 1 and outG′(S) = outG(S) − 1. Then, since G′′ is formed by reversing (x, y) in G′, it is easy to see that volG′′(S) = volG′(S) + 1 and outG′′(S) = outG′(S) + 1. Therefore, we have again volG′′(S) = volG(S) and outG′′(S) = outG(S).

The case where y / ∈ S is treated similarly.

Corollary 59. Let v and s be two distinct vertices, let P be a path that starts from v, and let G′ be the graph that is formed by reversing the direction of the edges of P. Then, λG′(v, s) ∈ {λG(v, s), λG(v, s) − 1}.

Proof. Let k = λG(v, s), and let S be a k-cut that separates v and s. By Lemma 58, we have outG′(S) ≤ outG(S). Thus, the edge-connectivity between v and s in G′ cannot be higher than that in G. Now let us suppose, for the sake of contradiction, that there is a k′-out set S′ in G′ that separates v and s, with k′ < k − 1. Then, S′ is a cut that separates v and s in G, and thus by Lemma 58 we have outG(S′) − 1 ≤ outG′(S′). Since k′ = outG′(S′), this implies that outG(S′) − 1 ≤ k′. Therefore, since k′ < k − 1, this implies that outG(S′) < k, which contradicts λG(v, s) = k. This shows that the edge-connectivity between v and s in G′ either has stayed the same as in G, or it has been reduced by one.

Corollary 60. Let v and s be two distinct vertices of G, let k = λG(v, s) > 0, let S be the (inclusion-wise) minimum k-out set that separates v and s, and let P be a path that starts from v and ends outside of S. Let G′ be the graph that is formed from G by reversing the direction of the edges of P. Then, S is the (inclusion-wise) minimum (k − 1)-out set that separates v and s in G′.

Proof. By Lemma 58, we have outG′(S) = k − 1. By Corollary 59, we have λG′(v, s) = k − 1. Now let us suppose, for the sake of contradiction, that there is a proper subset S′ of S that is a (k − 1)-out set in G′ that separates v and s. Then, we have that P (in G) ends outside of S′. Thus, Lemma 58 implies that outG′(S′) = outG(S′) − 1. But since S′ is a (k − 1)-out set in G′, this implies that S′ is a k-out set in G, and thus we get a contradiction to the minimality of S.

Lemma 61. Let v and s be two distinct vertices with λ(v, s) = k, and let S be the minimum k-out set in G that separates v and s. Let P1, G1, P2, G2, . . . , Pk, Gk be a sequence of paths and graphs with the following properties. P1 is a path that starts from v, and G1 is the graph that is formed by reversing the direction of the edges of P1. Then, for every i ∈ {2, . . . , k}, Pi is a path in Gi−1 that starts from v, and Gi is the graph that is formed from Gi−1 by reversing the direction of the edges of Pi. Then we have the following:

• If every path Pi, for i ∈ {1, . . . , k}, ends outside of S, then S = reachGk(v).

• If at least one path among P1, . . . , Pk ends in S, then v can reach s in Gk.

Proof. First, let us assume that every path Pi, for i ∈ {1, . . . , k}, ends outside of S. Then, a repeated application of Lemma 58 implies that S is a 0-out set in Gk. Thus, a graph exploration starting at v in Gk will reach a set of vertices S′ ⊆ S. Now let us suppose, for the sake of contradiction, that S′ = S. Therefore, we have S′ ⊂ S. Then, since S′ is a cut that separates v and s, and λ(v, s) = k, and S is the minimum k-out set in G that separates v and s, we have outG(S′) > k. Notice that every path Pi, for i ∈ {1, . . . , k}, ends outside of S′. Then, a repeated application of Lemma 58 implies that S′ is a (≥ 1)-out set in Gk. But this contradicts the fact that S′ is the reachability set of a vertex of Gk. This shows that S = reachGk(v).

Now let us assume that at least one path among P1, . . . , Pk ends in S, and let R = reachGk(v). Since R is a reachability set of a vertex of Gk, we have outGk(R) = 0. Since every path Pi, for i ∈ {1, . . . , k}, starts from v, a repeated application of Lemma 58 implies that outGk(R) ≥ outG(R) − k. Thus, since outGk(R) = 0, we infer that outG(R) ≤ k.

Now let us suppose, for the sake of contradiction, that s / ∈ R. This implies that R is a (v, s)-cut. Thus, since λ(v, s) = k, we have outG(R) ≥ k. Therefore, outG(R) ≤ k implies that outG(R) = k. Then, since S is the minimum k-cut that separates v and s, we have S ⊆ R. Therefore, since at least one path among P1, . . . , Pk ends in S, we have that at least one path among P1, . . . , Pk ends in R. Then, a repeated application of Lemma 58 implies that outGk(R) > 0, a contradiction. This shows that v can reach s in Gk.

Lemma 62. Let v and s be two distinct vertices of G, and let k ≥ 1 and ∆ ≥ 1 be two integer parameters. There is an algorithm FindOutPaths(G, v, s, k, ∆) (see Algorithm 3) that runs in O(k2∆) time, and returns a collection of at most 2k paths that start from v, with the following guarantee:

• If there is a k-out set S with vol(S) ≤ ∆ that separates v and s, then at least one of the paths returned by the algorithm ends outside of S.

Proof. The algorithm works by performing a depth-first search (DFS) of the graph, starting at v, with budget (2k + 1)(∆ + 1) on the exploration of edges. That is, we will run a DFS starting at v, but we will stop once we have explored (2k + 1)(∆ + 1) entries of the adjacency lists. (However, we may stop even earlier, if we happen to meet s.)

The clever insight from [8] is that we can pause the exploration every ∆ + 1 steps, in order to pick a candidate vertex (and then continue the exploration as usual), so that, in the end, if there is a k-out set S with vol(S) ≤ ∆ that separates v and s, at least one of the vertices that we have gathered lies outside of S.

In order to describe the algorithm and prove its correctness, we have to make careful use of the concepts that are involved in a depth-first search. Let us assume that the adjacency list of every vertex x consists of the vertices y for which there exists an edge (x, y) (where the same vertex is allowed to appear multiple times in an adjacency list, to account for the existence of parallel edges). Initially, all vertices are considered “unvisited”. When the DFS starts, v is marked as “visited”. Then, every time we meet a vertex x in an adjacency list, there are two possibilities: either the vertex is “unvisited”, or “visited”. If x is “unvisited”, then we mark it as “visited”, and at this point we say that we “discover” x. However, if x is already marked as “visited”, then we simply say that we “meet” x (i.e., when we say that we “meet” a vertex, we mean that we have already discovered it). We number the vertices according to the order of their discovery. Thus, v is number 1, the first vertex in the adjacency list of v is number 2, etc. Every time a new vertex x = v is discovered, this is because we were traversing the adjacency list of a vertex p, and there we met x for the first time (as an “unvisited” vertex). We call p “the parent” of x, and we say that the edge (p, x) is “traversed”. Then, we maintain the edge (p, x), and thus we build a directed tree T, which is a subgraph of G, and it is rooted at v. The tree T is important, because it will be used in order to provide our desired collection of paths.

Due to the recursive nature of the DFS, there appears the concept of “backtracking”. Specifically, each time the DFS has explored everything it could after the discovery of a vertex x = v (and so it has reached the “end-of-list” entry of the adjacency list of x), it backtracks to its parent p, and the search continues from the next entry in the adjacency list of p after (the first occurrence of) x. At this point, we say that the DFS has “backtracked over the edge (p, x)”.

Thus, at any point during the DFS, we have the following characterization of the edges of the graph: “unvisited”, “traversed”, “explored”, “backtracked over”. We say that an edge (x, y) is explored, when we hit the entry y in the adjacency list of x that corresponds to (x, y). (y may be either visited or unvisited.) Thus, every exploration of an edge consumes one unit from our budget of (2k + 1)(∆ + 1) on the exploration of edges. Notice that every traversed edge is explored, but the converse is not necessarily true. (I.e., when we explore an edge, we do not necessarily traverse it.) Furthermore, only traversed edges may be backtracked over, and this can happen at most once for each traversed edge.

Now the description of the algorithm is very simple. (See Algorithm 3.) First, we run a DFS for ∆ + 1 steps (i.e., we explore ∆ + 1 edges). If within those ∆ + 1 initial steps we have discovered s, then we terminate the exploration, and we return the tree path from v to s. Otherwise, let x be the current vertex on which the DFS was paused. Then we repeat the following process for 2k times. We resume the DFS from x for ∆ + 1 steps. If we discover s, then we terminate the exploration, and we return the tree path from v to s. Otherwise, we pause the exploration, and there are two possibilities: either the resumed DFS has backtracked at some point to an ancestor of x, or the resumed DFS did not backtrack to an ancestor of x. In the first case, let z be the lowest ancestor of x that the resumed DFS has backtracked to, and in the second case let z = x. Then we store in a collection of paths (that will potentially be the output) the tree path from v to z.

Now we will prove the correctness of this procedure. So let us assume that there is a k-out set S with vol(S) ≤ ∆ that separates v and s. If we happen to meet s during the course of the algorithm, then the exploration will terminate abruptly, and we will correctly return a path that starts from v and ends in s. So let us assume that we did not meet s during the course of the algorithm.

Since vol(S) ≤ ∆, we have that the first exploration of ∆ + 1 edges must have left S at some point (although it may have returned back thereafter). Thus, at least one outgoing edge of S was traversed during the first exploration. Now, for every subsequent continuation of the DFS exploration for ∆ + 1 edges (i.e., every time we execute a block of the for loop in Line 6), there are three possibilities:

(1) The resumed DFS has explored at least one outgoing edge of S.

(2) The resumed DFS has backtracked over at least one outgoing edge of S.

(3) Neither (1) nor (2) took place.

Since the first exploration has traversed an outgoing edge of S, and since the for loop in Line 6 is repeated 2k times, and since S has precisely k outgoing edges, and since an edge can be explored at most once and can be backtracked over at most once, we have that (3) must have been the case for at least one iteration of the for loop in Line 6.

Now let us see what happened during an iteration of the for loop in Line 6 where no outgoing edge of S was explored, and no outgoing edge of S was backtracked over. Let x be the vertex on which the DFS was paused before this iteration began. Now there are two possibilities: either x is outside of S, or x is in S. First, let us assume that x is outside of S. If the resumed DFS will not backtrack to an ancestor of x, then in Line 16 we collect the DFS-tree path from v to x. So let us assume that, at some point, the resumed DFS has backtracked to an ancestor of x. Then, since no backtracking over an outgoing edge of S took place, we have that all the ancestors of x to which the resumed DFS has backtracked are also outside of S. Thus, in Line 16 we collect a path from v to a vertex outside of S. Now let us assume that x is in S. Then, since we explore ∆ + 1 edges, and since vol(S) ≤ ∆, and since the resumed DFS did not explore an outgoing edge of S, the resumed DFS must have backtracked to a vertex outside of S (which must be an ancestor of x). And then, since no backtracking over an outgoing edge of S took place, we have that all further backtrackings were to vertices that were also outside of S. Thus, the lowest ancestor of x which the resumed DFS has backtracked to is a vertex outside of S, and therefore in Line 16 we collect a path from v to a vertex outside of S.

The O(k2∆) time bound is easy to see. Since we perform a DFS with budget O(k∆) on the number of explored edges, every path that we return has length O(k∆). Thus, since the output consists of at most 2k paths, the total size of the paths that we return is O(k2∆). This is clearly an upper bound on the running time of the algorithm.

Algorithm 3: FindOutPaths(G, v, s, k, ∆) 1explore ∆ + 1 edges, starting from v, in a DFS manner 2if s was discovered then 3return the DFS-tree path from v to s 4end 5let P ← ∅ // the collection of paths to be potentially returned 6for 2k times do 7let x be the vertex on which the DFS was paused 8explore ∆ + 1 extra edges 9if s was discovered then 10return the DFS-tree path from v to s 11end 12z ← x 13if the resumed DFS has backtracked to an ancestor of x then 14let z be the lowest ancestor of x to which the resumed DFS has backtracked 15end 16add to P the DFS-tree path from v to z 17end 18return P

Now we are ready to prove Proposition 6, which we restate here for convenience.

Proposition 6. Let v be a vertex with v = s and λ(v, s) ≥ k + 1, and let ∆ ≥ 1 be an integer. There is an algorithm LocalSearchForMSet(G, v, s, k + 1, ∆) which runs in O(2k(k + 1)!∆) time and returns a set of vertices S (which may be ∅) with the following guarantees:

• If S = ∅, then S = M(v).

• If S = ∅, then either M(v) = ⊥ or vol(M(v)) > ∆.

Proof. The idea is to utilize Lemma 61. To be specific, let us assume that λ(v, s) = k + 1, and let U = M(v) and vol(U) ≤ ∆. Then, we need to find a sequence P1, P2, . . . , Pk+1 of paths with the following properties. P1 is a path of G that starts from v and ends outside of U. Let G1 be the graph that is formed from G by reversing the edges of P1. Then, for every i ∈ {1, . . . , k}, supposing that we have found a path Pi and we have defined a graph Gi, we have that Pi+1 is a path of Gi that starts from v and ends outside of U, and Gi+1 is formed from Gi by reversing the edges of Pi+1. Then, a repeated application of Lemma 58 shows that: first, the reachability set of v in Gk+1 coincides with U, and second, volGk+1(U) = volG(U) − (k + 1), and thus v reaches at most ∆ − (k + 1) edges in Gk+1.

In order to find the desired paths P1, P2, . . . , Pk+1, we use the procedure FindOutPaths, whose guarantees are stated in Lemma 62. Specifically, we first run FindOutPaths(G, v, s, k + 1, ∆). This will return at most 2(k + 1) paths that start from v, with the property that at least one of them ends outside of U. Since we do not know for sure which of those paths will work for us, we process each of them separately. Thus, for each of them, we reverse its edges, we get a graph G′, and then we run FindOutPaths(G′, v, s, k, ∆). (Note that after processing a path, we undo the reversals that we did to the graph.) Then we repeat this process, as shown in Algorithm 4.

Notice that every time that we call LocalSearchForMSet(G, v, s, k, ∆) with k > 0, this creates a set of calls of the form LocalSearchForMSet(G′, v, s, k − 1, ∆). If one of those calls returns a non-empty set, then the algorithm terminates and outputs this set. Now, we have essentially shown, that, if λ(v, s) = k + 1, then there is a branch of recursive calls that will return U. However, we must also show that there will be no incorrect outputs (i.e., non-empty outputs which are distinct from U). But this follows easily from Lemma 61: if throughout a branch of recursive calls to LocalSearchForMSet we process a path (in Line 9) which does not end outside of U, then all terminal calls, which have the form LocalSearchForMSet(·, v, s, 0, ∆), will fail to return a non-empty set, because v will always be able to reach s (and so Line 6 will return ∅).

In order to complete the proof of correctness, we have to consider the case where either λ(v, s) > k + 1, or λ(v, s) = k + 1 and vol(M(v)) > ∆. First, let us assume that λ(v, s) > k + 1. Then, if we call LocalSearchForMSet(G, v, s, k + 1, ∆), by Corollary 59 we have that, in every (terminal) recursive call of LocalSearchForMSet(·, v, s, 0, ∆), the edge-connectivity between v and s is larger than 0. Therefore, in those terminal calls, either v can reach at least ∆ + 1 edges, or it can reach s, and so the output will always be ∅.

Now let us consider the case where λ(v, s) = k + 1 and vol(M(v)) > ∆. Then, for every branch of recursive calls to LocalSearchForMSet, there are two possibilities: either (1) every call was initiated after the reversal of a path that starts from v and ends outside of M(v), or (2) at least one such call was initiated after the reversal of a path that starts from v and ends in M(v). In the first case, when we reach the terminal call to LocalSearchForMSet, by Lemma 61 we have that the edge-connectivity of v and s on the input graph G′ has dropped to 0, and the set of vertices reachable by v on G′ coincides with M(v) (where M(v) refers to the minimal (k + 1)-out set in the original graph G). Thus, if the volume of M(v) in G′ happens to be at most ∆ (which may be the case, since volG′(M(v)) = volG(M(v)) − (k + 1), as an implication of Lemma 58), then M(v) will be returned. Otherwise, this call will return ∅. Now let us consider case (2). Then, Lemma 61 implies that, when we reach the terminal call to LocalSearchForMSet, the edge-connectivity of v and s on the input graph G′ is greater than 0. Thus, in this terminal call, either v can reach at least ∆ + 1 edges, or it can reach s, and so the output will be ∅.

The O(2k(k + 1)!∆) time bound is an immediate consequence of the guarantees of FindOutPaths, provided by Lemma 62, and the recursive structure of Algorithm 4, LocalSearchForMSet. Specifically, by calling LocalSearchForMSet(G, v, s, k + 1, ∆), first we perform a call to FindOutPaths(G, v, s, k + 1, ∆). By Lemma 62, this takes time O((k + 1)2∆), and returns a collection of at most 2(k + 1) paths. Then, for each of those paths, the recursive call to LocalSearchForMSet will perform a call to FindOutPaths with parameters k and ∆. Thus, there are at most 2(k + 1) calls to FindOutPaths that each takes time O(k2∆) and returns a collection of at most 2k paths. Continuing in this way, there will be 2(k+1)(k + 1)! terminal calls to LocalSearchForMSet, each of which simply performs a DFS with budget ∆ + 1 on the number of explored edges (see Line 2). Thus, the total running time can be bounded by O(2k(k + 1)!∆).

Algorithm 4: LocalSearchForMSet(G, v, s, k, ∆) 1if k = 0 then 2perform a DFS on G, starting from v, with budget ∆ + 1 on the number of explored edges, and let S be the set of explored vertices 3if s / ∈ S and at most ∆ edges were explored then 4return S 5end 6return ∅ 7end 8let P be the collection of paths return by FindOutPaths(v, s, k, ∆) on G 9foreach path P ∈ P do 10let G′ be the graph that is formed by reversing the direction of the edges of P 11let S be the set that is returned by LocalSearchForMSet(G′, v, s, k − 1, ∆) 12if S = ∅ then 13return S 14end 15end 16return ∅

6.2 Randomized local search

Let v and s be two vertices such that λ(v, s) = k, and let M(v) denote the inclusion-wise minimum (v, s)-mincut. Here we provide a randomized (Monte Carlo) algorithm for computing M(v) in the case where vol(M(v)) ≤ ∆, where ∆ is a parameter specified by the user. The running time of this algorithm is O(k2∆), and thus the dependency on k is significantly improved compared to Proposition 6.

Our algorithm is an adaptation of the randomized local search procedure of [12] (given in Corollary A.1 in [12]). Specifically, the general idea is the same as in the proof of Proposition 6: first, we need to find k paths P1, . . . , Pk with the property that P1 starts from v and ends outside of M(v), and each Pi, for i ∈ {2, . . . , k}, has the same property on the graph that is formed by reversing the direction of the edges of the paths P1, . . . , Pi−1. And then, in order to find M(v), it is sufficient to run a graph exploration, starting from v, on the graph that is formed by reversing the direction of the edges of the paths P1, . . . , Pk, with budget ∆ on the exploration of edges.

The important observation of [12] is that, if we are willing to allow for some probability of failure (so that M(v) may not be discovered, and ∅ is returned instead), a desired collection of paths P1, . . . , Pk can be discovered with a random selection of edges from a simple graph exploration. Specifically, due to the bound ∆ on vol(M(v)), it is sufficient to just explore enough edges, starting from v, using a graph exploration such as BFS or DFS, and then with uniform sampling we have a good chance to pick an edge whose tail is not in M(v). With the appropriate modifications to the procedure of [12], we get the following:

Proposition 7. Given that λ(v, s) ≥ k, there is a procedure (shown in Algorithm 5) that has a running time of O(k2∆) and returns a (possibly empty) set of vertices S with the following guarantees:

• If S = ∅, then S = M(v).

• If λ(v, s) = k and vol(M(v)) ≤ ∆, then, with probability at least 1/2, S = ∅.

Proof. Algorithm 5 works by repeatedly finding paths starting from v and reversing their edges. This is repeated for k times, and it is followed by a final graph exploration starting from v. Therefore, since λ(v, s) ≥ k, by Lemma 61 it is easy to see that if the set S returned by Algorithm 5 is not empty, then it coincides with M(v). Furthermore, if λ(v, s) = k and all of the paths reversed during the execution of the for loop in Line 1 end outside of M(v), then Lemma 61 implies that the final exploration in Line 12 will provide M(v).

Thus, we only need to show that, if λ(v, s) = k and vol(M(v)) ≤ ∆, then, with probability at least 1/2, all of the paths reversed during the execution of the for loop in Line 1 have the property that they end outside of M(v).

Let P1, . . . , Pk be the paths discovered by the for loop in Line 1, and let G0, . . . , Gk−1 be the graph instances on which they were found. (I.e., we have G0 = G, and Gi, for i ∈ {1, . . . , k − 1}, is the graph that is derived from Gi−1 by reversing the direction of the edges of Pi.) Then, since vol(M(v)) ≤ ∆, a repeated application of Lemma 58 shows that the volume of M(v) in all of the graphs G1, . . . , Gk−1 is at most ∆.

Now, whenever the exploration in Line 2 discovers s, it is certain that the path reversed in Line 4 ends outside of M(v). Otherwise, if the exploration in Line 2 explores 2k∆ edges, we have that at least a fraction of (2k∆ − ∆)/(2k∆) = 1 − (1/2k) of them have their tail outside of M(v). Therefore, the probability that the sampled edge in Line 7 has its tail in M(v) is at most 1/(2k). Thus, by the union bound, the probability that this was the case at least once during the k iterations of the for loop in Line 1 is at most 1/2.

Therefore, the probability that all of the paths reversed during the execution of the for loop in Line 1 have their end outside of M(v) is at least 1/2.

Algorithm 5: RandomizedLocalSearchForMSet(G, v, s, k, ∆) 1foreach i ∈ {1, . . . , k} do 2perform a graph exploration, in a BFS manner, starting from v, but stop once 2k∆ edges have been explored, or if s is discovered 3if s was discovered then 4reverse the direction of the edges of the BFS-tree path from v to s 5end 6else 7sample an edge (x, y), uniformly at random, from the set of explored edges 8reverse the direction of the edges of the BFS-tree path from v to x 9end 10end 11S ← ∅ 12explore at most ∆ + 1 edges, starting from v, in a BFS manner 13if at most ∆ edges were explored, and s was not discovered then 14S ← the set of discovered vertices 15end 16undo all the edge reversals on G 17return S

The success probability of Algorithm 5 can be amplified to at least 1 − δ, for any δ ∈ (0, 1/2), by repeatedly applying it for ⌈log2(1/δ)⌉ times.

7 Extending to (k + 3)-edge-connected components

As already explained, there are two main obstacles that we have to overcome following our general framework in order to compute the k-edge-connected components, for any fixed k > 4, within the same running time. However, we would like to understand the limitations of our approach for computing the (k + 3)-edge-connected components in a k-edge-connected graph. Towards this direction, we propose a refinement partition of a k-edge-connected digraph that computes the (k + 3)-edge-connected components which are contained within a given (k + 2)-edge-connected-component.

Observe that the given assumptions and relaxations drop the need for a fast decomposition into (k + 2)-edge-connected components and concentrate on the existence of efficient algorithm for computing a good partition of a vertex v with λ(v, s) ≤ k + 2. More precisely, we show that our framework can be adopted for computing a corresponding good (k + 3)-partition (i.e., a partition P for a vertex v with λ(v, s) ≤ k + 2 according to Definition 8 with the difference that P maintains the (k + 3)-edge-connected components and separates ordinary vertices from s with respect to minimum (k + 2)-out sets) by exploiting the existing linear-time algorithms for computing the k′-edge-connected components with k′ ∈ {1, 2, 3} of general digraphs [19, 20, 18].

Let G be a k-edge connected graph, with n vertices and m edges where some of its vertices are designated as “ordinary”. The ordinary vertices of G are (k + 2)-edge-connected. Our goal is to compute a partition P of V(G) such that two ordinary vertices are (k + 3)-edge-connected if they belong to the same set in P. Our result is stated as follows.

Theorem 63. Let δ be a parameter with 0 < δ < 1. There exists a randomized algorithm that runs in O(k3m√n log(n/δ)) time, where n is the number of the ordinary vertices of G, and outputs a partition P of V(G) satisfying the following guarantees:

• P maintains the (k + 3)-edge-connected components of the ordinary vertices of G. I.e., every two (k + 3)-edge-connected ordinary vertices of G are in the same set from P.

• With probability at least 1 − δ, every two ordinary vertices of G that are not (k + 3)-edge-connected are separated by P.

Let us briefly explain the idea. We show how to extend the algorithm given in Theorem 5 in which we avoid repeated arguments regarding correctness and running time analysis. Fix an ordinary vertex s. For any ordinary vertex v = s, we let M(v) denote the (inclusion-wise) minimum (k + 2)-out set such that v ∈ M(v) and s / ∈ M(v). We begin by computing the M-sets with volume at most m/√n. In particular, for every ordinary vertex v = s, we invoke RandomizedLocalSearchForMSet(G, v, s, k + 2, ∆) to compute a partition P1 that maintains the (k + 3)-edge-connected components of ordinary vertices having small M-set in O(m√n) time. By Proposition 7 and the corresponding discussion in Theorem 5, we conclude that P1 contains two ordinary vertices v, v′ within the same set if v, v′ are (k + 3)-edge-connected and both M(v), M(v′) have volume at most m/√n. We note that handling small M-sets can be done within the same running time for any k-out set of a general digraph.

Next we consider large M-sets. As explained in the algorithm that establishes Theorem 5, by sampling ˜O(√n) edges we get the following: for every M-set U with volume more than m/√n, we have sampled at least one edge whose tail v is in U. Now our task is to compute a good (k + 3)-partition for v. Notice that if λ(v, s) > k + 2 then there is no (k + 2)-out set that separates v and s. Also recall that any (k + 3)-edge-connected component containing v is a subset of M(v). We assume henceforth that λ(v, s) ≤ k + 2. Since G is k-edge connected, we have k ≤ λ(v, s) ≤ k + 2.

Let S be the latest (v, s)-mincut and let λ = λ(v, s) (so that k ≤ λ ≤ k + 2). Build G′ by contracting S into a new vertex z having λ outgoing edges e1, . . . , eλ and build λ new graphs G′i that are obtained from G′ by contracting z with an edge ei into a new vertex zi. In order to compute a good (k + 3)-partition for v, we distinguish the following cases:

1. λ(v, s) = k + 2 We build the Picard-Queyranne graph (Definition 20) PQ of G and compute a corresponding partition P that corresponds to the strongly connected components of PQ. In a similar fashion as given in the proof of Proposition 22, the two properties of the good (k + 3)-partition are fulfilled.

2. λ(v, s) = k + 1 Observe the following: (i) for any two vertices x, y / ∈ S such that λG(x, y) ≥ k + 3, we know that x, y belong to the same 2-edge-connected component of G′ \ {e1, . . . , ek+1} and (ii) by Lemma 19 we have λG′i(zi, s) ≥ k + 2. Thus it suffices to compute a refinement of the following partitions (with the same argumentation given in Section 4.2):

(2.i) the 2-edge-connected components of G′ \ {e1, . . . , ek+1} and

(2.ii) the SCCs of the PQ graph of G′i, whenever λG′i(zi, s) = k + 2 (reduce to case 1).

3. λ(v, s) = k Observe the following: (i) for any two vertices x, y / ∈ S such that λG(x, y) ≥ k + 3, we know that x, y belong to the same 3-edge-connected component of G′ \ {e1, . . . , ek} and (ii) by Lemma 19 we have λG′i(zi, s) ≥ k + 1. Thus it suffices to compute a refinement of the following partitions:

(3.i) the 3-edge-connected components of G′ \ {e1, . . . , ek},

(3.ii) the SCCs of the PQ graph of G′i, whenever λG′i(zi, s) = k + 2 (reduce to case 1), and

(3.iii) the 2-edge-connected components of the graph obtained from G′i after removing all outgoing edges of zi (2.i) and the SCC’s of each PQ graph obtained from G′i after contracting an outgoing edge of zi (2.ii), whenever λG′i(zi, s) = k + 1 (reduce to case 2).

It is not difficult to see that the number of all computed graphs are in total O(k2) and building a PQ graph requires O(km) time. Thus, by the linear-time algorithms for computing the k′-edge-connected components with k′ ∈ {1, 2, 3} of general digraphs [19, 20, 18], we conclude that finding a good (k + 3)-partition for v can be carried out in O(k3m) time. After collecting all such partitions from each sampled edge into P2, we compute the common refinement of P1 (small M-sets) and P2 (large M-sets).

Although it is tempting to use Theorem 63 for computing all (k + 3)-edge-connected components of G, we should make clear that we only claim the following: given a (k + 2)-edge-connected component S of a k-edge-connected graph G, the algorithm given in Theorem 63 (by labeling the vertices of S as ordinary) can compute, within the claimed running time, a partition P of V(G) such that (i) every two (k + 3)-edge-connected vertices of S are in the same set of P and (ii) with high probability every two vertices of S that are not (k + 3)-edge-connected are separated by P. Nevertheless, we believe that the previous analysis highlights certain obstacles for extending our framework towards higher edge-connectivity.

Acknowledgment. We thank an anonymous reviewer for suggesting the use of the Picard-Queyranne graph in the proof of Proposition 9.

References

[1] Abboud, A., Krauthgamer, R., and Trabelsi, O. APMF < APSP? Gomory-Hu tree for unweighted graphs in almost-quadratic time, 2021. 1

[2] Abboud, A., Krauthgamer, R., and Trabelsi, O. Subcubic algorithms for gomory–hu tree in unweighted graphs. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (New York, NY, USA, 2021), STOC 2021, Association for Computing Machinery, p. 1725–1737. 1

[3] Abboud, A., Li, J., Panigrahi, D., and Saranurak, T. All-pairs max-flow is no harder than single-pair max-flow: Gomory–Hu trees in almost-linear time. In 2023 IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS) (2023), pp. 2204–2212. 1

[4] Akmal, S. An enumerative perspective on connectivity. In 2024 Symposium on Simplicity in Algorithms (SOSA) (2024), pp. 179–198. 1

[5] Akmal, S., and Jin, C. An Efficient Algorithm for All-Pairs Bounded Edge Connectivity. In 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023) (Dagstuhl, Germany, 2023), K. Etessami, U. Feige, and G. Puppis, Eds., vol. 261 of Leibniz International Proceedings in Informatics (LIPIcs), Schloss Dagstuhl – Leibniz-Zentrum für Informatik, pp. 11:1–11:20. 1

[6] Alman, J., Duan, R., Williams, V. V., Xu, Y., Xu, Z., and Zhou, R. More asymmetry yields faster matrix multiplication. In Proceedings of the 2025 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA) (2025), pp. 2005–2039. 1

[7] Benczúr, A. A. Counterexamples for directed and node capacitated cut-trees. SIAM Journal on Computing 24, 3 (1995), 505–510. 1

[8] Chechik, S., Hansen, T. D., Italiano, G. F., Loitzenbauer, V., and Parotsidis, N. Faster algorithms for computing maximal 2-connected subgraphs in sparse directed graphs. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms (2017), SIAM, pp. 1900–1918. 1

[9] Chen, L., Kyng, R., Liu, Y. P., Peng, R., Gutenberg, M. P., and Sachdeva, S. Maximum flow and minimum-cost flow in almost-linear time. In Proceedings of the 63rd IEEE Symposium on Foundations of Computer Science (2022), FOCS ’22. 1

[10] Cheung, H. Y., Lau, L. C., and Leung, K. M. Graph connectivities, network coding, and expander graphs. SIAM J. Comput. 42, 3 (Jan. 2013), 733–751. 1

[11] Ford, D. R., and Fulkerson, D. R. Flows in Networks. Princeton University Press, USA, 2010. 1

[12] Forster, S., Nanongkai, D., Yang, L., Saranurak, T., and Yingchareonthawornchai, S. Computing and testing small connectivity in near-linear time and queries via fast local cut algorithms. In Proceedings of the Fourteenth Annual ACM-SIAM Symposium on Discrete Algorithms (2020), SIAM, pp. 2046–2065. 1

[13] Gabow, H. N. A matroid approach to finding edge connectivity and packing arborescences. Journal of Computer and System Sciences 50 (1995), 259–273. 1

[14] Gabow, H. N. Path-based depth-first search for strong and biconnected components. Information Processing Letters 74 (2000), 107–114. 1

[15] Gabow, H. N. The minset-poset approach to representations of graph connectivity. ACM Transactions on Algorithms 12, 2 (Feb. 2016), 24:1–24:73. 1

[16] Galil, Z., and Italiano, G. F. Reducing edge connectivity to vertex connectivity. SIGACT News 22, 1 (Mar. 1991), 57–61. 1

[17] Georgiadis, L., Italiano, G. F., and Kosinas, E. Computing the 4-edge-connected components of a graph in linear time. In Proc. 29th European Symposium on Algorithms (2021), pp. 47:1–47:17. 1

[18] Georgiadis, L., Italiano, G. F., and Kosinas, E. Computing the 3-edge-connected components of directed graphs in linear time. In 65th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2024, Chicago, IL, USA, October 27-30, 2024 (2024), IEEE, pp. 62–85. 1

[19] Georgiadis, L., Italiano, G. F., Laura, L., and Parotsidis, N. 2-edge connectivity in directed graphs. ACM Trans. Algorithms 13, 1 (Oct. 2016). 1

[20] Georgiadis, L., Italiano, G. F., and Parotsidis, N. Strong connectivity in directed graphs under failures, with applications. SIAM J. Comput. 49, 5 (2020), 865–926. 1

[21] Georgiadis, L., Kipouridis, E., Papadopoulos, C., and Parotsidis, N. Faster computation of 3-edge-connected components in digraphs. In Proc. 2023 ACM-SIAM Symposium on Discrete Algorithms, SODA (2023), SIAM, pp. 2489–2531. 1

[22] Georgiadis, L., and Tarjan, R. E. Dominator tree certification and divergent spanning trees. ACM Transactions on Algorithms 12, 1 (Nov. 2015), 11:1–11:42. 1

[23] Hariharan, R., Kavitha, T., and Panigrahi, D. Efficient algorithms for computing all low s-t edge connectivities and related problems. In Proceedings of the Eighteenth Annual ACM-SIAM Symposium on Discrete Algorithms (USA, 2007), SODA ’07, Society for Industrial and Applied Mathematics, p. 127–136. 1

[24] Henzinger, M., Rao, S., and Wang, D. Local flow partitioning for faster edge connectivity. SIAM Journal on Computing 49, 1 (2020), 1–36. 1

[25] Hopcroft, J. E., and Tarjan, R. E. Dividing a graph into triconnected components. SIAM Journal on Computing 2, 3 (1973), 135–158. 1

[26] Hoppenworth, G., Saranurak, T., and Wang, B. Near-optimal fault-tolerant strong connectivity preservers. In Proceedings of the 66th Annual Symposium on Foundations of Computer Science (FOCS 2025) (2025). 1

[27] Huck, A. Disproof of a conjecture about independent branchings in k-connected directed graphs. Journal of Graph Theory 20, 2 (1995), 235–239. 1

[28] Kawarabayashi, K.-I., and Thorup, M. Deterministic edge connectivity in near-linear time. Journal of the ACM 66, 1 (Dec. 2018). 1

[29] Korhonen, T. Linear-time algorithms for k-edge-connected components, k-lean tree decompositions, and more. In 57th ACM Symposium on Theory of Computing (STOC 2025) (2025). 1

[30] Kosinas, E. Computing the 5-edge-connected components in linear time. In Proceedings of the Annual ACM-SIAM Symposium on Discrete Algorithms (2024), p. 1887 – 2119. 1

[31] Li, J., Panigrahi, D., and Saranurak, T. A nearly optimal all-pairs min-cuts algorithm in simple graphs. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS) (2022), pp. 1124–1134. 1

[32] Menger, K. Zur allgemeinen kurventheorie. Fund. Math. 10 (1927), 96–115. 1

[33] Nadara, W., Radecki, M., Smulewicz, M., and Sokolowski, M. Determining 4-edge-connected components in linear time. In Proc. 29th European Symposium on Algorithms (2021). 1

[34] Nagamochi, H., and Ibaraki, T. A linear time algorithm for computing 3-edge-connected components in a multigraph. Japan J. Indust. Appl. Math 9, 163 (1992). 1

[35] Nagamochi, H., and Ibaraki, T. Algorithmic Aspects of Graph Connectivity. Cambridge University Press, 2008. 1st edition. 1

[36] Nagamochi, H., and Watanabe, T. Computing k-edge-connected components of a multigraph (special section on discrete mathematics and its applications). IEICE Transactions on Fundamentals of Electronics, Communications and Computer Sciences 76 (1993), 513–517. 1

[37] Nanongkai, D., Saranurak, T., and Yingchareonthawornchai, S. Breaking quadratic time for small vertex connectivity and an approximation scheme. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (2019), pp. 241–252. 1

[38] Picard, J., and Queyranne, M. On the structure of all minimum cuts in a network and applications. Math. Program. 13, 1 (1980), 8–16. 1

[39] Schnorr, C.-P. Bottlenecks and edge connectivity in unsymmetrical networks. SIAM Journal on Computing 8, 2 (1979), 265–274. 1

[40] Tarjan, R. E. Depth-first search and linear graph algorithms. SIAM Journal on Computing 1, 2 (1972), 146–160. 1

[41] Tarjan, R. E. Efficiency of a good but not linear set union algorithm. Journal of the ACM 22, 2 (1975), 215–225. 1

[42] Tarjan, R. E., and van Leeuwen, J. Worst-case analysis of set union algorithms. Journal of the ACM 31, 2 (1984), 245–81. 1

[43] Tsin, Y. H. Yet another optimal algorithm for 3-edge-connectivity. Journal of Discrete Algorithms 7, 1 (2009), 130 – 146. Selected papers from the 1st International Workshop on Similarity Search and Applications (SISAP). 1