balanced network flows. i. a unifying framework for design and analysis of matching algorithms

28
Balanced Network Flows. I. A Unifying Framework for Design and Analysis of Matching Algorithms Christian Fremuth-Paeger, Dieter Jungnickel Lehrstuhl fu ¨ r Diskrete Mathematik, Optimierung und Operations Research, University of Augsburg, D-86135 Augsburg, Germany Received 8 December 1997; accepted 29 April 1998 Abstract: We discuss a wide range of matching problems in terms of a network flow model. More than this, we start up a matching theory which is very intuitive and independent from the original graph context. This first paper contains a standardized theory for the performance analysis of augmentation algorithms in a wide area of matching problems. Several optimality criteria are given which do not use cuts or barriers. As an application of our theory, the known cardinality matching algorithms of Edmonds, Kameda and Munro, and Micali and Vazirani, and the algorithm of Kocay and Stone for capacitated matching problems can be studied in their effects. From our theory a c -capacitated b-matching algorithm can be derived that behaves like the Dinic algorithm for the maximum flow problem. It will turn out that techniques for the maximum flow problem can be applied to matching problems much more explicitly than done before. A comprehensive duality theory depending on the network flow model used here will follow. Explicit algorithms for nonweighted problems will be presented in subsequent papers. 1999 John Wiley & Sons, Inc. Networks 33: 1–28, 1999 Keywords: capacitated matching problems; network flows; balanced flow networks; skew-symmetric graphs; antisymmetrical digraphs; augmenting a matching; blossoms; nuclei; layered auxiliary networks 1. PRELIMINARIES lished by Berge [3], Edmonds [7], Hopcroft and Karp [ 16 ] , and Micali and Vazirani [ 23 ] long ago. Here, linear programming methods are not considered. The best-known and best-understood matching problem All known cardinality matching algorithms are based is the cardinality matching problem: For a given graph on the method of augmentation of a given matching M : (V, E ) , a set M E of nonadjacent edges, called a match- An alternating path, called the augmenting path, is cho- ing, of maximum cardinality has to be found. The most sen which starts and ends with nodes not in M . Here, popular techniques for solving this problem were estab- an alternating path is a path which traverses edges of M and E " M in alternation. Once an augmenting path p Correspondence to: D. Jungnickel; e-mail: [email protected] is found, we obtain a matching M ˜ of cardinality É M ˜ É augsburg.de Å É MÉ / 1 by deleting all edges from M that are also The major results of this paper form part of the first author’s doctoral on p and adding all edges on p that are not in M . This thesis which has been written under the supervision of the second author. AMS subject classification: 05C70, 90B10, 90C35 step is called an augmentation of M . Any matching that 1999 John Wiley & Sons, Inc. CCC 0028-3045/99/010001-28 1 839 / 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Upload: others

Post on 11-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

Balanced Network Flows. I. A UnifyingFramework for Design and Analysisof Matching Algorithms

Christian Fremuth-Paeger, Dieter Jungnickel

Lehrstuhl fur Diskrete Mathematik, Optimierung und Operations Research,University of Augsburg, D-86135 Augsburg, Germany

Received 8 December 1997; accepted 29 April 1998

Abstract: We discuss a wide range of matching problems in terms of a network flow model. More thanthis, we start up a matching theory which is very intuitive and independent from the original graph context.This first paper contains a standardized theory for the performance analysis of augmentation algorithmsin a wide area of matching problems. Several optimality criteria are given which do not use cuts orbarriers. As an application of our theory, the known cardinality matching algorithms of Edmonds, Kamedaand Munro, and Micali and Vazirani, and the algorithm of Kocay and Stone for capacitated matchingproblems can be studied in their effects. From our theory a c-capacitated b-matching algorithm can bederived that behaves like the Dinic algorithm for the maximum flow problem. It will turn out that techniquesfor the maximum flow problem can be applied to matching problems much more explicitly than donebefore. A comprehensive duality theory depending on the network flow model used here will follow.Explicit algorithms for nonweighted problems will be presented in subsequent papers. ! 1999 JohnWiley & Sons, Inc. Networks 33: 1–28, 1999

Keywords: capacitated matching problems; network flows; balanced flow networks; skew-symmetricgraphs; antisymmetrical digraphs; augmenting a matching; blossoms; nuclei; layered auxiliary networks

1. PRELIMINARIES lished by Berge [3] , Edmonds [7] , Hopcroft and Karp[16], and Micali and Vazirani [23] long ago. Here, linearprogramming methods are not considered.The best-known and best-understood matching problemAll known cardinality matching algorithms are basedis the cardinality matching problem: For a given graph

on the method of augmentation of a given matching M :(V, E) , a setM ⊆ E of nonadjacent edges, called amatch-An alternating path, called the augmenting path, is cho-ing, of maximum cardinality has to be found. The mostsen which starts and ends with nodes not in M . Here,popular techniques for solving this problem were estab-an alternating path is a path which traverses edges ofM and E"M in alternation. Once an augmenting path p

Correspondence to: D. Jungnickel; e-mail: [email protected] is found, we obtain a matching M of cardinality ÉMÉaugsburg.de Å ÉMÉ / 1 by deleting all edges from M that are alsoThe major results of this paper form part of the first author’s doctoral

on p and adding all edges on p that are not in M . Thisthesis which has been written under the supervision of the second author.AMS subject classification: 05C70, 90B10, 90C35 step is called an augmentation of M . Any matching that

! 1999 John Wiley & Sons, Inc. CCC 0028-3045/99/010001-28

1

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 2: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

2 FREMUTH-PAEGER AND JUNGNICKEL

cannot be augmented was proven to be maximum by Throughout the paper, we will use standard terminol-ogy from network flow theory without further explana-Berge [3] . We will present analogous results for the ca-tion; we refer the reader to Ahuja et al. [1] or Jungnickelpacitated matching problems which are introduced in the[17] for background.next section.

Many notions used in algorithmic matching theory likeblossoms and blossom baseswere introduced by Edmonds[7] . He devised the method of shrinking blossoms, which 2. GENERALIZED MATCHING PROBLEMSreduces the problem of augmentation in arbitrary graphsto augmentation in bipartite graphs. Since finding an aug- There are several directions of generalizing the cardinalitymenting path in bipartite graphs is very easy, this resulted matching problem. In this paper, we will not treatin the first efficient cardinality matching algorithm. weighted matching problems which have been studiedHopcroft and Karp [16] gave upper bounds on the by many authors before. We, rather, look at multigraphs

number of augmentation steps under the assumption that instead of simple graphs and a larger class of subgraphsall occurring augmenting paths have minimum length. than independent edge sets. Our framework includes theAny algorithm satisfying this assumption is called phase- notions of k-factors, f-factors, and ( f , g)-factors.ordered. At this point, the perception of bipartite match- A multigraph is a triple G :Å (V, E , c) consisting ofing problems began to differ from that of general graph a node set V, an edge set E ⊆ {{u , £} : u , £ √ V }, andmatching problems: a capacity constraint c : E r N , where c(e) denotes theConcerning bipartite graphs, Hopcroft and Karp [16] multiplicity of the edge e , that is the number of edges

parallel to e . Note that this definition allows edges ofand Even and Tarjan [8] improved the complexity of thethe form {u} Å {u , u} √ E , called loops.augmentation algorithm to O(n 5/2 ) and O(

√nm) , respec-

Any mapping x : E r N0 with x ° c is called a sub-tively. The latter algorithm is still state of the art. Further-graph of G . The degree sequence of x in G is given bymore, Even and Tarjan recognized that the bipartite

matching problems can be mapped onto the max-flowdegx(£) :Å x({£, £}) / !

w√V

x({£, w}),problem for a certain class of networks and that theircardinality matching algorithm was equivalent to themax-flow algorithm of Dinic running on these networks.

which is the degree of £ in the subgraph x . Note that anHowever, the method of explicitly shrinking blossomsincidence with a loop is counted twice since loops areis unable to obtain a minimum-length augmenting pathconsidered to be cycles of length 1. We simply writein general, since the length of alternating paths changesdeg(£) instead of degc(£) . More generally, we call anywithin those shrinking operations. Micali and Vaziranimapping y : V r N0 with y ° deg a degree sequence[23] devised an algorithm that uses an appropriate searchof G .strategy and a set union mechanism instead of explicitNow let G be a connected multigraph, and a , b , twoshrinking. This algorithm runs in O(

√nm)-time, exactly degree sequences of G so that a(£) ° b(£) , a(£) ú 0,the bound known for the bipartite case. and b(£) õ deg(£) for all nodes £ √ V (G) . From theSince the first comprehensive correctness proof of this subgraph networkM :Å (V, E , c , a , b) , some interesting

algorithm was published by Vazirani [28] only recently, optimization problems result. To this end, we call anyhis ideas did not reappear in any compendium on match- subgraph x of G with the property degx ° b a matchinging theory yet. We rework Vazirani’s results, but in a of M. If G is bipartite, we speak of assignments insteaddifferent logical arrangement for three reasons: to make of matchings.them applicable to a wider range of problems, to obtain a A matching x is said to be a maximum matching iffstandardization of the analysis and notions in algorithmic it has maximum cardinality within the set of matchingsmatching theory, and to get more useful and intuitive of M. The extended matching problem asks for a maxi-intermediate results. mum matching of any given subgraph network M. Here,Our approach is based on two recent papers by Kocay the cardinality of a subgraph x of G is defined by

and Stone [19, 20], who described a class of integralflow networks, called balanced networks, that represent ÉxÉ :Å 1

2 !£√V

degx(£)generalized matching problems, an adaptation of the fa-mous max-flow min-cut theorem to balanced networksand an algorithm for finding maximummatchings in terms and is usually considered to be the number of edges inof these networks. As we will see, this is indeed the x . But one can use the notation ÉxÉ also if x is a fractionalsuitable framework for the study of matching algorithms, matching, that is, a mapping x : E r R with 0 ° x ° csince it unifies the setting for nearly all important match- and 0 ° degx ° b , where also the definition of degx has

to be extended to nonintegral matchings.ing algorithms proposed up to now.

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 3: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 3

we consider the cardinality matching problem, we simplyset a , b :å 1 and get 1-factors and perfect matchings asequivalent notions.The so-called capacitated b-matching problem is the

extended matching problem where loops are excluded.The b-matching problem is the case with c å b(V ) .These problems are the natural extensions of the cardinal-

Fig. 1. Examples for the cardinality matching problem. ity matching problem in the context of the matching poly-tope.Traditionally, factors are called ( f , g)-factors, and f-

In what follows, let M denote some subgraph network factors, if we have a å b . Since we will use f and g toand x some matching of M. A node £ √ V is said to be denote network flows, we will use the slightly differentsaturated by x whenever degx(£) ¢ a(£) holds. The notations introduced before.nodes which are not saturated by x are called deficient This model is extended to weighted matching problemsand collected into the set V 0(x) . The matching x is called by adding cost labels g(e) and b(£) with the arcs and,perfect or a factor of M iff all nodes in V are saturated, nodes respectively, of the multigraph G(M) . We willthat is, iff V 0(x) is empty. The problem of determining discuss nonweighted matching problems thoroughly, buta factor of M is called the degree constrained subgraph we will give only a few remarks on weighted problems.problem.If there is no factor of M, one could try to minimize

ÉV 0(x)É, the number of deficient nodes. This has been 3. BALANCED FLOW NETWORKScalled the maximum saturation problem and is knownto be NP-hard [15]. Another way to measure how much Searching for maximum flows of a certain class of flowthe condition a ° degx is violated by any matching x is networks solves bipartite matching problems very ele-given by the deficiency of x : gantly (see [17]) . The class of balanced flow networks

we introduce now yields a similar representation for thedef ( x) :Å !

£√V0 (x )

(a(£) 0 degx(£)) . general matching problem. Related settings can be foundin Tutte [27], Anstee [2] , Kocay and Stone [19], andGoldberg and Karzanov [14] and in papers on the so-

Thisminimum-deficiency matching problem reduces to called symmetric assignment problem (see [5]) .the general matching problem if we have a å b . We Unfortunately, the notations of the different papers doexamine the case a å b in more detail: not coincide. We will follow the terminology given inAmatching x is called near-perfect iff all nodes except Kocay and Stone [19], the paper known to us first. Their

£ are saturated and if degx(£) Å a(£) 0 1. Clearly, a results are the same as in Tutte [27], but the terminologyfactor of M can only exist if a(V ) :Å !£√V a(£) is even, is more familiar. We will point out where synonymousand a near-perfect matching, only if a(V ) is odd. In the expressions are used among the different papers.latter case, the best we can hope is that a u-matching Let G Å (V, E) be a simple graph. We choose a nodeexists for every node u √ V . Then, we call M factor- set V ! disjoint to V of cardinality ÉV !É Å ÉVÉ and somecritical. bijection of V onto V !. The image of £ √ V is said to beFor example, Figure 1 shows a 1-factor and a deficient the complementary (or conjugated [27]) node of £ and

matching within its graphs. The graph shown in Figure is denoted by £ !. The elements of V are called outer, and1(b) is even factor-critical. We mention that factor-criti- the elements of V !, inner nodes.cal matching networks never come from bipartite graphs.Figure 2 depicts our less trivial running example which

contains some parallel edges and loops. We choose aå bå 2 and ask if the resulting subgraph network has a factor.The figure also contains a matching x consisting of alledges drawn in boldface. One can consider this matchingto be found by a greedy procedure. Here, we have V 0(x)Å {10} and def ( x) Å 2. We will show how to derivefrom x a 2-factor, where a 2-factor is nothing but a sub-graph which partitions the node set into simple cycles.All popular matching problems are obtained by spe-

cialization of the subgraph network M: If a , b å k √ NFig. 2. A multigraph and one of its subgraphs.holds, we speak of k-factors instead of factors. Thus, if

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 4: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

4 FREMUTH-PAEGER AND JUNGNICKEL

cap(uu !) :Å 2c({u , u}) for all loops {u , u} √ E

cap(su) , cap(u !t) :Å b(u) for all nodes u √ V,

where M Å (G , a , b , c) is a subgraph network. Thenetwork NM :Å (DG , cap) is called the balanced flownetwork associated with M. In the special case cap å 1,an instance of the cardinality matching problem, we writeNG instead of NM .We are interested in those flows on NM that are the

image of some fractional matching x of M under themapping

f (u£ !) :Å x({u , £})Fig. 3. The skew-symmetric digraph associated with Figure1(b) . for all non-loop edges {u , £} √ E

f (uu !) :Å 2x({u , u}) for all loops {u , u} √ EMoreover, we choose a source s and a sink t neitherin V nor V !. By the arc sets AG :Å {u£ ! : {u , £} √ E}, f (s£) , f (£t) :Å degx(£) for all nodes £ √ V .As :Å {su : u √ V }, and At :Å {£ !t : £ √ V }, we definethe skew-symmetric digraph associated with G by

This is the natural injection of the fractional matchingsof M into the set of flows on NM . Hence, we say that xDG :Å (V ! V ! ! {s , t}, AG ! As ! At) . corresponds to the flow f .For a given arc a , we denote the start node by a0 ,This graph is bipartite since V ! { t} and V ! ! {s} are the end node by a/ , and the reverse arc by aV . Let d/(s)independent node sets. Accordingly, we consider the sink :Å {a √ A(N) : a0 Å £} be the set of arcs with startt to be an outer and the source s to be an inner node. node s , and d0(s) :Å {a √ A(N) : a/ Å £}. The valueThus, any path in DG visits inner nodes and outer nodes

in alternation. Figure 3 shows an example, namely, the e(£) :Å !a√d/ (s )

f (a) 0 !a√d0 (s )

f (a)skew-symmetric digraph associated with the graph shownin Figure 1(b).There are some symmetries inherent to DG . To make is called the excess of the node £ with respect to f . It is

