Algebraic Structures and Algorithms for Matching and Problems

Nicholas J. A. Harvey∗ Massachusetts Institute of Technology [email protected]

Abstract 1.1. Matching algorithms We present new algebraic approaches for several well- The literature for non-bipartite matching algorithms is quite known combinatorial problems, including non-bipartite lengthy. The initial work of Edmonds [10] gives an algo- matching, matroid intersection, and some of their general- rithm with running time O(n2m), where n and m respec- izations. Our work yields new randomized algorithms that tively are the number of vertices and edges.√ Several addi- are the most efficient known. For non-bipartite matching, tional improvements culminated in the O( nm) algorithm we obtain a simple, purely algebraic algorithm with running of Micali and Vazirani in 1980 [25]. There was little sub- time O(nω) where n is the number of vertices and ω is the sequent progress until 2004, when an exciting development matrix multiplication exponent. This resolves the central of Mucha and Sankowski [27] gave a randomized algorithm open problem of Mucha and Sankowski (2004). For matroid to construct a maximum matching in time O(nω) where intersection, our algorithm has running time O(nrω−1) for ω < 2.38 is the exponent indicating the time to multiply with n elements and rank r that satisfy some nat- two n × n matrices [4]. A highly readable exposition of ural conditions. This algorithm is based on new algebraic their algorithm is in Mucha’s thesis [26]. results characterizing the size of a maximum intersection in Unfortunately, all of these algorithm mentioned above contracted matroids. Furthermore, the running time of this are quite complicated. Edmonds’ algorithm requires much algorithm is essentially optimal. care in manipulating “blossoms”, and the Micali-Vazirani algorithm was not formally proven correct for ten years 1. Introduction [38]. The Mucha-Sankowski algorithm relies on a non- trivial structural decomposition of graphs called the “canon- The non-bipartite matching problem — finding the largest ical partition”, and uses sophisticated dynamic connectiv- set of disjoint edges in a graph — is a fundamental problem ity data structures to maintain this decomposition online. that has played a pivotal role in the development of graph Mucha writes [26, §6]: theory, combinatorial optimization, and computer science [34]. For example, Edmonds’ seminal work on matchings [The non-bipartite] algorithm is quite compli- [9, 10] inspired the definition of the class P, and launched cated and heavily relies on graph-theoretic results the field of polyhedral . The matching the- and techniques. It would be nice to have a strictly ory book [24] gives an extensive treatment of this subject, algebraic, and possibly simpler, matching algo- and uses matchings as a touchstone to develop much of the rithm for general graphs. theory of combinatorial optimization. Interestingly, for the special case of bipartite graphs, Mucha The matroid intersection problem — finding the largest and Sankowski give a simple algorithm that amounts to per- common independent set in two given matroids — is an- forming Gaussian elimination lazily. Unfortunately, this other fundamental optimization problem, originating in the technique seems to break down for general graphs, lead- pioneering work of Edmonds [11, 12]. This work led to sig- ing to the conjecture that there is no O(nω) matching algo- nificant developments concerning integral polyhedra [33], rithm for non-bipartite graphs that uses only lazy computa- submodular functions [13] and electrical networks [21]. Al- tion techniques [26, §3.4]. gorithmically, matroid intersection is a powerful tool that In subsequent work, Sankowski [32] developed a par- has been used in various areas such as approximation al- allel (RNC5) algorithm for constructing perfect matchings gorithms [2, 19], mixed matrix theory [28], and network that uses only O(nω) processors, yielding another sequen- coding [20]. tial algorithm that uses only O(nω) time. However, this algorithm is also complicated: it depends on sophisticated ∗Supported by a Natural Sciences and Engineering Research Council of Canada PGS Scholarship, by NSF contract CCF-0515221 and by ONR parallel subroutines for evaluating a polynomial at a matrix grant N00014-05-1-0148. and for computing the characteristic polynomial of a matrix.

