Math. Program. 84: 529–535 (1999) / DOI 10.1007/s10107990070b
Springer-Verlag 1999
Steffen Enni
A 1-(S, T )-edge-co...
12 downloads
442 Views
66KB Size
Report
This content was uploaded by our users and we assume good faith they have the permission to share this book. If you own the copyright to this book and it is wrongfully on our website, we offer a simple DMCA procedure to remove your content from our site. Start by pressing the button below!
Report copyright / DMCA form
Math. Program. 84: 529–535 (1999) / DOI 10.1007/s10107990070b
Springer-Verlag 1999
Steffen Enni
A 1-(S, T )-edge-connectivity augmentation algorithm Received January 1995 / Revised version received April 1996 Published online March 16, 1999 Abstract. We present a combinatorial algorithm for the 1-(S, T )-edge-connectivity augmentation problem in digraphs. The general k-(S, T )-edge-connectivity augmentation problem was first solved by A. Frank and T. Jordán [4] , but their proof does not yield a combinatorial polynomial-time algorithm. Our algorithm generalizes an earlier result of P. Eswaran and R.E. Tarjan and relies heavily on the nature of the special case k = 1.
1. Introduction Let G = (V, E) be a (finite) directed graph with vertex-set V and edge-set E. We call G simple if G has no multiple edges and no self-loops. An edge st ∈ E has tail s and head t, for a set X ⊆ V we let %(X) denote the number of edges with heads in X and tails in V − X. For a one element set {v} we abbreviate X ∪ {v} to X + v and f(v) = f({v}). A vertex v is isolated if there are no edges incident with v. For a subset of vertices S ⊂ V we let G[S] denote the graph induced by the vertices in S. A component of G is a maximum (with respect to inclusion) set of vertices which are connected in the undirected sense using the edges of G. The local edge-connectivity λ(x, y; G) is the maximum number of pairwise edgedisjoint paths from x to y in G. A directed graph G = (V, E) with two specified non-empty subsets of vertices S and T (which need not be disjoint) is said to be k-(S, T )-edge-connected if λ(s, t; G) ≥ k for all choices of s ∈ S, t ∈ T . A family F of subsets of vertices is (S, T )-independent if S − X, X ∩ T 6= ∅ for every X ∈ F and no two members X, Y of F separates the same pair of vertices s ∈ S, t ∈ T . That is for every two members X, Y of F we have either X ∩ Y ∩ T = ∅ or (S − X) ∩ (S − Y) = ∅. Given a family of subsets of vertices F P and a function p defined on the power-set of V we define p(F) = ( p(X) : X ∈ F). In the rest of this paper the term ‘graph’ is meant to be a directed graph. The following theorem appears in [4] as a consequence of the main min-max theorem on coverings of crossing bi-supermodular functions. Theorem 1. A digraph G = (V, E) with two non-empty subsets S, T ⊆ V can be augmented to a k-(S, T )-edge-connected graph with a set F of γ edges with tails in S S. Enni: Department of Mathematics and Computer Science, Odense University, Denmark. Part of this work was done while the author was visiting Professor András Frank at Institute IMAG, Grenoble. The hospitality of the institute is gratefully acknowledged. Mathematics Subject Classification (1991): 05C40
530
and heads in T if and only if
Steffen Enni
X
pdef (X) ≤ γ
(1)
X∈F
for all (S, T )-independent families of subsets of V where pdef (X) := max(0, k − %(X)). t u Unfortunately the only proof of Theorem 1 so far relies on the main theorem in [4] for which we do not know any polynomially algorithm to find the optimum dual value, except when the number of sets with pdef > 0 is bounded by a polynomial in |S ∪ T |. Even in this case the algorithm so far relies on the ellipsoid method and is thus not purely combinatorial. In the next section we will describe a combinatorial polynomial algorithm which constructs a minimum set of augmenting edges for the special case where k = 1. Observe that even in this case the number of sets with pdef > 0 need not be bounded by a polynomial in |S ∪ T |. Consider for instance a bipartite graph with bipartite sets S and T each of size n and a perfect matching directed from T to S as edge set. In this case there are 3n − 2 different sets with positive deficiency. If we choose S = T = V in Theorem 1, then we get a theorem of Frank [3] concerning augmentations of digraphs in order to get a k-edge-connected result. For this problem we have good algorithms, Frank initially gives a O(|V |6 ) algorithm which Bussieck [1] and Gabow [5] have improved. The current status of the (S, T )-edgeconnectivity augmentation problem is similar to the status of the general connectivity problem at the time where Eswaran and Tarjan [2] first published their O(V + E) algorithm to make a digraph strongly connected by adding a minimum number of edges. It is our hope that the algorithm we present here can be a similar starting point and that the general (S, T ) problem eventually will become tractable from an algorithmic point of view. 2. The algorithm We will now derive an algorithm that given a graph G and specified subsets S, T ⊆ V constructs a minimal set of edges F so that G + F is 1-(S, T )-edge-connected. This is done in two steps; first we derive a formula for the number of edges needed to 1-(S, T )-edge-connect a special class of bipartite graphs. This derivation is essentially algorithmic and can easily be turned into an algorithm which constructs an optimal set of augmenting edges; hence we will refer to this derivation as an algorithm without explicitly writing it down. Secondly we show how to reduce the problem for any starting graph to a problem on a bipartite graph belonging to this class. Let G = (S ∪ T, E) be a simple directed bipartite graph with bipartitions S and T consisting of components of the following three types and possibly some isolated vertices. (1) A pair of vertices s ∈ S, t ∈ T which are connected with a pair of oppositely directed edges, (2) all edges are directed from S to T and (3) all edges are directed from T to S. We call two oppositely directed edges between a pair of vertices a double edge and edges from T to S (S to T ) back edges (forward edges). The following proposition is obviously true, and can be proved by an elementary construction of an (S, T )-independent family F with pdef (F) = |S||T | − |E(G)|.
A 1-(S, T )-edge-connectivity augmentation algorithm
531
Proposition 1. If G has only forward edges and isolated points, then a 1-(S, T )-edgeconnectivity augmentation with γ edges requires γ ≥ |S||T | − |E(G)|. t u Proposition 2. If G has precisely one double edge and no back edges, then a 1-(S, T )edge-connectivity augmentation with γ edges requires γ ≥ |S| + |T | − 2. Proof. Let s ∈ S, t ∈ T be the pair of vertices connected by a double edge. For every u ∈ T − t we let Cu := S − s + u and for every v ∈ S − s we let Cv := S + t − v. This family F = {Cv : v ∈ S − s} ∪ {Cu : u ∈ T − t} of sets is (S, T )-independent and pdef (F) = |S| + |T | − 2. Conversely, augmenting with the set of edges {su : u ∈ T − t} ∪ {vt : v ∈ S − s} clearly gives a 1-(S, T )-edge-connected digraph. t u Proposition 3. If G does not satisfy the conditions of Proposition 1 or 2 then a 1-(S, T )edge-connectivity augmentation with γ edges requires γ ≥ |S| + |T | − min(|S B |, |TB |). Where S B (respectively TB ) denote the set of vertices v ∈ S (u ∈ T ) incident with a back edge uv directed from T to S. Proof. By induction on l := |S| + |T | we construct an augmentation using |S| + |T | − min(|S B |, |TB |) edges. The base case is l = 2 in which G must consist of only one edge directed from T to S. (Otherwise either Proposition 1 or 2 would apply.) In this case the statement is trivial. Let now l > 2, there are two different cases. Case 1. Every vertex is incident with an edge directed from T to S, i.e., there are no forward edges and no isolated vertices. Let M = {s1 t1 , . . . , sn tn } be a maximum cardinality matching in the set of edges directed from T to S. Construct an augmentation giving a 1-(S, T )-edge-connected graph as follows; connect si to ti+1 for i ∈ {1, 2, . . . , n} (subscripts modulo n) and connect the unmatched vertices {sn+1 , . . . , sn+k , tn+1 , . . . , tn+l } pairwise with edges sn+i tn+i for i ∈ {1, 2, . . . , min(l, k)}. If k > l we connect sn+i to tn+l for i > l and if l > k we connect sn+l to tn+i for i > k. The result is a 1-(S, T )-edge connected digraph and we have used n + max(k, l) = max(|S|, |T |) = |S| + |T | − min(|S B |, |TB |) edges. Case 2. There is either an isolated vertex or a component spanned by forward edges. Let C = {s1 , . . . , sl , t1 , . . . , tk } be a component which is either an isolated vertex or spanned by forward edges. If we delete C then the resulting graph G 0 satisfies the hypothesis of Proposition 3 because G did. By induction there is an augmentation F 0 of G 0 using |S0 | + |T 0 | − min(|S0B |, |TB0 |) edges where the primes refer to G 0 . Note that |S0B | = |S B | and |TB0 | = |TB |. Let ts be an edge in G 0 directed from T to S. Adding the set of edges {si t}li=1 ∪ {sti }ki=1 to F 0 clearly gives an augmenting set of edges which 1-(S, T )-edgeconnects G. The total number of edges in this set is |S0 |+|T 0 |−min(|S0B |, |TB0 |)+l +k = |S| + |T | − min(|S B |, |TB |).
532
Steffen Enni
To finish the proof we have to construct an (S, T )-independent family F for which pdef (F) = |S| + |T | − min(|S B |, |TB |). We consider only the case when |TB | ≥ |S B |, the construction in the other case is slightly different but similar. Let us introduce some notation by writing S and T as disjoint unions S = S1 ∪ S2 ∪ S3 and T = T1 ∪ T2 ∪ T3 where S1 (T1 ) is the set of vertices incident with a double edge, S2 (T2 ) the set of vertices incident with forward edges and S3 (T3 ) the vertices incident with back edges. For further simplicity we will assume that there are no isolated vertices; these shall be treated just as vertices incident with forward edges. We have the following sets with indegree zero. • • • •
For each td ∈ T1 : X = S2 + td + sd where {td sd , sd td } is the pair of double edges. For each t f ∈ T2 : X = S2 + t f . For each tb ∈ T3 : X = S2 + tb . For each s f ∈ S2 : X = S − s f + T − T2 .
An easy inspection reveals that the family F consisting of these sets is (S, T )-independent and pdef (F) = |S2 | + |T | = |S| + |T | − min(|S B |, |TB |). t u Summarizing the results of Proposition 1 to 3 we get the following theorem. Theorem 2. Let G = (S ∪ T, E) be a simple bipartite directed graph for which every component containing edges in both directions between S and T has precisely two vertices. Let γ denote the number of new edges with tails in S and heads in T in a minimal 1-(S, T )-edge-connected augmentation of G. Then |S||T | − |E|, |S| + |T | − 2, γ = |S| + |T | − min(|S B |, |TB |),
if all edges are directed from S to T , if only one edge ts is directed from T to S and the reverse edge st ∈ E, otherwise.
Where S B (respectively TB ) denote the number of vertices in S (T ) incident with an edge directed from T to S. t u Note that there is no nice uniform formula for the minimum number of edges needed to 1-(S, T )-edge-connect G. The situation in Proposition 1 is expected and trivial; but the distinction between Proposition 2 and 3 is highly unexpected. The presence of double edges instead of back edges seems to make a difference only if one edge is directed from T to S. If we have at least two edges in this direction then we may delete the edge st from every double pair s and t without raising the number of edges needed. We will now show how to reduce the problem on any starting graph to a problem on a bipartite graph with the same special structure as just studied. We will transform the starting graph in four steps and in each step show that the maximum number in (1) is preserved. To simplify the arguments we need the following observation. If there is a vertex v ∈ S ∩ T then we may remove v from T and add a new vertex vt ∈ T to the graph and connect vt and v with a pair of oppositely directed edges. Now any set X
A 1-(S, T )-edge-connectivity augmentation algorithm
533
containing v with pdef (X) = 1 must contain both v and vt in the new graph. Therefore in the following we assume that S and T are disjoint. Let νG denote the maximum number in (1), that is nX o νG = max [ pdef (X) : X ∈ F] : F is (S, T )-independent in G . Step 1. Compute the transitive closure G tr of G. It is easy to see that νG tr = νG because we may assume that no member X of an (S, T )-independent family has pdef (X) = 0 and thus have no entering edge. Step 2. Let G ST = G tr [S ∪ T ] be the graph spanned by S ∪ T in G tr . The inequality νG ST ≥ νG tr follows immediately when we given an (S, T )-independent family F in G tr define F 0 := {X ∩ (S ∪ T ) : X ∈ F}. To prove the opposite inequality consider an (S, T )-independent family F in G ST . For every member X define X 0 := X ∪ {v ∈ V − (S ∪ T ) : ∃vx ∈ E(G tr ), x ∈ X}. Using the fact that G tr is a transitively closed graphs it is easy to see that pdef (X 0 ) = pdef (X) (= 1) and that the family defined this way is (S, T )-independent. Step 3. Let G 0 be the result of shrinking those strongly connected components of G ST which are contained entirely in S or in T to single vertices. As no set X with pdef (X) = 1 can intersect a strongly connected component, this operation clearly preserves the maximum in (1). The graphs spanned by S and by T are acyclic and the only cycles in G 0 consists of pairs of oppositely directed edges between a vertex in S and a vertex in T (recall that G ST is transitively closed). Step 4. Construct a bipartite graph H from G 0 as follows. Remove all vertices in S which have an out-neighbour s0 ∈ S and all vertices in T with an in-neighbour t 0 ∈ T . That is H is defined with vertex-set V(H ) := {s ∈ S : @ss0 ∈ E(G 0 ), s0 ∈ S} ∪ {t ∈ T : @t 0 t ∈ E(G 0 ), t 0 ∈ T } and edge-set induced by V(H) in G 0 . To show that ν H ≥ νG 0 let F be an (S, T )-independent family in G 0 and let X be a member of F. By assumption both S − X and X ∩ T are non-empty and %(X) = 0. Observe that both S H − X and TH ∩ X are non-empty. If, say, S H − X is empty then by assumption there is a vertex s ∈ S − X and because s ∈ / H there is an edge ss0 0 with s ∈ S H ⊆ X, this is a contradiction to %(X) = 0. (Similar arguments apply if TH ∩ X = ∅.) Furthermore the restriction of F to H is (S, T )-independent (if not then we deduce that F is not (S, T )-independent) and ν H ≥ νG 0 follows. Now let F be an (S, T )-independent family in H. Define a family F 0 with members 0 X = X ∪ {s ∈ S : ∃s0 ∈ S H ∩ X, ss0 ∈ E(G 0 )}. Using the fact that G 0 is the transitive closure of G and contains no cycles in S or in T it is easy to conclude that %(X 0 ) = 0. We claim that F 0 is (S, T )-independent in G 0 . If not then there are two members X 0 , Y 0 separating the same pair of vertices s ∈ S, t ∈ T . If s ∈ S H , t ∈ TH then the contradiction follows immediately as the corresponding sets X, Y ∈ F separates the same pair in H.
534
Steffen Enni
If s ∈ / S H then there is at least one out-neighbour s0 ∈ S H , by the definition of X 0 , Y 0 we have s0 ∈ / X ∪ Y (similar arguments show the existence of a vertex t 0 ∈ X ∩ Y ∩ TH ) and then X, Y is dependent in H, a contradiction. We have now showed that ν H ≤ νG 0 and equality follows. Proposition 4. The graph H derived from any starting graph G is a bipartite graph consisting of components of the following three types. (1) A pair of vertices s ∈ S, t ∈ T connected by a pair of oppositely directed edges, (2) all edges are directed from S to T and (3) all edges are directed from T to S. Proof. It is clear that H is bipartite by definition. Assume H has a component consisting of edges in both directions not connecting the same pair of vertices. Without loss of generality we may assume there are edges t1 s and st2 (t1 6= t2 ) in this component. This is impossible because in the first step we computed the transitive closure and therefore the edge t1 t2 was present during the execution of the fourth step. This implies that t2 is discarded at that time. t u The reduction above in combination with the proof of Proposition 1 to 3 is essentially an algorithm to construct a 1-(S, T )-edge-connectivity augmentation of any starting digraph. Using depth-first search we can find the strongly connected components in O(|V | + |E|) time and finding the transitive closure requires O(|V ||E|) time. In all we can accomplish the reduction in O(|V ||E|) time. To construct a set of augmenting edges we use O(|S||T |) = O(|V |2 ) time in Proposition 1 because we need at least one time unit to construct each edge. Proposition 2 can be done in linear time O(|S| + |T |) = O(|V √ |). Proposition 3 uses maximum (non-weighted) bipartite matching which requires O( |V ||E|) time. Thus the total time needed to construct a set of augmenting edges is bounded by O(max(|V |2 , |V ||E|)). If we just want to calculate the number of edges needed O(|V ||E|) time suffices. In the special case when S = T = V we get an algorithm to make a digraph strongly connected by adding edges which is significantly faster than the general algorithm for k-edge-connecting a digraph for any integer k > 0 which [1] requires O(min(k, V)V 4 ). In this light there seems to be little hope to generalize the method presented here to higher connectivity requirements. Remark 1. We can refine our algorithm to construct a minimum cost augmentation where the cost of an edge uv is c(u) + c(v) for some cost function c : V → Z+ defined on the vertex-set. Note that because the vertex costs are positive, any minimum cost augmentation is a minimum cardinality augmentation at the same time. The first step is to modify the vertex costs appropriately when we construct a bipartite graph from any starting graph. When we shrink a strongly connected component C to a new vertex v we define c(v) as the minimum cost of any vertex in C. The augmentation in Proposition 1 and 2 is forced, none of the edges we add can be omitted. In this case we construct a minimum cost augmentation without any changes. In Proposition 3 the situation is different, we can construct different optimal augmentations (with the same cardinality). The key observation is that every vertex in S B ∪ TB must be incident with at least one new edge which connects vertices sb ∈ S B and tb ∈ TB . Let
A 1-(S, T )-edge-connectivity augmentation algorithm
535
S B = {s1 , . . . , sl } and TB = {t1 , . . . , tk }. If l = k then any set of edges connecting si ’s with t j ’s have the same cost and the strategy employed in the proof of Proposition 3 is optimal. If l 6= k we have to connect the ‘surplus’ vertices with the cheapest possible endpoint in the other set if we want to construct the cheapest augmentation on S B and TB . Similarly we connect every s ∈ S − S B with the cheapest t ∈ TB and the cheapest s ∈ S B with every t ∈ T − TB . We claim that this way of choosing the augmenting set of edges yields a minimum cost augmentation when the cost function is node-induced. Remark 2. If we have no restrictions on the cost-function the problem becomes NP-hard immediately. For instance the Hamiltonian circuit problem for a digraph G = (V, E) can be solved this way. Split every node v ∈ V into two copies vs ∈ S and vt ∈ T and connect vt to vs . Define c(vs u t ) to be 1 if the edge vu ∈ E and 2 otherwise. It is easy to see that there is a 1-(S, T )-edge-connected augmentation with cost |V | if and only if there is a Hamiltonian circuit in G. Acknowledgements. The author would like to thank Professor András Frank for the invaluable discussions about this and related problems during the author’s visit at Institute IMAG, Grenoble, June 1994.
References 1. Bussieck, M. (1992): Augmenting capacities in networks. Manuscript 2. Eswaran, K.P., Tarjan, R.E. (1976): Augmentation problems. SIAM J. Comput. 5, 653–665 3. Frank, A. (1992): Augmenting graphs to meet edge-connectivity requirements. SIAM J. Discrete Math. 5, 159–170 4. Frank, A., Jordán, T. (1995): Minimal edge-coverings of pairs of sets. J. Comb. Theory, Ser. B 65, 73–110 5. Gabow, H.N. (1994): Efficient splitting off algorithms for graphs. Proc. of the 26th ACM Symp. on Theory of Computing