use of these, we extend the notation of complementarity obvious that we have e(£) Å 0 for £ x s , t . Accordingly,to arbitrary node sets: We define s ! :Å t , £ ! :Å u , where we call f an st-flow andu ! Å £ holds, and W ! :Å {£ ! : £ √ W } for a given setW ⊆ V (DG) . If we have W Å W !, then W is said to be val( f ) :Å e( t) Å 0e(s) Å 2ÉxÉa self-complementary set.Thus, the nonloop edges {u , £} of G are represented the flow value. Amaximum flow is an st-flow with maxi-in NM by two arcs, namely, u£ ! and £u !. Again, these mum flow value.arcs are called complementary, briefly written (u£ !) ! Maximum matchings ofM do not correspond to maxi-Å £u !. Note that node complementarity is a graph auto- mum flows on NM in general, and an arbitrary flow f onmorphism up to the arc directions. For this reason, Gold- NM cannot be transformed into a matching x with 2ÉxÉberg and Karzanov [14] chose the term skew-symmetric. Å val( f ) . Indeed, all flows corresponding to some match-If B ⊆ A(DG) is the sets of arcs with a given property, ing satisfy the following additional constraints:the co-arcs with respect to this property are given by the

set B ! :Å {a ! : a √ B}. A loop {u , u} √ E induces only (b1) f (a) and f (a !) are equal for all arcs a √ A(NM) ,one arc uu ! in DG , again called a loop. Thus, the co- (b2) f (a) is integral for every arc a √ A(NM) ,loops are the loops themselves. (b3) f (a) is even for every loop a Å a ! √ A(NM) .A network flow description of the extended matchingproblem is given by the digraph DG and the capacity Every flow on NM and, more generally, every labelingconstraint cap which is defined by

of A(NM) with these properties is called balanced. Thetransformation described above is a bijection between thecap(u£ !) :Å c({u , £}) matchings of M and the balanced flows on NM . It isalso a bijection between the fractional matchings and thefor all edges {u , £} √ E , u x £

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 5: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 5

fractional balanced flows, that is, mappings which sat- ear, whereas the usual reduction mechanisms to the cardi-nality matching problem grow the instance size signifi-isfy condition (b1) only.

To see that maximum matchings do not correspond to cantly (see [21]) .maximum st-flows in general, we consider the networkNG of Figure 3 and the 0–1 flow f which is supportedby the arcs drawn in bold. This flow corresponds to the 4. AUGMENTATIONmaximum matching shown in Figure 1(b) and, hence, ismaximum balanced. However, (s , 1, 2 !, 3, 1 !, t) is an

In this section, we will prove that one can always obtainaugmenting path with respect to the residual networka maximum balanced st-flow if the choice of augmentingNM( f ) so that f is not a maximum flow.paths is properly restricted and augmentation is done pair-On the other hand, there is an obvious way to obtainwise. In what follows, let N denote a balanced flow net-a maximum fractional balanced flow f0 from any givenwork; s and t , a complementary pair of nodes; and f , amaximum flow f *. One merely has to putbalanced st-flow on N . We begin with some basic obser-vations:f0(a) :Å 1

2 ( f *(a) / f *(a !)) . If p is a simple £w-path in N( f ) and P is the set ofedges on p , the edges in P ! Å {a ! : a√ P} define a simple

Since f0 and f * have same value, f0 is maximum again, w!£ !-path p!, the complementary path of p . Because ofespecially maximum fractional balanced. its meaning in the underlying graph, we sometimes callIn ordinary network flow theory, it is standard proce- p ! the way back.

dure to consider the more general notion of circulations, If p is an augmenting st-path, also the complementarywhich means a flow where every node £ has excess e(£) st-path p! is augmenting. An obvious idea is to start withÅ 0. Any st-flow f can be transformed into a circulation the flow f å 0 on N and to augment f step by step alongby adding the return arc ts and putting f ( ts) :Å val( f ) , pairs p , p! of st-paths. However, p and p! could haveeliminating the special role of the source s and the sink some arcs in common. We cannot exclude this case int . One then asks for an admissible circulation f which general, but have to consider additional restrictions forsatisfies capacity bounds 0° lcap(a)° f (a)° ucap(a) . the choice of an augmenting path p .Not surprisingly, an analogous approach turns out also A simple directed path p in N is said to be valid (or

to be useful for balanced flows. There are reductions for admissible [27] or regular [14]) iff there is no comple-the degree constrained subgraph problem and the mini- mentary edge pair a , a ! of residual capacity rescap(a)mum-deficiency matching problem to circulation prob- Å rescap(a !) Å 1 on p , that is, one can augment onlems on balanced flow networks. For this, we use DG with complementary valid paths p , p! simultaneously. We callthe return arc ts , ucap å cap , a node £ √ V (N) strictly reachable iff there is a valid

path leading from s to £.lcap(u£ !) :Å 0 for all edges {u , £} √ E Thus, if t is strictly reachable, there exists a pair of

valid paths and we may augment the flow f . If we considerlcap(su) , lcap(u !t) :Å a(u) for all nodes u √ Vthe example of M in Figure 2, we find

and lcap( ts) Å 0, ucap( ts) Å ! and then try to find anp :Å (s , 10, 8 !, 7, 9 !, 11, 11 !, 12, 7 !, 8, 4 !, 5, 10 !, t)admissible circulation. Actually, the subsequent theory

does not depend on the problem transformations presentedbut on the following general setting: to be a valid augmenting path in NM( f ) , where f is the

balanced flow corresponding to the matching of FigureWe call any digraph (V, A) skew-symmetric (or anti-symmetrical [27]) if there is a permutation p of V which 2. Note that this path does not correspond to a path, but

merely a walk of G(M) since the complementary arc pairhas no fixpoints, only cycles of length 2, and (p(£) , p(u))√ A for every arc u£ √ A . In this setting, a balanced (8!, 7) , (7 !, 8) is traversed. If we augment f by the paths

p and p !, the balanced flow corresponding to the matchingflow network is skew-symmetric where complementarynodes are specified, and the capacity labels are balanced. of Figure 4 results.

This example is not representative for the difficultiesFor simplicity, we make the general assumption thatbalanced flow networks are bipartite and that neither par- which the balanced augmentation process presents, since

the maximum balanced flows are maximum flows here.allel nor antiparallel arcs occur. Otherwise, we could re-place the network by one of its subdivisions which is a Nevertheless, reachability of t yields a necessary and also

sufficient criterion for the maximality of the balancedlinear reduction step again. We also assume balancednetworks to be connected and the source to be an inner flow f , as we shall see shortly.

If N is a flow network without antiparallel arcs, wenode. The bipartition is unique then.Note that all of these problem transformations are lin- call

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 6: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

6 FREMUTH-PAEGER AND JUNGNICKEL

which is counted on the left-hand side of (2) and leaves£ by an arc counted on the right-hand side.Let u be the start node and w be the end node of p .

If we would have u x w , then there would be an arc a√ Ad , a0 Å w which is not traversed d(a)-times by pand p ! together. If a is a loop, then d(a) is even, and ais traversed by p and p ! an even number of times. Inevery case, p could be extended by a , contradicting themaximality of p .Therefore, p is a closed walk. Hence, p splits into

simple cycles p1 , p2 , . . . , pl which are all valid withFig. 4. A 2-factor of the graph of Figure 2. respect to N( f ) . We now update g by setting

g :å g 0 !l

iÅ1( fpi / f !pi) .Supp( f ) :Å {a √ A(N) : f (a) ú 0}

! {aV : a √ A(N) , f (a) õ 0}Then, g stays a balanced and admissible circulation. It is

the support of the flow f on N . If p is a simple path p , easy to see that P(d) :Å !a√Add(a) decreases by the

we denote by fp the elementary flow supported by p , that amount 2(Ép1É / Ép2É / rrr / ÉplÉ) . Since P(d) isis, fp is a flow with values 0, 1, 01 and Supp( fp) is the nonnegative and integral, there can only be a finite num-set of arcs on p . ber of update steps on g . Therefore, we eventually achieve

f å g which finishes the proof. !Theorem 4.1 (Balanced Flow Decomposition). Let f,g be different balanced circulations on the balanced flow If we have N Å NG , Theorem 4.1 essentially describesnetwork N. Then, there are valid cycles p1 , p2 , . . . , pk in the symmetric difference of two matchings of the underly-the residual network N( f ) such that ing graph G . The applications of this theorem are just as

widespread as in the traditional setting. In particular, onecan derive optimality criteria for weighted problems also.g 0 f å !

k

iÅ1( fpi / f !pi) . (1)

Here, we restrict ourselves to the maximum balanced flowproblem:

Proof. Put d :Å g 0 f , and consider the arc setsTheorem 4.2 (Augmenting Path Theorem for Bal-

A/d :Å {a √ A(N) : d(a) ú 0}, anced Networks). Let f be a balanced st-flow on the

balanced flow network N. Then, f is a maximum balancedA0

d :Å {aV : a √ A(N) , d(a) õ 0}. flow iff there is no valid st-path in N( f ) .

Proof. Both directions follow by contraposition: First,Note that the arcs of A/d and A0

d are arcs of the residual let p be a valid st-path in N( f ) . One obtains a balancednetwork N( f ) . Furthermore, the set Supp(d) Å A/d ! flow g with val(g) Å val( f ) / 2 by setting g :å f / fpA0

d is self-complementary, and d(a) is even for every / fp = . But then f is not a maximum balanced flow.loop a √ A(N) . If we put d(a) :Å 0d(aV ) for every a Conversely, we assume that f is not maximum, choose√ A0d , we see that N( f )[Supp(d)] together with d is a some maximum balanced st-flow g for N , add the returnbalanced network again. arc ts to N , and consider Eq. (1) . Since we have g( ts)Let p be a walk with respect to N( f )[Supp(d)] such ú f ( ts) , there is a valid cycle with respect to N( f ) whichthat p and p ! together traverse any arc a √ Ad at most traverses ts . This cycle corresponds to a valid st-path in

d(a) times. Suppose that p is a maximal walk with that the former network, a contradiction. !property. We have to show that p is a closed walk.From the flow conservation conditions for f and g , If N Å NG is a 0–1-balanced network, Theorem 4.2a ‘‘mass balance’’ equation results for every node £ simplifies to the well-known theorem of Berge [3] , since√ V (N) , namely: the restriction to capå 1 forces valid paths not to contain

complementary arc pairs. Furthermore, every valid path!a√Ad

a/Å£

d(a) Å !a√Ad

a0Å£

d(a) . (2) is strictly simple. This means a simple path in a balancednetwork which does not traverse any complementary pairof nodes (start and end node excluded).To interpret valid paths in the underlying graph, weIf £ is an interior node on p , then p reaches £ by an arc

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 7: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 7

delete from the residual network N( f ) all arcs with start Theorem 4.4. Let N be a balanced flow network with0–1 capacities. Then, the set system (d/(s) , I) forms anode t and end node s . Then, strictly simple, directed

paths are just the image of alternating paths under the matroid.transformation of (G , x) into NG( f ) .

Proof. Let D ⊆ d/(s) and I , J ⊆ D maximal indepen-In a similar way, we call a pair of valid paths p , qdent with ÉIÉ ° ÉJÉ. It is sufficient to show that ÉIÉstrictly disjoint iff p is node disjoint not only to q butÅ ÉJÉ.also to q !. Thus, if p is a valid s£-path, q is a valid £w-Let balanced st-flows f , g be chosen so that Ipath, and p and q are strictly disjoint; also their concatena-

⊆ Supp( f ) , J ⊆ Supp(g) . Since I and J are maximal, wetion p!q is valid. Strictly edge-disjoint paths are definedhave I Å Supp( f ) ! D and I Å Supp(g) ! D. Since alikewise.flow on the arcs in d/(s) cannot decrease by an augmen-In what follows, we need a prototype algorithm whichtation step, we can assume that f and g are maximumfinds a maximum balanced flow from an arbitrary bal-balanced flows. Decomposeanced flow f0 , for instance, the zeroflow. This algorithm

is a mere modification of the maximum-flow algorithmof Ford and Fulkerson.

g 0 f å !k

iÅ1( fpi / f !pi) ,As suggested by the previous discussion, we must ei-

ther find a valid st-path in N( fi ) in step i of the algorithmor prove that such a path does not exist. This process is

where p1 , p2 , . . . , pk are pairwise strictly edge disjointcalled balanced network search (BNS). Once we haveand valid in N( f ) . If we would have ÉIÉ õ ÉJÉ, thenfound such a path p , we can proceed from fi to the flowwe could find an index i so that the cycle pi traverses anarc a √ J"I but not the reverse of any arc in I"J . Wefi/1 :å fi / balcap(p)( fp / fp =) , (3)would obtain a flow h :å f / fpi / fp =i with Supp(h)! D Å I " {a}, contradicting the maximality of I . "where the balanced capacity of a valid path p is defined

byBy this result, a maximal independent arc set with

minimum costs can be found by a greedy strategy. But,balcap(p) :Å min

a√p

rescap(a)2

, if a! √ p

rescap(a) , otherwisethen, a maximum balanced st-flow with minimum vertexcosts can be found as follows:Determine some maximum balanced st-flow. Order the

nodes in V (M) by the b-labels into a queue Q . Succes-and the iteration of Eq. (3) is called an augmentationsively delete a node £ with minimum b(£) on Q . Run astep. If no valid st-path is available, the algorithm halts.BNS, and check if there is a strictly £-reachable node wThis is called the balanced augmentation algorithm. √ V (M) which is still on Q . In that case, expand a valid£w-path q in N( f ) , put p :Å q!(w , s , £) , augment f :å fCorollary 4.3. The balanced augmentation algorithm/ balcap(p)( fp / f !p ) , and repeat the BNS.halts for every balanced flow network, and returns some

maximum balanced flow. "

At this point, we can adapt the idea of matching5. LOWER-CAPACITY BOUNDSmatroids to balanced flow networks. The following con-

struction requires 0–1 capacities. But note that an arbi-trary balanced flow network can be transformed into a Next, we describe how to find a balanced circulation on0–1 flow network by introducing explicit parallel arcs. a balanced flow network N with given capacity boundsHence, a matroid can be associated with every balanced lcap and ucap : We reduce the problem to the maximumflow network. The resulting matroids, however, are the balanced flow problem. The same technique was used bysame. One puts Ford and Fulkerson [9] for finding ordinary circulations.

We introduce an artificial source node s*, a sink nodeI :Å {I ⊆ d/(s) : I is strictly independent}, t*, and replace the capacities by a labeling cap which is

defined bywhere I ⊆ d/(s) is called strictly independent iff wehave I ⊆ Supp( f ) for some balanced flow f on N . If N is cap(a) :Å ucap(a) 0 lcap(a)arbitrary, there is no special structure in I. The followingtheorem, however, covers more networks than just trans-formed networks NG . for every arc a √ A(N) and

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 8: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

8 FREMUTH-PAEGER AND JUNGNICKEL

and the analogus equationcap(s*, £) :Å !a√A (N )a/Å£

lcap(a) ,

!a√A (N )a0Å£

f (a) Å f *(£, t*) / !a√A (N )a0Å£

f *(a) , (6)cap(£, t*) :Å !

a√A (N )a0Å£

lcap(a)

which implies that e(£) Å 0 for the nodes £ √ V (N) .for every node £ √ V (N) . The resulting flow network is Hence, f * is an s*t*-flow on N*. One can now character-denoted by N*, where s* and t* are considered to be ize the admissible balanced circulations for N by theircomplementary nodes. Since we have corresponding flows on N*:

cap(s*, £) Å !a√A (N )a/Å£

lcap(a) Å !a√A (N )a0Å£ =

lcap(a)Theorem 5.1. Let N be a balanced flow network withcapacity constraints lcap and ucap, and N* be definedas above. Then, there is an admissible balanced circula-Å cap(£ !, t*), (4)tion on N iff a balanced s*t*-flow f* on N* with val( f *)Å !a√A (N ) lcap(a) exists.N* is balanced. In the case of a subgraph network M,

the network N*M is bipartite, since s* is adjacent with t Proof. (r ) Let f be an admissible balanced circulationand the nodes in V (M) only. Moreover, if we have a(M) on N , and f *, the corresponding flow on N*. Since f (a)å b(M) , then NM and N*M are essentially the same ( t is ¢ lcap(a) is assumed for every arc a √ A(N) , we obtainadjacent with s and s* only) .Let f be a nonnegative balanced circulation for N

f *(s*£) Å !a√A (N )a/Å£

lcap(a) Å cap(s*£) (7)where we require that the upper-capacity constraints aresatisfied but allow that the lower bounds are violated. Wedefine a flow f * for N* by

for every node £ √ V (N) or, equivalently,f *(a) :Å max{0, f (a) 0 lcap(a)}

val( f *) Å !£√V (N )

f *(s*£) Å !a√A (N )

lcap(a) . (8)for every arc a √ A(N) and