1 1.2. Matroid intersection algorithms ing scheme that only updates “nearby” matrix entries will Polynomial time algorithms for matroid intersection were fail. We overcome this difficulty by traversing the matrix in developed in the 1970s by various authors [11, 12, 22]. The a novel manner such that symmetric locations are nearby in efficiency of these early algorithms was typically measured our traversal, even if they are far apart in the matrix. Our relative to an oracle for testing independence. For example, new approach has an important consequence: it easily ex- Edmonds’ algorithm uses O(nr2) oracle queries, where r is tends to various generalizations of the non-bipartite match- the rank of the matroid and n is the size of the ground set. ing problem such as path-matchings. It is not clear whether Cunningham [5] gave a more efficient algorithm, motivated previous algorithms [25, 27] also admit such extensions. by intersection of linear matroids (those that can be repre- Matroid intersection. We present a randomized algo- sented as a r × n matrix). This algorithm makes no oracle rithm for the matroid intersection problem that uses only queries and uses only O(nr2 log r) time. Gabow and Xu O(nrω−1) time. This running time is essentially optimal [14] obtained an improved bound of O(nr1.62) through the because computing the rank of a n×r matrix reduces to ma- use of fast matrix multiplication and quite technical argu- troid intersection of the matrix with itself, and O(nrω−1) is ments. However, their bound does not seem to be a natural the best running time for any rank-computation algorithm one: for square matrices the running time is O(n2.62), al- that we know of. Restated, we show that finding a maxi- though one would hope for a running time of O(n2.38). mum independent set in two matroids requires asymptoti- cally the same time as finding a maximum independent set 1.3. Generalizations in just one matroid. Several variants and generalizations of matchings and ma- Our algorithm operates with a certain square matrix of troid intersection have been considered, notably matroid size n + r, and its inverse. (See Section 4 for details.) Since matching. Matroid matching problems on general graphs the inverse has Ω(n2) entries, it cannot be explicitly com- require exponential time in the oracle model, although so- puted — our desired running time is linear in n. Thus a phisticated polynomial-time algorithms do exist for linear key aspect of our algorithm involves computing and updat- matroids [24]. On the other hand, bipartite matroid match- ing the inverse of a matrix, even though it is sparse. These ing problems are tractable: they are polynomial-time re- techniques may be useful for other similar problems. ducible to matroid intersection [11, Theorem 81] [13]. Whereas most existing matroid algorithms use augment- Another generalization of matroid intersections and non- ing path techniques, ours uses an algebraic approach. Sev- bipartite matchings are basic path-matchings, introduced by eral previous matroid algorithms also use algebraic tech- Cunningham and Geelen [7, 8, 16]. Their work shows inte- niques [1, 23, 29]. This algebraic approach involves two grality of related polyhedra and shows that one can optimize assumptions. (1) We assume that the given matroids are lin- over these polyhedra using the ellipsoid method [8]. Later ear. This is a standard assumption for algorithms that are not work [6] used algebraic techniques together with a matroid oracle-based, since linear matroids are the broadest class of intersection algorithm to compute a basic path-matching. matroids with efficient representations. (2) We make the 1.4. Our results mild technical assumption that the given pair of matroids are represented as matrices over the same field. Although In this paper, we present new algebraic approaches for sev- there exist matroids for which this assumption cannot be eral of the problems mentioned above. satisfied (e.g., the Fano and non-Fano matroids), this as- Non-bipartite matching. We present a purely algebraic, sumption is valid for the vast majority of matroids arising randomized algorithm for constructing a maximum match- in applications. For example, the regular matroids are those ω 1 ing in O(n ) time . The algorithm is conceptually sim- that are representable over all fields; this class includes the ple — it uses lazy updates, and does not require sophis- graphic, cographic and partition matroids. Many classes of ticated data structures or subroutines other than a black- matroids are representable over all but finitely many fields; box algorithm for matrix multiplication/inversion. There- these include the uniform, matching, and transversal ma- fore our work resolves the central open question of Mucha troids, as well as deltoids and gammoids [33]. Our results and Sankowski [27], and refutes the conjecture [26] that no apply to any two matroids from the union of these classes. such lazy algorithm exists. Bipartite Matroid Matching. We show a surprising re- Our algorithm is based on a simple, but subtle, divide- sult: the Mucha-Sankowski bipartite graph matching al- and-conquer approach. The key insight is: adding an edge gorithm [27], when run on an appropriate matrix, solves to the matching involves modifying two symmetric entries the bipartite matroid matching problem in O(nω) time. of a certain matrix. (See Section 3 for further details.) These Our contribution is to derive the appropriate matrix and to entries may be quite far apart in the matrix, so a lazy updat- prove some of its properties. Our result improves on the 2 1.62 3.62 1If ω = 2, the running time is actually O(n2 log n). Henceforth, we O(n r ) = O(n ) bound obtained via earlier matroid ignore polylog(n) factors in expressions of the form O(nω). intersection algorithms [14], and the usual reduction from bipartite matroid matching to matroid intersection [13]. Another important fact about matrices concerns algorith- Basic Path-Matching. We present a novel algebraic mic efficiency. For matrices of size n×n, the following op- structure which characterizes solvable instances of the ba- erations can be performed in O(nω) time: multiplication, sic path-matching problem. This extends Geelen’s algebraic determinant computation, rank computation, and inversion framework for ordinary path-matching problems, which do (if the matrix is non-singular). not involve matroids [16]. We also define a new notion of contraction for basic path-matching problems, allowing us 3. Non-Bipartite Matching to extend our non-bipartite matching algorithm to a O(nω) Tutte matrix. Let G = (S, E) be a graph with n = algorithm for constructing basic path-matchings. |S|. For each edge {i, j} ∈ E, associate an indetermi- nate t{i,j}. The Tutte matrix T for G is an n × n matrix 2. Notation and Basic Facts where Ti,j = ±t{i,j} and the signs are chosen such that T The set of {1, . . . , n} is denoted [n]. If J is a set, is skew-symmetric. Tutte [37] showed that T is formally J + i denotes J ∪ {i}. If M is a matrix, a submatrix con- non-singular iff G has a perfect matching (see, e.g., God- taining rows S and columns T is denoted M[S, T ]. A sub- sil [18]). However, this does not directly imply an efficient matrix containing all rows (columns) is denoted M[∗,T ] algorithm to test if G has a perfect matching: the determi- (M[S, ∗]). A submatrix M[S, T ] is sometimes written as nant of T is a formal polynomial which may have exponen- th MS,T when this enhances legibility. The i row (column) tial size, so computing it symbolically is inefficient. Fortu- of M is denoted Mi,∗ (M∗,i). An entry of M is denoted nately, Lovasz´ [23] showed that the rank of T is preserved Mi,j. The submatrix obtained by deleting row i and column with high probability after randomly substituting non-zero j (row-set I and column-set J) from M is denoted Mdel(i,j) values for the t{i,j}’s from a sufficiently large field, say of 2 (Mdel(I,J)). A submatrix containing rows {a, . . . , b} and size Θ(n ). After this numeric substitution, the determinant ω columns {c, . . . , d} is denoted Ma:b, c:d. When a matrix of the resulting matrix can be computed in O(n ) time. WX has been decomposed into blocks such as ( YZ ), we will A Self-Reducibility Algorithm. This observation yields refer to the blocks using compass directions, e.g., W is the the following simple algorithm to construct a perfect match- “north-west” submatrix. ing in O(nω+2) time. For each edge {i, j}, temporarily We will use the following basic facts from linear , delete it and test if the resulting graph still has a perfect proofs of which are in Appendix A. matching. If so, delete the edge permanently; otherwise, re- store the edge. The test used in this algorithm is performed M Fact 1. Let be a non-singular matrix with row-set and by setting t{i,j} = 0 and checking whether the determinant column-set C. Then, for any equicardinal sets I,J ⊆ C, of the resulting matrix is non-zero. −1 we haveP detPM[I,J] = det M · det M [C \ J, C \ I] · Rabin and Vazirani’s Improvement. Two definitions i+ j (−1) i∈I j∈J . are needed. The inverse Tutte matrix is N := T −1, and an edge e = {i, j} is called allowed if e is contained in a Fact 2. Let M be a square matrix of the form M = ( WX ) YZ perfect matching. Rabin-Vazirani [30] showed that, assum- where Z is square. If Z is non-singular, the matrix W − ing G has a perfect matching, e is allowed iff N 6= 0. XZ−1Y is known as the Schur complement of Z in M. The i,j We observed2 the following simple proof of their lemma. Schur complement satisfies the following useful property: ¡ ¢ G[S \{i, j}] has a perfect matching iff det T det M = det Z · det W − XZ−1Y . Additionally, the del({i,j},{i,j}) is non-zero (by Tutte’s theorem). This determinant is rank of the Schur complement equals the rank of M minus the size of Z. det Tdel({i,j},{i,j}) = ± det T · det N[{i, j} , {i, j}] ³ ´ 2 Fact 3. Let M = ( WX ) have inverse M −1 = Wˆ Xˆ . = ± det T · (Ni,j) ; YZ Yˆ Zˆ Then W is non-singular iff Zˆ is, and W −1 = Wˆ −XˆZˆ−1Yˆ . the first equality follows from Fact 1, and the second fol- lows since Fact 5 shows that N is skew-symmetric. These Fact 4. Let u and v be vectors and c a non-zero scalar. observations prove the lemma. The matrix M˜ = M +cuvT is called a rank-1 update of M. −1 T −1 This lemma yields a more efficient self-reducibility al- Assume that M is non-singular and let α = c +v M u. gorithm to construct a perfect matching. First compute ˜ ˜ −1 The inverse of¡ M exists¢ ¡ iff α 6=¢ 0, and equals M = N = T −1, thereby identifying all allowed edges. Next, M −1 − α−1 M −1 u vT M −1 , which is itself a rank-1 −1 add one allowed edge {i, j} to the matching, then recurse update of M . on the subgraph G[S \{i, j}]. This algorithm performs n/2 ω+1 Fact 5. Let M be an n × n skew-symmetric matrix, i.e., matrix inversions and therefore uses O(n ) time in total. T −1 M = −M . If M is non-singular then M is also skew- 2We are grateful to Jim Geelen for pointing out that this argument is symmetric. precisely equation (2) of Tutte [37]. Rank-1 Updates. The bottleneck of the Rabin-Vazirani Algorithm 1: The divide-and-conquer approach to construct a algorithm is recomputing N from scratch in each recursive perfect matching. step. Mucha and Sankowski showed that this is unneces- sary; instead, N can be updated using rank-1 updates. To FindPerfectMatching(G) see this, suppose that edge {i, j} is added to the matching. Construct T and assign random values to the indeterminates −1 The algorithm recurses on the subgraph G[S \{i, j}], and Compute N = T must compute the inverse Tutte matrix N 0 for this subprob- FindAllowedEdges(S), where S is the vertex set of G 0 lem. One might naively expect that N is Ndel({i,j},{i,j}), FindAllowedEdges(S) but this is not the case. Instead, N 0 can be determined If |S| > 2 then from Fact 3: take M = T , W = Tdel({i,j},{i,j}) and Partition S arbitrarily into α equal-sized parts S1,...,Sα Zˆ = N[{i, j} , {i, j}]. Then For each unordered pair {Sa,Sb} of parts FindAllowedEdges(Sa ∪ Sb) Update N (if necessary) N 0 = (T )−1 = W −1 del({i,j},{i,j}) Else = Wˆ − XˆZˆ−1Y.ˆ This is a base case: S consists of two vertices i and j If Ti,j 6= 0 and Ni,j 6= 0 (i.e., edge {i, j} is allowed) then As observed above, the matrix N[{i, j} , {i, j}] = Zˆ is Add {i, j} to the matching and update N skew-symmetric, and therefore µ ¶ ³ ´ | | ¡ ¢ vT algorithm performs an update. The total time required sat- ˆ ˆ−1 ˆ u u 0 c i XZ Y = i j · −c 0 · T | | vj isfies the recurrence µ ¶ | | ³ T ´ ¡ ¢ ¡ ¢ ¡¡ ¢ ¢ v α s α ω −c·u c·u i = j i · T h(s) = 2 · h α/2 + O 2 · s . (3.2) | | vj T T = −cujvi + cuivj . (3.1) By standard arguments, the solution of this recurrence ω is h(n)¡ =¢ O(n ) if α is a constant¡ ¢ chosen such that 0 α α 1 Thus N can be computed from N by two rank-1 updates, logα/2 2 < ω. Since logα/2 2 < 2 + log α−1 , there whose parameters are simple submatrices of N. This com- exists an appropriate choice of α, assuming that ω > 2. putation requires only O(n2) time. Assuming that ω = 2.38, the choice α = 13 is appropriate. Modifying the Rabin-Vazirani algorithm to use rank-1 We now describe a slight variant of the algorithm which updates, one obtains a simple, O(n3) time algorithm for is preferable for implementations, and also admits an tighter constructing perfect matchings. Furthermore, this algo- analysis. The key observation is that Algorithm 1 may re- rithm uses only naive matrix multiplication. The key ques- curse into the same subproblem multiple times, and this is tion is: how can fast matrix multiplication be used to im- completely unnecessary. This issue can be avoided via dy- prove this algorithm? namic programming: simply maintain a bit vector indicat- Our recursive approach. We now describe an algorithm ing which subproblems have been solved. (Note that the that achieves running time O(nω) via a simple divide-and- queries and updates to the bit vector do not depend on the conquer approach. The pseudocode in Algorithm 1 outlines input.) Let us analyze this scheme with α = 4. At level i of −i our algorithm, but for now we postpone the discussion of the recursion, the size of a subproblem is n2 and the num- ¡ i+1¢ how to update N. The constant α will be specified later and ber of subproblems is 2 ≤ 22i+1. The total time to ap- ¡2 ¢ has value at least 3. ply updates at level i is O (n2−i)ω·22i = O(nω2−(ω−2)i). A crucial observation is that Algorithm 1 considers each Summing over all levels yields a bound of O(nω) if ω > 2 pair of vertices in at least one base case. The proof is an easy and O(n2 log n) if ω = 2. In contrast, the recurrence of inductive argument: fix a pair of vertices {i, j}, and note Eq. (3.2) leads to a bound of O(n2+²) for any ² > 0, in the that at each level of the recursion, at least one unordered pair case that ω = 2. of parts {Sa,Sb} has {i, j} ⊆ Sa ∪ Sb. The correctness of Naive Updates. We now describe the scheme for updat- Algorithm 1 follows immediately: our algorithm is simply a ing the matrix N in Algorithm 1. To begin, imagine a naive variant of the Rabin-Vazirani algorithm that considers edges scheme which uses rank-1 updates to update N in the base in an unusual order. cases, as in Eq. (3.1), and does not update N after each re- Analysis. Let us suppose for now that the updating cursive call. Each rank-1 update requires O(n2) time, and scheme requires only O(sω) time for a subproblem with s therefore the resulting algorithm uses time O(n3) in total. vertices; this will be demonstrated later. For a subproblem Ultimately we will define a more efficient updating ¡α¢ with s vertices, Algorithm 1 recurses on 2 subproblems, scheme. Before doing so, let us modify the naive scheme 2s each with α vertices. After solving each subproblem, the by defining some additional memory areas which will store Algorithm 2: The naive scheme to update N during a base case This requires only O(1) time and is sufficient to maintain of Algorithm 1. the invariant for the moment. The remainder of the update work will be performed later (by the recursive ancestors). Set U[∗, {i, j}] = N[∗, {i, j}] After each child subproblem completes, we must per- Set V [{i, j} , ∗] = N[{i, j} , ∗] form additional updates in order to maintain the invariant. Set Ci,j = −1/Nj,i and Cj,i = −1/Ni,j For notational convenience, we will assume that the parent Set N = N + Ci,j U∗,i Vj,∗ + Cj,i U∗,j Vi,∗ subproblem is in fact the root of the recursion. The matrices Append i and j to πc, and append j and i to πr N, U, and V can be decomposed as: ¡ ¢ ¡ ¢ ¡ ¢ N = N NW NNE U = U NW U NE V = V NW VNE NSW NSE USW U SE V SW V SE the parameters of the updates. Consider a single rank-1 up- date performed by the naive scheme (c.f. Eq. (3.1)) when where the north-west submatrices correspond to the child edge {i, j} is added to the matching. The parameters of the subproblem that has just completed. The matrix C is de- composed analogously. The submatrices shown in bold are update are a scalar c = −1/Nj,i, a column-vector u = N∗,i T clean; this follows from our invariant. and a row-vector v = Nj,∗. The algorithm will store the parameters of all updates in three additional n × n matrices We now explain how to update the dirty submatrices. U, V and C. Algorithm 2 illustrates this procedure. The First, consider USW. Ideally, one would just copy into USW the columns from NSW corresponding to new updates gen- algorithm also maintains two lists πc and πr which spec- ify, for each k, which column of U and row of V store the erated during the child subproblem. The difficulty is that parameters of the kth rank-1 update. these new updates have dependencies: columns of NSW in- th th The updates performed by Algorithm 2 have a property volved in the j update should have been modified by the i update (if i < j), but this work was postponed. The follow- that will be useful later: when vertex i is matched, N∗,i and ing lemma gives the key to resolving these dependencies. Ni,∗ are set to zero. To see this, note that Nk,i is set to 1 1 Lemma 3.1. Let X and Y be n × n matrices where Y is Nk,i − Nk,iNj,i − Nk,j Ni,i, Nj,i Ni,j strictly upper triangular. Define a sequence of matrices by (0) (i) (i−1) (i−1) which is zero since Ni,i = 0 by skew-symmetry. X = X and X = X +X∗,i ·Yi,∗ for 1 ≤ i ≤ n. Efficient Updates. We now describe the efficient scheme Let X ~ Y denote X(n). Then X ~ Y = X · (I − Y )−1. which only updates the portions of the matrix which will be needed soon. The recursion of Algorithm 1 gives a con- We use this lemma as follows. Let X = NSW and let venient way to decide which portions should be updated. Y = CNW · VNW. Next, permute columns of X and rows Roughly speaking, whenever a recursive subproblem fin- of Y using πc and πr so that X∗,i and Yi,∗ correspond to th ishes executing, it fully updates the submatrix of N corre- the i new update generated during the child subproblem. sponding to its parent subproblem. As will be explained The rows of Y that don’t correspond to new updates are set shortly, this update requires only a constant number of ma- to zero. Note that Y is strictly upper triangular; this fol- trix multiplications/inversions involving matrices of size at lows from our earlier observation that N∗,i is set to zero most s, which is the number of vertices in the current sub- when column i participates in an update (i.e., when vertex 3 problem. This justifies our earlier assumption that the up- i is matched). Therefore X and Y satisfy the hypotheses dating scheme requires O(sω) time after each recursive call. of Lemma 3.1. The matrix X ~ Y is, by definition, the re- To describe the efficient updating scheme more formally, sult of sequentially applying all new updates to NSW. So, we need some terminology. At any of the algorithm, to make NSW and USW clean, we do the following. First, we say that a submatrix (of N, U, etc.) is clean if its en- set NSW = X ~ Y . Next, the columns from NSW cor- tries are identical to those that the naive scheme would have responding to new updates are copied into USW and set to computed at this point of the algorithm. The efficient up- zero. dating scheme maintains the following invariant. A symmetric argument shows how to make NNE and VNE clean. It remains to apply the new updates to NSE. Invariant: When each recursive subproblem begins or com- This is straightforward since the parameters of these up- pletes, the parent’s submatrices of N, U and V are dates have now been fully computed. Let U˜, C˜ and V˜ de- clean. The matrix C is always clean. note the submatrices of USW, CNW and VNE correspond- When a base case performs an update, our efficient ing to the new updates. We make NSE clean by setting ˜ ˜ ˜ scheme behaves similarly to Algorithm 2. The key differ- NSE = NSE + UCV . All submatrices of the parent sub- ence is that it need not update large portions of the matrices. problem are now clean, and therefore the invariant has been 2 × 2 3 Instead, it only updates the submatrices correspond- Actually NSW is only square if α = 4, but X and Y can be made ing to this base case: U[{i, j} , {i, j}], V [{i, j} , {i, j}], etc. square by padding them with zeros. restored. Notice that this update procedure requires only For the special case J = ∅, this result was stated by a constant number of matrix multiplications/inversions in- Geelen [17] and follows easily from the connection be- volving matrices of size s, where s is the number of vertices tween matroid intersection and the Cauchy-Binet formula, in the parent subproblem. Thus O(sω) time suffices. as noted by Tomizawa and Iri [36]. Building on our Theo- Extensions. The algorithm that we have presented above rem 4.1, we obtain the following result which is crucial to is a Monte Carlo algorithm for finding a perfect matching. our algorithm. It can be extended to a Las Vegas algorithm for finding a Theorem 4.2. Suppose that λ(∅) = r, i.e., M and M maximum cardinality matching using existing techniques 1 2 have a common base. Then Z(J) is non-singular iff J is an [3, 26, 30]. To find a maximum cardinality matching, sim- extensible intersection. ply find a full-rank principal submatrix of the Tutte matrix, then apply our perfect matching algorithm. To make the Interestingly, this theorem is false without the assump- algorithm Las Vegas, one can efficiently construct an op- tion that λ(∅) = r. (There is an example with |S| = 3.) timum dual solution, i.e., the Gallai-Edmonds decomposi- Theorem 4.2 can be proven using the following results and tion, using Cheriyan’s algorithm [3]. induction. 4. Matroid Intersection Fact 6. An independent set J is extensible iff λ(∅) = 4.1. Preliminaries λ(J) + |J|. We assume that the reader is familiar with the basic defini- Fact 7. For any set J ⊆ S, we have λ(J) ≤ r − tions and properties of matroids; introductions can be found maxi∈{1,2} ri(J). in standard references [33]. We write a matroid as a tuple M = (S, I, B, r) where S is the ground set, I ⊆ 2S is the Fact 8. The function λ is non-increasing, i.e., λ(I) ≥ λ(J) collection of independent sets, B ⊆ I is the collection of for all sets I ⊆ J. bases, and r is the rank function. Together with S, any one Lemma 4.3. The function ψ(J) := r (J) + r (J) − |J| + of I, B, and r is sufficient to specify the matroid, so we do 1 2 λ(J) is non-increasing. not necessarily mention all of them. To emphasize connec- tion to a specific matroid, we sometimes use the notation The preceding theorems lead to the following lemma IM, BM and rM. The rank of the matroid M is defined to which characterizes allowed elements. Here, we identify be r(S). For J ⊆ S, M/J denotes the matroid obtained the elements of S \ J with the rows and columns of the from M by contracting J. Recall that its rank function is submatrix of T (J) in Z(J). rM/J (A) := rM(J ∪ A) − rM(J). Let M1 = (S, I1, r1) and M2 = (S, I2, r2) be two ma- Lemma 4.4. Suppose that J ⊆ S is an extensible inter- troids with rank r and let n = |S|. A set J ⊆ S is called section and that i ∈ S \ J. The element i is allowed iff −1 −1 an intersection if J ∈ I1 ∩ I2. A maximum intersection (Z(J) )i,i 6= ti . is one with maximum size. For convenience, we will as- Proof. By Theorem 4.2, our hypotheses imply that sume that M and M have a common base. A subset of 1 2 Z(J) is non-singular. By linearity of the determinant, a maximum intersection is called an extensible set. If J is det Z(J + i) = det Z(J) − t · det Z(J) . By extensible, i 6∈ J, and J + i is also extensible then element i del(i,i) Fact 1, (Z(J)−1) = det Z(J) / det Z(J), so we i is called allowed (relative to J). Let λ(J) denote the size i,i del(i,i) have det Z(J +i) = det Z(J)·(1−t ·(Z(J)−1) ). Thus of a maximum intersection of M /J and M /J. i i,i 1 2 det Z(J + i) 6= 0 ⇐⇒ Z(J)−1 6= t−1. By Theorem 4.2, Suppose that each M is a linear matroid representable i,i i i this holds iff element i is allowed. ¥ over a common field F. Let Q1 be an r × t matrix whose columns represent M1 over F and let Q2 be a t × r ma- The structure of Z will play a key role in our algo- trix whose rows represent M2 over F. For notational con- rithm for matroid intersection below. For simplicity, let J J venience, we will let Q1 denote Q1[∗,J] and Q2 denote Z = Z(∅). Let Y denote the Schur complement of T in −1 Q2[J, ∗]. Let T be a diagonal matrix where Ti,i is an in- Z, i.e., Y = −Q1 · T · Q2. One may verify that determinate t . For convenience, let T (J) denote T . i del(J,J) ³ −1 −1 −1 ´ For each extensible intersection J, we define the matrix Z−1 = Y −Y ·Q1·T . (4.2) −T −1·Q ·Y −1 T −1+T −1·Q ·Y −1·Q ·T −1   2 2 1 J J¯ Q1 Q1  J  4.2. Matroid intersection algorithm Z(J) := Q2 . (4.1) QJ¯ T (J) In this section we describe our matroid intersection algo- 2 rithm, which achieves running time O(nrω−1). We start by Theorem 4.1. For any J ⊆ S, we have rank Z(J) = n + constructing the matrix Z, which is non-singular by our as- r1(J) + r2(J) − |J| + λ(J). sumption that λ(∅) = r. As in Algorithm 1, the first step is to randomly substitute values for the indeterminates in Z As in Section 3, we conceptually store the update parame- from the field F, or a sufficiently large extension. By stan- ters in U, C and V , but actually only perform O(1) work: dard arguments, Z remains non-singular whp. −1 Our algorithm maintains an extensible intersection, ini- Ui,i := Ni,i Vi,i := Ni,i Ci,i := −1/(−ti + Ni,i) tially empty, and searches for allowed elements using 2 −1 Ni,i := Ni,i − (Ni,i) /(−ti + Ni,i) Lemma 4.4. This seemingly requires computing the entire matrix Z−1, which would require a prohibitive Ω(n2) time. The remainder of the entries are updated later. Initially we work under the assumption that Z−1 has been Consider now a subproblem at level i of the recursion completely computed, and later we will show that this as- tree. The number of elements in this subproblem is n2−i. sumption can be removed. We also assume that both n and Say that the entries of its children are S1 and S2. Once its r are powers of two. first child subproblem has completed, we must restore in- Suppose that an allowed element i ∈ S has been found variant (2) by updating USW and VNE. This step is more and we now wish to construct Z({i})−1. The matrix Z({i}) involved than in Section 3 because of our relaxed invari- is identical to Z except that ti has been set to 0. This can ants. We say that an update is old if it was produced before T be expressed as the rank-1 update Z({i}) = Z − tieiei . entering subproblem S1. The difficulty is that old updates th Here ei is the i elementary vector, that is, ei is 1 in the might not have been applied to NSW. The easy case is when ith component and zero elsewhere. Using Fact 4, Z({i})−1 n2−i ≤ r. In this case, invariant (1) implies that the old up- may be computed by the following equation: dates have been applied. It remains to apply the pending updates that were generated within the first child subprob- −1 −1 −1 −1 −1 −1 Z − (−ti + (Z )i,i) (Z )∗,i (Z )i,∗. (4.3) lem. This is done using Lemma 3.1, as in Section 3. The time required is only O((n2−i)ω). This is a rank-1 update whose vector parameters are sub- The more difficult case is when n2−i > r. In this case, matrices of Z−1. Therefore it seems that updates can be there may be old updates which have not yet been applied to applied in a similar manner to our non-bipartite matching N . In fact, no updates have been applied to N what- algorithm. This is indeed possible, although achieving the SW SW soever. However, the portions of U and V which contain the running time O(nrω−1) involves some intricacy. To harmo- updates relevant to N are clean; this follows from apply- nize the notation with Section 3, let N denote the south-east SW ing invariant (2) to the parent of the current subproblem. submatrix (Z−1) . As before, the update parameters will S,S The only portion of N that is of interest is the submatrix be stored in auxiliary matrices U, C and V . SW corresponding to columns that were added to the intersec- Our matroid intersection algorithm is also recursive, but tion. Let us denote this submatrix by N˜. Its size is at most the recursion is much simpler than the non-bipartite match- n2−i × r, since any intersection has size at most r. The ing algorithm. The root of the recursion considers the entire number of old updates which must be applied to N˜ is also ground set S and the entire submatrix N. The ground set at most r. Therefore the time required to apply the old up- is split in two: let S be the first n/2 elements and S the 1 2 dates is bounded by the time to multiply an n2−i ×r matrix remainder. We recurse first on the subproblem S , and then 1 by an r × r matrix, which is O(n2−irω−1) time. on S . 2 Next, we must make N clean. That is, we must re- Although the recursion of this algorithm is simple, it SW solve the interdependencies of updates generated within the needs to maintain somewhat complicated invariants in or- first child subproblem. Using Lemma 3.1, this requires der to obtain the desired level of efficiency. As before, we O(n2−irω−1) time. A similar argument applies to updating will say that a submatrix is clean if all existing updates have N and V . Finally, we must update N . To restore the been applied to it. The invariants are: NE NE SE invariants, we only need update its r × r diagonal blocks. −i ω−1 Invariant 1: When the recursion enters a subproblem with This requires time only O(n2 r ) by the obvious ap- elements A, the submatrix N[A, A] is clean if |A| ≤ r. proach. If |A| > r then only the r × r blocks on the diagonal To analyze the time required by this algorithm, recall that i of N[A, A] are clean. there are 2 subproblems at level i. For levels i < log(n/r), Plog(n/r) i −i ω−1 the total time required is i=1 2 · O(n2 r ) = Invariant 2: For any subproblem, just before its second O(nrω−1), ignoring a log r factor. For levels i ≥ log(n/r), child subproblem begins processing, the USW and VNE the time is submatrices are clean. logXn logXr A base case of the recursion tree considers a single ele- 2i · O((n2−i)ω) = O(n2(ω−1)i) = O(nrω−1), −1 ment i, and checks if Ni,i 6= ti . (Invariant 1 ensures that i=log(n/r) i=0 this entry is clean.) If so, element i is added to the intersec- tion, and we conceptually perform the update of Eq. (4.3). so the total time required is O(nrω−1). Figure 1: The matrix Z(M) used for the basic path-matching problem.   Q∂1M Q∂1M  1 1  Q∂2M   2  Z(M) =  ∂2M  (4.4) Q2 D2  0  D1 T [∂1M, ∂2M] T [∂1M,C2 ∪ S ]  0 0 0 T [C1 ∪ S , ∂2M] T [C1 ∪ S ,C2 ∪ S ]

