This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Maximum Cardinality ff-Matching in Time O(n2/3m)O(n^{2/3}m)

Harold N. Gabow Department of Computer Science, University of Colorado at Boulder, Boulder, Colorado 80309-0430, USA. E-mail: hal@cs.colorado.edu
Abstract

We present an algorithm that finds a maximum cardinality ff-matching of a simple graph in time O(n2/3m)O(n^{2/3}m). Here f:Vf:V\to\mathbb{N} is a given function, and an ff-matching is a subgraph wherein each vertex vVv\in V has degree f(v)\leq f(v). This result generalizes a string of algorithms, concentrating on simple bipartite graphs. The bipartite case is based on the notion of level graph, introduced by Dinic for network flow. For general graphs the “level” of a vertex is unclear: A given vertex can occur on many different levels in augmenting trails. In fact there does not seem to be a unique level graph, our notion of level graph depends on the trails being analyzed. Our analysis presents new properties of blossoms of shortest augmenting trails.

Our algorithm, unmodified, is also efficient on multigraphs, achieving time O(min{f(V),n}m)O(\min\{\sqrt{f(V)},n\}\,m), for f(V)=vf(v)f(V)=\sum_{v}f(v).

1 Introduction

The method of shortest augmenting paths leads to many fundamental algorithms for graphs and networks. Dinic [4] as well as Edmonds and Karp [9] introduced the method for maximum network flow. Its use for matching and small networks was given by Hopcroft and Karp [16], Karzanov [18, 19], and Even and Tarjan [10]. These papers show that a maximum cardinality ff-matching on a bipartite graph can be found in time