f *(s*, £) (R ) Let f * be a balanced s*t*-flow on N* which satisfiesthe Eqs. (7) and (8). Put f (a) :Å f *(a) / lcap(a) for:Å !

a√A (N )a/Å£

( lcap(a) 0 max{0, lcap(a) 0 f (a)}) every arc a √ A(N) . It is obvious that f is admissibleand balanced for N . The flow conservation conditionsfollow byf *(£, t*)

:Å !a√A (N )a0Å£

( lcap(a) 0 max{0, lcap(a) 0 f (a)}) !a√A (N )a/Å£

f (a) Å !a√A (N )a/Å£

( f *(a) / lcap(a))

(9) !

Å f *(s*£) / !a√A (N )a/Å£

f *(a) .for every node £ √ V (N) . We say that f * correspondsto f . It is obvious that f * is admissible and balanced. Fora given £ √ V (N) , we have

Using this reduction mechanism, we can solve the degree-!

a√A (N )a/Å£

f (a) Å !a√A (N )a/Å£

f (a )õlcap (a )

f (a) / !a√A (N )a/Å£

f (a )¢lcap (a )

f (a) constrained subgraph problem as soon as we have effi-cient methods for the maximum balanced flow problem. Agood characterization of minimum-deficiency matchingsrequires some defect form of Theorem 5.1:Å !

a√A (N )a/Å£

( lcap(a)Let M be a subgraph network; x , a matching for M;

f , the corresponding circulation on NM ; and f *, the s*t*-0 max{0, lcap(a) 0 f (a)} (5) flow on N*M corresponding to f . Then, we say that f *

corresponds to x . Since f (s , £) denotes the degree of £/ max{0, f (a) 0 lcap(a)}) in x , we observe thatÅ f *(s*£) / !

a√A (N )a/Å£

f *(a)def ( x) Å cap(s*, t) 0 f *(s*, t) , (10)

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 9: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 9

extended by ts and st* to an augmenting path inN*M( f ) . An analogous contradiction follows. !def ( x) Å !

£√V (M )(cap(s*, £) 0 f *(s*, £)) , (11)

For algorithmic purposes, statements concerning theand, hence, network N #

M are useless. But we can give another opti-mality criterion:

val( f *) / 2def ( x) Å 2 !£√V (M )

a(£) . (12)Theorem 5.4. Let x be a matching of M, and f, thecorresponding flow on N*M . Then, x has minimum defi-

Note that a flow on N*M corresponds to a flow on NM only ciency iff every valid s*t*-path in N*M( f ) starts with thein special circumstances. But we can restrict an arbitrary arc s*t and ends with the arc st*.balanced flow f * for N*M to a matching x forM by putting Proof. (r ) Let x be minimum deficient so that f is ax({u , £}) :Å f (u , £ !) for every adjacent pair u , £ maximum balanced s*t*-flow on N #

M . If there is a valid√ V (M) . If a flow f * corresponds to a matching x , then augmenting path p in N*M( f ) , at least s*t or st* is on p .f * restricts to x . Denote by N #

M the network N*M where If p would traverse st* but not s*t , then twould be strictlys*-reachable in N #

M( f ) , contradicting Lemma 5.3. If pwould traverse s*t but not st*, we would exchance p bycap(s*, t) , cap(s , t*) :Å a(V (M)) 0 def (M)p ! to obtain a contradiction.(R ) Let y be a minimum-deficient matching; g , the corre-is set. This modification is not made for algorithmic pur-sponding flow on N*M , and def ( y)õ def ( x) . Decomposeposes. But we can identify maximum balanced flows and

minimum-deficiency matchings, then,g 0 f å !

k

iÅ1( fpi / fp =i ) ,

Lemma 5.2. A maximum balanced st-flow on N #M corre-

sponds to a minimum-deficiency matching.where p1 , p2 , . . . , pk are valid in N #

M( f ) . By the choiceProof. Let f be a maximum balanced st-flow on of y , we have f (s*, £) õ g(s*, £) for at least one node

N #M , x the restricted matching, and g , the flow correspond- £ √ V (M) . Hence, there is an augmenting path among

ing to x . Assume that f å/ g and decompose p1 , p2 , . . . , pk which traverses the arc s*£. !

To find a valid augmenting path p as in the this theo-f 0 g å !k

iÅ1( fpi / fp =i ) . rem, one would simply ignore the arcs s*t and st* during

the balanced network search. If t* still is strictly s*-reachable (say by a valid path p) , we would augment onAssume that pi traverses s*. Note that val(g) ° val( f )the paths p , p !, p* :Å (s*, t , s , t*), and p !*. Otherwise,and f (s*, t) ° g(s*, t) so that pi would traverse an arcif t is reached (say by a path q) , we would augment ons*u , u √ V (M) . But g(s*, u) õ a(u) implies that g(s ,q"( t , s , t*) and (s*, t , s) "q !. In either case, we obtain au) Å 0. Since we have g(u , £ !) Å f (u , £ !) for any £flow which corresponds to a matching again.√ V (M) , the node u cannot not be left by pi , a contra-

diction. If follows that no node in V (M) is traversed byp1 , . . . , pk . Hence, f å g holds. !

6. DISTANCE LABELSLemma 5.3. Let f be a maximum balanced s*t*-flow

Of course, we are interested in efficient techniques toon N #M . Then, neither s nor t are strictly s*-reachable decide whether valid st-paths exist, and, if so, to obtainin N #

M . such a path. Kocay and Stone [20] devised a BNS proce-Proof. Suppose, otherwise, that p is a valid s*s-path dure which determines a valid st-path in O(n 2)-time. We

in N #M( f ) which does not traverse t . Note that f (s*, t) will present methods which even run in (almost) O(m)

Å a(V ) 0 def (M) by Lemma 5.2. But then we have time in [10] and [11].def (M) ú 0 since f (s*, £) õ a(£) for at least one node The balanced augmentation algorithm together with£ √ V (M) . such a procedure will behave polynomially, if the maxi-Hence, p could be extended by the arc st* to an aug- mum flow value on N polynomially depends on the en-

menting path in N*M( f ) . The augmented flow would cor- coded length of the network N . This is satisfied for NM ,respond to a matching again, contradicting the definition where M is an instance for the f-factor problem on simple

graphs.of N #M .

A valid s*t-path which does not traverse s could be In this section, we will show that the number of aug-

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 10: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

10 FREMUTH-PAEGER AND JUNGNICKEL

mentation steps can be made independent from the arc As p is minimum valid, we have ÉpÉ ° Ép1É. Then,(13) shows ÉqÉ ¢ Ép2É and, hence, ÉqÉ ¢ ÉpÉ, so ÉpÉcapacities by choosing minimum-length valid st-paths at

every single step. The distances of nodes on valid paths Å ÉqÉ. !are called balanced distances.With respect to the sources , we define distance labels by If we partition the augmentation step along any pair

of paths pj and p !j into balcap(pj) augmentation along pjd(£) :Åmin{! , {ÉpÉ : p is a valid s£-path in N( f )}}. and p !j , Theorem 6.2 shows that the length of the paths

pj derived by the balanced augmentation algorithm cannotAny valid s£-path q with ÉqÉ Å d(£) is called minimum decrease. Let 2n :Å £al( f ) be the value of the maximumvalid or simply a d(£)-path. In what follows, we consider balanced flow f computed by the algorithm. We collectthe method BNS to be implemented in such a way that all augmenting paths of equal length into the setall paths p1 , p2 , . . . , pj determined for augmentation areminimum valid. This section contains an analysis of the phasei :Å {pj : 1 ° j ° n, ÉpjÉ Å 2i / 1}number of augmentation steps of the balanced augmen-tation algorithm under this assumption. The key to our and call any period during which the balanced augmen-results is the observation that antiparallel arcs are rela- tation algorithm derives d( t)-paths of equal length atively rare within the paths p1 , p2 , . . . , pj : phase. The existence of phases, as implied by the last

theorem, is crucial for efficient implementations of theLemma 6.1. Let p be a d( t)-path in N( f ) , and u£ !,method.some arc on p. Then, p traverses neither £ !u nor u !£.

Proof. Since valid paths are simple, p cannot contain Corollary 6.3. Let p, q be paths as in Theorem 6.2 ,any pair u£ !, £ !u of antiparallel arcs. Now assume that p assume that ÉqÉ Å ÉpÉ , and let u£ ! be some arc on q.traverses some arc pair u£ !, u !£. Then, p can be written Then, p traverses neither £ !u nor u !£.as p Å p1 " u£ ! " p2 " u !£ " p3 or p Å p1 " u !£ " p2 " u£ !

Proof. Suppose otherwise, so that p contains £ !u or" p3 for certain paths p1 , p2 , p3 .u!£. Then, we would have d(u£ !) Å 0 in the proof ofWe shorten p by setting p :Å p1 " p !2 " p3 . By this Theorem 6.2, and, hence, 2(ÉpÉ / ÉqÉ) ú P(d) , that is,operation, p looses exactly two arcs, has not to be a simplethe inequality (13) would be strict. !path any longer, but can be shortened again to a simple

st-path q . This path q not only is simple, but also validThe preceding corollary is important for two reasons:in N( f ) , since q only contains arcs of p and p!, and q

First, it shows that all augmentation steps of a singlecan contain a pair a , a ! only if p has traversed both arcsphase commute, that is, those steps can be swapped with-a , a ! before. Since q is strictly shorter than p , we obtainout turning intermediate flows inadmissible. Moreover,a contradiction to the choice of p . !the number of augmentation steps of any phase i can nowbe bounded from above: Each path pj √ phasei containsTheorem 6.2. Let p be a d( t)-path in N( f ) , put gat least one arc a that prevents us from increasing the:Å f / fp / fp = , and let q be a d( t)-path in N(g) . Then,flow value by more than balcap(pj) units; such an arc isÉpÉ ° ÉqÉ holds.called a blocking arc on pj .Proof. Let h :Å g / fq / fq = and assume that ÉqÉ If a is blocking and pj does not traverse a !, then re-° ÉpÉ. As explained at the end of Section 3, we can scap(a) Å 0 holds after iteration j . Otherwise, if a! isconsider f and g as circulations. By Theorem 4.1, we also on pj , after this augmentation step, rescap(a) ° 1have holds. Because of Corollary 6.3, rescap(a) cannot in-crease in phase i again. In particular, any arc a can occur

d :å h 0 f å !k

iÅ1( fpi / f !pi) , as a blocking arc at most twice within a given phase.

Since the complementary arc a! occurs as a blockingarc whenever a does, and since the reverse arcs aV and aV !where p1 , p2 , . . . , pk are valid cycles in N( f ) . We have do not occur in this phase at all (by Corollary 6.3) , wed( ts) Å 4; hence, there are exactly two augmenting pathsconclude ÉphaseiÉ ° m / n . Obviously, the length ofamong p1 , p2 , . . . , pk . Without loss of generality, let p1 , any valid st-path is odd and restricted by the total numberp2 be these paths and Ép1É ° Ép2É. Using P(d) as givenof nodes of N , so the balanced augmentation algorithmin the proof of Theorem 4.1, we observeruns in at most n phases. We get the following importantresult:2(ÉpÉ / ÉqÉ) ¢ P(d)

Å 2(Ép1É / Ép2É / rrr / ÉpkÉ) (13) Theorem 6.4. If all derived augmenting paths are mini-mum valid, the balanced augmentation algorithm consists¢ 2(Ép1É / Ép2É) .

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 11: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 11

of O(n) phases, and each phase consists of O(m / n) traverses at most (1/r)(n 0 r) backward arcs. In particu-lar, we haveaugmentation steps. !

There still remains the problem how to find a d( t)-d( t) ° 2

r(n 0 r) / 3path efficiently. As we will see in [11], this can be done

with a calculus which generalizes the state-of-the-art algo-rithm of Micali and Vazirani [23] for the cardinality Å 2n

r/ 1 ° 2

√n / 1 ° 2!

√n " / 3,

(14)

matching problem. In fact, one of the major advantagesof phase ordering is the following: The augmenting pathsof each phase have not to be computed independently, so since, trivially, n ° n . Hence, at most !

√n " / 1 phases

that the computational effort may be decreased consider- occur before f is constructed, and at most r Å #√n$

ably. Especially in the case of the cardinality matching ° !√n " / 1 phases occur after the construction of f . This

problem, considerably stronger complexity bounds are is the bound O(√n ) . !

available. The following result is due to Hopcroft andKarp [16].

7. WEIGHTED PROBLEMSLemma 6.5. Let NG be the 0–1-balanced flow networkassociated with graph G. If all derived augmenting paths

To conclude the discussion of optimality criteria for bal-are minimum valid, the augmenting paths of a particularanced network flows, we must say something aboutphase are pairwise disjoint.weighed problems. Although the optimality criteria are

Proof. Let p1 , p2 , . . . , pr be the augmenting paths simple, the respective algorithms seem rather involved.computed during some phase of the algorithm, and f , the Assume that N is a balanced flow network with lower-flow just before the first augmentation step of this phase. and upper-capacity bounds and, in addition, that a costSince there are no antiparallel arc pairs among p1 , p !1 , label g(a) Å g(a !) is assigned with every arc a √ A(N) .p2 , p !2 , . . . , pr , p!r , the augmenting paths are at least Let us call a balanced circulation f optimum iffedge-disjoint.Let u be an outer node other than t . In the case of f (s , g( f ) :Å %

a√A (N )

g(a) f (a)u) Å 1, there is a unique node £ with f (u , £ !) Å 1.Otherwise, we have f (s , u) Å 0. In either case, there isonly one arc a with rescap(a) ú 0 and end node u . is minimum among all balanced circulations on N . If pHence, the node u can be traversed by at most one of the is a valid path in N( f ) , we also write g(p) :Å g( fp) .paths p1 , p !1 , p2 , p !2 , . . . , pr , p !r . An analogus statement There is an obvious linear reduction of all given matchingholds for the inner nodes other than s . ! problems to these class of flow networks.

Theorem 6.6. Let NG be the 0–1-balanced flow network Theorem 7.1 (Primal Approach). Let f be a balancedassociated with graph G. If all derived augmenting paths circulation on the balanced flow network N. Then, f isare minimum valid, the balanced augmentation algorithm optimum iff there is no valid cycle p in N( f ) with length

g( p) õ 0 .consists of O(√n ) phases.

Proof. Let g be optimum and decomposeProof. Let 2n be the value of a maximum balancedflow on NG , r :Å #

√n$ . If we have 2(n 0 r) ° 0, the

assertion is obvious. Hence, let 2(n 0 r) ú 0, let f be g 0 f å %k

iÅ1( fpi / f !pi) ,the balanced flow of value 2(n 0 r) which is constructed

by the algorithm, and let g a maximum balanced flow onNG . By Theorem 4.1, we can write where p1 , p2 , . . . , pk are valid in N( f ) . Since g(g)

0 g( f ) õ 0, and since g is linear, we can find an indexi so that g(pi ) õ 0. !g 0 f å %

k

iÅ1( fpi / f !pi) ,

We have shown how to find some admissible balancedcirculation. But remember how difficult primal algorithmswhere p1 , p2 , . . . , pk are valid in N( f ) , r ° k and p1 ,

p2 , . . . , pr are augmenting. for the ordinary max-flow problem are to implement effi-ciently. It is an open question if the ideas used there applyNote that p1 , p !1 , p2 , p !2 , . . . , pr , p !r are pairwise

disjoint and can traverse at most val( f ) Å 2(n 0 r) also to balanced flows. To our knowledge, a pri-mal matching algorithm has been deviced only once, forbackward arcs altogether. Thus, at least one of the paths

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 12: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

12 FREMUTH-PAEGER AND JUNGNICKEL

the perfect matching problem by Cunningham and anced augmentation algorithm are special implementa-tions of the PD algorithm. A description of the PD algo-Marsh [4] .

We may be interested in a balanced st-flow f of given rithm would require an LP formulation of balanced circu-lations, which is nontrivial and therefore omitted. Anvalue n with g( f ) minimum. Such a flow is called (n)-

optimum. Note that we do not need to distinguish be- PD-optimality criterion would result from the comple-mentary slackness conditions.tween (n)-optimum and extreme flows as in the graph

theoretical context. If f å 0 is (0)-optimum, a series of(n)-optimum balanced flows can be derived using thefollowing idea: 8. TENACITY LABELS