The preceding discussion assumes that N was initially the paths. If M ⊆ E is a path-matching, let ∂iM ⊆ Ri fully computed. However, it is clear that the only parts of denote the set of vertices in Ri that are covered by M, and N that are needed are those in the r ×r diagonal blocks and let ∂SM ⊆ S denote the covered S-vertices. A perfect those parts that are involved in updates. It is straightforward path-matching is a path-matching M such that ∂iM = Ri to extend the algorithm so that the necessary parts of N are and ∂SM = S.A basic path-matching (bpm) is a path- computed on demand. At the beginning of the algorithm, matching such that ∂iM ∈ BMi and that ∂SM = S. we compute only the r × r diagonal blocks of N. As shown A set M ⊆ E is called an extensible set for G if there by Eq. (4.2), this amounts to computing the r × r diagonal exists a bpm M 0 ⊇ M. Let M be an extensible set and T −1 blocks of Q2Y Q1 plus some negligible additional work, note that ∂iM ∈ IMi . We will now define a basic path- and hence O(nrω−1) time suffices. Next, consider perform- matching problem G(M), which we call the contraction of −i ing an update where n2 > r. Then we must compute the G by M. Let Pi be the set of paths in M with one endpoint initial submatrix N˜ (before any updates are applied). Recall in Ri and the other in S. Informally, we contract (in the −i that N˜ has size at most n2 × r. Then, referring again to graph) each path in Pi to a single vertex, and we contract −i ω−1 Eq. (4.2), we see that N˜ can be computed in O(n2 r ) (in the matroid Mi) the elements ∂iM. Formally, the set time. Thus the preceding analysis applies without change. Ci ⊆ S consists of the endpoints in S of the paths in Pi. Extensions. The algorithm presented above is a Monte Define ∂iM = Ri \ ∂iM, and note that ∂1M and ∂2M 0 Carlo algorithm for finding a common base. To find a maxi- are not necessarily equicardinal. Define Ri := ∂iM ∪ Ci 0 0 mum cardinality intersection instead, start by finding a full- and S := S \ ∂SM. Define E ⊆ E to be the set of 0 0 rank submatrix of the matrix Z, then apply our common edges with both endpoints in S or with one endpoint in Ri 0 0 0 base algorithm. It is possible to find such a submatrix in and the other in S ∪ Rj where i 6= j. The matroid Mi is ω−1 time O(nr ), although we omit the details. The algo- (Mi/∂iM)⊕F(Ci), where F(Ci) denotes the free matroid rithm can be made Las Vegas by constructing an optimum on Ci and ⊕ denotes direct sum. The contraction of G by 0 0 0 0 0 0 dual solution. Simply construct the auxiliary graph used M is G(M) := (R1,R2,S ,E , M1, M2). by Lawler’s algorithm [33], then find the vertices reachable Fact 9. If M 0 ⊇ M is a bpm for G then M 0 \M is a bpm for from the sources; these vertices form an optimal dual solu- G(M). Conversely, if M 0 is a bpm of G(M) then M ∪ M 0 tion whp. It is possible to construct the auxiliary graph in is a bpm of G. time O(nrω−1), although we omit the details. We now define an algebraic structure which extending 5. Generalizations for matroid intersection. First, there is a matrix of inde- A nice feature of our previous algorithms is that they extend terminates T which is similar to the Tutte matrix and de- easily to several generalizations of matching and matroid scribes the graph underlying G. The rows of T are indexed intersection. We consider two such generalizations here. by R1 ∪ S and the columns are indexed by R2 ∪ S. The entries are defined as Ti,j = ±t{i,j}, where the signs are 5.1. Path-Matchings chosen such that T [S, S] is skew-symmetric. An instance of the a basic path-matching is a tuple G = Lemma 5.1 (Geelen [16]). T is non-singular iff G has a (R ,R , S, E, M , M ) where (R ∪R ∪S, E) is a graph 1 2 1 2 1 2 perfect path-matching. and each Mi is a matroid (Ri, Ii, ri). The vertex sets R1, R2 and S are disjoint and furthermore R1 and R2 are stable Let Di be a diagonal matrix of size |∂iM| whose non- sets (no edge has both endpoints in either R1 or R2). As- zero entries contain distinct indeterminates. Define Z(M) sume that |R1| = |R2|, and that M1 and M2 have the same to be the matrix in Eq. (4.4). rank r.A path-matching is a collection of node-disjoint paths with one endpoint in R1 and the other in R2, together Theorem 5.2. Let M be a set of edges in G such that with a matching on the S-vertices not contained in any of ∂1M ∈ IM1 and ∂2M ∈ IM2 . Then G(M) has a bpm iff Z(M) is non-singular. Equivalently, M is an extensible Acknowledgements set iff Z(M) is non-singular. The author thanks Michel Goemans, Satoru Iwata, and An edge e = {i, j} in G(M) is called allowed (rela- David Karger for helpful discussions on this topic. Addi- tive to M) if M + e is also extensible. An extension of tionally, the author thanks the anonymous referees for sug- Lemma 4.4 characterizes whether edges are allowed. Using gesting numerous improvements to the text of the paper. this, the algorithm of Section 3 can be extended to compute References a basic path-matching in time O(nω). Details are postponed [1] A. I. Barvinok. New algorithms for linear k-matroid intersection and to the full version of the paper. matroid k-parity problems. Mathematical Programming, 69:449– 5.2. Bipartite Matroid Matchings 470, 1995. [2] P. Chalasani and R. Motwani. Approximating capacitated routing An instance of the bipartite matroid matching problem is a and delivery problems. SIAM Journal on Computing, 26(6):2133– tuple G = (R1,R2,E, M1, M2) where E ⊆ R1 × R2 and 2149, 1999. [3] J. Cheriyan. Randomized O˜(M(|V |)) algorithms for problems in Mi = (Ri, Ii) is a matroid. An independent matching in G matching theory. SIAM Journal on Computing, 26(6):1635–1669, is a matching M ⊆ E such that ∂1M ∈ I1 and ∂2M ∈ I2. 1997. The objective is to find a maximum cardinality independent [4] D. Coppersmith and S. Winograd. Matrix multiplication via arith- matching. Bipartite matroid matching is a special case of metic progressions. Journal of Symbolic Computation, 9(3):251– basic path-matching where S = ∅. Also, matroid intersec- 280, 1990. tion is a special case of bipartite matroid matching where [5] W. H. Cunningham. Improved bounds for matroid partition and in- tersection algorithms. SIAM Journal on Computing, 15(4):948–957, all vertices have degree 1. Theorem 5.2 extends to show Nov. 1986. that the maximum cardinality of an independent matching [6] W. H. Cunningham and J. F. Geelen. Vertex-disjoint directed paths in G(M) is rank Z(M) − 2n, for any M ⊆ E. and even circuits. Manuscript. Additionally, the algorithm for basic path-matchings im- [7] W. H. Cunningham and J. F. Geelen. The optimal path-matching mediately solves the bipartite matroid matching problem problem. In Proceedings of the 37th Annual IEEE Symposium on ω Foundations of Computer Science (FOCS), pages 78–85, 1996. in O(n ) time. However, for bipartite matroid matching [8] W. H. Cunningham and J. F. Geelen. The optimal path-matching problems, the matrix Z(M) contains no skew-symmetric problem. Combinatorica, 17(3):315–337, 1997. parts. Therefore the algorithm can be simplified, and one [9] J. Edmonds. Maximum matching and a polyhedron with 0,1-vertices. obtains an algorithm that amounts to executing the Mucha- Journal of Research of the National Bureau of Standards, 69B:125– Sankowski bipartite matching algorithm on the lower-right 130, 1965. −1 [10] J. Edmonds. Paths, trees, and flowers. Canadian Journal of Mathe- submatrix of Z . Thus we have the following surpris- matics, 17:449–467, 1965. ing result: when the Mucha-Sankowski algorithm exe- [11] J. Edmonds. Submodular functions, matroids, and certain polyhedra. cutes on T and T −1, it computes a maximum bipartite In R. Guy, H. Hanani, N. Sauer, and J. Schonheim,¨ editors, Com- matching. However, when it executes on T and Q˜ := binatorial Structures and Their Applications, pages 69–87. Gordon −1 and Breach, 1970. Republished in M. Junger,¨ G. Reinelt, G. Ri- Q2(Q1TQ2) Q1 (which is the lower-right submatrix of naldi, editors, Combinatorial Optimization – Eureka, You Shrink!, −1 Z ) it computes a maximum independent matching. Lecture Notes in Computer Science 2570, pages 11–26. Springer- Verlag, 2003. 6. Open Questions [12] J. Edmonds. Matroid intersection. In P. L. Hammer, E. L. Johnson, and B. H. Korte, editors, Discrete Optimization I, volume 4 of Annals Graphical Matroid Intersection. One can obtain a of Discrete , pages 39–49. North-Holland, 1979. polynomial-time algorithm for matroid intersection that [13] S. Fujishige. Submodular Functions and Optimization, volume 58 of works only with the matrix Y , as defined in Section 4. Annals of Discrete Mathematics. Elsevier, second edition, 2005. How efficient can such an algorithm be? Consider the spe- [14] H. N. Gabow and Y. Xu. Efficient theoretic and practical algorithms cific case of graphical matroids — the standard represen- for linear matroid intersection problems. Journal of Computer and System Sciences, 53(1):129–147, 1996. tation is a matrix with two non-zero entries per column. [15] F. R. Gantmakher. The Theory of Matrices, volume 1. Chelsea, New In this framework, contracting an element requires only York, 1960. Translation by K.A. Kirsch. O(1) changes to Y . Using Sankowski’s dynamic matrix [16] J. F. Geelen. Matroids, Matchings, and Unimodular Matrices. PhD inverse operations [31], one obtains a O(n2.575) algorithm thesis, University of Waterloo, Canada, 1995. for graphical matroid intersection, which is slightly worse [17] J. F. Geelen. Matching theory. Lecture notes from the Euler Institute 2.5 for Discrete Mathematics and its Applications, 2001. than the O(n log n) algorithm of Gabow-Xu [14]. Does [18] C. D. Godsil. Algebraic Combinatorics. Chapman & Hall, 1993. ω a O(n ) algorithm exist? [19] M. X. Goemans. Bounded degree minimum spanning trees. In Pro- Skew-Symmetric Matrices. The recursion presented in ceedings of the 21st Annual IEEE Symposium on Foundations of Section 3 is a general technique for performing eliminations Computer Science (FOCS), 2006. in skew-symmetric matrices in O(nω) time. Can it be used [20] N. J. A. Harvey, D. R. Karger, and K. Murota. Deterministic network coding by matrix completion. In Proceedings of the Sixteenth Annual to obtain efficient algorithms for other operations on skew- ACM-SIAM Symposium on Discrete Algorithms (SODA 05), pages symmetric matrices? 489–498, 2005. [21] M. Iri. Applications of matroid theory. In A. Bachem, M. Grotschel,¨ the south-east submatrix Z. The general result follows via and B. Korte, editors, Mathematical Programming: The State of the row/column permutations. ¥ Art, pages 158–201. 1983. [22] E. L. Lawler. Matroid intersection algorithms. Mathematical Pro- Proof (of Fact 2). See Murota [28]. Note that: gramming, 9:31–56, 1975. ³ ´ ¡ ¢ ¡ ¢ [23] L. Lovasz.´ On determinants, matchings and random algorithms. In W −XZ−1Y 0 I −X I 0 WX = · −1 · ( ) . (A.1) L. Budach, editor, Fundamentals of Computation Theory, FCT ’79, Z−1YI 0 I 0 Z YZ pages 565–574. Akademie-Verlag, Berlin, 1979. [24] L. Lovasz´ and M. D. Plummer. Matching Theory. Akademiai´ Kiado´ Taking the determinant of both sides proves the fact. ¥ – North Holland, Budapest, 1986. √ Proof (of Fact 3). The condition for non-singularity of W [25] S. Micali and V. V. Vazirani. An O( VE) algorithm for finding −1 maximum matching in general graphs. In Proceedings of the 21st An- follows from Fact 1. To prove the equation for W , we −1 −1 nual IEEE Symposium on Foundations of Computer Science (FOCS), reverse the roles of M and M , i.e., we consider Wˆ pages 17–27, 1980. instead. Take inverses in Eq. (A.1): [26] M. Mucha. Finding Maximum Matchings via Gaussian Elimination. ³ −1 −1 ´ ³ ´ PhD thesis, Warsaw University, 2005. (W −XZ Y ) 0 = Wˆ Xˆ · ( I 0 ) · ( IX ) [27] M. Mucha and P. Sankowski. Maximum matchings via Gaussian Z−1Y (W −XZ−1Y )−1 I Yˆ Zˆ 0 Z 0 I elimination. In Proceedings of the 45th Annual IEEE Symposium on ³ ´ = Wˆ WXˆ +XZˆ . Foundations of Computer Science (FOCS), pages 248–255, 2004. Yˆ YXˆ +ZZˆ [28] K. Murota. Matrices and Matroids for Systems Analysis. Springer- Verlag, 2000. The equality of the north-west submatrices shows that [29] H. Narayanan, H. Saran, and V. V. Vazirani. Randomized parallel al- Wˆ −1 = W − XZ−1Y , as desired. ¥ gorithms for matroid union and intersection, with applications to ar- boresences and edge-disjoint spanning trees. SIAM Journal on Com- Proof (of Fact 4). First we prove the condition³ for´ exis- puting, 23(2):387–397, 1994. −1 T tence of M˜ −1. Consider the matrix A = −c v . Use [30] M. O. Rabin and V. V. Vazirani. Maximum matchings in general u M graphs through randomization. Journal of Algorithms, 10(4):557– Fact 2 first on the south-east submatrix M, and then on the 567, 1989. north-west submatrix −c−1, obtaining: [31] P. Sankowski. Dynamic transitive closure via dynamic matrix in- ¡ ¢ verse. In Proceedings of the 45th Annual IEEE Symposium on Foun- det M · det − c−1 − vTM −1u dations of Computer Science (FOCS), pages 509–517, 2004. ¡ ¢ [32] P. Sankowski. Processor efficient parallel matching. In Proceedings = det A = (−c−1) · det M − u(−c)vT . of the 17th ACM Symposium on Parallelism in Algorithms and Ar- chitectures (SPAA), pages 165–170, 2005. This shows that M˜ is non-singular iff α 6= 0. To verify the [33] A. Schrijver. Combinatorial Optimization: Polyhedra and Efficiency. ˜ −1 Springer-Verlag, 2003. equation for M , note that [34] A. Schrijver. On the history of combinatorial optimization (till 1960). ¡ T¢ ¡ −1 −1 −1 T −1¢ In K. Aardal, G. L. Nemhauser, and R. Weismantel, editors, Discrete M + cuv · M − α M uv M = I. ¥ Optimization, volume 12 of Handbooks in Operations Research and Management Science, pages 1–68. North Holland, 2005. −1 [35] G. Strang. and its Applications. Thomson Learning, Proof (of Fact 5). Suppose that M exists. Then 1988. −1 ¡ −1 T ¡ T −1 (M )i,j = (M ) )j,i = (M ) )j,i [36] N. Tomizawa and M. Iri. An Algorithm for Determining the Rank ¡ of a Triple Matrix Product AXB with Application to the Problem of −1 −1 = (−M) )j,i = −(M )j,i. ¥ Discerning the Existence of the Unique Solution in a Network. Elec- tronics and Communications in Japan (Scripta Electronica Japonica II), 57(11):50–57, Nov. 1974. (j) (k) Proof (of Lemma 3.1). First, note that X∗,i = X∗,i if [37] W. T. Tutte. The factorization of linear graphs. Journal of the London i ≤ j ≤ k since Y is strictly upper triangular. Define Mathematical Society, 22:107–111, 1947. ¡ ¢ A = I−Y 0 , and consider performing Gaussian elimi- [38] V. V. Vazirani. A theory of√ alternating paths and blossoms for prov- XI ing correctness of the O( VE) general graph matching algorithm. nation on A. Let S(i) denote the south-west submatrix of In Proceedings of the 1st Programming and Combinatorial A just before the ith elimination. An easy inductive argu- Optimization Conference (IPCO), pages 509–530, 1990. (i) (i) ment shows that S∗, i:n = X∗, i:n. The (lower half of the) A. Additional Proofs column vector involved in the ith elimination is therefore (i) (n) Proof (of Fact 1). This is Jacobi’s theorem. The following S∗, i = X∗, i . Now consider the LU-decomposition of A: proof is folklore; see also Gantmakher [15, §1.4]. Let M be µ ¶ µ ¶ µ ¶ ³ ´ I − Y 0 I 0 I − Y 0 of the form M = ( WX ) and let M −1 = Wˆ Xˆ . Note = · . YZ Yˆ Zˆ XI BI 0 I that µ ¶ µ ¶ µ ¶ WX Wˆ 0 IX It is well-known that B∗,i is precisely the (lower half of · = . th YZ YIˆ 0 Z the) column involved in the i elimination (see, e.g., Strang [35]). Thus B = X(n) = X ⊗ Y . The lemma follows by Taking the determinant of both sides shows that det M · observing that X = B · (I − Y ). ¥ det Wˆ = det Z. This proves the result when M[I,J] is