(1.1) {O(n2/3m)G a simple graphO(f(V)m)G a multigraph.\begin{cases}O(n^{2/3}\;m)&G\text{ a simple graph}\\ O(\sqrt{f(V)}\;m)&G\text{ a multigraph.}\end{cases}

(For definitions of ff-matching and other terms please see the Terminology section below.) These bounds extend to problems with edge weights via cost-scaling, in work by Gabow and Tarjan [15] (the time increases by a logarithmic factor for scaling).111The above bound are the best known for combinatorial algorithms. Chen and Kyng et.al. [3] use interior point methods to achieve time m1+o(1)m^{1+o(1)} with high probability, even for the general problem of maximum flow in arbitrary networks.

Extending these results from bipartite to general graphs is a big jump, because of complications caused by blossoms, introduced by Edmonds [7] in the first efficient general graph matching algorithm. For general graphs with f1f\equiv 1, i.e., ordinary matching, Micali and Vazirani [21, 24, 25] use the shortest-augmenting-path method to achieve time O(nm)O(\sqrt{n}\;m). Huang and Pettie [17] achieve time O(f(V)mα(m,n))O(\sqrt{f(V)}\,m\,\alpha(m,n)) for general multigraphs (using scaling).

All of the above cited algorithms find shortest augmenting paths using the natural, breadth-first-search notion of a level graph ([23, pp. 153-155], [20, p.166], [2, called the “layered network”, Section 7.5]).

The main contribution of this paper is to extend the simple graph bound O(n2/3m)O(n^{2/3}m) from bipartite to general graphs. The difficulty is that the natural notion of level graph does not capture the structure of blossoms needed for this bound. Fundamentally:


\bullet Vertices no longer have unique levels. An O(n)O(n) size graph can have Θ(n2)\Theta(n^{2}) different levels.

\bullet Our level graph is not unique. It depends on the augmenting trails being analyzed.

\bullet Our analysis uses the natural version of our level graph to prove basic properties of blossoms. But we need to remove redundancies to deduce the final bound.


In spite of these difficulties we wind up with only two levels for each vertex, just like the bipartite case.


Previous work on simple general graphs was essentially introduced in the break-through paper of Duan, He, and Zhang [5]. They present a scaling algorithm for maximum weight ff-matching of simple (general) graphs. It comes within logarithmic factors of the bipartite bound, O~(n2/3mlogW)\widetilde{O}(n^{2/3}\,m\,\,{\rm log}\,W) (WW the maximum edge weight). In fact when all weights are 1 this is the first algorithm to achieve the n2/3mn^{2/3}\,m bound to within logarithmic factors, for unweighted ff-factors of simple general graphs. (See also [14] for a algorithm on multigraphs with time O(f(V)logf(V)mlog(f(V)W)O(\sqrt{f(V)\,{\rm log}\,f(V)}\,m\,\,{\rm log}\,(f(V)W).)

Our algorithm also runs in time O(min{f(V),n}m)O(\min\{\sqrt{f(V)},n\}\,m) on multigraphs. The first bound is a slight improvement of the above bound of [17] (and avoids scaling).

Content and structure of the paper

We call the new type of vertex levels “petalevels”. (They are caused by the petals of blossoms.) We present a family of example graphs that has a quadratic number of petalevels. The construction is not needed to prove our upper bound, but provides motivation. We also present formulas for ordinary levels and petalevels, without proof but for more motivation. The formulas can be proved using the approach of [11] for matching. In fact our algorithm follows the weighted matching approach to maximum cardinality matching introduced by Gabow [11].

The paper is organized as follows. Section 2 sets the stage. It starts by reviewing the shortest-augmenting-trail approach (Section 2.1) and the ff-matching algorithm (Section 2.2). Section 2.3 presents our example graph with multiple petalevels. Section 3 proves the main result, the n2/3n^{2/3} bound on iterations for simple graphs. Section 4 completes our result by providing details of the matching algorithm. Appendix A completes the description of how the ff-matching algorithm searches the example graph.

Terminology and conventions

We often omit set braces from singleton sets, denoting {v}\{v\} as vv. So SvS-v denotes S{v}S-\{v\}. We abbreviate expressions {v}S\{v\}\cup S to v+Sv+S. We use a common summing notation: If ff is a function on elements and SS is a set of elements then f(S)f(S) denotes sSf(s)\sum_{s\in S}f(s).

The trees in this paper are out-trees (i.e., a root has indegree 0 and all other nodes have indegree 1). An out-forest is a collection of disjoint out-trees. (We sometimes erroneously say “out-tree” when “out-forest” is the proper term; this is done for convenience and intuition.) Writing xyxy for an arc of a tree implies the arc joins parent xx to child yy. In this case we also define τ(y)\tau(y) to be arc xyxy. (Mnemonically, τ\tau stands for directed to.)

We extend parent and child relations to tree arcs, e.g., arc xyxy is the parent of yzyz. A node xx is an ancestor of a node yy allows the possibility x=yx=y, unless xx is a proper ancestor of yy.

Graphs in this paper are undirected multigraphs. Loops are allowed (even in simple graphs). A cycle is a connected degree 2 subgraph, be it a loop, 2 parallel edges, or an undirected graph cycle. A trail is a path that is allowed to repeat vertices but not edges. For vertices x,yx,y an xyxy-trail has ends xx and yy.

In graph G=(V,E)G=(V,E) for SVS\subseteq V and MEM\subseteq E, δM(S)\delta_{M}(S) (γM(S)\gamma_{M}(S)) denotes the set of edges of MM with exactly one (respectively two) endpoints in SS. We sometimes write For a set of vertices SVS\subseteq V and a subgraph HH of GG, δ(S,M)\delta(S,M) (γ(S,M)\gamma(S,M)). dH(v)d_{H}(v) (d(v,H)d(v,H)) denotes the degree of vertex vv in HH. When referring to the given graph GG we often omit the last argument and write, e.g., δ(S)\delta(S). (For example a vertex vv has d(v)=|δ(v)|+2|γ(v)|d(v)=|\delta(v)|+2|\gamma(v)|.)

We omit MM (writing δ(S)\delta(S) or γ(S)\gamma(S)) when M=EM=E. A loop at vSv\in S belongs to γ(S)δ(S)\gamma(S)-\delta(S). For multigraphs GG all of these sets are multisets.

For an undirected multigraph G=(V,E)G=(V,E) with function f:V+f:V\to\mathbb{Z}_{+}, an ff-matching is a subgraph where each vertex vVv\in V has degree at most f(v)f(v). A maximum (cardinality) ff-matching contains the greatest possible number of edges. Vertex vv is free if strict inequality holds.

We often call an ff-matching a matching. We refer to an ordinary matching as a 1-matching (i.e., ff is identically 1 for all vertices). def(x)def(x) is the deficiency of vertex xx in the current matching MM, def(x)=f(x)|δ(x,M)|2|γ(x,M)|def(x)=f(x)-|\delta(x,M)|-2|\gamma(x,M)|.

Consider a graph GG with an ff-matching MM. An augmenting trail is an alternating trail AA that begins and ends at a free vertex, such that MAM\oplus A is a valid matching, i.e., the two ends of the trail still satisfy their degree bound ff. (The trail may be closed, i.e., AA begins and ends at the same vertex. Alternating means consecutive edges of AA have opposite M-types.)

Additional notation for matchings is given at the start of Section 2.2.

2 Background

2.1 Shortest Augmenting Trails

Consider an ff-matching MM. Let SS be an augmenting trail for MM. |S||S| denotes the length of SS. SS is a shortest augmenting trail if it has the minimum length possible. We call SS a sat.

Hopcroft and Karp [16] and Karzanov [18] proved the fundamental result that for 1-matching the length of a sat is nondecreasing. The proof immediately extends to ff-matching. For completeness we sketch it.

Lemma 2.1

Let MM be an arbitrary ff-matching. Let S1S_{1} be a sat for MM and S2S_{2} a sat for MS1M\oplus S_{1}. Then |S1||S2||S_{1}|\leq|S_{2}|.

Proof: Let NN be the ff-matching resulting from augmenting the two sats, N=(MS1)S2N=(M\oplus S_{1})\oplus S_{2}. Since MN=S1S2M\oplus N=S_{1}\oplus S_{2} we have

|MN||S1S2||S1|+|S2|.|M\oplus N|\leq|S_{1}\cup S_{2}|\leq|S_{1}|+|S_{2}|.

We claim MNM\oplus N contains two edge-disjoint trails T1,T2T_{1},T_{2} that are augmenting for MM. This implies

|MN||T1|+|T2|2|S1|.|M\oplus N|\geq|T_{1}|+|T_{2}|\geq 2|S_{1}|.

Combining these two inequalities gives |S1|+|S2|2|S1||S_{1}|+|S_{2}|\geq 2|S_{1}|, |S2||S1||S_{2}|\geq|S_{1}| as desired. So to complete the proof we need only prove the claim.

For i=1,2i=1,2 let trail SiS_{i} have ends viv_{i} and wiw_{i}. (These four ends need not be distinct, in fact all four may be the same vertex.) Enlarge MM to an ff-matching MM^{\prime} by adding artificial edges viwiv_{i}w_{i}, i=1,2i=1,2. Every vertex uVu\in V has d(u,N)=d(u,M)d(u,N)=d(u,M^{\prime}). So NMN\oplus M^{\prime} is a collection of edge-disjoint alternating circuits. Removing the two artificial edges creates two alternating trails that begin and end with edges of NMN-M and hence are augmenting for MM. (In detail let CiC_{i} be the circuit containing viwiv_{i}w_{i}, i=1,2i=1,2. If C1C2C_{1}\neq C_{2} then the desired augmenting trails are Ti=CiviwiT_{i}=C_{i}-v_{i}w_{i}. If C1=C2C_{1}=C_{2} then C1v1w1v2w2C_{1}-v_{1}w_{1}-v_{2}w_{2} is the disjoint union of trails T1T_{1} and T2T_{2}.) \Box

The lemma leads to the following high-level algorithm for finding a maximum cardinality ff-matching. Define a blocking set to be a maximal size collection of edge-disjoint shortest augmenting trails. The algorithm repeatedly finds a blocking set and augments each of its trails. When no augmenting trail exists the matching is maximum.

Our goal is to show a maximum cardinality ff-matching on a general graph can be found in time (1.1). Section 4 shows a blocking set can be found in time O(m)O(m). So the goal is achieved by showing the high-level algorithm finds O(min{f(V),n}O(\min\{\sqrt{f(V)},n\} blocking sets on multigraphs and O(n2/3)O(n^{2/3}) blocking sets on simple graphs. The arguments are as follows.

Let MM be the ff-matching at some point in the high-level algorithm. Let ss be the length of a sat for MM. We start with the simple analysis for multigraphs.

Proof of the 𝒇(𝑽)\sqrt{f(V)} bound

A maximum cardinality matching MM^{*} gives a collection of (|M||M|)/2(|M^{*}|-|M|)/2 disjoint augmenting trails. Each such trail is alternating. Its length is s\geq s. So it has (s1)/2\geq(s-1)/2 matched edges. This imples there are (f(V)/2)/(s1)/2\leq(f(V)/2)/(s-1)/2 trails. When s=f(V)+1s=\sqrt{f(V)}+1 there are f(V)\leq\sqrt{f(V)} such trails. So the number of searches in the algorithm is 2f(V)+1\leq 2\sqrt{f(V)}+1.


Proof of the 𝒏n bound

Any vertex vv occurs at most twice in a sat. In proof, if a sat enters vv on edge uvuv and reenters vv on uvu^{\prime}v, then the two edges have opposite M-types (otherwise we can omit the subtrail from uvuv to uvu^{\prime}v.) Thus the algorithm halts with s2ns\leq 2n.


Proof of the 𝒏𝟐/𝟑n^{2/3} bound, high level

The key property is


()(*)                   Any ff-matching has at most 4(n/s)24(n/s)^{2} more edges than MM.


Taking s=22/3n2/3s=2^{2/3}n^{2/3} shows after 22/3n2/3\leq 2^{2/3}n^{2/3} searches, at most (4/24/3)n2/3=22/3n2/3(4/2^{4/3})n^{2/3}=2^{2/3}n^{2/3} augmenting trails need be found. So the total number of searches is at most 25/3n2/3<4n2/32^{5/3}n^{2/3}<4n^{2/3}.


Section 3 will prove ()(*). We do this by defining a level graph LGLG and identifying a bottleneck level, as in [10] and [18]. Ultimately the argument is similar to the bipartite argument: We show some layer of LGLG has 4(n/s)\leq 4(n/s) nodes, hence 4(n/s)2\leq 4(n/s)^{2} edges.

Our approach, both for proving ()(*) and for our corresponding efficient algorithm, is via weighted matching, as presented for ordinary matching by Gabow [11]. In detail suppose we seek a sat for a given ff-matching MM. Assign weights to the edges of GG by

(2.1) w(e)={0eM2eM.w(e)=\begin{cases}0&e\notin M\\ 2&e\in M.\end{cases}

The (incremental) weight of an alternating trail TT is defined as

w(T,M)=w(TM)w(TM).w(T,M)=w(T-M)-w(T\cap M).

An alternating trail TT that starts with an unmatched edge emanating from a free vertex has length

(2.2) |T|=w(T,M)+|T|mod 2.|T|=-w(T,M)+|T|{\rm mod\ }2.

So a sat is an augmenting trail with the greatest possible weight. Edmonds’ algorithm for ordinary matching, as extended to ff-matchings by Gabow [12], finds such a trail.

Combining this idea with the high-level algorithm of Hopcroft and Karp gives the pseudocode for our algorithm in Fig. 1. We fill in the details of this algorithm in Section 4. First we will use this outline to prove ()(*), in Section 3.

Initialize BlockBoundBlockBound to min{f(V),2n}\min\{\sqrt{f(V)},2n\} for multigraphs or n2/3n^{2/3} for simple

graphs. Then execute the following:


MM\leftarrow a maximal ff-matching, Δ0\Delta\leftarrow 0

while (Δ<BlockBound\Delta<BlockBound)

for (every edge ee) w(e)w(e)\leftarrow if (eMe\in M) 22 else 0

for (every vertex vv) y(v)1y(v)\leftarrow 1

execute an ff-matching search to find a maximum weight augmenting trail

if (no augmenting trail is found) return MM

{{\cal B}}\leftarrow a blocking trail set

augment the trails of {\cal B}

ΔΔ+2\Delta\leftarrow\Delta+2


loop

search for an augmenting trail TT

if (no augmenting trail is found) return MM

augment TT

Figure 1: Blocking trail algorithm to find a maximum ff-matching.

2.2 Weighted Blossoms

The proof of ()(*) requires some basic properties of ff-matching blossoms. We present them here. Readers familiar with [12] need only skim this section to review the notation. Fig. 2 illustrates the discussion.

Refer to caption
1-102-2220ϕ\phi113-3331-11-111ϕ\phi22001-13311112222xx44xx22ϕ\phiϕ\phi0
Figure 2: Blossoms and petalevels: (a) Search structure for y(ϕ)=2y(\phi)=-2. Vertex labels are yy values, and the triangle blossom has zz-value 0. Edge weights are given by (2.1). (b) Search structure for y(ϕ)=3y(\phi)=-3, with yy and zz values. One blossom BB contains all vertices and has zz-value 0. BB can be parsed using the subblossom of (c) or of (d). Vertex xx, as an outer vertex, is on level 2 in (d) and level 4 in (c).

We begin with more terminology for matchings.

Contracting a subgraph contracted vertex (all internal edges including internal loops disappear). We will even contract subgraphs that just contain a loop. We use the following notation for contractions. Let G¯\overline{G} be a graph derived from GG by contracting a number of vertex-disjoint subgraphs. VV (V¯\overline{V}) denotes the vertex set of GG (G¯\overline{G}), respectively. A vertex of G¯\overline{G} that belongs to VV (i.e., it is not in a contracted subgraph) is an atom. We identify an edge of G¯\overline{G} with its corresponding edge in GG. Thus an edge of G¯\overline{G} incident to a contracted vertex is denoted as xyxy, where xx and yy are VV-vertices in distinct V¯\overline{V}-vertices, and xyExy\in E. Let HH be a subgraph of G¯\overline{G}. The preimage of HH is a subgraph of GG consisting of the edges of HH, plus the subgraphs whose contractions are vertices of HH, plus the atoms of HH. V¯(H)\overline{V}(H) (V(H)V(H)) denotes the vertex set of HH (the preimage of HH), respectively. Similarly E¯(H)\overline{E}(H) (E(H)E(H)) denotes the edge set of HH (the preimage of HH), respectively.

Figures in this paper use the following conventions. Matched edges are drawn heavy, unmatched edges light. Free vertices are drawn as rectangles. Edge weights are always given by (2.1). Trails are indicated by arrowheads on their edges.

When discussing a matching MM, the M-type of an edge ee is MM or M¯\overline{M} depending on whether ee is matched or unmatched, respectively. We usually denote an arbitrary M-type as μ\mu, and μ(e)\mu(e) denotes the M-type of edge ee.

Let GG be a graph with an ff-matching. A trail is closed if it starts and ends at the same vertex. A trail is alternating if every 2 consecutive edges have opposite M-types. The first and last edges of a closed trail are not consecutive.

Blossoms are defined recursively as follows. Let G¯\overline{G} be a graph derived from GG by contracting a family 𝒜{\cal A} of zero or more vertex-disjoint blossoms. Let CC be a closed trail in G¯\overline{G} that starts and ends at a vertex αV(G¯)\alpha\in V(\overline{G}). The preimage of CC is a blossom BB with base vertex β(B)\beta(B) if CC has the following properties:


If α\alpha is an atom then CC starts and ends with edges of the same MM-type. BB has this MM-type and β(B)=α\beta(B)=\alpha.

If α𝒜\alpha\in{{\cal A}} then BB has the same MM-type as α\alpha and β(B)=β(α)\beta(B)=\beta(\alpha).


If vv is an atom of CC then every 2 consecutive edges of δ(v,C)\delta(v,C) alternate.

If v𝒜Cv\in{{\cal A}}\cap C then d(v,C)=2d(v,C)=2. Furthermore if vαv\neq\alpha then δ(β(v),C)\delta(\beta(v),C) contains an edge of opposite MM-type from vv.


Note that as a subgraph of GG, a blossom BB has vertex and edge sets V(B)V(B) and E(B)E(B). Also note in Fig.2 the blossom of part (b) can be viewed as being formed from the blossom of part (c) or the blossom of part (d). (This nonuniqueness is usually irrelevant.)

In addition we define the base edge of a blossom AA, denoted η(A)\eta(A). η(A)\eta(A) is an edge that leaves V(A)V(A) from vertex β(A)\beta(A), and it has opposite MM-type from AA. Every blossom with base β(A)\beta(A) has the same base edge η(A)\eta(A). So now assume AA is the maximal blossom with base vertex β(A)\beta(A). If AA is in the closed trail CC of some blossom, η(A)\eta(A) is the edge required in the above definition. (In case both edges of δ(β(v),C)\delta(\beta(v),C) qualify, the choice for η(A)\eta(A) is arbitrary.) If AA is a maximal blossom (i.e., not in such a closed trail) η(A)\eta(A) is some chosen edge (of opposite MM-type from AA); it will be clear from context.

Blossoms where β(A)\beta(A) is a free vertex are a special case. We say the blossom is free. A free blossom has MM-type M¯\overline{M} (since an augmenting trail always begins with an unmatched edge). Also the vertex β(A)\beta(A) has deficiency 1. (Otherwise the edges of AA contain an augmenting trail, and the blossom structure is irrelevant.) For a free blossom η(A)\eta(A) is a matched edge from an artificial vertex ε\varepsilon to β(A)\beta(A).

For any blossom BB, any edge leaving BB other than η(B)\eta(B) is a petal of BB. Blossom BB is heavy (light) if its M-type is MM (M¯\overline{M}), respectively.

In a blossom BB with base vertex β\beta, each vertex vV(B)v\in V(B) has 2 associated vβv\beta-trails in E(B)E(B), Pi(v,β)P_{i}(v,\beta), i=0,1i=0,1. Each PiP_{i} is alternating and ends with an edge whose MM-type is that of BB. The starting edge for P1(v,β)P_{1}(v,\beta) has the same MM-type as BB; it has the opposite MM-type for P0(v,β)P_{0}(v,\beta). There is one exceptional trail: P0(β,β)P_{0}(\beta,\beta) is the length 0 trail β\beta.

Next we describe the linear program dual variables for weighted matching, as they are maintained in [12] (extending [8]). Assume every edge of GG has a numerical weight w(e)w(e). We define a subset of the edges incident to a blossom BB by

I(B)=δ(V(B),M)η(B).I(B)=\delta(V(B),M)\oplus\eta(B).

(Here MM is the matching and II stands for “incident”.) There are two dual functions y:Vy:V\to\mathbb{R}, z:2V+z:2^{V}\to\mathbb{R_{+}}. Define yz^:E\widehat{yz}:E\to\mathbb{R} by

(2.3) yz^(e)=y(e)+z{B:eγ(B)I(B)}.\widehat{yz}(e)=y(e)+z\{B:e\in\gamma(B)\cup I(B)\}.

The duals satisfy the LP feasibility conditions, which (using CS for blossoms) are:

ee matched \displaystyle\Rightarrow ee is underrated, i.e., yz^(e)w(e)\widehat{yz}(e)\leq w(e)
ee unmatched \displaystyle\Rightarrow ee is dominated, i.e., yz^(e)\widehat{yz}(e) is w(e)\geq w(e)

We say ee is tight if equality holds, otherwise loose. The terms strictly dominated and strictly underrated refer to the possibilities >w(e)>w(e) and <w(e)<w(e) respectively.

A positive blossom has positive zz-value. For any positive blossom BB every edge of E(B)+η(B)E(B)+\eta(B) is tight. (A zero blossom has z(B)=0z(B)=0. Note that the subgraph of a zero blossom can be part of the subgraph of a positive blossom. For example the blossoms of Fig.2(b)–(d) are zero blossoms. We can make (b) a positive blossom (lower y(ϕ)y(\phi) to 4-4) but (c) or (d) remains a zero blossom.)

The last property of duals is that all free vertices ϕ\phi have the same yy-value y(ϕ)y(\phi). A structured matching consists of a matching, duals y,zy,z, and positive blossoms wherein every unmatched (matched) edge is dominated (underrated) respectively; every edge in a positive blossom subgraph is tight; and every free vertex has the same yy-value.


Edmonds’ algorithm and its extension to ff-matching both work by constructing a “search structure” 𝒮\cal S. The structure consists of atoms and blossoms, and 𝒮¯\overline{\cal S} denotes 𝒮\cal S with all blossoms contracted. 𝒮¯\overline{\cal S} is a forest, and we call the elements of V(𝒮¯)V({\overline{\cal S}}) “nodes”. (Recall our tree terminology from Section 1.) Every edge of 𝒮\cal S is tight. The roots of 𝒮¯\overline{\cal S} are the free vertices/blossoms. If vv is an atom of 𝒮¯\overline{\cal S} then τ(v)\tau(v) alternates with each child edge of vv. (For a free vertex vv take τ(v)=εv\tau(v)=\varepsilon v.) The base edge of a blossom BB in 𝒮\cal S is its parent edge τ(B)\tau(B).

Every node of 𝒮¯\overline{\cal S} has a corresponding path to the root of its search tree. These paths expand to trails in GG for every vertex of 𝒮\cal S. We denote the trails as Pj(v)P_{j}(v), defined as follows. Call an atom vv of 𝒮¯\overline{\cal S} inner if τ(v)\tau(v) is unmatched and outer if τ(v)\tau(v) is matched. Correspondingly an io-type is ii or oo, for inner and outer respectively. A vertex vv in a blossom has both io-types. Any vertex of 𝒮\cal S has a trail Pj(v)P_{j}(v). Here jj is the io-type of vv. Pj(v)P_{j}(v) starts with an edge from vv that is unmatched (matched) for j=ij=i (j=oj=o). It ends on an unmatched edge to a free vertex. Pj(v)P_{j}(v) starts with τ(v)\tau(v) if vv is atomic. If vv is in a blossom Pj(v)P_{j}(v) starts with the trail Pi(v)P_{i}(v), where ii is chosen to correspond with jj. A node on a path to the root in 𝒮¯\overline{\cal S} expands in a PP_{\cdot} trail in the obvious way. Every trail Pj(v)P_{j}(v) is alternating.

For a blossom BB, two edges of δ(B)\delta(B) alternate if one of the edges is η(B)\eta(B). The motivation for this definition is that the two edges can be combined with the appropriate PiP_{i} trail to form an alternating trail in GG. Note that with this definition, 𝒮¯{\overline{\cal S}} is an alternating forest, i.e., its edges alternate at every node.

Pj(v)P_{j}(v) is a shortest alternating trail that starts with an unmatched (matched) edge for j=ij=i (j=0j=0) and ends with an unmatched edge to a free vertex. (This can be proved following the development in [11] for 1-matching, or using the tracking algorithm of Section 3. But we do not use this fact.) We denote the length of Pj(v)P_{j}(v) as lj(v)l_{j}(v). lj(v)l_{j}(v) is the basic level of a vertex in the level graph. But unlike level graphs of previous papers, vertices have other levels. We call these other levels petalevels, since they are caused by petals in shortest trails.222In more detail ordinary levels are formed by trails that enter every positive blossom on its base edge. So they are “basic levels”. In contrast petalevels enter at least one positive blossom on a petal. Fig. 2(c)-(d) show a vertex with ordinary level lo(x)=2l_{o}(x)=2 and petalevel 4.

Refer to caption
2-2β4\beta_{4}β1\beta_{1}e1e_{1}e2e_{2}e3e_{3}e4e_{4}8-8220886-64-42-26644220222222228-84-44-44-44-4666-66-66-6β2\beta_{2}4444β3\beta_{3}2202-2
Figure 3: Vertices have multiple petalevels in graph EG(4)EG(4). Four sats of length 17 are formed by “cross edges” eie_{i}, i=1,,4i=1,\ldots,4. Arrows give e2e_{2}’s sat. Vertex βi\beta_{i}, i=1,4i=1,\ldots 4, is the base of blossom BiB_{i}, which consists of the edges touching the ii lowest 2’s (B4B_{4} consists of all the edges descending from β4\beta_{4}, and Bi,i<4B_{i},i<4 consists of all but the rightmost edge descending from βi\beta_{i}). The base vertices occur at various levels in the sats: The table gives the level l(Bj)l(B_{j}) of base βj\beta_{j} in the sat for eie_{i}.
l(β1)l(\beta_{1}) l(β2)l(\beta_{2}) l(β3)l(\beta_{3}) l(β4)l(\beta_{4})
e1e_{1} 6
e2e_{2} 8 9
e3e_{3} 10 11 12
e4e_{4} 12 13 14 15

2.3 Multiple Petalevels

This section provides a central motivation for our proof of ()(*), an example graph with too many petalevels to include in the desired level graph. Strictly speaking the example is not needed to prove ()(*). But we include it here to provide an in-depth look at the search structure 𝒮\cal S, to illustrate how multiple petalevels arise, and to provide details about how the example graph’s search structure can actually occur in our algorithm Fig. 1. (The remaining details for this are given in Appendix A.)

The example graph EG(b)EG(b) has bb blossoms, for any even b2b\geq 2. EG(b)EG(b) has Θ(b)\Theta(b) vertices and edges. It has sat length 4b+14b+1 and importantly, Θ(b2)\Theta(b^{2}) petalevels. Fig.3 gives a simple example, with b=4b=4 and sat length 17. Its table shows there are 6 petalevels (that are not ordinary levels).

As usual vertical level in the figure corresponds to level, i.e., shortest distance from a free vertex. So the two vertices with yy-value 0 are at level 8. Edges drawn vertically are in the search structure 𝒮\cal S.

The blossoms BiB_{i} are alternately heavy and light. The triangle blossom B1B_{1} has a slightly different structure from the others. Changing it to have the same structure gives a similar construction, with multiple petalevels. We do not present it because that structure cannot be grown using the algorithm of Fig.1. Fig.5 shows how the algorithm grows the search structure of Fig. 3.

Note also that a similar example uses only light blossoms. So our construction can be modified for ordinary matching. The given construction has the advantage of being smaller.


Refer to caption
p3b2p_{3b-2}si2s_{i2}si1s_{i1}si3s_{i3}si4s_{i4}βi1\beta_{i-1}βi+1\beta_{i+1}βi\beta_{i}p3(bi)2p_{3(b-i)-2}p1+3(bi)p_{1+3(b-i)}βb\beta_{b}βb1\beta_{b-1}β2\beta_{2}β1\beta_{1}s24s_{24}β1\beta_{1}β2\beta_{2}PPp0p_{0}p1p_{1}p2p_{2}p3p_{3}p4p_{4}p3b5p_{3b-5}p3b4p_{3b-4}p3b3p_{3b-3}p3b2p_{3b-2}β1\beta^{\prime}_{1}
Figure 4: General structure of EG(b)EG(b): (a) Blossoms BiB_{i} and Bi+1B_{i+1}, i>1i>1 odd: Blossom Bi1B_{i-1} is extended to BiB_{i} by a path of 5 edges, βi1,βi,si1,si2,si3,si4\beta_{i-1},\beta_{i},s_{i1},s_{i2},s_{i3},s_{i4}. Arrows give edges on the alternating trail for lo(βi)l_{o}(\beta_{i}). BiB_{i} extends to Bi+1B_{i+1} by a similar path, with similar alternating trail. For any jj (odd or even), sj4=sj1,1s_{j4}=s_{j-1,1} and cross edge βjp1+3(bj)\beta_{j}p_{1+3(b-j)} is unmatched iff jj is odd. (b) Base case of the construction: Blossoms B1B_{1} and B2B_{2} are defined like part (a) except B1B_{1} is replaced with a triangle as shown. (c) PP is an alternating path of length 3b13b-1. The subpath of PP from p0p_{0} to p1+3(bi)p_{1+3(b-i)}, followed by the cross edge to blossom base βi\beta_{i}, is also alternating.

Fig.4 illustrates the general structure of the example graph EGEG. In addition we assume f(p0)=f(βb)=1f(p_{0})=f(\beta_{b})=1. The remaining vertices are saturated, as implied by the figure, and their ff-value is 1 or 2. The figure implies the following expressions that combine to define the augmenting trail of a cross edge βip1+3(bi)\beta_{i}p_{1+3(b-i)}.

Let jj be the io-type oo (ii) for ii odd (even). Let Si=si1si2si3si4S_{i}=s_{i1}s_{i2}s_{i3}s_{i4}. For every i1i\geq 1,

(2.4) lj(βi)=βbβiSβ1β1βil_{j}(\beta_{i})=\beta_{b}\ldots\beta_{i}S\beta_{1}^{\prime}\beta_{1}\ldots\beta_{i}

where

(2.5) S={SiSi1S2i>1s24i=1.S=\begin{cases}S_{i}S_{i-1}\ldots S_{2}&i>1\\ s_{24}&i=1.\end{cases}

This trail illustrated in Fig.3 for i=2i=2 and 4(a) for ii odd.

To calculate the length of βi\beta_{i}’s trail first note |S|=3(bi)|S|=3(b-i). So |lj(βi)|=(bi)+1+3(i1)+1+1+(i1)=b+3i1|l_{j}(\beta_{i})|=(b-i)+1+3(i-1)+1+1+(i-1)=b+3i-1.

The augmenting trail for βi\beta_{i} is

(2.6) lj(βi)p1+3(bi)p0.l_{j}(\beta_{i})p_{1+3(b-i)}\ldots p_{0}.

Its length is (b+3i1)+1+(1+3(bi))=4b+1(b+3i-1)+1+(1+3(b-i))=4b+1 as desired.

It is clear that the graph has size Θ(b)\Theta(b), and (2.4) implies there are Θ(b2)\Theta(b^{2}) petalevels. It only remains to prove the augmenting trails of (2.4) are all sats, i.e., s=4b+1s=4b+1. Appendix A shows this by exhibiting the optimum dual values. Here we present a path-tracing argument for greater intuition.

Let TT be a sat. The degree constraints imply TT contains both free vertices p0p_{0} and βb\beta_{b}. So TT contains a cross edge p1+3(bi)βip_{1+3(b-i)}\beta_{i}. The alternation of TT implies similar properties on both sides of the cross edge:

Proposition 2.2

(a) TPT\cap P is the path p0,,p1+3(bi)p_{0},\ldots,p_{1+3(b-i)}.

(b) For i=1i=1 TT contains β1β1s24β1\beta_{1}\beta_{1}^{\prime}s_{24}\beta_{1} or its reverse.

(c) For i>1i>1 if TT contains the directed edge si1si2s_{i1}s_{i2} then it contains Sβ1β1βiS\beta_{1}^{\prime}\beta_{1}\ldots\beta_{i}. (SS is defined as in (2.5).)

Proof: (a) A cross edge directed to pjp_{j} alternates with pjpj1p_{j}p_{j-1}, but not pj+1pjp_{j+1}p_{j} (see Fig. 4(c)). Using this, a simple downward induction (starting at j=p1+3(bi)j=p_{1+3(b-i)}) shows TT contains directed edge pjpj1p_{j}p_{j-1}.

The arguments for (b)–(c) are similar to (a): Arriving at a vertex vv on a directed edge uvuv, alternation implies there is only one possibility for the next edge.

(b) Examining Fig. 4(b), we use the nonalteration of directed edge s24s23s_{24}s_{23}.

(c) Examining Fig. 4(a)-(b), we successively use nonalteration of directed edges sj4βj1s_{j4}\beta_{j-1}, s24β1s_{24}\beta_{1}, βjsj+1,4\beta_{j}s_{j+1,4}. \Box

Part (a) of the lemma shows TT consists of the trail p0p1+3(bi)βip_{0}\ldots p_{1+3(b-i)}\beta_{i} and a trail from βi\beta_{i} to βb\beta_{b}, that begins with an edge of opposite M-type from the cross edge p1+3(bi)βip_{1+3(b-i)}\beta_{i}. We claim that trail must be lj(βi)l_{j}(\beta_{i}). (2.6) then shows s=4b+1s=4b+1 as desired.

Before proving the claim we show another simple property (self-evident from Fig. 4(a)-(b)).

Proposition 2.3

A shortest path tree for BbB_{b} is E(Bb){si3si4:i>1}s24β1E(B_{b})-\{s_{i3}s_{i4}:i>1\}-s_{24}\beta_{1}^{\prime}.

Proof: First observe that for any i>1i>1, the directed edge si3si4s_{i3}s_{i4} is not in a shortest path tree of BiB_{i}. This follows since the path βiβi1si4\beta_{i}\beta_{i-1}s_{i4} is shorter than βisi1si2si3si4\beta_{i}s_{i1}s_{i2}s_{i3}s_{i4}. Using this, an easy induction shows no edge sj3sj4s_{j3}s_{j4} is in a shortest path tree for BiB_{i}. This easily gives the proposition. \Box

For i=1i=1 a shortest path from β1\beta_{1} to βb\beta_{b} is β1βb\beta_{1}\ldots\beta_{b}. For every i>1i>1, a shortest path from si1s_{i1} to βb\beta_{b} is si1βiβbs_{i1}\beta_{i}\ldots\beta_{b}.


Proof of the Claim: We first assume 1<i<b1<i<b. The two exceptions are minor variants, which we treat after the main case.

TT enters blossom BiB_{i} on cross edge p1+3(bi)βip_{1+3(b-i)}\beta_{i}. To reach βb\beta_{b} it leaves BiB_{i} either on edge βiβi+1\beta_{i}\beta_{i+1} or si+1,4si+1,3s_{i+1,4}s_{i+1,3}. Observe that in both cases TT contains an alternating trail from βi\beta_{i} to the edge si1si2s_{i1}s_{i2}: To leave on βiβi+1\beta_{i}\beta_{i+1} alteration implies TT uses both edges descending from the cross edge, and alteration at si1s_{i1} implies TT uses si1si2s_{i1}s_{i2} as claimed. To leave on si+1,4si+1,3s_{i+1,4}s_{i+1,3}, alteration at si+1,4=si1s_{i+1,4}=s_{i1} also implies TT uses si1si2s_{i1}s_{i2}.

Now Proposition 2.2(c) shows TT contains

Sβ1β1βi.S\beta_{1}^{\prime}\beta_{1}\ldots\beta_{i}.

The rest of TT joins si1s_{i1} to βb\beta_{b}. Proposition 2.3 implies a shortest such path path is

si1βiβb.s_{i1}\beta_{i}\ldots\beta_{b}.

TT can use this path, since it alternates with si1si2s_{i1}s_{i2}. Since TT is a sat we can assume TT uses it. Now (2.4) shows the claim holds.


Case i=1i=1: After the unmatched cross edge TT must contain the two matched edges incident to β1\beta_{1} (in either order). So TT contains the entire triangle. Then it can follow the path β1βb\beta_{1}\ldots\beta_{b}. As in the main case we can assume it is used. So wlog TT contains β1β1s24β1βb\beta_{1}\beta^{\prime}_{1}s_{24}\beta_{1}\ldots\beta_{b} as desired.


Case i=bi=b: The matched cross edge implies TT contains an alternating trail beginning and ending with unmatched edges, i.e., βbβb1\beta_{b}\beta_{b-1} and βbsb1\beta_{b}s_{b1}. The latter implies TT contains sb1sb2s_{b1}s_{b2}. The rest of the argument is the same as i<bi<b. \spadesuit

3 The Simple Graph Bound

As shown in the previous section the nn vertices of a given graph may have Θ(n2)\Theta(n^{2}) different petalevels. Most of these must be discarded in our desired level graph.

Motivation

We begin by discussing an approach to define a small level graph that is tempting but, to the best of our knowledge, fails.

Like [5, 6] it is based on classifying each blossom as “big” or “small”, depending on whether its “size” (appropriately defined) is \geq or << n1/3n^{1/3}. Assuming disjointness there are n/n1/3=n2/3\leq n/n^{1/3}=n^{2/3} big blossoms, so augmenting trails through their base edges can be ignored. A vertex vv in a small blossom SS can be traversed on an edge of γ(S)\gamma(S) at most to n1/3n^{1/3} times, so only n1/3n^{1/3} petalevels are needed for vv. And over n2/3n^{2/3} levels, some level has (n×n1/3)/n2/3=n2/3\leq(n\times n^{1/3})/n^{2/3}=n^{2/3} such petalevels, so n2/3\leq n^{2/3} augmenting trails pass through that layer of LGLG. Unfortunately it does not seem possible to complete this approach. For instance the edges of δ(S)\delta(S) cannot be accounted for. In fact our approach ignores the notion of big blossoms entirely.

Instead, our approach resembles previous definitions of the level graph: Every vertex is represented at most twice in the level graph (just once for the previous definitions). An important difference is that our level graph depends on the collection 𝒯\cal T of augmenting trails being analyzed. In contrast previous definitions have a unique level graph.

To begin consider a graph with edge weights (2.1). All references to a matching, blossoms, dual variables, etc. refer to some fixed structured matching. (The structured matching will be provided by the algorithm of Fig.1.)

We start with some motivation. We shall see the following formula for the ordinary level of a vertex vv and any j{i,o}j\in\{\rm{i,o}\}:

(3.1) lj(v)={y(v)y(ϕ)j=o1(y{v,ϕ}+z(v))j=il_{j}(v)=\begin{cases}y(v)-y(\phi)&j=o\\ 1-(y\{v,\phi\}+z(v))&j=i\end{cases}

where

z(v)=z{B:vB}.z(v)=z\{B:v\in B\}.

The formula is valid for any search structure containing the corrsponding trail Pj(v)P_{j}(v).

Reading Pj(v)P_{j}(v) in reverse, note that it enters every blossom containing vv through its base edge (e.g., Pj(β1)P_{j}(\beta_{1}) for either jj in Fig.3). When vv occurs on a petalevel in some Pj(v)P_{j}(v^{\prime}), a blossom containing vv can be entered on a petal (e.g., v=β1v=\beta_{1} in Pj(β2)P_{j}(\beta_{2}) in Fig.3). Equation (3.1) generalizes to give the length of petalevels as follows.

Consider an alternating trail TT from free vertex ϕ\phi to vv, ending in an edge of io-type jj. Let ι\iota be the “entrance sequence” of vv in TT, i.e., for every positive blossom AA containing vv, ιA{b,p}\iota_{A}\in\{b,p\} is bb if TT enters AA on its base edge, pp if it enters on a petal (ι\iota is mnemonic for “in” value). We write ιA(v)\iota_{A}(v) if the vertex is not clear. Define the petalevel

(3.2) lj(v,ι)={y(v)y(ϕ)+zp(v,ι)j=o1(y{v,ϕ}+zb(v,ι))j=i,l_{j}(v,\iota)=\begin{cases}y(v)-y(\phi)+z_{p}(v,\iota)&j=o\\ 1-(y\{v,\phi\}+z_{b}(v,\iota))&j=i,\end{cases}

where for c{b,p}c\in\{b,p\},


zc(v,ι)=z{A:vA,ιA=c}z_{c}(v,\iota)=z\{A:v\in A,\iota_{A}=c\}.


When TT enters and leaves AA more than once, ιA\iota_{A} is defined by the last entry. Here the dual values y,zy,z are for any structured matching. As an example in Fig.3 vertex β1\beta_{1} in Pj(β2)P_{j}(\beta_{2}) has lo(β1,ι)=2(8)+2=8l_{o}(\beta_{1},\iota)=-2-(-8)+2=8.

It is easy to see that (3.2) becomes (3.1) when TT is Pj(v)P_{j}(v). Note that an atom vv has an empty ι\iota. For nonatomic vv, both of its ordinary levels lj(v)l_{j}(v) have ιA=b\iota_{A}=b for every blossom AA containing vv. Note also that any entrance sequence ι(v)\iota_{\cdot}(v) has lj(v,ι)lj(v)l_{j}(v,\iota)\geq l_{j}(v).

(3.1) and (3.2) can be proved by a “blossom-tracking” argument similar to [11] for ordinary matching. We omit this in this paper, since we can always rely on our more powerful petalevel-tracking approach. We proceed to explain how we track an augmenting trail TT (for the level graph).

Natural petalevels

We will present two versions of the petalevels of (3.2). The natural petalevels define ι\iota using the following rule. The dummy vertex ε\varepsilon leading to free vertices is not in any blossom and so has an empty entrance sequence. Suppose TT advances on an edge uvuv, with ι(u)\iota(u) already defined. For any positive blossom AA containing vv,

(3.3) ιA(v)={ιA(u)uAbuA,uv=η(A)puA,uvη(A).\iota_{A}(v)=\begin{cases}\iota_{A}(u)&u\in A\\ b&u\notin A,uv=\eta(A)\\ p&u\notin A,uv\neq\eta(A).\end{cases}

These natural petalevels are consistent with the description of petalevels in (3.2) Note this definition makes ι(v)\iota(v) empty if vv is atomic. Also note that the entry for a base edge is consistent: For blossoms AAA^{\prime}\subset A with the same base edge uv=η(A)=η(A)uv=\eta(A)=\eta(A^{\prime}), ιA(v)=ιA(v)\iota_{A^{\prime}}(v)=\iota_{A}(v).

We will analyze the natural petalevels before discussing the second version of petalevels. The following lemma is the basis of the crucial property that TT goes from one level of LGLG to the next, unless it falls back to a lower level. The lemma gets extended to the variant petalevels in the corollary below.

We associate an i/o type with an edge by using its M-type and assuming we are advancing along the edge. Specifically for an M-type μ{M,M¯}\mu\in\{M,\overline{M}\} define

(3.4) j(μ)={iμ=M¯oμ=M.j(\mu)=\begin{cases}i&\mu=\overline{M}\\ o&\mu=M.\end{cases}

When considering an edge uvuv we usually define j=j(μ(uv))j=j(\mu(uv)). Also for j{i,o}j\in\{i,o\} j¯{\overline{j}} denotes the opposite i/o value from jj. Similarly for j¯(μ(uv)){\overline{j}}(\mu(uv)).

Lemma 3.1

Consider an edge uvuv in an augmenting trail TT, where all petalevels are natural.

(a) For j=j(μ(uv))j=j(\mu(uv)),

(3.5) lj(v,ι(v))lj¯(u,ι(u))+1.l_{j}(v,\iota(v))\leq l_{{\overline{j}}}(u,\iota(u))+1.

(b) Equality holds in (a) iff uvuv is tight and it alternates at every positive blossom that it leaves, i.e., for every positive blossom AA with uA∌vu\in A\not\ni v, either ιA(u)=b\iota_{A}(u)=b or uv=η(A)uv=\eta(A).

Proof: The two possibilities uvuv matched and unmatched are symmetric, so we cover them in parallel. We begin by reducing the lemma to symmetric inequalities (3.8) and (3.11), and their tightness.


Case uvMuv\in M: The lemma’s inequality is li(u,ι(u))+1lo(v,ι(v))l_{i}(u,\iota(u))+1\geq l_{o}(v,\iota(v)), i.e., 1(y{u,ϕ}+zb(u,ι(u)))+1y(v)y(ϕ)+zp(v,ι(v))1-\big{(}y\{u,\phi\}+z_{b}(u,\iota(u))\big{)}+1\geq y(v)-y(\phi)+z_{p}(v,\iota(v)). Rearrange this to the equivalent inequality

(3.6) 2y{u,v}+zb(u,ι(u))+zp(v,ι(v)).2\geq y\{u,v\}+z_{b}(u,\iota(u))+z_{p}(v,\iota(v)).

Since uvuv is undervalued,

(3.7) 2y{u,v}+z(uv).2\geq y\{u,v\}+z(uv).

We will show

(3.8) z(uv)zb(u,ι(u))+zp(v,ι(v)),z(uv)\geq z_{b}(u,\iota(u))+z_{p}(v,\iota(v)),

Part (a) follows from (3.7) and (3.8). So we need only prove the latter for part (a). Equality in (3.5) is equivalent to equality in (3.7) and (3.8). So for (b) we need only prove equality in (3.8) is equivalent to (b)’s second condition.


Case uvM¯uv\in\overline{M}: We wish to prove lo(u,ι(u))+1li(v,ι(v))l_{o}(u,\iota(u))+1\geq l_{i}(v,\iota(v)), i.e., y(u)y(ϕ)+zp(u,ι(u))+11(y{v,ϕ}+zb(v,ι(v))).y(u)-y(\phi)+z_{p}(u,\iota(u))+1\geq 1-\big{(}y\{v,\phi\}+z_{b}(v,\iota(v))\big{)}. Rearrange this to the equivalent inequality

(3.9) y{u,v}+zp(u,ι(u))+zb(v,ι(v))0.y\{u,v\}+z_{p}(u,\iota(u))+z_{b}(v,\iota(v))\geq 0.

Since uvuv is dominated,

(3.10) y{u,v}+z(uv)0.y\{u,v\}+z(uv)\geq 0.

We will show

(3.11) zp(u,ι(u))+zb(v,ι(v))z(uv).z_{p}(u,\iota(u))+z_{b}(v,\iota(v))\geq z(uv).

(3.5) follows from (3.10)–(3.11), so we need only prove (3.11) for (a). Similarly equality in (3.5) amounts to equality in the two above inequalities. So (b) amounts to showing equality in (3.11) is equivalent to (b)’s second condition.


We will show that the desired inequalities (3.8) and (3.11) hold blossom-by-blossom, i.e., any blossom AA contributes at least as much to the LHS as the RHS. To do this, in the context of the chosen blossom AA we let LHSLHS be AA’s contribution to the LHS of (3.8) (respectively (3.11)) and similarly for RHSRHS, when discussing the set MM (resectively M¯\overline{M}). We will show LHSRHSLHS\geq RHS. In addition we will show some AA has LHS>RHSLHS>RHS iff uvuv does not alternate at AA, more precisely, uA∌vu\in A\not\ni v with ιA(u)=p\iota_{A}(u)=p and uvuv a petal of AA. This clearly implies part (b) of the lemma.


A blossom AA contributing to a term in (3.8) or (3.11) contains at least one of u,vu,v. (In particular we are done if neither vertex is in a blossom. A vertex not in a blossom is either atomic or it does not belong to 𝒮\cal S.) We consider three cases, uvγ(A)uv\in\gamma(A), uv=η(A)uv=\eta(A), or uvuv a petal of AA.


Case u,vAu,v\in A: AA contributes z(A)z(A) to z(uv)z(uv). We show it makes the same contribution to the other side of (3.8) and (3.11).

(3.3) for this case implies ιA(u)=ιA(v)\iota_{A}(u)=\iota_{A}(v). This value ιA(u)\iota_{A}(u) is either b or p. Thus z(A)z(A) contributes to exactly one of the terms zb(u,ι(u))z_{b}(u,\iota(u)), zp(v,ι(v))z_{p}(v,\iota(v)) in (3.8), and exactly one of the terms zp(u,ι(u))z_{p}(u,\iota(u)), zb(v,ι(v))z_{b}(v,\iota(v)) in (3.11).

So LHS=RHS=z(A)LHS=RHS=z(A) as desired.


Case uv=η(A)uv=\eta(A): First assume uvuv is matched. We will show LHS=RHS=0LHS=RHS=0. The case makes uvI(A)uv\not\in I(A), so LHS=0LHS=0.

Suppose v=β(A)v=\beta(A). Thus TT enters AA on its base uvuv. So TT does not enter AA on a petal, i.e., it does not contribute to the RHS term zp(v,ι(v))z_{p}(v,\iota(v)). Also uAu\notin A, so AA does not contribute to the RHS term zp(u,ι(u))z_{p}(u,\iota(u)). So RHS=0RHS=0 as desired.

Suppose u=β(A)u=\beta(A). Thus TT leaves AA on its base uvuv. So TT enters AA on a petal. Thus AA does not contribute to the RHS term zb(u,ι(u))z_{b}(u,\iota(u)). Also vAv\notin A, so AA does not contribute to the RHS term zp(v,ι(v))z_{p}(v,\iota(v)). So RHS=0RHS=0 as desired.

Next assume uvuv is unmatched. Opposite from before we show LHS=RHS=z(A)LHS=RHS=z(A). The case makes uvI(A)uv\in I(A), so RHS=z(A)RHS=z(A).

Suppose v=β(A)v=\beta(A). Thus TT enters AA on its base uvuv. So AA contributes to the LHS term zb(v,ι(v))z_{b}(v,\iota(v)). Also uAu\notin A, so AA does not contribute to the LHS term zp(u,ι(u))z_{p}(u,\iota(u)). So LHS=z(A)+0=z(A)LHS=z(A)+0=z(A) as desired.

Suppose u=β(A)u=\beta(A). Thus TT leaves AA on its base uvuv. So TT enters AA on a petal. This makes AA contribute to the LHS term zp(u,ι(u))z_{p}(u,\iota(u)). Also vAv\notin A, so AA does not contribute to the LHS term zb(v,ι(v))z_{b}(v,\iota(v)). So LHS=z(A)+0=z(A)LHS=z(A)+0=z(A) as desired.


Case uvuv a petal of AA: First assume uvuv is matched. Clearly uvI(A)uv\in I(A) so LHS=z(A)LHS=z(A). Since AA contains only one of the vertices u,vu,v, only one of the RHS terms zb(u,ι(u))z_{b}(u,\iota(u)), zp(v,ι(v))z_{p}(v,\iota(v)) can be positive. Thus LHSRHSLHS\geq RHS as desired.

Suppose uAu\in A. Note the RHS term zb(u,ι(u))z_{b}(u,\iota(u)) has a contribution from AA iff ιA(u)=b\iota_{A}(u)=b, which may or may not hold for TT. ιA(u)=b\iota_{A}(u)=b implies RHS=z(A)=LHSRHS=z(A)=LHS. Also TT alternates at AA, as desired for (b). ιA(u)=p\iota_{A}(u)=p implies RHS=0<z(A)=LHSRHS=0<z(A)=LHS. TT does not alternate at AA. Again (b) holds.

Suppose vAv\in A. AA contributes to the RHS term zp(v,ι(v))z_{p}(v,\iota(v)), so LHS=RHSLHS=RHS.

Next assume uvuv is unmatched. Clearly uvI(A)uv\not\in I(A) so RHS=0RHS=0. Thus LHSRHSLHS\geq RHS as desired.

Suppose uAu\in A. The LHS term zp(u,ι(u))z_{p}(u,\iota(u)) has a contribution from AA iff ιA(u)=p\iota_{A}(u)=p. ιA(u)=b\iota_{A}(u)=b implies RHS=0=LHSRHS=0=LHS. TT alternates at AA, as desired for (b). ιA(u)=p\iota_{A}(u)=p implies LHS=z(A)>0=RHSLHS=z(A)>0=RHS. TT does not alternate at AA. Again (b) holds.

Suppose vAv\in A. AA does not contributes to the RHS term zb(v,ι(v))z_{b}(v,\iota(v)), so LHS=RHS=0LHS=RHS=0. \Box

Shortened petalevels

As noted there are too many natural petalevels to use in the level graph. But some of them are extraneous. The following property is the source of the redundancy.

Proposition 3.2

Let ι\iota and ι\iota^{\prime} be in-values for vertex vv that are identical except that Δ\Delta positive blossoms AA have ιA=p\iota_{A}=p and ιA=b\iota^{\prime}_{A}=b. Then for any j{i,o}j\in\{i,o\}, lj(v,ι)lj(v,ι)2Δl_{j}(v,\iota^{\prime})\leq l_{j}(v,\iota)-2\Delta.

Proof: If vv is outer AA contributes z(A)z(A) to the ι\iota petalevel and 0 to the ι\iota^{\prime} version. If vv is inner the contribution is 0 to the ι\iota petalevel and z(A)-z(A) to the ι\iota^{\prime} version. \Box

For clarity we write LGLG^{*} to denote our version of the level graph (using LGLG to denote generic level graphs). The petalevels used in LGLG^{*} sometimes make the change of the proposition, i.e., p entries are changed to bb. In keeping with the proposition we call this change a shortening. Intuitively, shortening destroys progress of TT towards the goal, the last level of LGLG. But that progress is not needed, since TT advances from the shortened petalevel to the goal only one level at a time.

We integrate shortening into the tracking as follows. To set the stage, we are given a collection 𝒯\cal T of edge disjoint augmenting trails. Start by choosing an arbitrary orientation for every 𝒯\cal T-trail. For each positive blossom AA we will define a unique value ιA\iota_{A} such that every vertex vAv\in A has ιA(v)=ιA\iota_{A}(v)=\iota_{A} in each of its petalevels. Specifically we define ιA=b\iota_{A}=b if some trail T𝒯T\in{\cal T} enters AA on its base. Otherwise ιA=p\iota_{A}=p.

Observe this is well-defined, since any base edge η(A)\eta(A) is on at most one 𝒯\cal T-trail. The effect of this rule is to change an in-value pp to bb when TT enters AA on a petal, but some other 𝒯\cal T-trail enters AA on its base.

This translates to the new version of (3.3):

(3.12) ιA(v)={ιA(u)uAbuA, some 𝒯-trail enters A on η(A)puA, no 𝒯-trail enters A on η(A).\iota_{A}(v)=\begin{cases}\iota_{A}(u)&u\in A\\ b&u\notin A,\text{ some {$\cal T$}-trail enters $A$ on $\eta(A)$}\\ p&u\notin A,\text{ no {$\cal T$}-trail enters $A$ on $\eta(A)$.}\end{cases}

This change means that in-values no longer correspond exactly to the direction a blossom is entered. The reader should bear this distinction in mind throughout the rest of this section. Now we show the lemma for natural petalevels is preserved by shortening.

Corollary 3.3

Consider a graph where all petalevels are defined using rule (3.12). Inequality (3.5) continues to hold.

Remark: The shortening affects the shortened petalevel as well as all of the following petalevels. Because of the latter the corollary does not immediately follow from Proposition 3.2.

Proof: As in the lemma consider an edge uvuv. We will refer to the proof of the lemma, explicitly pointing out any changes needed for the corollary. All case references below are to the corresponding case in the lemma’s proof.

In the first two cases uvMuv\in M, uvM¯uv\in\overline{M}, the reductions to (3.8) and (3.11) are unchanged. The zpz_{p} and zbz_{b} quantities are now interpreted using (3.12) for ι\iota-values.


Case u,vAu,v\in A: The proof is unchanged: The claim that ιA(u)=ιA(v)\iota_{A}(u)=\iota_{A}(v) follows from the first case of (3.3), which is also the first case of (3.12).


Case uv=η(A)uv=\eta(A): First assume uvuv is matched.

Suppose v=β(A)v=\beta(A). Thus TT enters AA on its base uvuv. The second case of (3.12) shows ιA(v)=b\iota_{A}(v)=b. Thus AA does not contribute to the RHS term zp(v,ι(v))z_{p}(v,\iota(v)), as in the lemma.

Suppose u=β(A)u=\beta(A). As in the lemma TT enters AA on a petal, say rsrs. As in the lemma the RHSRHS term zb(u,ι(u))z_{b}(u,\iota(u)) is 0, but now the following argument is used. The first case of (3.12) implies ιA(u)=ιA(s)\iota_{A}(u)=\iota_{A}(s). No 𝒯\cal T-trail enters AA on its base (since TT leaves AA on its base edge η(A)=uv\eta(A)=uv, and 𝒯\cal T uses edge uvuv only once). Thus (3.12) defines ιA(s)\iota_{A}(s) as pp. So ιA(u)=p\iota_{A}(u)=p and zb(u,ι(u))=0z_{b}(u,\iota(u))=0 as desired.

Now assume uvuv is unmatched.

Suppose v=β(A)v=\beta(A). As in the lemma this means TT enters AA on its base uvuv. TT satisfies the second line of (3.12), i.e., uAu\notin A and TT enters AA on its base. So AA contributes to the LHS term zb(v,ι(v))z_{b}(v,\iota(v)). As in the lemma AA does not contribute to the LHS term zp(u,ι(u))z_{p}(u,\iota(u)).

Suppose u=β(A)u=\beta(A). As in the lemma this means TT leaves AA on its base uvuv. Let rsrs be the edge of TT that enters AA before leaving on uvuv. 𝒯\cal T uses uvuv only once, so ιA(s)=p\iota_{A}(s)=p by the third line of (3.12). The first line implies ιA(u)=p\iota_{A}(u)=p. Thus AA contributes to the LHS term zp(u,ι(u))z_{p}(u,\iota(u)), as desired.


Case uvuv a petal of AA: First suppose uvuv is matched. If uAu\in A the argument does not change: The RHS term zb(u,ι(u))z_{b}(u,\iota(u)) has a contribution from AA iff ιA(u)=b\iota_{A}(u)=b, which may or may not hold for TT. If it does then RHS=z(A)=LHSRHS=z(A)=LHS.

If vAv\in A then TT enters AA on a petal. The second or third line of (3.12) applies. The third line keeps ιA(v)=p\iota_{A}(v)=p so as in the lemma, AA contributes to the RHS term zp(v,ι(v))z_{p}(v,\iota(v)). The second line means AA does not contribute to the RHS and LHS>RHSLHS>RHS.

Next assume uvuv is unmatched. As in the lemma this makes RHS=0RHS=0 so LHSRHSLHS\geq RHS as desired. In more detail suppose uAu\in A. TT may or may not have ιA(u)=p\iota_{A}(u)=p. The former gives strict inequality LHS>RHSLHS>RHS. Suppose vAv\in A. TT may or may not have ιA(v)=b\iota_{A}(v)=b. The former gives strict inequality. \Box

Analysis

We prove properties of shortened petalevels that lead to the definition of our level graph and its correctness.

The first fact will be used to define the last level of our level graph. Consider an iteration of the matching algorithm Fig.1. The algorithm uses the ff-matching search algorithm of [12] to find an augmenting trail. The search ends with a structured matching for an augmenting trail. Let y(ϕ)y(\phi) denote the yy-value of free vertices in this structured matching. Define L=y(ϕ)L=-y(\phi).

Lemma 3.4

The last vertex of any 𝒯\cal T-trail has petalevel 1+2L1+2L.

Remark: The lemma does not preclude multiple visits to this petalevel.

Proof: Suppose T𝒯T\in{\cal T} starts at a free vertex ϕ\phi and ends at a free vertex ϕ\phi^{\prime} on an odd petalevel li(ϕ,ι(ϕ))l_{i}(\phi^{\prime},\iota(\phi^{\prime})). The edge leading to ϕ\phi^{\prime} is unmatched, and possibly in various blossoms AA with base vertex ϕ\phi^{\prime}. (It is also possible that ϕ=ϕ\phi=\phi^{\prime}.) The definition of petalevels (3.2) gives li(ϕ,ι(ϕ))=1(y{ϕ,ϕ}+zb(ϕ,ι(ϕ)))l_{i}(\phi^{\prime},\iota(\phi^{\prime}))=1-(y\{\phi^{\prime},\phi\}+z_{b}(\phi^{\prime},\iota(\phi^{\prime}))). We will show the zz term equals 0. This makes the petalevel equal to 1y{ϕ,ϕ}=1+2L1-y\{\phi^{\prime},\phi\}=1+2L, as claimed.

To analyze the zz term we start with this observation: Let ϕ\phi be the base vertex of a positive blossom AA. (There may be many such AA.) ϕ\phi is on at most one 𝒯\cal T-trail TT, and ϕ\phi is the first or last vertex of TT but not both. In proof, since AA is positive the ϕϕ\phi\phi-trail forming AA is not augmenting. Thus def(ϕ)=1def(\phi)=1. Thus ϕ\phi occurs at most once as an end of a 𝒯\cal T-trail.

Now return to the given trail TT ending at ϕ\phi^{\prime}. Take any positive blossom AA with base vertex ϕ\phi^{\prime}. TT ends on the base edge of AA, η(A)=εϕ\eta(A)=\varepsilon\phi^{\prime}. The observation implies no 𝒯\cal T-trail enters AA on its base η(A)\eta(A). Thus (3.12) shows ι(A)=p\iota(A)=p. Hence zb(ϕ,ι(ϕ))=0z_{b}(\phi^{\prime},\iota(\phi^{\prime}))=0 as desired. \Box

Recall the lemma tracks 𝒯\cal T-trails with shortened petalevels. A version of the lemma with natural petalevels is useful:

Corollary 3.5

Tracking an augmenting trail with natural petalevels, its last vertex has petalevel 1+2L1+2L.

Proof: The argument is simpler – it is obvious that TT enters a blossom containing ϕ\phi^{\prime} on a petal. \Box

We now present the details of our level graph. We call it LGLG^{*}, to distinguish it from references to generic level graphs LGLG. We use the term node to refer to vertices in the level graph. Define the last level of LGLG^{*} to be 1+2L1+2L.

Each edge of TT advances at most one level in LGLG^{*}. We conclude every 𝒯{\cal T}-trail uses an edge in every layer of LGLG^{*}. (N.B. The edges of TT that advance from level 0 to 2L+12L+1 need not form an augmenting trail or even contain one: Loose edges retreat in LGLG and lead to duplicate advances. TT may leave the search graph 𝒮\cal S and reenter at a different point, etc.)

We complete the definition of LGLG^{*} by specifying the petalevels that it uses. Every vertex vv has at most two petalevels in LGLG^{*}, lj(v,ι(v))l_{j}(v,\iota(v)). Here jj ranges over the io-types i,o, and the in-values ι(v)\iota(v) are consistent with our shortening rule: For every positive blossom AA containing vv,

(3.13) ιA(v)={bsome 𝒯-trail enters A on its base η(A)pno 𝒯-trail enters A on its base η(A).\iota_{A}(v)=\begin{cases}b&\text{some {$\cal T$}-trail enters $A$ on its base $\eta(A)$}\\ p&\text{no {$\cal T$}-trail enters $A$ on its base $\eta(A)$}.\end{cases}

If vv is atomic, i.e., not in any positive blossom, these 2\leq 2 petalevels are ordinary levels lj(v)l_{j}(v), by (3.1). LGLG^{*} contains every possible edge that joins two such nodes on consecutive levels.

We show this level graph LGLG^{*} tracks every 𝒯\cal T-trail TT from level 0 to level 2L+12L+1. To be precise assume (3.12) is used to define the petalevels that track TT. Let L(T)L(T) denote the set of edges of TT that are in the final set of tracked advances. (L(T)L(T) need not include every forward edge of TT. For example a petal uvuv that enters a positive blossom becomes a backup edge if it gets shortened.)

Lemma 3.6

Suppose edge uvL(T)uv\in L(T) advances from level lj¯(u,ι(u))l_{\bar{j}}(u,\iota(u)) to lj(v,ι(v))l_{j}(v,\iota(v)) (where these petalevels are defined using (3.12)). The level graph LGLG^{*} has a corresponding edge from node uu on level lj¯(u,ι(u))l_{\bar{j}}(u,\iota(u)) to node vv on level lj(v,ι(v))l_{j}(v,\iota(v)).

Proof: The main argument is to show the vertex vv has a corresponding node on level lj(v,ι(v))l_{j}(v,\iota(v)). (Here vv is an arbitrary vertex, so this suffices to show uu also has its corresponding vertex.)

First suppose vv is an atom, i.e., not in any positive blossom. As previously noted, (3.12) and (3.1) define lj(v,ι(v))l_{j}(v,\iota(v)) as lj(v)l_{j}(v), and LGLG^{*} has been defined to contain the corresponding node.

Next suppose vv is contained in various positive blossoms, and fix such a blossom AA. Suppose TT enters AA on edge uv1uv_{1} and follows the trail to vv, v1v2vk=vv_{1}v_{2}\ldots v_{k}=v, that is contained in AA. (3.12) defines ιA(v1)\iota_{A}(v_{1}) according to line 2 or 3, i.e., for x=v1x=v_{1},


()(\dagger)                               ιA(x)=b\iota_{A}(x)=b iff some 𝒯\cal T-trail enters AA on η(A)\eta(A).


The first line of (3.12) defines ιA(vi)\iota_{A}(v_{i}) as ιA(vi1)\iota_{A}(v_{i-1}). Thus ()(\dagger) holds for every x=vix=v_{i}, including x=vk=vx=v_{k}=v. ()(\dagger) for vv is identical to the definition of ιA(v)\iota_{A}(v) in (3.13), as desired.

We conclude that LGLG^{*} contains the desired nodes for uu and vv. By definition LGLG^{*} contains every possible edge in the layer for uvuv, so it contains the desired edge for uvuv. \Box

Let ss denote the length of a sat in GG. We will show ss is the number of levels in LGLG^{*}, s=1+2Ls=1+2L. The reason is that the ff-matching search algorithm finds a sat. This can be seen from first principles, but we prefer to use our tracking of natural petalevels.

Let TT be the augmenting trail found by the ff-matching algorithm in Fig.1. Recall that TT is discovered as an alternating path in the algorithm’s search structure 𝒮¯\overline{\cal S}. The subtrail of TT through any contracted blossom BB of 𝒮¯\overline{\cal S} is the appropriate trail Pi(v,β(B))P_{i}(v,\beta(B)) (recall Section 2.2). The construction of these trails (Lemma 4.4 of [12]) easily shows that they alternate at every blossom they traverse. (This includes all subblossoms of BB.) We conclude that every edge of TT satisfies the conditions of Lemma 3.1 (b). Thus every edge of TT advances to the next highest petalevel.

Corollary 3.5 shows TT ends at petalevel 1+2L1+2L. TT never visits a petalevel twice, since it always advances petalevels. Thus TT ends the first time it reaches 1+2L1+2L, |T|=1+2L|T|=1+2L. Lemma 3.4 shows every augmenting trail has length 1+2L\geq 1+2L. Thus TT is a sat and s=1+2Ls=1+2L, as desired.

We finally note LGLG^{*} has the desired size and our overall efficiency bound holds: The nn vertices of GG have 2n2n corresponding nodes in LGLG^{*}. LGLG^{*} has ss layers. Some layer ll^{*} of LGLG^{*} has (2×2n)/s=4n/s\leq(2\times 2n)/s=4n/s nodes. Thus ll^{*} has 4(n/s)2\leq 4(n/s)^{2} edges. Every 𝒯\cal T-trail uses an edge in ll^{*}. So 𝒯\cal T has at most 4(n/s)24(n/s)^{2} trails. This is the desired key property ()(*).

4 The Cardinality Matching Algorithm

This section presents the details of our cardinality matching algorithm, Fig. 1.

Details and correctness

We use the algorithm of [12] for the ff-matching search. The previous section shows it finds a sat. It remains only to give the details for finding the blocking set.

We use the blocking flow algorithm of [13]. By definition, that algorithm finds a maximal collection of disjoint augmenting trails. So a priori it is not guaranteed to find the {\cal B}-set that we seek. We will prove that in our context, [13] does find sats. Thus Fig.1 is correct.

We call [13] with the set of tight edges and the blossoms found in the ff-matching search. (In general [13] is called with a graph and a matching, and an optional set of blossoms.) The algorithm finds a maximal set of edge-disjoint augmenting trails. We will show that in our context a trail is augmenting iff it is a sat. This establishes the validity of our use of [13].

Consider an augmenting trail TT returned by [13]. Track the edges of TT using natural petalevels. Lemma 3.1(b) shows each edge increases the petalevel by 1. Corollary 3.5 shows the last vertex of TT has petalevel 1+2L=s1+2L=s. Thus TT is a sat.

Time bound

Each iteration of our algorithm uses time O(m)O(m). Specifically the time for an ff-matching search is O(m)O(m). This follows from the algorithm description in [12], using data structures given in [11, Section 5] for ordinary matching. (Adapting them for ff-matching is straightforward. We use the fact that f(V)s=12y(ϕ)f(V)\geq s=1-2y(\phi).)

The time to find the blocking set {\cal B} is O(m)O(m) [13]. (Note that the trails returned by [13] have all positive blossoms contracted. Our algorithm expands these blossoms – the trail through a blossom is the appropriate PiP_{i} trail. These trails can be computed in linear time [13, Appendix C].)

Theorem 4.1

A maximum cardinality ff-matching can be found in time O(n2/3m)O(n^{2/3}\;m) for simple graphs and O(min{f(V),n}m)O(\min\{\sqrt{f(V)},n\}m) for a multigraphs. \Box

A The Search of the Example Graph

This section gives shows the ff-matching algorithm can grow the search structure of our example graph.

The search in 𝑬𝑮(𝟒)EG(4)

Refer to caption
βi\beta_{i}1-17-75-53-3221-1225506-64-4442-2662222022772233551111553-3331-15-52211114-42-222044eie_{i}pip_{i}eie_{i}pip_{i}βi\beta_{i}
Figure 5: Search steps forming blossoms. (a)–(d): Search structure 𝒮\cal S with y,zy,z values, for consecutive steps y(ϕ)=4,5,6,7y(\phi)=-4,-5,-6,-7. Dashed edges are strictly dominated or strictly underrated and not in 𝒮\cal S. Vertices on the same level are connected by dotted lines. (e)–(f): Cross edges eie_{i} do not enter 𝒮\cal S, see text.

Fig.5 shows how the ff-matching algorithm grows the search structure of Fig.3. Parts (a)–(d) show how the blossoms are formed. In addition we must check that no cross edge enters 𝒮\cal S until the sat’s are discovered (i.e., y(ϕ)=8y(\phi)=-8). This follows from the fact that cross edges are loose (with one minor exception) before that point. In proof βi\beta_{i} enters 𝒮\cal S strictly before pip_{i}. The next dual adjustment makes an unmatched cross edge strictly dominated (y(βi)y(\beta_{i}) increases by 1, see part (e)) and a matched cross edge strictly underrated (y(βi)y(\beta_{i}) decreases by 1, see part (f)). As long as βi\beta_{i} is atomic, dual adjustments keep the cross edge loose: For an unmatched (matched) cross edge, y(pi)y(p_{i}) decreases by 0 or 1 (increases by 0 or 1), respectively. After BiB_{i} is formed, dual adjustments reduce the slack in eie_{i}’s inequality: If eie_{i} is unmatched yz^(ei)\widehat{yz}(e_{i}) decreases by 1 (01=10-1=-1) or 2 (1+(1)=2-1+(-1)=-2). If eie_{i} is matched yz^(ei)\widehat{yz}(e_{i}) increases by 1 (01+2=10-1+2=1) or 2 (11+2)=21-1+2)=2). Each eie_{i} is tight when the sat’s are discovered (recall Fig.3). So eie_{i} was strictly dominated before that point.

The general search structure 𝒮\cal S

Fig. 6 and 7 illustrate the final search structure constructed by the ff-matching algorithm. Start by considering the blossom structure, illustrated in Fig. 6(a)–(b). In the definition of yz^(e)\widehat{yz}(e) ((2.3)) abbreviate the zz term to z(e)z(e). The edge e=βi1βie=\beta_{i-1}\beta_{i} is tight, i.e., yi1+yi+z(e)=w(e)y_{i-1}+y_{i}+z(e)=w(e). This relation, and the tightness of all 6 edges shown in Fig. 6(a)–(b), implies all the yy values shown. For example, in (a) edge f=βi1si4f=\beta_{i-1}s_{i4} has 2=yi1+(yi+2)+z(f)2=y_{i-1}+(y_{i}+2)+z(f) (we use z(f)=z(e)z(f)=z(e), Bi1B_{i-1} contributes to both zz’s).

The relations between the yiy_{i}’s gives the following constraints. Let β0\beta_{0} and β0=s11\beta^{\prime}_{0}=s_{11} be the two children of β1\beta_{1}, and let y0y_{0} be their yy-value.

(A.1) yi+2\displaystyle y_{i}+2 =\displaystyle= yi2 i2 even\displaystyle y_{i-2}\text{\hskip 38.0pt$i\geq 2$ even}
(A.2) yi4\displaystyle y_{i}-4 =\displaystyle= yi2+2 i3 odd\displaystyle y_{i-2}+2\text{\hskip 20.0pt$i\geq 3$ odd}
(A.3) y0\displaystyle y_{0} =\displaystyle= b\displaystyle-b
(A.4) y1\displaystyle y_{1} =\displaystyle= b+2.\displaystyle-b+2.

In proof the relation si4=si1,1s_{i4}=s_{i-1,1} gives (A.1) and (A.2). The last two lines come from tightness of the triangle blossom: Tightness of the unmatched edge β0β0\beta_{0}\beta^{\prime}_{0} gives y0+y0+2b=0y_{0}+y_{0}+2b=0, i.e., (A.3). Tightness of the matched edge β0β1\beta_{0}\beta_{1} gives y0+y1+2b=2y_{0}+y_{1}+2b=2, so y1=22by0y_{1}=2-2b-y_{0} giving (A.4). There are no other constraints on the yiy_{i}’s.

It is easy to see the above system gives these values:

(A.5) yi={bii evenb1+3ii odd.y_{i}=\begin{cases}-b-i&i\text{ even}\\ -b-1+3i&i\text{ odd}.\end{cases}

Using y1=b+2y_{1}=-b+2 verifies the yy-values shown in Fig.6(c). Grow steps in the ff-matching algorithm give the two alternating paths that end at ee, PP and P1P_{1}. We define P1P_{1} to start with the cross edge from β1\beta_{1} (ending at p3b2p_{3b-2}, the inner vertex with yy-value b2b-2). Recalling Fig.4(c), we must check that the various cross edges βip1+3(bi)\beta_{i}p_{1+3(b-i)} do not preempt the grow steps for P1P_{1} (e.g., Fig. 7 indicates potential grow steps for β2\beta_{2}’s cross edge). An easy alternative is to enlarge the example graph with alternating paths PiP_{i} similar to P1P_{1} but starting at each base βi\beta_{i}. The disadvantage is that the example graph grows to size Θ(b2)\Theta(b^{2}).

No preemptions

The grow step to vertex p1+3(bi)p_{1+3(b-i)} occurs either from vertex βi\beta_{i} or from a vertex on β1\beta_{1}’s grow path. We show that both of these grow steps become possible when

(A.6) y(ϕ)=b3i+(i+1mod 2).y(\phi)=-b-3i+(i+1{\rm{\ mod\;}}2).

Thus the algorithm can choose to grow from β1\beta_{1}, as desired.

We start with the βi\beta_{i} case. The bb blossoms BiB_{i} are formed in consecutive dual adjustments. BbB_{b} is formed in the penultimate search, i.e., y(ϕ)=2b+1y(\phi)=-2b+1. So in general each blossom BiB_{i} is formed when

(A.7) y(ϕ)=(2b+1)+(bi)=bi+1.y(\phi)=(-2b+1)+(b-i)=-b-i+1.

Using A.5, the yy-value of βi\beta_{i} when BiB_{i} is formed is

(A.8) yi={(bi)+(bi+1)=2i+1i even(b1+3i)+(bi+1)=2ii odd.y_{i}=\begin{cases}(-b-i)+(b-i+1)=-2i+1&i\text{ even}\\ (-b-1+3i)+(b-i+1)=2i&i\text{ odd}.\end{cases}

At that point, assuming βi\beta_{i}’s cross edge f=βip1+3(bi)f=\beta_{i}p_{1+3(b-i)} is still not in 𝒮\cal S, yz^(f)=1+yi\widehat{yz}(f)=1+y_{i}.

Suppose ii is odd. ff is unmatched. ff is strictly dominated (since yiy_{i} is positive) and the next 1+yi1+y_{i} dual adjustments make ff tight, yz^(f)=0\widehat{yz}(f)=0. Using (A.7) these duals adjustments decrease y(ϕy(\phi to (bi+1)(1+yi)=(bi+1)(2i+1)=b3i(-b-i+1)-(1+y_{i})=(-b-i+1)-(2i+1)=-b-3i. Thus (A.6) holds in the odd case.

Suppose ii is even. ff is matched. ff is strictly underated (since yiy_{i} is negative). Since ff belongs to I(Bi)I(B_{i}) and no other II sets, each dual adjustment increases the value of yz^(f)\widehat{yz}(f) by 1. So the next 2(1+yi)2-(1+y_{i}) dual adjustments make ff tight. Using (A.7) these duals adjustments decrease y(ϕy(\phi to (bi+1)(1yi)=(bi+1)(2i)=b3i+1(-b-i+1)-(1-y_{i})=(-b-i+1)-(2i)=-b-3i+1. Thus (A.6) holds for ii even.

We turn to β1\beta_{1}’s path. We will show that the algorithm can grow the path P1P_{1} shown in Fig. 6(c). View the graph as in Fig.4(c), i.e., pjp_{j} is the vertex on PP at distance jj from free vertex p0p_{0}. Execute the search algorithm, always choosing to grow path P1P_{1} whenever possible.

Consider the cross edge for β1\beta_{1} ending at p3b2p_{3b-2}. (A.6) shows it becomes tight when y(ϕ)=b3y(\phi)=-b-3. This is before any other cross edge becomes tight, so it is added to 𝒮\cal S. Inductively assume path P1P_{1} has been extended, with no cross edge from a βi\beta_{i}, i>1i>1 grown, when y(ϕ)y(\phi) gets decreased to the value of (A.6) b3i+(i+1mod 2)-b-3i+(i+1{\rm{\ mod\;}}2), when cross edge f=βip1+3(bi)f=\beta_{i}p_{1+3(b-i)} becomes tight. Note that path P1P_{1} extends by 2 edges every other dual adjustment. More precisely when

y(ϕ)=b12δy(\phi)=-b-1-2\delta

the grow path can be extended to length 2δ2\delta, i.e., the pcdotp_{cdot} vertices at distance 2δ12\delta-1 and 2δ2\delta can be added. (For example the case δ=1\delta=1 correponds to the above grow step when y(ϕ)=b3y(\phi)=-b-3.) Eyeballing Fig.4(c), the distance of ff’s end p1+3(bi)p_{1+3(b-i)} from the start of P1P_{1} is

(A.9) (3b1)(1+3(bi))=3i2.(3b-1)-(1+3(b-i))=3i-2.

Suppose ii is odd. Since the distance (A.9) is odd, P1P1 can be extended to this ff’s end when 2δ1=3i22\delta-1=3i-2, 2δ=3i12\delta=3i-1. This corresponds to y(ϕ)=b12δ=b1(3i1)=b3iy(\phi)=-b-1-2\delta=-b-1-(3i-1)=-b-3i. (A.6) gives the same value for the grow step from βi\beta_{i}. So our rule grows P1P_{1} as desired.

Suppose ii is even. The distance of ff’s end from the start of P1P_{1}, (A.9), is even. So P1P1 can be extended to ff’s end when 2δ=3i22\delta=3i-2. This corresponds to y(ϕ)=b12δ=b1(3i2)=b3i+1y(\phi)=-b-1-2\delta=-b-1-(3i-2)=-b-3i+1. (A.6) gives the same value for the grow step from βi\beta_{i}. Again our rule grows P1P_{1} as desired.


Edge ee triggers a blossom step in the ff-matching algorithm.

In summary, the uniqueness of the structured matching, plus the above P1P_{1} growth argument, implies that the ff-matching algorithm finds the search structure that we show.

We turn to the structure of the cross edges. The alternating trail from free vertex βb\beta_{b} to the cross edge from βi\beta_{i} is 3 edges longer than the similar trail for βi1\beta_{i-1}. This is follows since the βi\beta_{i} trail has 3 extra edges. It can be constructed from βi1\beta_{i-1} by replacing βiβi1si1,1\beta_{i}\beta_{i-1}s_{i-1,1} with βisi1si2si3si4\beta_{i}s_{i1}s_{i2}s_{i3}s_{i4} and extending it with edge βi1βi\beta_{i-1}\beta_{i}. Fig.7 illustrates the cross edges as they switch the path leading to ee. The pattern repeats every 3 cross overs.

Refer to caption
P1P_{1}442-2220βb\beta_{b}βb1\beta_{b-1}b+4-b+4b2b-22b-2b2b2b2b+2-2b+22b22b-22b+4-2b+4442-2220β1\beta_{1}b+2-b+2βi1\beta_{i-1}βi\beta_{i}yi1y_{i-1}yi2y_{i}-2yi1+2y_{i-1}+2yi4y_{i}-4yi1+2y_{i-1}+2yi+2y_{i}+2yi1y_{i-1}yi+2y_{i}+2βi\beta_{i}yiy_{i}βi1\beta_{i-1}eeyiy_{i}PP
Figure 6: Search structure for EGEG. (a)–(b): yy-values for the blossoms, for ii even (a) and i>1i>1 odd (b). Base vertex βi\beta_{i} has yy-value yiy_{i}. (c) Edge ee joins 𝒮¯\overline{\cal S} paths PP and P1P_{1}, completing the augmenting trails.
Refer to caption
β2\beta_{2}b=6b=6b=8b=8b=10b=10b=12b=12β3\beta_{3}β3\beta_{3}β3\beta_{3}β4\beta_{4}β3\beta_{3}β4\beta_{4}β5\beta_{5}β1\beta_{1}β1\beta_{1}β1\beta_{1}β1\beta_{1}β2\beta_{2}β2\beta_{2}β2\beta_{2}
Figure 7: Cross edge structure in 𝒮\cal S. The three patterns for cross edges switching sides of paths joined by ee. b=12b=12 has the same pattern as b=6b=6.

References

  • [1]
  • [2] R.K. Ahuja, T.L. Magnanti, and J.B. Orlin, Network Flows: Theory, Algorithms, and Applications, Prentice-Hall, Saddle River, New Jersey, 1993.
  • [3] L. Chen, R. Kyng, Y. Liu, R. Peng, M.P. Gutenberg, S. Sachdeva, “Maximum flow and minimum-cost flow in almost-linear time”, arXiv:2010.01102, 2022.
  • [4] E.A. Dinic, “Algorithm for solution of a problem of maximum flow in networks with power estimation”, in Russian, Soviet Mathematics Doklody 11, 1970, pp. 1277–1280.
  • [5] R. Duan, H. He, and T. Zhang, ”A scaling algorithm for weighted f-factors in general graphs”, Proc. of the 47th International Colloquium on Automata, Languages, and Programming (ICALP 2020), Vol. 168 of LIPIcs, pp. 41:1–41:17, 2020.
  • [6] R. Duan, S. Pettie, and H-H. Su, ”Scaling algorithms for weighted matching in general graphs”, ACM Trans. Algorithms 14, 1, 2018, Article 8, 35 pages.
  • [7] J. Edmonds, ”Paths, trees, and flowers”, Canad. J. Math. 17, 1965, pp. 449–467.
  • [8] J. Edmonds, “Maximum matching and a polyhedron with 0,1-vertices”, J. Res. Nat. Bur. Standards 69B, 1965, pp. 125–130.
  • [9] J. Edmonds and R.M. Karp, ”Theoretical improvements in algorithmic efficiency for network flow problems”, J. ACM, 19, 1972, pp. 248–264.
  • [10] S. Even and R.E. Tarjan, “Network flow and testing graph connectivity”, SIAM J. Comput., 4, 1975, pp. 507–518.
  • [11] H.N. Gabow, ”The weighted matching approach to maximum cardinality matching,” Fundamenta Informaticae (Elegant Structures in Computation: To Andrzej Ehrenfeucht on His 85th Birthday) 154, 1-4, 2017, pp. 109–130.
  • [12] H.N. Gabow, ”Data structures for weighted matching and extensions to bb-matching and ff-factors,” ACM Trans. Algorithms 14, 3, 2018, Article 39, 80 pages.
  • [13] H.N. Gabow, “Blocking trails for ff-factors of multigraphs,” Algorithmica, https://doi.org/10.1007/s00453-023-01126-y, 2023.
  • [14] H.N. Gabow, ”A weight-scaling algorithm for ff-factors of multigraphs,” Algorithmica, https://doi.org/10.1007/s00453-023-01127-x, 2023.
  • [15] H.N. Gabow and R.E. Tarjan, “Faster scaling algorithms for network problems,” SIAM J. Comput., 18, 5, 1989, pp. 1013–1036.
  • [16] J.E. Hopcroft and R.M. Karp, “An n2.5n^{2.5} algorithm for maximum matchings in bipartite graphs”, SIAM J. Comput., 2, 1973, pp. 225–231.
  • [17] D. Huang and S. Pettie, “Approximate generalized matching: ff-matchings and ff-edge covers”, Algorithmica 84, 7, 2022, pp. 1952–1992.
  • [18] A.V. Karzanov, “On finding maximum flows in network with special structure and some applications”, in Russian, Math. Problems for Production Control 5, Moscow State University Press, 1973, pp. 81–94.
  • [19] A.V. Karzanov, “An exact estimate of an algorithm for finding a maximum flow, applied to the problems ’of representatives’“, in Russian, Voprosy Kibernetiki, Trudy Seminara po Kombinatorno ı˘\breve{\imath} Matematike 5, Sovetskoe Radio, Moscow, 1973, pp. 66–70.
  • [20] B. Korte and J. Vygen, Combinatorial Optimization: Theory and Algorithms, 3rd Ed., Springer, NY, 2005.
  • [21] S. Micali and V.V. Vazirani, ”An O(|v||E|)O(\sqrt{|v|}\cdot|E|) algorithm for finding maximum matching in general graphs”, Proc. 21st Annual Symp. on Found. of Comp. Sci., 1980, pp. 17–27.
  • [22] J.B. Orlin and R.K. Ahuja, “New scaling algorithms for the assignment and minimum mean cycle problems”, Math. Programming 54, 1992, pp. 41–56.
  • [23] A. Schrijver, Combinatorial Optimization: Polyhedra and Efficiency, Springer, NY, 2003.
  • [24] V.V. Vazirani, “A theory of alternating paths and blossoms for proving correctness of the O(VE)O(\sqrt{V}E) general graph maximum matching algorithm”, Combinatorica, 14, 1, 1994, pp. 71–109.
  • [25] V.V. Vazirani, “A simplification of the MV matching algorithm and its proof”, CoRR, abs/1210.4594v5, Aug.27, 2013, 32 pages; also “A proof of the MV matching algorithm”, manuscript, May 13, 2014, 42 pages.