Theorem 7.2 (SAP Approach). Let f be a (n)-optimum This section deals with the distance between the nodesbalanced st-flow on the balanced flow network N, and p, of any balanced network N with respect to valid paths,a shortest valid augmenting path in N( f ) . Then, g :å f now that we have seen their relevance for matching algo-/ fp / fp = is (n / 2)-optimum balanced. rithms. To this end, we will classify the arcs of N . We

will use another labeling t : V (N) ! A(N) r N! associ-Proof. Suppose that g is not (n / 2)-optimum bal- ated with the distance function d , the so-called tenacityanced. If we put lcap( t , s) :Å n and ucap( t , s) :Å n in which is defined byN , we can find a valid cycle q in N(g) with length g(q)õ 0. Let h :å g / fq / fq = and decompose t(w) :Å d(w) / d(w !)

h 0 f å !k

iÅ1( fpi / f !pi) , t(u , £ !) :Å d(u) / d(£) / 1

for all nodes u , £, w √ V (N) . The tenacity will be usedwhere p1 , p2 , . . . , pk are valid in N( f ) . Without loss of to decide within the computation of d or a d( t)-pathgenerality, let p1 be the augmenting cycle among p1 , p2 , which arc should be investigated next. Since u and £ have. . . , pk . Since p2 , . . . , pk do not traverse the return arc the same, but w and w! have different parity for eachin either direction, we obtain g(p2) ¢ 0, . . . , g(pk) ¢ 0. node £ in V (N) , tenacity labels are always odd or infinite.Observe that We also note that tenacity labels are invariant under com-

plementarity, that is, t(w) Å t(w !) and t(u , £ !) Å t(£,g(p) / g(q) Å g(p1) / g(p2) / rrr / g(pk) u !) hold.

and g(p2) / rrr / g(pk) ¢ 0 ú g(q) . Hence, we have Lemma 8.1. Let N be a balanced network and assumethat g(p1) õ g(p) , a contradiction. ! that t is strictly reachable. Then, t(w) , t(a)° d( t) holds

for every node £ and every arc a traversed by some d( t)-An algorithm is known which determines a shortest path q.

valid augmenting path in polynomial time. It is a primal-Proof. If we assume that u£ ! Å a and use the fact thatdual procedure and was described by Goldberg and Kar-

the complement of a valid path is a valid path again, thezanov [14]. By the reduction principle of Section 5, theassertion follows by observing thatSAP approach applies to the problem of finding an opti-

mum balanced circulation and, in turn, to all discussedd( t) Å ÉpÉ Å Ép[w]É / Ép[w , t] !É

(15)matching problems.Note that a maximum balanced flow of minimum costs ¢ d(w) / d(w !) Å t(w)

can be found by an SAP algorithm efficiently only ifthe maximum flow value depends polynomially on the andnetwork size, that is, the f-factor problem for simplegraphs is solved efficiently, but not the general problem. d( t) Å ÉpÉ Å Ép[u]É / É(u , £ !)É

(16)The traditional approach to weighted matching prob-/ Ép[£ !, t] !É ¢ d(u) / d(£) / 1 Å t(a) .lems is the primal-dual approach which depends on the

famous algorithm given by Edmonds [6] . PulleyblankHere, p[x] denotes the part of a simple path p until x is[25] and Marsh [22] applied the idea to capacitatedreached, and p[y , z] denotes the subpath of p connectingmatching problems, by mere reduction to the perfecty and z . !matching problem. In the latter paper, scaling techniques

were used, so that the resulting algorithm is weakly poly-nomial. The distances of the source s to the nodes in V (N)

with respect to arbitrary directed paths can be obtainedIt should turn out that the SAP algorithm and the bal-

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 13: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 13

õ d(£) õ d(£ !) , neither £ nor £ ! can occur on q . Inparticular, r :Å q!u !£ is a valid s£-path. Since p[u ! is avalid su !-path, ÉqÉ / 1 ° ÉpÉ holds. If even ÉqÉ / 1õ ÉpÉ would hold, we would have ÉrÉ õ ÉpÉ in contra-diction to the minimality of p . Thus, r is a d(£)-path andd(£) Å d(u !) / 1 holds. "

Fig. 5. Choosing an appropriate predecessor. If u ! and £ are nodes as in Lemma 8.2, we call u! apredecessor of £ and the arc u !£ a prop. Every arc whichis neither a prop nor a co-prop is said to be a bridge.by a breadth-first search—hence, in O(m) steps. This is

usually used by augmentation algorithms for the maxi-Corollary 8.3. Let £ x s be a minlevel node of N. A pathmum-flow problem. Here, the BFS grows an arborescencep is a d(£)-path iff p Å q!u !£ holds for a prop u!£ andthat contains a minimum-length directed path for eacha d(u !)-path q. "node reached before.

The following simple example shows that minimumvalid paths cannot be determined in this manner. It is also The simple proof of the following observations maya counterexample for the incorrect cardinality matching be left to the reader:algorithm of Pape and Conradt [24] (see [17]) .Figure 5 consists of a simple graph G and a matching Observation 8.4. In any balanced network N, the follow-

x of G (consisting of the lines in bold face) . There is ing hold:some additional information shown which previews thecorrect computation of the balanced distances with respect (a) A co-prop never is a prop.to NG( f ) , but which shall not be described yet. It is easy (b) A co-bridge a! is a bridge itself, and t(a) Å t(a !).to see that d(3 !) Å 2 and d(3) Å 9 hold and that the (c) Every loop is a bridge. "unique d(3)-path is (s , 9, 1 !, 2, 7 !, 8, 6 !, 5, 4 !, 3) .Hence, node 3 has tenacity t(3) Å 11. Suppose that we

In Section 12, we will prove that only bridges a withhave computed d(£) and some predecessor of £ on a d(£)-t(a) ° t(£) can occur on d(£)-paths. In particular, if £path for every strictly reachable node £ (In this network,is a maxlevel node, every d(£)-path is proven to traverseevery node but 4 ! has a unique predecessor.)exactly one bridge a of tenacity t(a) Å t(£) . Such aThe predecessor function determines an arborescence.bridge a is said to be a petal of node £. The role ofWe might expect this tree to contain a system of minimumpetals for maxlevel nodes is analogous to that of propsvalid paths for all strictly reachable nodes. Unfortunately,for minlevel nodes in the reconstruction of (minimum)the only d(3)-path is not entirely contained in this treevalid paths.since the predecessor of 6! is not the node 8 but 4, andThere is a class of bridges that cannot occur on mini-not even d(3) Å d(4 !) / 1 holds!

mum valid paths at all: Suppose that not only the arc aNevertheless, the distance labels d can be computedbut also its reverse arc aV are bridges and that t(a) ° t(aV )in approximately O(m) steps. Micali and Vazirani [23]holds. We will show later that then only a can be traversedsolved this task for the cardinality matching problem byby a minimum valid path. In this context, the next lemmaan appropriate classification of the edges of the graphshould be noted:G which is generalized to balanced networks in what

follows.Lemma 8.5. Let a Å u£ ! and aV Å £ !u be bridges andLet £ and £ ! be two complementary nodes with d(£)assume that t(a) is finite. Then, t(a) x t(aV ) holds.õ d(£ !) . Then, we call £ a minlevel node and £ ! a max-

level node. For example, the source s is a minlevel node, Proof. For u Å £, trivially, t(a) Å 2d(u) / 1and its complementary node t , a maxlevel node. The dis-x 2d(u !) / 1 Å t(aV ) holds. We therefore assume that utinction between minlevel and maxlevel nodes is reason-x £ and t(a) Å t(aV ) õ ! . Then, either u is a minlevelable, since minlevel node distance labels can be computed and £ is a maxlevel node or vice versa. Since a and a!by a rudimentary BFS, as the following lemma shows: are complementary, we can assume u to be the minlevelnode.Lemma 8.2. Let £ x s be a minlevel node; p, a d(£)- For reasons of parity, d(u) and d(£ !) cannot bepath; and u !, the predecessor of £ on p. Then, d(£) equal. If d(u)õ d(£ !) holds, no d(u)-path p can traverseÅ d(u !) / 1 holds, and any d(u !)-path can be extended £ or £ !. Thus, p!a is a d(£ !)-path, and a , a prop. In theto a d(£)-path by appending u!£. same manner from d(£ !) õ d(u) , we conclude aV to bea prop. "Proof. Choose some d(u !)-path q . Because of d(u !)

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 14: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

14 FREMUTH-PAEGER AND JUNGNICKEL

are almost equivalent to those of Tutte. No one has ex-plained the relationships precisely up to now. Before wecan do this, we need some formalism.We call an arc (u!, £) √ A(N) strictly accessible iff

u !£ is traversed by some u !£-accessing path p . By that,we denote a path starting at s such that p[u!] is simple,and no arc pair a , a ! with rescap(a) Å 1 is traversed byp . If p is a valid s£-path, and u !, the predecessor of £ onp , then p is u !£-accessing. As a slight generalization, ona u !£-accessing path, £ can be traversed by p[u!] oncebefore. For example, props are always strictly accessible.It turns out that a bridge is strictly accessible iff it has

Fig. 6. The residual network associated with the example finite tenacity.in Figure 2. A strictly accessible arc a is said to be bicursal iff a!is also accessible and unicursal otherwise. Iff neither anor a! is accessible, then both arcs are called acursal.On the other hand, the reverse arc of a bridge may be

a prop, and some node cannot be reached without this Let Bic(N) denote the set of all bicursal arcs of N , andN[Bic(N)] , the subnetwork of N which has arc setbridge sometimes. To see this, we consider the multigraph

G Å (V, E , c) of Figure 2 and the subgraph network M Bic(N) and the end nodes of bicursal arcs as nodes. Theconnected components of N[Bic(N)] are called the blos-:Å (V, E , c , 2, 2) again which models the search for a

2-factor of G . We also use the matching x shown there soms or the bicursal components of N as in the originalpaper of Tutte. For every node £ incident with any bicursaland the corresponding flow f on NM .

Since the networks NM and NM( f ) associated with M arc, we denote the blossom containing £ by B(£) .For example, all arcs on a valid st-path p are bicursalare quite large in general and in particular for our running

example, we chose a more economic representation of since p ! is also valid. In particular, B(s) and B( t) coin-cide. On the other hand, both end nodes of a bicursal arcthe residual networks NM( f ) that depicts the underlying

multigraph G(M) and is to be read in the following man- u£ ! have finite tenacity, since all of u , £ !, £, and u ! arestrictly reachable. This suggests another subgraph struc-ner: Only the minlevel nodes are shown, so that some

nodes of G with infinite tenacity are neglected. Forward ture depending on the tenacity labels:For every balanced network N , an edge cut Q(N)edges with respect to NM are drawn in thin, backward

edges in bold-faced lines. If £ is a predecessor of node :Å [S , T] exists which divides its node set into reachableand unreachable nodes with respect to s . This cut is de-w !, the representation contains an arc directed from £ and

£ ! to w !. The prop gets a double arrowhead iff its residual fined by S :Å B !/ C and T :Å B! !/ D, where we putcapacity is greater than one. Co-props and bridges a witht(a) Å ! are not represented, while the remaining bridges B :Å {£ √ V (N) : d(£) õ ! , d(£ !) Å !}are represented in complementary pairs by an undirected

C :Å {£ √ V (N) : d(£) , d(£ !) õ !}edge. We warn the reader that this representation alreadyuses information which is not yet available to us! Å {£ √ V (N) : t(£) õ !}Figure 6 depicts the residual network NM( f ) belonging

D :Å {£ √ V (N) : d(£) , d(£ !) Å !}.to our running example in which (s , 10, 8 !, 7, 3!, 6, 1 !,2, 6 !, 5, 10 !, t) occurs as a d( t)-path. This path traversesthe bridge (3 !, 6) , but at the same time 6 is a predeces- The set C is called the core of N . For the time being, we

are not interested in the cut Q(N) , but only in the con-sor of 3 !. Thus, a system of d(£)-paths to each node £√ V (NM) can contain antiparallel arcs. In our example, nected components of the subnetwork N[C] which contain

precisely the arcs of N with both end nodes in the core.we could choose another d( t)-path, but, in general, wecannot avoid such situations. These connected components are called the nuclei or bi-

cursal units of N . Furthermore, the nucleus containing anode £ √ C is denoted by U(£) .Consider Figure 7 which shows the residual network9. BLOSSOMS AND NUCLEI

according to a 2-factor search. In this example, two blos-soms exist which consist of 1, 3, 4, and their complemen-In this section, we present two closely related subgraph

structures which have been used in Tutte [26] first, called tary nodes and s , 7, 8, 11, 12, 13, and their complements.Both blossoms are joined by the unicursal arc (13, 3!)blossoms and nuclei in what follows. Both notions are

almost equivalent, and subsequent authors in matching and, hence, form a nucleus together. This proves thatblossoms and nuclei are, in general, not the same. How-theory have introduced a series of notions which, in turn,

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 15: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 15

soms by their base and the tenacity labels, but needs alot of effort to show the crucial uniqueness of blossombases.We will use a logical arrangement similar to that of

Kocay and Stone [19] and will easily derive general re-sults which can be applied to the analysis of any matchingalgorithm based on augmentation. We later pay a pricefor this, since it will be more involved to relate the tenac-ity labels to the blossoms occurring in the computationof minimum valid paths.

Theorem 9.2 (Base Identity for Blossoms). Let B is ablossom not containing the source s. Then, there is a propa Å ub with rescap(a) Å 1 which is traversed by everyvalid path p connecting s to a node £ in B. Furthermore,p[u] ⊆ S"B and p[b, £] ⊆ B hold.

Proof. Let £ be any node in B . Since £ is incident withFig. 7. Blossoms and nuclei.some bicursal arc, £ is strictly reachable. Let p be a valids£-path and a Å ub the last unicursal arc on p . Such anarc exists since B x B(s) is assumed. We will prove thatever, blossoms and nuclei have a lot of structure in com-a is the desired arc.mon. We shall see later that every nucleus is the disjointSince b is incident with some bicursal arc, b ! is alsounion of blossoms.

strictly reachable. Choose some valid sb !-path q . ThisIf t is not strictly reachable, we also call the nucleipath must traverse a since, otherwise, q ! a ! would beodd components. This terminology is motivated bya !-accessing. But then a and a! would be bicursal arcs,Tutte’s factor theorems [26] which are not discussed here.contradicting the choice of a . For the same reason,On the other hand, if t is strictly reachable, s and t are inrescap(a) Å 1 holds.a common nucleus since every valid st-path is entirelyLet x be the first node on q[b] such that x or x! is oncontained in a blossom as noted above.

q[b , b !] . If x and b would differ, then either q[x] ! q[x ,As a familiar example, consider any residual networkb !] or q[x] ! q[b , x !] ! would be a valid sb!-path notN( f ) . Here, the set T may be empty in special circum-containing a . But, then, a ! would be strictly accessible,stances like the case f å 0, while S will at least containa contradiction.the source s . Using Theorem 4.2, maximum balancedHence, q[b) and q[b , b!] are strictly disjoint, q[b]flows can be characterized as follows:

! q[b , b !] and q[b] ! q[b , b !] ! are valid, and all arcs onq[b , b !] are bicursal. Thus, we haveObservation 9.1. Let N be a balanced flow network, and

f, a balanced st-flow on N. Then, the following statementsB0 :Å q[b , b !] ! q[b , b !] ! ⊆ B .are equivalent:

(1) The flow f is a maximum balanced flow. Suppose the existence of a node x √ B0 and a valid sx-(2) The sink t is not strictly reachable in N( f ) . path r not containing ub . Let y be the first node in B0(3) The edge cut Q(NM( f )) is an st-cut. visited by r . Then, either r[y] ! q[y , b !] or r[y] ! q[b ,(4) The source s is not contained in any blossom y !] ! would be a valid sb!-path not containing a , a contra-

of N( f ) . " diction.Using induction on ÉB0É, we prove that also the re-

maining vertices z √ B"B0 can be reached only if the arcNext, we prove that one can associate with every blossomB of N a unique node, called the base of B , which con- a is traversed. To see this, choose any arc zx with z

√ B"B0 , x √ B0 and rescap(z , x) ú 0. Such an arc existsnects this blossom and the remaining nodes of N in avery special manner. A corresponding result for the nuclei as long as there are nodes in B"B0 .

If some valid sz-path r would not contain the arc a ,of N follows.Nearly all papers on matching algorithms deal with then r would not traverse B0 at all, and r ! zx would be

a valid sx-path not containing a , a contradiction. Next,some notion of blossoms and blossom bases. In the setupof Edmonds [7] who introduced the floristic terminology, consider a valid sz !-path q and the first vertex y √ r[b ,

z] ! r[b , z] ! on q . We either get the valid sz-path q[ y]the determination of a blossom base is straightforward.Vazirani [28] takes a different approach, defining blos- ! r[ y , z] or the valid sb!-path q[ y] ! r[b , y !] !, which

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 16: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

16 FREMUTH-PAEGER AND JUNGNICKEL

proves that a is also on q[ y] . If we set B0 :Å B0 ! {z , the hypothetical arc £w cannot exist, and p ⊆ B indeedholds. !z !} and iterate this induction step until B Å B0 holds, the

uniqueness of ub is evident.By choice of a , one has p[b , £] ⊆ B . Suppose that If B and b are as in Theorem 9.2, we call base(B)

p[u] contains some further node x also in B . We already :Å b the base of the blossom B and denote the prop a byknow that p[x] traverses the arc a itself. Since p is simple, prop(B) . If t is strictly reachable, and B is the blossomwe obtain a contradiction. containing s and t , we set base( B) :Å s .Finally, to prove the claim that a is a prop, we consider We also consider each node £ which is strictly reach-

some d(b !)-path q . Since a is on q , we have d(b) able, but not on some bicursal arc to be in a blossom,õ d(b !) , that is, b is a minlevel vertex. Furthermore, we namely, the bud B(£) Å B(£ !) :Å {£, £ !}, andknow that a is the last arc of any d(b)-path. By definition, base(B(£)) :Å £ to be the base of this bud. This notiona is a prop. ! is motivated by the balanced network search algorithms to

be discussed later. Where necessary, we call the blossomsother than buds proper. Note that buds are likewise self-Corollary 9.3. Every blossom is self-complementary.complementary.

Proof. First, consider the case s √/ B and the proof of By the base identity, all proper blossom bases are min-Theorem 9.2: In the beginning, B0 Å q[b , b !] ! q[b , level nodes. Obviously, this is also true for buds. Indeed,b !] ! is self-complementary, and at the end, B0 Å B holds. buds often behave like proper blossoms in algorithms.With induction on the steps B0 :Å B0 ! {z , z !}, we However, buds are not connected and can be reached byobtain that likewise B is self-complementary. more than one prop in general.Now, let B Å B(s) . Altogether, the blossoms partition

Bic(N) , and by the first case, all blossoms different from Corollary 9.6. Any valid s£-path p traverses any blossomB are self-complementary. Obviously, Bic(N) , and like- at most once. Every proper blossom B x B(s) traversedwise B are self-complementary. ! by p is reached by prop(B) .

Proof. Let x be the last node on p that is also in B .Corollary 9.4. If B is a blossom of N, then N[B] entirely The assertion follows by applying Theorems 9.2 and 9.5consists of bicursal arcs. to p[x] . !

Proof. Suppose that xy ! is a nonaccessible arc with y!Next, we consider minimum valid paths: Let £ be in a√ B . Since y and y ! are strictly reachable, every valid

blossom and b Å base(B(£)) . By the base identity, theresy-path q has to traverse xy !. If we put b :Å y ! and £are valid b£-paths which are entirely contained in B(£) .:Å y , the proof of Theorem 9.2 shows that a and xy! areLet d(b , £) denote the minimum length of such a b£-equal. In particular, x is not in B . !path. The corresponding b£-path is called a d(b , £)-path.

Theorem 9.5. If B is a blossom containing s, and u Corollary 9.7. Let £ be in a proper blossom with baseanother node in B, then every valid su-path is entirely b Å base(B(£)) . A path p is a d(£)-path iff p Å q " rcontained in B. holds for a d(b)-path q and a d(b, £)-path r. !

Proof. Suppose that p contains nodes not in B and thatCorollary 9.8. Let p be a d(£)-path; B, a blossom visited£w is the last unicursal arc on p . Since w and w! areby p, b :Å base(B) the first, and x, the last node of B onstrictly reachable, every valid sw !-path q has to traversep. Then, p[b, x] is a d(b, x)-path. !£w . As in the last proof, we conclude that all arcs on

q[w , w !]! are strictly accessible, that is, B0 :Å q[w , w !]! q[w , w!] ! ⊆ B . Furthermore, all nodes in B0 can only We stress that valid b£-paths p of length ÉpÉ õ d(b ,be reached if £w is traversed, since, otherwise, w!£ !would £) can exist which contain nodes not in B(£) . An examplebe strictly accessible. for this is given in Figure 8 which depicts the residualSince B is a connected component of N[Bic(N)] , there graph according to some 1-factor search. Here, exactly

is some undirected sw-path r in N[B] . Let zx be an arc one blossom exists, which has base 3, and the d(3, 5)-on r with x √ B0 , z √/ B0 . As in the last proof, it is path is (3, 1!, 2, 10!, 9, 8!, 7, 6!, 5) . The shorter pathevident that every valid sz-path and every valid sz !-path p :Å (3, 1 !, 2, 3 !, 4, 6 !, 5) is valid, but visits node 4,must traverse £w . Then, we set B0 :Å B0 ! {z , z !} and which is not in B(3) . Note that the concatenation of the

only d(3)-path (s , 11, 4!, 3) and p is not a valid path,choose another arc zx with x √ B0 , z √/ B0 .There is only a finite number of arcs on the path r . since both arcs (4!, 3) and (3 !, 4) are traversed.

As the preceding corollaries show, the determinationUsing induction on ÉrÉ, we see that the source s can onlybe reached if £w is traversed which is absurd. Thus, of minimum valid paths in a balanced network N naturally

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 17: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 17

First, we give a characterization of the bicursal bridgesof N .

Theorem 9.10. Let a be a bridge. The following state-ments are equivalent: (a) t(a) is finite. (b) a is containedin a proper blossom. (c) a is bicursal. (d) a is containedin a nucleus.

Proof. Write a Å: u£ !. The implications (c) r (b) ,(b) r (d) , and (d) r (a) are trivial. Thus, we only haveto prove the implication (a) r (c) .Hence, t(a) Å d(u) / d(£) / 1, and, especially, d(u)

and d(£) are finite. If a is a loop, that is, u Å £, then aÅ uu ! Å (uu !) ! Å a ! is bicursal indeed. Otherwise, weFig. 8. Traversing a blossom.can assume that d(u) ° d(£) õ ! since a ! is also abridge, and properties (a) and (c) are self-complemen-tary. Let p be a d(u)-path. Then, p ! a is a-accessing. Ifsplits into two parts, namely, traversing the various blos-p ! a is not valid, then £ ! is already on p .soms and traveling from blossom to blossom. We firstSuppose that a is unicursal. Then, a would be traversedpay attention to the latter task and the construction of

by every d(£)-path q , and £ ! would be a minlevel node.the layered auxiliary network Aux(N) : The nodes ofSince a is not a prop, there is a d(£ !)-path r that doesAux(N) are the blossom bases of N . Two bases u and £not contain a . Let x be the first node on r such that x orare connected by an arc u£ √ A(Aux(N)) iff there is ax ! is on q[£ !, £] . Then, either r[x] ! q[x , £] or r[x]predecessor w of £ with u Å base(B(w)) . The capacity! q[£ !, x !] ! would be a valid s£-path, a contradiction. "assigned to the arc u£ is

Corollary 9.11. The network N[Bic(N)] has node set C.auxcap(u , £) :Å rescap(w , £) ,Hence, every nucleus splits into proper blossoms. Everybud consists of a node in B and its complementary nodeand we identify u£ and the prop w£ sometimes. In particu-in B!.lar, Aux(N) has parallel arcs for each prop with end node

£ and start node in B(w) . By application of Corollaries Proof. By definition, N[Bic(N)] is a subgraph of8.3 and 9.7 to u£, we obtain the inequality N[C] . Let w be a strictly reachable maxlevel node; p , a

d(w)-path; and x !, the predecessor of w on p . Since x!wd(£) Å d(u) / d(u , w) / 1 ú d(u) . (17) is not a prop, it is either a co-prop or a bridge. In the

former case, x!w is bicursal by definition; in the latter, itThus, the network Aux(N) is acyclic, and for this reason, is bicursal by Theorem 9.10. Thus, every node in C iswe use the term layered. The layers consist of those incident with some bicursal arc. "bases with equal distance label d . Furthermore, Aux(N)is connected, and s is its unique root, as is seen from the Corollary 9.12. Every nucleus is self-complementary.following lemma: "

Lemma 9.9. Let b be a blossom base and p Å (xi ) kiÅ0 Theorem 9.13 (Base Identity for Nuclei) . Let U be abe some d(b)-path with respect to N. Then, aux(p) nucleus. If U does not contain the source s, then there is:Å (xi : xi is a blossom base) kiÅ0 determines a directed a prop ub with rescap(u, b) Å 1 which is traversed bysb-path in Aux(N) . On the other hand, to any directed every valid path p connecting s to a node £ √ U, andsb-path p in Aux(N) , a d(b)-path with respect to N with p[u] ⊆ S"U and p[b, £] ⊆ U hold. If U Å U(s) , thenp Å aux(p) exists. every valid path which connects s to a node £ √ U is

entirely contained in U.Proof. Both claims hold trivially if b and s are equal.For any other blossom base, use Corollaries 8.3, 9.7, and Proof. Suppose that two proper blossoms B1 , B2 ⊆ Uinduction on d(b) . " are adjacent by some arc pair a , a !. By Theorem 9.10,

we can assume that a is a prop. By the base identity forblossoms, a either is prop(B1) or is prop(B2) . In theWe now establish similar results for the nuclei of N

which also describe their relationship to the blossoms. In former case, (base(B2) , base(B1)) is an arc of Aux(N) ;in the latter, (base(B1) , base(B2)) is an arc of Aux(N) .the context of the cardinality matching problem, both

notions coincide which is proven at the end of this section. By the base identity, every blossom base has a unique

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 18: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

18 FREMUTH-PAEGER AND JUNGNICKEL

predecessor in Aux(N) . Hence, the blossom bases of the For the most important application, namely, computinga d( t)-path, the usage of blossoms and the layered net-nucleus U span an arborescence T in Aux(N) since U is

connected. Let b be the root of T . Then, every s£-path work is rather limited, since either t is not strictly reach-able or every d( t)-path is entirely contained in the blos-meets b by Lemma 9.9. The remainder of the proof is a

straightforward application of Theorems 9.2 and 9.5. ! som B(s) . For this reason, all popular algorithms reusefor expanding the information which has been collectedduring the shrinking phase. This makes the expansionCorollary 9.14. Two blossoms are connected by at mostprocess deterministic. In this section, we discuss the re-one arc pair, namely, a prop and a co-prop. !cursive construction of blossoms during the shrinkingphase of a.Corollary 9.15. Let G be a simple graph; f, some bal-Surely, any algorithm a has to investigate some arcsanced 0–1- flow on NG; and B, a proper blossom of

a√ A(N) , where investigation denotes that moment whenN :Å NG( f ) . Then, b :Å base(B) is an outer node or ba decides which nodes in V (N) can be reached using theÅ s holds. Furthermore, B is a nucleus of N.arc a . (Note that a could have been explored by a earlier

Proof. Assume that b x s , and let p be a valid sb!- and put aside, as, e.g., in the algorithm of Micali andpath. By the base identity, p visits the base b . Further- Vazirani [23]) . The order in which the arcs of N aremore, p is strictly simple. Thus, the respective successors investigated is called the search strategy of a. Our ap-u and £ of b on p[b , b !] and p[b , b !]! are different. If proach is based upon this strategy only so that we areb would be an inner node, bu and b£ would be backward able to analyze an algorithm even if it does not utilizeedges w.r.t. NG . Thus, f (ub) Å cap(ub) Å 1 and f (£b) blossoms and layered auxiliary networks explicitly (as,Å cap(£b) Å 1 would hold, implying that f (bt) ¢ 2, e.g., the algorithm of Kameda and Munro [18]) .which is incompatible with cap(bt) Å 1. This proves the We assume that the algorithm a always investigatesfirst assertion. complementary arcs in pairs, say, in order a1 , a !1 , a2 ,Let U(b) be the nucleus containing B . If N[U(b)] a !2 , . . . , ak , a !k , and that a halts with the investigation of

entirely consists of bicursal arcs, then U(b) is a blossom, ak and a !k . In the beginning, the set of arcs investigatedthat is, U(b) Å B . Suppose, otherwise, so that u!w is a by a is A0 :Å M. After the investigation of ai and a !i , itunicursal arc contained in U(b) . Then, B(u) and B(w) is the set Ai :Å {aj , a !j : 1 ° j ° i}.are proper blossoms. By Theorem 9.5, B(w) and B(s) For any self-complementary arc set A ⊆ A(N) , weare different. By the proof of the last theorem, we have denote by N[A] the subnetwork of N with node set V (N)u !w Å prop(B(w)) . By the first assertion, w and u are and arc set A , and by dA(£) , the minimum length ofouter nodes. valid s£-paths with respect to N[A] . This network N[A]Let p be a d(u)-path, and x !, the predecessor of u on is balanced again, so that all results of Sections 8 and 9

p . If x would be in V (G) !, then f (ux !) Å f (uw !) Å 1, apply to N[A] ; in particular, this holds if A is taken tou x w , and f (su)° cap(su) Å 1 would hold. Otherwise, be one of the sets Ai occurring under a. Of course, wewe would have x ! Å s and f (su) Å 0. In either case, have to take the labels t(£) and also the terms blossomf (su) and !£√V (G ) f (u£ !) would differ, contradicting the B(£) , base(B) , and aux(p) relatively to A . For the sakeflow conservation condition. ! of clarity, we speak of (A)-blossoms, strictly (A)-reach-

able nodes and (A)-valid paths, and also use appropriateindices.

10. SHRINKING BLOSSOMS We call those node sets which are (Ai )-blossoms forsome 1 ° i ° k the a-blossoms of N . The next lemmadescribes the recursive construction of a-blossoms, anIn what follows, let a be any balanced network search

algorithm, that is, an algorithm which computes the dis- important tool within the design of matching algorithms.It shows that the a-blossoms form a nested or laminartance labels d , a system of d(£)-paths, or simply any

valid st-path with respect to the balanced network N . We set family, called the a-shrinking family.wish to develop tools for the analysis of a wide range ofknown BNS algorithms. Lemma 10.1. Let 1 ° j ° i ° k, and let Bj be an (Aj)-A valid s£-path with respect to N is typically computed blossom, and Bi , an (Ai )-blossom. Then, either Bi and

as follows: First, a computes the blossoms of N during Bj are disjoint or Bj is contained in Bi . In either case, Bjthe so-called shrinking phase and chooses some directed is contained in some (Ai )-blossom.path p in Aux(N) connecting s and base(£) . After that,

Proof. Every (Aj)-valid path is entirely contained ina reconstructs a valid s£-path p with respect to N andN[Ai ] . Thus, dAi(£) ° dAj(£) holds for all nodes £aux(p) Å p . One says that the path p is expanded to the

path p . Since there may be several paths p with aux(p) √ V (N) . If Bj is a bud, the assertion follows by the self-complementarity of Ai . Otherwise, every (Aj)-bicursalÅ p , the expansion phase need not be deterministic.

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 19: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 19

arc xy ! contained in Bj is also (Ai )-bicursal. Hence, at strictly reachable when a is investigated. In particular,dA(£) is still infinite, and no ( A)-valid s-path contains theleast the (Ai )-blossom BAi(x , y) has nodes with Bjarc £u !. This implies that CA Å CA and BA Å BA ! {£ !}.Å BAj(x , y) in common.Furthermore, a is the only ( A)-accessible arc which wasSuppose that Bj and Bi have a node u in common. not strictly (A)-accessible yet. Hence, all ( A)-bicursalChoose another node £ √ Bj . Then, there is an undirected arcs are (A)-bicursal. !path in N[Bic(N[Aj])] connecting u and £. Because of

Bic(N[Aj]) ⊆ Bic(N[Ai ]) , u and £ are in a common (Ai )-Theorem 10.3 (First Shrinking Property). Assumeblossom. Indeed, this blossom is Bi . !that the arc set A ⊆ A(N) satisfies conditions (a1) and(a2) . Let a Å u£ ! be an arc in A(N)"A with dA(u) ,We will now prove a somewhat stronger result,dA(£) õ ! . Then, the following assertions hold for thenamely, that every (Aj/1)-blossom either is the disjointarc set A :Å A ! {a, a !}:union of (Aj)-blossoms or a bud. For this, it is necessary

to make some assumptions about the performance of a.(a) DA Å DA .We assume that every set A Å Ai satisfies the following(b) Both u and £ are in a common proper ( A)-blossom,conditions:

denoted by BA(u, £) .(c) Except for BA(u, £) , every ( A)-blossom is an (A)-(a1) A is self-complementary.

blossom.(a2) A does not contain (A)-acursal arcs.Proof.(a3) Every (A)-unicursal arc is an (A)-prop.(a) Suppose that w √ DA for some strictly ( A)-reach-

able node w . Let x! be the predecessor of w onWhile condition (a1) is crucial for any application ofsome ( A)-valid path. Since w! was not strictlyour preceding results, (a2) ensures that the investigated(A)-reachable, the arcs x!w and w!x were alreadysubgraph N[A] grows like a search tree. Condition (a3)in A . By condition (a2), x !w would have beenforces every (A)-valid path p to induce a directed pathstrictly (A)-accessible, contradicting dA(w) Å ! .auxA(p) in Aux(N[A]) . Informally spoken: If (a3) holds,Thus, DA Å DA holds.one can ‘‘detour’’ only within an (A)-blossom. To show

that every (Aj/1)-blossom splits into (Aj)-blossoms, we (b) Every (A)-valid s£-path can be extended to a a!-only need conditions (a1) and (a2): accessing path since a is not in A , and £ is assumed

to be strictly (A)-reachable. For the same reason,a is ( A)-accessible. Since u and £ are adjacent,Theorem 10.2 (Bud Generation). Assume that the arcand a and a ! are ( A)-bicursal, both nodes are inset A ⊆ A(N) satisfies conditions (a1) and (a2) . Let aa common proper ( A)-blossom.Å u£ ! be an arc in A(N)"A with dA(u) õ ! and dA(£)

Å ! . Then, the following assertions hold for the arc set (c) Suppose the existence of a proper ( A)-blossomA :Å A! {a, a !}: other than BA(u , £) which is not an (A)-blossom.

Such a blossom could only arise if an ( A)-bicursal(a) CA Å CA . arc pair xy!, yx ! with x , y √/ BA(u , £) exists which

is not (A)-bicursal.(b) BA Å BA !{£ !}.(c) Every proper ( A)-blossom is an (A)-blossom.

By condition (a2), we can assume xy! to be strictlyProof. Write A :Å A ! {a}. Because of dA(£) Å ! , (A)-accessible. Let p be a xy !-accessing path in N[A] ,

every (A)-valid su-path which does not already visit £ ! and q , a yx ! accessing path in N[ A] . Each of p and qcan be extended by a to an ( A)-valid s£ !-path. Thus, visits b :Å baseA(x , y) , and q[b , y] would be entirelydA(£ !) õ ! holds. contained in BA(x , y) by the base identity. Thus, q[b ,Let p be an ( A)-valid path starting at s and ending at y] , and, in turn, p[b] "q[b , y] would be even (A)-valid.

some node w which traverses a . Suppose that w x £ !, Obviously, xy! cannot be on p[b] so that r "yz! would beand let y be the successor of £ ! on p . Since (a2) is yx !-accessing, a contradiction. !required for £ !y , y !£ √ A , the node £ ! would be evenstrictly (A)-reachable. Let q be an (A)-valid s£ !-path, Corollary 10.4. Let A, a, and A be as in Theorem 10.3 ,and x , the first node on q for which x or x ! is on p[£ !, and let BA(u) Å BA(£) . Then, by the investigation of aw] . If x would be on p[£ !, w] , then q[x] "p[x , w] would and a!, no node becomes strictly reachable, and no arcsbe an (A)-valid sw-path. Otherwise, q[x] "p[£ !, x !]! but a and a! become strictly accessible.would be an (A)-valid s£-path, contradicting the choiceof £. Proof. Let p be an ( A)-valid path which traverses a

or a!. Then, BA(u , £) is reached by baseA(u , £) first, andThis proves that £ ! is the only node that becomes

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 20: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

20 FREMUTH-PAEGER AND JUNGNICKEL

the part between the first and the last node of BA(u , £) w) ; x , the base of B , and r , a dA(x)-path. Suppose thatx was on p[£ !, w] . Let y be the first node on r such thaton p can be exchanged by some (A)-valid path. !y or y ! is on p[x , w] . If y would be on p[x , w] , thenr[y] " p[y , w] would be an (A)-valid sw-path, contradict-Theorem 10.2 deals with those iterations of a duringing the choice of w . Otherwise, r[y] "p[x , y !] ! wouldwhich new buds can arise. Regarding the remaining itera-have been an (A)-valid sx !-path, contradicting the choicetions j of a, Theorem 10.3 shows that any new (Aj/1)-of x . Thus, x ! is on p[£ !, w] . The arc by which x ! is leftblossom must be the disjoint union of (Aj)-blossoms. Inon p is the complementary arc of an (A)-prop by condi-both situations, at most one new a-blossom can arise;tion (a3).alternatively, the blossom structure may also stay un-Now, let B be a proper (A)-blossom traversed by p[£ !,changed.

w] ; x , the last vertex of B on p ; and r , a dA(x)-path. LetThe arc a investigated in the situation of Theorem 10.2y be the first node on r such that y or y ! is on p[x , w] .is called an a-prop of £ !, whereas the arc a investigatedIf y would be on p[x , w] , then r[y] " p[y , w] would bein the situation of Theorem 10.3 is called an a-bridge.an (A)-valid sw-path, a contradiction. Otherwise, r[y]Note that a-props and props are not the same. These" p[x , y !] ! is an (A)-valid sx !-path that reaches B vianotions coincide only for special BNS algorithms whichpropA(B) by the base identity.compute the correct distance labels.Suppose that p[x , w] does not traverse propA(B) !.Next, we want to know which (A)-blossoms form the

Then, p[x , y !] would be entirely contained in B . Choos-( A)-blossom BA(u , £) occurring in Theorem 10.3. At thising b :Å baseA(B) and a dA(b , y !)-path r , we wouldpoint, condition (a3) and the layered network Aux(N[A])have r[b] " r " p[x , w] as an (A)-valid sw-path, a contra-come into play.diction. Thus, propA(B) ! is an arc on p[x , w] . By thechoice of x , we have x Å baseA(B) !.Lemma 10.5. Assume that A ⊆ A(N) is self-complemen-Now, let z be the first node of B on p . We alreadytary. Let a Å u£ ! be an arc in A(N)"A with dA(u) , dA(£) know that z is on p[£ !, x] , since, otherwise, p would notõ ! , A :Å A ! {a, a!}, and w, a strictly ( A)-reachable

only traverse propA(B) but also propA(B) !. Hence, p[u]node with dA(w) Å ! . Then, an ( A)-valid sw-path existsand p[£ !, w] have no proper blossoms in common.which traverses either a or a!, but not both.To see that p[z , x] is entirely contained in B , choose

some dA(x !)-path r . Let y be the first node on r such thatProof. Suppose otherwise that every ( A)-valid sw-y or y ! is on p[z , x] and assume that y x x !. Then, eitherpath p traverses both a and a !. Without loss of generality,r[y] " p[y , x] or r[y] " p[z , y !] ! would be (A)-validwe can assume that a ! is traversed before a . Let r be awith end node in B . But, then, p would either traversedA(u)-path, and y1x !1 , the last arc on r such that x1y !1 ispropA(B) and also propA(B) ! or would traverseon p[£ !, w] . (If such an arc would not exist, r " p[u , w]propA(B) ! twice. Thus, y Å x ! holds, r "p[z , x] ! is (A)-would be an ( A)-valid path not containing a ! or couldvalid, and p[z , x] is contained in B .be restricted to such an (A)-valid sw-path.) Hence,But, then, p[z , x] ! is an d(x !, z !)-path by the mini-r[x !1 , u]! " p[x1 , w] can be restricted to an (A)-valid

mality of p . It is now evident that r is a directed path inu !w-path q .Aux(N[A]) and that auxA(q) "r can be expanded into theBy our assumption, p[u !] " q is not valid and cannotdA(£)-path q " p[£ !, w]! again. Furthermore, p[u] is abe restricted to an ( A)-valid sw-path. Thus, arcs on p[£]dA(u)-path and auxA(p[u]) a directed path in Aux(N[A])exist that are also on r[x !1 , u] . Let y2x !2 be the first suchas an immediate consequence of Lemma 9.9. !arc on p[£] . Then, p[y2] " r[y2 , u] " p[u , w] is valid

and does not traverse a !, contradicting the hypothesis.!If a and w are as in Theorem 10.6, we call a the a-

petal of w . It is obvious that the knowledge of the a-Theorem 10.6 (Second Shrinking Property). Assumepetal is crucial for the reconstruction of some sw-paththat A ⊆ A(N) satisfies conditions (a1) – (a3) . Let aand that this arc is, therefore, stored by typical BNS algo-Å u£ ! √ A(N)"A be an arc with dA(u) , dA(£) õ ! , andrithms. We now describe how to determine blossom basesA :Å A ! {a, a !} . Furthermore, let w be a strictly ( A)-and the blossoms that have to be merged together duringreachable node with dA(w) Å !; p, a minimum lengthan arc investigation step.( A)-valid sw-path visiting a but not a!; and q, a dA(w !)-

path. Then, p[u] is a dA(u)-path and q " p[£ ! , w]! is adA(£)-path. Lemma 10.7. Assume that A ⊆ A(N) satisfies conditions

(a1) – (a3) . Let p be a valid cycle with respect to N[A] .Proof. Since p[u] is (A)-valid, auxA(p[u]) is a di- Then, p is contained in a proper (A)-blossom.

rected path in Aux(N[A]) . We will show that also r:Å auxA(p[£ !, w]) is a directed path in Aux(N[A]) . Proof. For any node x on p , at least one of x and x!

is strictly (A)-reachable, by condition (a2). Since p! isFirst, let B Å {x , x !} be an (A)-bud visited by p[£ !,

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 21: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 21

also a valid cycle, we may assume that p contains strictly be used for the construction of BA(u , £) immediately. Infact, all known BNS algorithms know the members of(A)-reachable nodes. Pick such a node y for which dA(y)

is minimal, and let q be a dA(y)-path. BA(u , £) in the moment when its base is recognized. Buthow can the base determination be managed?Now, let z ! be the predecessor of y on p . Then, q[y]

! p[y , z !] is (A)-valid. If z!y is (A)-bicursal, then y and Let a be an arc of the layered auxiliary networkAux(N) with auxcap(a) Å 1, and let £ be some blossomz are in a common (A)-blossom and we have p

⊆ BA(y , z) by the base identity. Otherwise, either z !y or base of N . If a is on every directed s£-path in Aux(N) ,we call a a bottleneck of £. Note that the bottlenecks ofy !z is an (A)-prop by conditions (a2) and (a3). But,

then, z or z ! would have been traversed by q[y] , contra- £ are ordered by the distance labels of their end nodes.Actually, BNS algorithms do not compute b :Å baseA(u ,dicting the choice of y . "£) , but, rather, the arc botA(u , £) of the layered auxiliarynetwork AuxA(N) which denotes the (A)-bottleneck ofTheorem 10.8. Let A, u£ !, and A be as in the shrinkingbaseA(u) and baseA(£) with maximum distance label.properties; B, an (A)-blossom; and b, :Å baseA(u, £) .

Then, B is contained in BA(u, £) iff baseA(B) is on someCorollary 10.9. Let x denote the unique (A)-predeces-directed (b, baseA(u))-path or (b, baseA(£))-path insor of b :Å baseA(u, £) . Then, botA(u, £) and (baseA(x) ,Aux(N[A]) .b) are the same.

Proof. First assume that B is a blossom contained inProof. It is obvious that (baseA(x) , b) is an (A)-bot-BA(u , £) . If baseA(B) and b are equal, the statement is

tleneck of baseA(u) and baseA(£) . Suppose yz to be anevident. Thus, assume that baseA(B) x b in what follows:(A)-bottleneck of baseA(u) and baseA(£) with dA(b)First, let B be an (A)-bud. By Theorem 10.3, the firstõ dA(z) . Then, BA(y) and BA(z) must be parts of BA(u ,shrinking property, BA(u , £) , is a proper blossom. There-£) by Theorem 10.8.fore, w :Å baseA(B) ! is strictly ( A)-reachable, but notSince yz is a bottleneck, there is only one (A)-prede-(A)-reachable. W.l.o.g. let p and q be sw- and sw!-paths

cessor w of z and also rescap(w , z) Å 1 holds. The arcas in Theorem 10.6. (If such paths do not exist, exchangewz would be (A)-unicursal and ( A)-bicursal; then, hence,a and a !.) Then, r :Å q ! p[£ !, w]! is a dA(£)-path byany z !w !-accessing path in N[ A] would traverse u£ ! orthe second shrinking property, and aux(r[b , £]) is the£u !. But u and £ can be reached in N[A] only by traversingrequested path in Aux(N[A]) .wz , a contradiction. "Now, let B be a proper (A)-blossom and wz

:Å propA(B) . Since z x b is required, wz is contained inBA(u , £) by Corollary 9.4 and the base identity. Thus, wzis ( A)-bicursal, but (A)-unicursal. 11. TREE-GROWING BNS ALGORITHMSSuppose that p is a z !w !-accessing path in N[ A] . With-

out loss of generality, we can assume that u£ ! is on p , In contrast to conditions (a1) and (a2) of the precedingbut £u ! is not on p[£ !, w !] , since, otherwise, u and £ can section, it is not obvious how to design a BNS algorithmbe exchanged. If w ! would be already on p[£ !, z !] , then which satisfies condition (a3). There are different con-z !w ! would be (A)-bicursal by the preceding lemma, con- cepts for this. In the present section, we replace (a3) bytradicting the choice of wz Å propA(B) . the more restrictive conditionLet q be a dA(w)-path, and x !, the first node on p[£ !,

w !] such that q ! p[x !, w !]! is valid. If x and £ are equal, (a4) At most one (A)-unicursal arcthen r :Å q ! p[£ !, w !]! is (A)-valid, and aux(r) isdirected in Aux(N[A]) . By the base identity, b is reached with given end node £ exists.on auxA(r) before wz is traversed.Let y be the predecessor of x ! on p[£ !, w !] otherwise. This simplifies the computation of the arc botA(u , £) con-

If yx ! would be also on q , then q[x !, w] ! p[x !, w !] ! siderably. If an algorithm a satisfies conditions (a1) –would be contained in a proper (A)-blossom by the base (a4), the occurring layered auxiliary networks are trees.identity. Otherwise, x would be already on q , and q[x , However, such an algorithm will find minimum validw] ! p[x !, w !] !, an (A)-valid cycle which is contained paths only in special circumstances.in a proper (A)-blossom by the preceding lemma. In ei- Unlike (a1) and (a2), a search strategy based on The-ther case, wz would be (A)-bicursal, a contradiction. orems 10.2 and 10.3 does not maintain condition (a4):The converse direction follows by the base identity In the situation of Theorem 10.2, the node £ ! may be

and Lemma 9.9. " already strictly (A)-reachable, in which case we call aan a-anomaly of £ !.One could expect that the investigation of anomaliesSince baseA(u , £) must be determined by a more or

less sophisticated search procedure, this theorem cannot is redundant, but note that the node £ may become strictly

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 22: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

22 FREMUTH-PAEGER AND JUNGNICKEL

reachable later. Then, we say that the anomaly a is re- reachable by the preceding lemma. In particular, C and CAare equal. By the hypothesis, no arc connecting twosolved since a becomes available for a blossom shrinking

operation according to Theorem 10.3. We will study an proper (Ak)-blossoms exists. !example for this phenomenon in our forthcoming paper[10] where the algorithm of Kameda and Munro is dis- Theorem 11.3. Let a √ A(N) and rescap(a) Å 1 . Then,cussed. This algorithm does not investigate resolved a is bicursal iff a is an a-bridge for some tree growinganomalies at all and, indeed, is incorrect. BNS algorithm a.A search strategy which does not investigate a-anoma-lies before they are resolved is called tree growing. For Proof. (r ) Let p and q be a- and a !-accessing paths,this case, we can prove that the iterated arc set A satisfies respectively, and a Å u£ !. Let x be the last node on q[£]conditions (a1) – (a4) whenever A does and, therefore, such that x or x! is traversed by p[u] . If x! is on p[u] ,that the network Aux(N[Ai/1]) is a tree again. The algo- then each of x and x! is strictly ( A)-reachable where werithms of Edmonds, Kameda/Munro, and Kocay/Stone put A :Å p[u] ! p[u]! ! q[£] ! q[£] !. Let yare tree growing. Especially for Edmonds’ algorithm [7], :Å baseA(BA(x)) in this case, and y :Å x otherwise.the layered auxiliary networks are called planted trees. In either case, p[y] " q[y , £] is valid; hence, A :Å p[u]

! p[u]! ! q[y , £] ! q[y , £] ! satisfies conditions (a1)Lemma 11.1. Let A ⊆ A(N) be self-complementary; w and (a2). To see that (a4) is also fullfilled, suppose that√ V (N) , a node; and d(w) õ dA(w) Å ! . Then, an arc two different (A)-unicursal arcs with a common end nodea √ A(N)"A exists which either satisfies the hypothesis exist. One of these arcs would be on p[y , u] , and theof Theorem 10.3 or satisfies the hypothesis of Theorem other, on q[y , £] , contradicting the choice of x .10.2 and is not an anomaly. An appropriate BNS algorithm a will first investigate

the arcs of p[u] in the order given by p[u] and thenProof. We choose that node w √ V (N) with d(w)investigate the arcs of q[y , £] in the given order. For theõ dA(w) Å ! which has minimum d(w) and a d(w)-above reasons, conditions (a1) – (a4) are also satisfiedpath p . Let a Å u£ ! be the last arc on p which is not inby the intermediate arc sets. At last, u£ ! and £u ! areA . If £ ! and w are equal, then £ ! is not in BA , and dA(u) investigated. Since u and £ are strictly (A)-reachable, ais finite by choice of w .indeed is an a-bridge.Otherwise, dA(u) and dA(£ !) are finite by choice of

w . Let q be a dA(£ !)-path, and y , the first node on q suchthat y or y ! is on p[£ !, w] . If y would be on p[£ !, w] , (R ) If a Å u£ ! is an a-bridge as in the first shrinkingthen p[y] "p[y , w] would be an (A)-valid sw-path, a property, then u and £ are strictly (A)-reachable for somecontradiction. Thus, q[y] "p[£ !, y !] ! is an (A)-valid s£- arc set A ⊆ A(N) with u£ !, £u ! √/ A occurring during thepath, and £ ! is in CA . ! course of a. But, then, any dA(u)- and dA(£)-paths

can be extended to u£ !- and £u !-accessing paths, respec-Theorem 11.2 (Termination). Let a be some tree- tively. !growing BNS algorithm and a1 , a !1 , a2 , a !2 , . . . , ak , a !kthe order of arc investigation with respect to some bal-

We can give a simple path expansion rule that worksanced network N.for all tree-growing BNS algorithms. To this end, weThen, Ai satisfies the conditions (a1) – (a4) formust assign at the point of investigating aj/1 Å u£ !i Å 1 , 2 , . . . , k. If there is no further arc ak/1 Å u£ !

√/ Ak as considered in Lemma 11.1 , then every strictlyreachable node is already strictly (Ak)-reachable, and (p1) prop[£ !] :Å aj/1 , if neither £ nor £ ! are strictlythe blossoms of N are exactly the (Ak)-blossoms. (Aj)-reachable,

(p2) petal[w] :Å aj/1 , if Theorem 10.6 applies.Proof. The set A0 trivially satisfies (a1) – (a4). Weassume Ai to satisfy these conditions and use inductionon i . It is obvious that (a1) and (a2) hold. Thus, we Now, for every strictly reachable node x , some valid sx-only have to prove condition (a4) since (a3) is less path can be obtained. At this point, we can give a correct-restrictive by the base identity. ness proof for the expansion rule which is defined byIf £ !i/1 is in DAi , that is, if a new bud is created, then path(x , x) :Å (x) ,

£ !i/1 is not incident with any arc in A . If di (£i/1) is finite,that is, in the case of a shrinking operation, then each of path(x , y) :Å path(x , z !) " prop[y] ,u£ ! and £u ! are strictly accessible. Thus, condition (a4)holds.Assume that the hypothesis of the second assertion if prop[y] Å z !y is assigned, and, if petal[y] Å u£ ! is

assigned,holds. Then, all strictly reachable nodes are strictly (Ak)-

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 23: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 23

path(x , y) path(x , u) ! (u , £ !) ! [path(w !, £)] ! Å path(x , w) .

: Å path(x , u) ! petal[y] ! [path(y !, £)0] !.

12. THE COMPOSITION OF MINIMUMTheorem 11.4 (Path Expansion). Let a be a tree-grow- VALID PATHSing BNS algorithm; N, a balanced network; and a1 , a!1 ,a2 , a !2 , . . . , ak , a !k , the order in which a investigates the There is another concept for a balanced network searcharcs of N. which is more sophisticated than tree-growing proceduresLet w be a strictly reachable node, j(w) :Å min{ i : 0 and which yields the distance labels and a d(£)-path for° i ° k, dAi(w) õ !} be the index of the investiga- all nodes £ √ V (N) implicitly. Here, a search strategy istion step during which w becomes strictly reachable, chosen such that in addition to conditions (a1) – (a3)and j ¢ j(w) . Let (xi ) ni:Å0 be the directed path in every strictly (A)-reachable node £ already has dA(£)Aux (N[Aj] ) with start node x :Å x0 and end Å d(£) and such that any pair of complementary verticesnode xn Å baseAj(BAj(w)) . Then, path(x, w) is an

is first reached at the minlevel node.(Aj)-valid xw-path which splits into parts Subsequent investigation steps do not influence thedistance labels of strictly (A)-reachable nodes since these

path(x0 , x1) ! path(x1 , x2) ! rrr labels are already correct. Even more, an (A)-prop is alsoan ( A)-prop, and one can decide ad hoc whether or not

! path(xn01 , xn) ! path(xn , w) . the current investigated arc a is an ( A)-prop.Unfortunately, under these conditions, the algorithm aProof. In the case of w Å x , especially w Å s , the

cannot be implemented in such a way that the occurringassertion is evident. Furthermore, w Å s is the only caselayered auxiliary networks are trees. Thus, the computa-with j(w)Å 0. Thus, assume that wx x , and, as inductiontion of bottlenecks requires a sophisticated search proce-hypothesis, that the assertion holds for every w √ V (N)dure running on Aux(N[A]) , which was named doublewith j(w) õ j(w) .depth first search (DDFS) by Micali and Vazirani [23].Let A :Å Aj (w ) and A :Å Aj (w )01 . If prop[w] is definedInformally spoken, the DDFS tries to derive two disjoint( i.e., if we are in the situation of Theorem 10.2) , let wsu- and s£-paths. This procedure will be described in our:Å prop[w]0 . Since w has become strictly reachable dur-forthcoming paper [11].ing the investigation of (w , w) , w is strictly (A)-reach-We will now discuss the arc sets A corresponding toable, but w is not. By the induction hypothesis, path(x ,

a search strategy which ensures that the conditions (a1) –w) determines an (A)-valid xw-path which splits into(a3) of the last section hold and that all strictly (A)-partsreachable nodes have correct distance dA(£) Å d(£) .Here, the tenacity labels will play an important role. Thepath(x0 , x1) ! path(x1 , x2) ! rrr statements that follow do not only describe a specificalgorithm, but also give a perception of the general struc-! path(xm01 , xm) ! path(xm , wI ) .ture of minimum valid paths.Let N be a balanced network and i √ N0 . Then, weObviously, path(x , w) ! prop[w] is an ( A)-valid xw- call the bridges u£ ! with t(u , £ !) ° 2i 0 1 the ( i)-path. But path(xm , w) ! prop[w] and path(xm , w) are bridges and the props u!£ with d(£) ° i the ( i)-props.the same. The assertion now follows: The ( i)-bridges, the ( i)-props, and the co-( i)-props to-If u :Å petal[w]0 and £ :Å (petal[w]!)0 are defined gether are the ( i)-arcs. We are interested in the network(i.e., if we are in the situation of the shrinking properties) , Ni which is the restriction of N to the set of ( i)-arcs.then u and £ are strictly (A)-reachable. By the induction For the moment, let A denote the set of ( i)-arcs forhypothesis, p :Å path(x , u) and q :Å path(w !, £) are some i √ N0 . We then speak of ( i)-valid paths instead(A)-valid paths. of (A)-valid paths, ( i)-blossoms, ( i)-bases, and ( i)-Of course, p and q may have an arc a in common. reachability and write di (£) :Å dA(£) , Bi (£) :Å BA(£) asHowever, since there are no paths alternative to aux(p) well asand aux(q) in Aux(N[A]) , and by the second shrinking

property, there is no proper (A)-blossom which is tra-Ci :Å {£ √ V (N) : di (£) , di (£ !) õ !}.versed by p and also by q . Hence, a is unicursal, that is,

an (A)-prop, and every dA(u)-path and every dA(£)-pathtraverses a . By the second shrinking property, we have Assume that some algorithm a has investigated the set A

of ( i)-arcs at some point and the set A of ( i / 1)-arcsrescap(a) ú 1.Thus, p ! petal[w] ! q[w !, £] ! is an ( A)-valid sw-path. at some later point. To apply the results of Section 10,

we have to prove that conditions (a1) – (a3) hold for A ,The assertion follows by the identity

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 24: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

24 FREMUTH-PAEGER AND JUNGNICKEL

We now state the major result of this section whichshows the relationship to the setup of Vazirani’s blos-soms [28]:

Theorem 12.1. Let d(£) õ d(£ !) . Then, the followingassertions hold:

di (£) Å ! d(£) , if d(£) ° i! , otherwise "

di (£ !) Å ! d(£ !) , if t(£) ° 2i 0 1! , otherwise "

Proof. For the time being, we only consider the casei Å 0: There are no (0)-arcs. Thus, the minlevel node sis the only strictly (0)-reachable node. On the other hand,no nodes £ with t(£) õ 3 and no nodes £ x s with d(£)Å 0 exist. !

It will take a considerable effort to prove Theorem12.1 in general. Meanwhile, we assume that Theorem12.1 is proven for some fixed j √ N0 and all integers i° j . All results that we state in the following dependon Theorem 12.1 and, hence, are valid only for i ° juntil we can do the induction step. First, we have

Corollary 12.2.Bi Å {£ √ V (N) : t(£) ú 2i 0 1, d(£) ° i õ d(£ !)}

Ci Å {£ √ V (N) : t(£) ° 2i 0 1}

Di Å {£ √ V (N) : t(£) ú 2i 0 1,

i õ d(£) , i õ d(£ !)}.Fig. 9. Subnetworks occurring during the BNS.

Corollary 12.3. Let £ be any node with d(£) ° i. Then,di (£) Å d(£) holds.A and also for intermediate self-complementary arc sets

A with A ⊆ A ⊆ A . Proof. If £ is a minlevel node, the assertion is an imme-Figure 9 shows some of the networks Ni belonging to diate consequence of Theorem 12.1. Otherwise, we have

our running example of Figures 2 and 6, using the notation d(£ !) õ d(£) and, hence, t(£) ° 2i 0 1; again, theof Section 8. For iõ 5, these networks are less interesting, assertion follows from Theorem 12.1. !since no ( i)-bridges and no proper ( i)-blossoms exist.On the other hand, there are two proper (5)-blossoms, There is still some ambiguity concerning the props ofthe first one consisting of 1, 2, 6, and their complementary the network Ni . Again, let A denote the set of ( i)-arcsnodes and the second consisting of 7, 8, 9, 10 and their of the balanced network N . We now can prove that thecomplements. Both (5)-blossoms which coincide with (A)-props, the props in N[A] , are the ( i)-props (whichthe (5)-nuclei are parts of the only (6)-blossom which our notation already has suggested):additionally contains the nodes 3, 4, 5, 11, 12, s , andtheir complements. Lemma 12.4. An ( i)-arc u !£ is an ( i)-prop iff u ! is aIn particular, a valid st-path exists in N 6( f ) , and f predecessor of £ on some di (£)-path and di (£)õ di (£ !) .can be augmented. With the exception of (3!, 4) and(4 !, 3) , any residual arc is a (6)-arc. By the way, the Proof. (r ) Let u !£ be an ( i)-prop. Then, u!£ is a prop

and d(£) ° i . By definition, £ is a minlevel node andinvestigation of (3 !, 4) is uninteresting since all nodesare already strictly reachable. d(u !) Å d(£) 0 1 ° i 0 1. Corollary 12.3 shows that

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 25: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 25

(e) Any ( i)-nucleus U x U(s) traversed by p before adi (u !) Å d(u !) õ d(£)(18) is reached by propi (U) .Å di (£) õ d(£ !) ° di (£ !) .

( f ) Any ( i)-nucleus U traversed by p after a is left bypropi (U) !.Therefore, no di (u !)-path traverses the co-prop £ !u , and,

(g) If both xy ! and y !x are bridges and xy! is on p, thenthus, any such path can be extended to a di (£)-path byt(x, y !) õ t(y !, x) holds.appending the arc u !£. In other words, u ! is the predeces-

sor of £ on some di (£)-path.Proof. First, consider the case i Å 0: Then, d(£) Å 1

õ d(£ !) holds, p Å s£ is the only d(£)-path, and (a) –(R ) If di (£) is finite, then di (£) Å d(£) holds by Theo- (g) are trivially satisfied. Using induction, we can assumerem 12.1. Obviously, £ is a minlevel node and u!£ is a that the statements are proven for any i õ j . Hence, weprop. ! only consider the case i Å j . Let p be a fixed d(£)-pathp , and let u ! be the predecessor of £ on p .

Theorem 12.5. Let u£ !, £u ! be a pair of bridges and First, we assume £ to be a minlevel node and d(£)assume that t(u, £ !) Å 2i 0 1 . Then, t(u) , t(£) ° t(u, Å j / 1, that is, t(£) ú 2 j / 1. Because of Lemma 8.2,£ !) hold. In particular, u and £ are in a common ( i)- p[u !] is a d(u !)-path, d(u !) Å j holds, and u !£ is a prop.blossom. Note that u ! is either a minlevel node with d(u !) ° j or

a maxlevel node with t(u !) ° 2 j 0 1. Hence, the pathProof. As in the proof of Lemma 9.10, we may assumep[u !] is ( j)-valid by induction hypothesis (a) , p is ( jthat d(u) ° d(£) so that £ cannot occur on any d(u)-/ 1)-valid, and (a) , (b) , and (g) are evident for the pairpath p . If p contains the node £ !, then d(£ !) õ d(u)£, p . Since £ is in no ( j)-nucleus, also (d) , (e) , and ( f )holds. Otherwise, p " u£ ! is a valid s£ !-path and d(£ !)hold. Thus, the induction step is complete.° d(u) / 1. In either case, t(£)° t(u , £ !) and, therefore,From now on we assume that £ is a maxlevel node£ √ Ci hold. If u is in Bi (£) , then t(u) ° 2i 0 1 holds,

with t(£) Å 2 j / 1 and that the statements are provenand nothing remains to be shown.for all maxlevel nodes w with t(w) Å 2 j / 1 and d(w)Therefore, we assume u not to be in Bi (£) and choose õ d(£) . Since no d(£ !)-path can traverse u !£, we havesome di (£)-path q . Then, q " £u ! would be ( i)-validd(u) ° d(£ !) / 1 and, therefore, t(u) ° t(£) . Clearly,since Bi (£) is visited by q only once and reached by anu!£ cannot be a prop.( i)-prop. But then each of u£ ! and £u ! would be i-accessi-We first assume u!£ to be a bridge. Because of d(u !)ble, contradicting the definition of Bi (£) . !

õ d(£) , we have t(u !£) ° t(£) . If even t(u !£) õ t(£)would hold, that is, t(u !£) ° 2 j 0 1, Theorem 12.5Corollary 12.6. The set A of ( i)-arcs satisfies conditions would yield the contradiction t(£)° t(u !£)õ t(£) . Thus,(a1) – (a3). we obtain t(u!£) Å t(£) , and, therefore, d(u !) / 1Å d(£) . In particular, p[u !] is a d(u !)-path.Proof. Obviously, the set A is self-complementary. AnIf t(u) is strictly smaller than t(£) , then p[u !] is a( i)-bridge is ( i)-bicursal by the proof of the preceding

dj(u !)-path by the induction hypothesis. Otherwise, wetheorem. An ( i)-prop u£ ! is accessed via any di (£ !)-pathmust have t(u) Å t(£) and d(u) ú d(u !) since we haveby Lemma 12.4. This proves (a2). If w£ ! is another ( i)-required that £ !u is not a prop. But then d(u !) ° j holds,prop with end node £ !, and each of u£ ! and w£ ! is unicur-and p[u!] is a dj(u !)-path again. The induction step issal, then Lemma 12.4 proves that both arcs are (A)-props.now obvious, except for assertion (g) . To see this, assumeThis is (a3). !that £u ! is also a bridge. Then, we have t(u !£) x t(£, u !)by Lemma 8.5. Now, Theorem 12.5 implies that t(u !£)Theorem 12.7 (Structure Theorem for Minimum Ad-õ t(£, u !) , since, otherwise, t(£) ° t(£, u !) õ t(u !, £)missible Paths) . Let £ √ V (N) either be a minlevelÅ t(£) would hold.node with distance d(£) Å i / 1 or a maxlevel node withFinally, we consider the case that £ !u is a prop. Then,tenacity t(£)Å 2i / 1 . Any d(£)-path p has the following

d(£ !) / 1 Å d(u) õ d(u !) holds and £ !u is even a ( j)-properties:prop. If, in addition, d(u !) / 1 Å d(£) holds, then t(u)and t(£) are equal and p[u !] is a d(u !)-path. By the(a) p is a di/1(£)-path. induction hypothesis, p[u!] is even a dj/1(u !)-path. But,

(b) p traverses exactly one arc a which is not an ( i)- then, the induction step is evident again.arc. Otherwise, t(u) õ t(£) and d(u !) / 1 õ d(£) hold.

(c) If £ is a maxlevel node, then a is a bridge and t(a) By the induction hypothesis, any d(u)-path q is a dj(u)-Å t(£) . path. This path reaches the nucleus U :Å Uj(u) by £ !u ,

since, otherwise, q " u !£ would be ( j)-valid. In particular,(d) p visits any ( i)-nucleus at most once.

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 26: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

26 FREMUTH-PAEGER AND JUNGNICKEL

rescap(£ !, u) Å 1 holds; hence, p cannot traverse the arc Lemma 12.8. Let u£ !, £u ! be a pair of bridges and t(u,£ !) Å t(£, u !) Å 2i / 1 . Then, u and £ are strictly ( i)-£ !u Å propj(U) .

Let x !y be that arc through which p reaches U the last reachable, and t(u, £ !) Å t(£, u !) Å di (u) / di (£) / 1holds.time. Since t(y) ° 2 j 0 1 holds, all d(y)-paths and all

d(y !)-paths are ( j)-valid by induction hypothesis. By theProof. Again, we can assume that d(u) ° d(£) and,base identity 9.13, any d(u)-path can be extended to a therefore, d(u) ° i . As in the proof of Theorem 12.5,valid sy !-path by appending p[y , u !] ! and any d(y !)-path we obtain t(£) ° t(u , £ !) Å 2i / 1. Suppose that di (£)to a valid sx-path by appending y !x . Thus, the following is infinite. By Corollary 12.3, we would have d(£) ¢ iinequalities hold: / 1 and, hence, d(£ !) ° i õ d(£) , that is, £ would be a

maxlevel node. Then, Theorem 12.1 shows t(£) Å 2id(x) 0 1 ° d(y !) ° d(u) / Ép[y , u !]É / 1 Å t(u , £ !) , and, therefore,Å d(£ !) / Ép[y , £]É

(19)

d(£ !) Å 2i / 1 0 d(£)d(x !) / 1 ° Ép[x !]É / 1 Å d(£) 0 Ép[y , £]É. (20)

Å (d(u) / d(£) / 1) 0 d(£) Å d(u) / 1(21)

Adding these inequalities yields t(x) ° t(x !, y) ° t(£) .hold, contradicting the assumption that u£ ! was a bridge.Note that t(x !, y) Å t(£) implies that d(x !) Å Ép[x !]É.Hence, we have di (u)Å d(u) and di (£)Å d(£) by Corol-Note also that x !y is not a prop since it would be alary 12.3. !( j)-prop reaching U otherwise, contradicting the base

identity. Three cases arise: Proof (of Theorem 12.1) . Let A be the set of ( j)-arcs;{a1 , a!1 , a2 , a !2 , . . . , ak , a !k}, the set of bridges ar with• In the case t(x) õ t(£) , x is in a ( j)-nucleus different tenacity t(ar) Å 2 j / 1; and {ak/1 , ak/2 , . . . , ak/1}, thefrom U . If y !x would be a prop, it would be a ( j)-prop set of props ar Å u !r £r with d(£r) Å j / 1. Also, put Arconnecting two ( j)-nuclei, a contradiction. Hence, x !y :Å A ! {a1 , a !1 , a2 , a !2 , . . . , ar , a!r } for r Å 1, 2, . . . ,is a bridge of tenacity t(x !, y) Å t(£) Å 2 j / 1 and k / l . Then, Ak/l is the set of ( j / 1)-arcs.

p[x !] is a dj( x !)-path by the induction hypothesis. By Corollary 12.6, A satisfies the conditions (a1) –Moreover, if yx ! is also a bridge, then t(x !, y) õ t(y , (a3). By Lemma 12.8, both end nodes of ar are strictlyx !) holds. (Ar)-reachable for r Å 1, 2, . . . , k ; hence, ar and a !r are• If t(x) Å t(£) and d(x !) õ d(x) hold, that is, d(x !) (Ar)-bicursal. By the first shrinking property and induc-° j , then p[x !] is an dj( x !)-path by the induction tion on r , Ar satisfies conditions (a1) and (a2) for rhypothesis. But x !y is not a ( j)-arc, since, otherwise, Å 1, 2, . . . , k , and DAr Å Dj , BAr ⊆ Bj hold. Furthermore,p[y] would be ( j)-valid, contradicting the base iden- d(w) Å dAr(w) Å dj(w) holds for any strictly ( j)-reach-tity. Thus, x !y is a bridge of tenacity t(x !, y) Å t(£) . able node w . Thus, every ( j)-prop is a (Ar)-prop, andAgain, if yx ! is also a bridge, then t(x !, y) õ t(y , x !) condition (a3) holds for Ar , r Å 1, 2, . . . , k .holds [as in the case t(u) Å t(£) above]. Choose some w √ CAk"Cj with dAr(w) Å ! , dAr/1 (w)

õ ! . Let p be a dAr/1 (w)-path which traverses ar/1• If t(x) Å t(£) and d(x !) ú d(x) hold, then p[x !] is adj/1(x !)-path by the induction hypothesis. Further- Å u£ !, and q , a dAr(w !)-path. An application of the sec-more, y !x is a ( j)-prop since (19) gives the equality ond shrinking property 10.6 and Lemma 12.8 yieldd(x) Å d(y !) / 1.

t(w) ° ÉpÉ / ÉqÉ Å Ép[u]É / 1In all cases, p[x !] cannot traverse the nucleus U , since,

/ Ép[£ !, w]É / ÉqÉ Å dAr(u) / dAr(£) (22)otherwise, propj(U) or propj(U) ! would be on p[x!] bythe induction hypothesis. But, then, we can exchange p[y , / 1 Å tAr(u , £ !) Å t(u , £ !) Å 2 j / 1u !] with the complementary path of a dj(u , y !)-pathwhich, again, is entirely contained in U , and obtain a

and even t(w) Å 2 j / 1 and d(w) ú d(w !) , since wvalid s£-path again. Because of the minimality of p , weis not strictly ( j)-reachable. On the other hand, d(w)have Ép[y , u !] !É Å dj(u , y !) . By the induction hypothe-Å dAk(w) holds for any maxlevel node w with t(w)sis, p[y , u !] is ( j)-valid. !Å 2 j / 1 by Theorem 12.7. Thus, exactly the maxlevelnodes w with t(w) Å 2 j / 1 become strictly reachableWe can now do the induction step for the proof of

Theorem 12.1. Here, we prove the conditions (a1) – (a3) during the investigation of the bridges of tenacity 2 j/ 1.only for a specific chain extending the set of ( j)-arcs to

the set of ( j / 1)-arcs, but note that the selection of this If ar Å u !r £r is a prop, and k / 1 ° r ° k / l , thend(u !r ) Å j and d(£r) Å j / 1 hold. It is obvious that archain is immaterial.

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 27: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

BALANCED NETWORK FLOWS. I 27

is (Ar)-accessible and an (Ar)-prop. An application of a special case of the well-known disjoint set union prob-Theorem 10.2 and induction on r show that Ar satisfies lem (DSU).(a1) – (a3) for r Å k / 1, k / 2, . . . , k / l and that It is somewhat surprising that the DSU is the criticalonly the node £r becomes strictly reachable during part in determining the asymptotic complexity. Neverthe-the investigation of ar and a !r . Finally, d(w) Å dj/1(w) less, the BNS can be realized in (almost) linear timeholds for any minlevel node w with distance label d(w) algorithms. If a depth first search strategy is chosen (asÅ j / 1. ! in the algorithm of Kameda and Munro [18]) , one canWe already know the most important consequences of avoid to merge blossoms explicitly, but, then, augmenting

Theorem 12.1, namely, the results which prepared the paths are missed for some pathological instances.induction step and which now hold for all values of i . In forthcoming papers, we will present three such im-We also conclude that the general blossoms and nuclei plementations of the BNS: In [10], we will present astudied in Section 9 coincide with the ( i)-blossoms and DFS-like procedure extending the Kameda/Munro algo-the ( i)-nuclei, respectively. rithm together with an example where an augmenting

path is missed. We will also describe a BFS-like algorithmwhich is an improvement of the Kocay/Stone [20] algo-Corollary 12.9. Every blossom of the balanced network

N is an ( i)-blossom for some appropriate i √ N. rithm and is similar to the Edmonds [7] search strategy.From the latter method, an O(nm)-time algorithm for the

Proof. We choose i :Å max{d(£) : £ √ V (N)} / 1. k-factor problem and an O(m2)-time algorithm for the f-Then, d(£) õ i 0 1 holds for every minlevel node and factor problem result.t(£) õ 2i 0 1 holds for every node £ √ C. Because of Another paper [11] will concern the double depth firstTheorem 12.1, we obtain C Å Ci and B Å Bi . That means search procedure and the extension of the algorithm ofthat the buds of N are exactly the ( i)-buds. Micali /Vazirani [23] to capacitated matching problems.The only arcs of N that are not ( i)-arcs are the bridges This BNS method determines minimum valid paths andof infinite tenacity. By Theorem 9.10, these arcs cannot results in strongly polynomial time algorithms for thebe contained in a nucleus. Let u£ ! be a bicursal arc; p , maximum balanced flow problem.a u£ !-accessing path, and b :Å base(U(u , £)) . Then,p[b , £ !] is ( i)-valid by the base identity. If q is a di (b)-path, then q " p[b , £ !] is ( i)-valid and u£ !-accessing, REFERENCESthat is, every bicursal arc is ( i)-bicursal, and the properblossoms are exactly the proper ( i)-blossoms. !

[1] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, NetworkFlows, Prentice Hall, Englewood Cliffs, NJ (1993).

[2] R. P. Anstee, An algorithmic proof of Tutte’s f-factortheorem, J Alg 6 (1985), 112–131.SUMMARY

[3] C. Berge, Two theorems in graph theory, Proceed NatAcad Sci 43 (1957), 842–844.In this paper, we have presented a series of tools which

[4] W. H. Cunningham and A. B. Marsh, A primal algorithmappear in the setup of nearly all algorithms for the cardi-for optimum matching, Math Program Study 8 (1978),nality matching problem. Using the results of Section 10,50–72.one will find it easy to investigate the relationship be-

[5] U. Derigs, Programming in networks and graphs,tween specific matching algorithms that depend on aug- Springer, Heidelberg, 1988.mentation. By our discussion, the correctness of the[6] J. Edmonds, Maximum matching and a polyhedron 0,1known cardinality matching algorithm is easy to verify. vertices, J Res Natl Bur Stand Sect B 69 (1965), 125–Our results generalize the techniques for the cardinality 130.

matching problem and the maximum-flow problem and [7] J. Edmonds, Paths, trees and flowers, Can J Math 17describe algorithms for the f-factor and the degree con- (1965), 449–467.strained subgraph problem. As in the earlier work of Ko- [8] S. Even and R. E. Tarjan, Network flow and testing graphcay and Stone, we have encoded these matching problems connectivity, SIAM J Comput 4 (1975), 507–512.into a special class of flow networks and considered aug- [9] L. R. Ford and D. R. Fulkerson, Flows in Networks,mentation algorithms and the process of balanced network Princeton University Press, Princeton, NJ, 1962.search (BNS). [10] C. Fremuth-Paeger and D. Jungnickel, Balanced networkBy our discussion, the BNS splits into three parts: The flows (II) : Simple augmentation algorithms, Networks,

first task is the management of the search strategy. The to appear.second task is determining all blossoms that have to be [11] C. Fremuth-Paeger and D. Jungnickel, Balanced networkmerged together if a bridge is investigated. The third task flows (III) : Strongly polynomial augmentation algo-

rithms, Networks, to appear.is merging these blossoms actually together which is

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks

Page 28: Balanced network flows. I. A unifying framework for design and analysis of matching algorithms

28 FREMUTH-PAEGER AND JUNGNICKEL

[20] W. Kocay and D. Stone, An algorithm for balanced[12] C. Fremuth-Paeger and D. Jungnickel, Balanced networkflows, JCMCC 19 (1995), 3–31.flows (IV): Duality and structure theory, Networks, sub-

[21] L. Lovasz and M. D. Plummer, Matching Theory, North-mitted.Holland, Amsterdam, 1986.[13] C. Fremuth-Paeger and D. Jungnickel, Balanced network

[22] A. B. Marsh, Matching algorithms, PhD Thesis, Johnflows (V): Cycle canceling algorithms, Networks, sub-Hopkins University, Baltimore, 1979.mitted.

[23] S. Micali and V. V. Vazirani, An O(√V E) algorithm[14] A. Goldberg and A. V. Karzanov, Path problems in

for finding maximum matching in general graphs, Pro-skew-symmetric graphs, Combinatorica 16 (1996),ceedings of the 21st Annual IEEE Symposium in Foun-353–382.dation of Computer Science, 1980, pp. 17–27.[15] P. Hell and D. G. Kirkpatrick, Algorithms for degree

[24] U. Pape and D. Conradt, Maximales matching in gra-constrained graph factors of minimum deficiency, J Algphen, Ausgewahlte Operations Research Software in14 (1993), 115–138.FORTRAN, H. Spath (Editor) , Oldenbourg, Munich,[16] J. E. Hopcroft and R. M. Karp, An n 5/2 algorithm for 1980, 103–114.

maximum matching in bipartite graphs, SIAM J Comput [25] W. Pulleyblank, Faces of matching polyhedra, PhD The-2 (1973), 225–231. sis, University of Waterloo, 1973.[17] D. Jungnickel, Graphen, Netzwerke und Algorithmen, [26] W. T. Tutte, The factors of graphs, Can J Math 4 (1952),3rd ed. BI-Wissenschafts-verlag, Mannheim, 1994. En- 314–328.

glish edition to appear in 1998 published by Springer.[27] W. T. Tutte, Antisymmetrical digraphs. Can J Math 19

[18] T. Kameda and I. Munro, An O(ÉVÉ!ÉEÉ) algorithm for (1967), 1101–1117.maximum matching of graphs, Computing 12 (1974), [28] V. V. Vazirani, A theory of alternating paths and blos-91–98. soms for proving correctness of the O(

√V E) general

[19] W. Kocay and D. Stone, Balanced network flows, Bull graph maximum matching algorithm, Combinatorica 14ICA 7 (1993), 17–32. (1994), 71–109.

839/ 8U26$$0839 11-12-98 10:53:23 netwa W: Networks