Manuscript Offprint
arXiv:2611.02287Faster graphic matroid parity: Breaking the time complexity barrier
Abstract
In the graphic matroid parity problem, we are given an undirected multigraph with vertices, together with a partition of into pairs of distinct edges, and the goal is to find a maximum-cardinality collection of pairs whose union is a forest. This problem generalizes both graph matching and graphic matroid intersection. Graph matching admits the celebrated -time algorithm of Micali-Vazirani [FOCS'80], and graphic matroid intersection admits -time algorithms due to Gabow-Stallmann [ICALP'85] and Gabow-Xu [FOCS'89]. In contrast, for graphic matroid parity, Gabow-Stallmann [FOCS'84 & Combinatorica'86] gave an -time algorithm, and its -time implementation by Gabow-Stallmann [ICALP'85] had long remained the best known bound, except in very dense regimes where , in which case the algebraic -time algorithm of Cheung-Lau-Leung [SODA'11 & TALG'14] is faster.
We present a randomized -time algorithm for graphic matroid parity. This is the first algorithm to break the -time complexity barrier for this problem outside the very dense regime. Moreover, it improves over the previous bounds except in very sparse regimes where and in very dense regimes where . In particular, when , our algorithm runs in time, which nearly matches the -time bounds of Micali-Vazirani for graph matching and of Gabow-Xu for graphic matroid intersection in this regime.
*Research Institute for Mathematical Sciences, Kyoto University. E-mail: ttatsuya@kurims.kyoto-u.ac.jp
Contents
1 Introduction 1
1.1 Additional related work 3
2 Preliminaries 4
3 Technical overview 5
4 Fast exact algorithm for graphic matroid parity (Proof of Theorem 1) 13
5 Minimum Covers: Definitions and Structural Properties 14
6 Adapting Assadi's framework to graphic matroid parity 16
7 Modifying Assadi's framework for a faster implementation 22
8 Fast (1 - ε)-approximation algorithm for graphic matroid parity 26
9 Fast span-membership tests via patterns (Proof of Lemma 30) 27
9.1 Patterns 28
9.2 Preliminaries on data structures 30
9.3 Fast enumeration of all patterns 31
9.4 Fast span-membership tests 33
A Matroids 46
B Gabow-Stallmann's algorithm 46
C Handling indices with large 48
In this work, we give an efficient algorithm for the important special case in which the matroid is graphic, known as the graphic matroid parity problem, or the spanning tree parity problem [GJ79]. In this problem, we are given an undirected multigraph with vertices, together with a partition of into pairs of distinct edges. We refer to each such pair as a line. The goal is to find a maximum-cardinality collection of lines whose union is a forest. A set is called a (graphic) matroid matching if is the union of a collection of lines and forms a forest. We note that, unlike the graph matching problem, where a simple graph has at most edges, the relevant objects here are lines, that is, pairs of edges. Thus, can be as large as after removing duplicate pair types.
Graphic matroid parity generalizes both graph matching and graphic matroid intersection. More concretely, both graph matching and graphic matroid intersection instances with n vertices and m edges can be reduced to graphic matroid parity instances with vertices and lines.
Developing faster algorithms for graphic matroid parity is a natural direction in light of the rich literature on faster algorithms for matroid problems on graphic matroids, including graphic matroid intersection [GS85, GX89], packing spanning trees (matroid union for graphic matroids) [RT85, GW88, Gab91, BMNT23, Qua24b, AK26], and several other matroid problems [Gab98, EN19, HLVZ23, KPS26]. Furthermore, the graphic matroid parity problem has applications in a variety of algorithmic settings, including approximation algorithms for the maximum planar subgraph problem [CFFK98, CSU19, CU24], the minimum Steiner tree problem [PS97, BFZ06], and various other problems [Căll10, Căll16, CKK24]. It also yields a polynomial-time algorithm for finding maximum-genus embeddings of graphs [FGM88]. Graphic matroid parity has further been used to obtain faster deterministic FPT algorithms for feedback vertex set [CCL15, KP14, IK21b] (see [KP14, Theorem 6] and [CFK 15, Section 12.2.2]).
Gabow–Stallmann [GS86] gave an -time algorithm for graphic matroid parity based on the augmenting-path method. Using range-searching data structures, they later improved this to time [GS85]. Cheung–Lau–Leung [CLL14] gave a randomized algebraic algorithm for graphic matroid parity that runs in time, and in time when each edge pair shares a common vertex. The case in which each edge pair shares a common vertex has applications in several approximation algorithms.
For both graph matching and graphic matroid intersection, breaking the -time complexity barrier marked an important milestone, and faster algorithms are now known.
For bipartite graph matching, the celebrated Hopcroft–Karp [HK73] algorithm achieved a running time of , improving over the bound obtained by a direct application of the Ford–Fulkerson [FJF56] maximum-flow algorithm. Recent breakthroughs in faster algorithms for bipartite matching and flow [Mad13, LS19, CMSV17, LS20, AMV20, vdBLN , VDBCK , CK24a, CK24b, BBST24, CKL , BBL ] have led to an -time algorithm [VDBCK , CKL ] and a combinatorial -time algorithm [BBL ] for bipartite matching.
For general graph matching, Edmonds [Edm65] first gave a polynomial-time algorithm. Gabow [Gab76] later gave an -time implementation of Edmonds' algorithm. Us
General graph matching (on a graph ) can be reduced to a graphic matroid parity problem (on a multigraph ) as follows. For each vertex in , create two vertices in . For each edge in , add a line consisting of two edges and in .
The notation omits polylog factors.
ing the disjoint set union data structure of [GT83], this can be improved to time. After the improvement of Even-Kariv [EK75], the celebrated Micali-Vazirani algorithm [MV80] achieved an running time. The original paper of Micali-Vazirani did not contain a complete correctness proof, and the first complete and correct proof was given recently by Vazirani [Vaz24]. Alternative -time algorithms were given by Gabow-Tarjan [GT91], Goldberg-Karzanov [GK04], and Gabow [Gab17]. Very recently, Izumi-Kitamura-Yamaguchi [IKY25] proposed a new structural framework for shortest augmenting paths, which yields an -time algorithm with a simpler correctness proof. More recently, a preprint released by OpenAI [Ope26] claims to give a randomized -time algorithm, and Li-Li-Zhang [LLZ26] gave an -time algorithm.
For the matroid intersection problem, Edmonds [Edm70,Edm79] first presented a polynomial-time algorithm. For graphic matroid intersection, Edmonds' algorithm can be implemented in time using appropriate data structures. Using an idea similar to the Hopcroft-Karp algorithm, Gabow-Stallmann [GS85] presented an -time algorithm for graphic matroid intersection. Gabow-Xu [GX89] later improved this to , matching, up to polylogarithmic factors, the running time of the Hopcroft-Karp algorithm for bipartite matching. (We note that bipartite matching is a simple special case of graphic matroid intersection.) More recently, the dynamic-oracle matroid intersection algorithm of Blikstad-Mukhopadhyay-Nanongkai-Tu [BMNT23] also implies an -time algorithm for graphic matroid intersection.
While the -time complexity barrier has been broken for both graph matching and graphic matroid intersection, graphic matroid parity has resisted such an improvement for nearly four decades, except in very dense regimes where [CLL14]. This naturally raises the following question.
Can the graphic matroid parity problem also be solved in time?
We answer this question affirmatively, except in the very sparse regime where . For every fixed constant , our algorithm runs in time whenever .
Theorem 1. There is a randomized algorithm that finds a maximum graphic matroid matching with high probability in time.
The running time in Theorem 1 is in the regime where , and in the regime where . Our algorithm in Theorem 1 improves upon the previous algorithms [GS86, GS85, CLL14] except in very sparse regime where and in very dense regime where . For example, when , Gabow-Stallmann [GS85] takes time, whereas our algorithm in Theorem 1 takes only time. Moreover, for , the algorithms of Micali-Vazirani [MV80] for graph matching and of Gabow-Xu [GX89] for graphic matroid intersection also run in time, so our algorithm is nearly as fast as the classical algorithms for the two special cases. The previous and new bounds over the full range of are summarized in Figure 1.
In fact, the algorithm in Theorem 1 is obtained by first developing a faster -approximation algorithm. Even for obtaining a -approximate solution, Gabow-Stallmann's algorithm [GS85] still takes time. Indeed, Gabow-Stallmann's algorithm repeatedly finds a single augmenting path and augments along it. Finding one augmenting path takes time, and this procedure is repeated times. We give a -approximation algorithm running in time. Once a -approximate solution is obtained, only a small number of augmentations remain to obtain an exact solution. By combining our fast -approximation algorithm with Gabow-Stallmann's augmenting-path algorithm, we obtain the fast exact algorithm in Theorem 1.

Figure 1: State-of-the-art time complexities for the graphic matroid parity problem.
Theorem 2. For any , there is a randomized algorithm that finds ()-approximate maximum graphic matroid matching with high probability in time.
Our algorithm in Theorem 2 builds on the framework of the recent semi-streaming algorithm for graph matching by Assadi [Ass25]. However, we emphasize that obtaining a faster algorithm for graphic matroid parity requires several new ideas.
Since our approximation algorithm builds on the framework of [Ass25], it can also be implemented in the streaming model. In the streaming model, the input lines, i.e., pairs of edges, are presented to the algorithm one by one. The graph matching problem is one of the most extensively studied problems in the graph streaming setting [FKM05, McG05, EKS09, AG11, GKK12, EKMS12, KMM12, AG13, Kap13, EHM16, KT17, AG18, Kon18, Tir18, GKMS19, ALT21, AB21, AJJ22, FMU22, HS23, Ber23, KNS23, FS24, Ass25, MMSS25, IKY25]. There are also several studies on the matroid intersection problem (and its generalizations) in the streaming setting in the literature [CGQ15, CK15, FKK18, HTW20, HW23, GJS23, HS24, Ter25a, DG26, HKKT26, HK26]. Thus, it is natural to study streaming algorithms for graphic matroid parity, which generalizes both graph matching and graphic matroid intersection.
Theorem 3. For any , there is a streaming algorithm that finds ()-approximate maximum graphic matroid matching with high probability using space and passes.
Our streaming algorithm in Theorem 3 is an extension of the semi-streaming algorithm for graph matching by Assadi [Ass25]. However, obtaining the faster sequential algorithm in Theorem 2 requires additional new ideas beyond this extension.
1.1 Additional related work
Szigeti [Szi03] gave a relatively simple proof of the min-max theorem specialized to graphic matroid parity (see [Sch03, Corollary 43.2c] and [Szi03, Theorem 1]).
There have been several important advances on the complexity of matroid parity. Lee-Sviridenko-Vondrák [LSV13] presented a PTAS for matroid parity for general matroids. For linear matroid parity, Gabow-Stallmann [GS86] gave an -time algorithm based on
Although our algorithm will use a min-max theorem, we do not use this specialized min-max theorem for graphic matroid parity [Sch03, Corollary 43.2c]. Instead, we rely on the min-max theorem for linear matroid parity. The reason is that the min-max theorem specialized to graphic matroid parity is not known in an algorithmic form. This is not an obstacle to obtaining an exponential-time streaming algorithm, since one can enumerate all candidate covers by brute force. However, it becomes a serious obstacle to obtaining a fast sequential algorithm for graphic matroid parity, where we would need to find a minimum cover efficiently. For this reason, our algorithm uses the min-max theorem for linear matroid parity, stated as Theorem 4.
the augmenting-path method. Orlin-Vande Vate [OVV90] gave an alternative algorithm that solves linear matroid parity as a sequence of matroid intersection problems. This approach was later simplified and improved by Orlin [Orl08], who gave an -time algorithm. Cheung-Lau-Leung [CLL14] presented a randomized algebraic -time algorithm for linear matroid parity, extending Harvey's [Har09] technique for linear matroid intersection. Very recently, Hamada-Iwata [HI26] presented a deterministic -time algorithm that repeatedly augments the current solution along a shortest augmenting path, improving upon the deterministic bounds of Gabow-Stallmann [GS86] and Orlin [Orl08]. With fast matrix multiplication, the running time can be reduced to . The breakthrough work of Iwata-Kobayashi [IK21a] gave the first polynomial-time algorithm for the weighted version of linear matroid parity.
The search procedure of Hamada-Iwata finds only one shortest augmenting path per search. To improve upon the bound for graphic matroid parity along the lines of Micali-Vazirani [MV80], one would need to find a maximal set of disjoint shortest augmenting paths in a single search of time, which requires both extending the search procedure of Hamada-Iwata so that it finds such a set at once, and designing data structures that handle blossoms and transforms as in Gabow-Stallmann [GS85]. We are not aware of how to achieve either, and we leave such an approach as an interesting direction for future work.
There have also been many studies on fast matroid intersection algorithms for other important specific classes of matroids [GT79,Cun86,GX89,GX96,XG94,Har07,Har09,HKK19,Ter26a]. Recently, Blikstad-Mukhopadhyay-Nanongkai-Tu [BMNT23] proposed a remarkable new oracle model, called dynamic oracle, which unifies various results on fast matroid intersection algorithms for specific classes of matroids; see [BMNT23, Table 2]. There have also been many studies on fast matroid intersection algorithms in the independence (or rank) oracle model, including several recent breakthroughs [Cun86,FX95,SI95,LSW15,CQ16,HKK19,Ngu19,CLS+19, BvdBMN21, Bli21, Tu22, BMNT23, Qua24a, BT25, DG26, HK26, Ter26b].
Gabow-Stallmann [GS85] also gave a fast algorithm to find edge-disjoint spanning trees on a graph. Subsequently, Gabow-Westermann [GW88] presented a fast algorithm to find forests in a graph maximizing the number of edges in their union, which subsumes the edge-disjoint spanning trees problem. More recently, several faster algorithms for this problem have been developed [Qua24b, BMNT23, AK26]. Note that this problem can be viewed as a matroid intersection of a graphic matroid and a partition matroid. It can also be viewed as the matroid union problem in which the given matroids are graphic. There have also been several studies on fast matroid union algorithms in the oracle model [Cun86, BMNT23, Qua24b, Ter25b].
The framework of Assadi [Ass25] has already found several applications, including a fast -approximation algorithm for matroid intersection in the independence-oracle model [Qua24a], a streaming algorithm for single-source shortest paths [AHS26], and a quantum query algorithm for linear programs [OV25].
2 Preliminaries
Notation. Throughout the paper, denotes the logarithm to base 2. We write "with high probability" (w.h.p.) if the failure probability is at most . For a finite set , let denote the cardinality of , which is also called the size of . For two sets and , we write for their symmetric difference.
Throughout the paper, we allow graphs to have parallel edges, but not self-loops. We work in the regime where and .
For the definitions of matroids, see Appendix A. In this paper, we use only graphic and linear matroids.
Graphic matroids. Given an undirected graph , let . Then, is a matroid, called the graphic matroid of .
Graphic matroid parity. In the graphic matroid parity problem, we are given an undirected multigraph with vertices, together with a partition of into pairs of distinct edges. We refer to each such pair as a line. The goal is to find a maximum-cardinality collection of lines whose union is a forest. A set is called a graphic matroid matching if is the union of a collection of lines and forms a forest. When no confusion can arise, we simply call it a matroid matching.
Let denote the set of all lines. We denote by the maximum number of lines in a matroid matching in . For each element , we write for the mate of , that is, the unique element such that . A parity partition of is a partition of into unions of lines, that is, if and only if for every and every .
Linear matroids. A matroid is said to be linearly representable or a linear matroid if there exists a matrix over some field whose columns are indexed by such that if and only if the columns indexed by are linearly independent.
It is well known that graphic matroids are linearly representable. Indeed, it is well known that a graphic matroid can be represented over by the vertex-edge incidence matrix, where each column corresponds to an edge and has exactly two nonzero entries, both equal to 1 (see, e.g., [Oxl06, Section 5.1]). Under this representation, a set of columns is linearly independent if and only if the corresponding edge set is a forest.
When working with a linear matroid, we fix the representation and identify each element with the corresponding column vector. For a set of vectors , we write for the linear subspace generated by . Throughout the paper, always denotes linear span, not matroid closure. For any set of vectors , we define its rank by .
Linear Matroid parity. In the linear matroid parity problem, we are given an matrix, together with a partition of column set into pairs of distinct columns. We call each such pair a line. The goal is to find a maximum-cardinality collection of lines whose union is linearly independent.
Graphic matroid parity is a special case of linear matroid parity. Whenever we use terminology from linear matroid parity, the linear matroid parity instance under consideration is the one obtained from the input graphic matroid parity instance. That is, we identify each edge of with its column in the vertex-edge incidence matrix over , and keep the same partition of edges into lines.
3 Technical overview
In this section, we give a technical overview of our fast -approximation algorithm for graphic matroid parity. Once we have obtained a -approximation algorithm that runs in time, we can turn it into a fast exact algorithm as follows. After obtaining a -approximate solution, at most augmentations are needed to obtain an exact optimal solution. Since Gabow–Stallmann [GS85] can find one augmenting path in time, these remaining augmentations take time in total. Thus, the total running time is . By setting , this becomes .
Our fast -approximation algorithm builds on the framework of the recent MWU-based algorithm for graph matching by Assadi [Ass25]. There are two main difficulties in turning this framework into a faster algorithm for graphic matroid parity.
The first difficulty is to adapt Assadi's idea from graph matching to graphic matroid parity. Although this adaptation requires a careful argument, it is not where the main technical novelty lies. To carry it out, we exploit structural properties of the minimum cover produced by the Gabow–Stallmann algorithm [GS86, GS85].
The second difficulty is to break the -time complexity barrier. The algorithm obtained by an adaptation of Assadi's framework would require span-membership tests. The main technical novelty of our algorithm is to avoid performing these tests one by one. To this end, we introduce random fingerprints, which we call patterns. These patterns compactly encode the relevant information, allowing us to reinterpret the span-membership tests as a pattern-matching problem and process many of them simultaneously. To make this approach work, we crucially exploit the structural properties of the minimum cover produced by Gabow–Stallmann's algorithm [GS86, GS85].
Organization of the technical overview We first review Assadi's MWU framework and view graphic matroid parity as linear matroid parity over , whose min-max theorem supplies the analogue of a vertex cover. We next describe the structure of the minimum covers produced by Gabow–Stallmann and use it to adapt Assadi's framework. Finally, we introduce patterns and explain how they avoid the span-membership tests required by a direct implementation.
For ease of exposition, the overview mainly explains a -approximation algorithm running in time, and hence an exact algorithm running in time. To improve the bounds further, we modify Assadi's framework itself so that it runs faster, and we also speed up the span-membership tests. Both modifications, which are briefly explained at the end of the overview, yield a -approximation algorithm running in time, and hence an exact algorithm running in time, as stated in Theorems 2 and 1.
Assadi's [Ass25] MWU-based framework for bipartite matching Our graphic matroid parity algorithm builds on Assadi's remarkable framework, so we briefly describe Assadi's algorithm for bipartite matching. The algorithm maintains an importance value for each edge , with all values initially equal. The algorithm then repeats the following process for iterations: In each iteration, it first samples edges in proportion to . Then, it computes a maximum matching and a minimum vertex cover in the sampled graph . Finally, it updates the importance values by setting for every edge not covered by . After iterations, the algorithm outputs the largest matching found during the process.
Viewing graphic matroid parity as linear matroid parity. Our algorithm also relies on arguments from Gabow–Stallmann's augmenting-path framework [GS86] for linear matroid parity. We therefore briefly describe the relationship between linear matroid parity and graphic matroid parity. Graphic matroid parity is obtained as the special case of linear matroid parity in which the linear matroid is the -representation of a graphic matroid by its vertex-edge incidence matrix. (See Section 2.)
When we use terminology from linear matroid parity, the linear matroid parity instance under consideration is the one obtained from the input graphic matroid parity instance by the reduction in Section 2. That is, we identify each edge of with its column in the vertex-edge incidence matrix over , and keep the same partition of edges into lines.
Gabow–Stallmann [GS86] gave an augmenting-path algorithm for linear matroid parity. Applied to the associated linear matroid parity instance over described above, this framework gives an augmenting-path algorithm for graphic matroid parity. Using range-searching data structures, Gabow–Stallmann [GS85] gave a faster implementation of this algorithm. Their implementation finds one augmenting path in time and solves graphic matroid parity in time.
Min-max theorem for linear matroid parity To extend the framework of Assadi [Ass25] to graphic matroid parity, we need to identify an object that plays the role of the vertex cover in Assadi's bipartite matching algorithm. We would like to obtain such an object from a min-max theorem for linear matroid parity. Lovász [Lov80b] proved the following min-max theorem for linear matroid parity, which can be viewed as a generalization of the Tutte–Berge formula for general graph matching.
Theorem 4. [See [Sch03, Corollary 43.2a] and [GS86]] Let denote the maximum number of lines in a matroid matching. For the linear matroid parity, satisfies
where the minimum is taken over all subsets and all parity partitions of .
Here, the minimum is taken over all subsets , not only over subsets of the ground set . We now define covers for linear matroid parity.
Definition 5. A cover of a linear matroid parity instance is a tuple , where and is a parity partition of . The value of a cover is defined as . A cover is called a minimum cover if its value is minimum among all covers.
Gabow–Stallmann’s augmenting-path algorithm for linear matroid parity [GS86] constructs an optimality certificate when no augmenting path remains. In the terminology of Definition 5, this certificate is a minimum cover. Their graphic matroid parity algorithm [GS85] is a specialized implementation of this linear matroid parity augmenting-path algorithm on the -representation of the input graph. Therefore, their graphic matroid parity algorithm [GS85] also produces a minimum cover for the associated linear matroid parity instance.
Structures of a minimum cover by Gabow–Stallmann [GS86, GS85] Our adaptation of Assadi’s idea [Ass25] to graphic matroid parity and our approach to breaking the -time complexity barrier both rely on structural properties of the minimum cover produced by Gabow–Stallmann’s algorithm for graphic matroid parity [GS86, GS85]. We therefore describe the minimum cover obtained from Gabow–Stallmann’s algorithm for the associated linear matroid parity instance, and then explain the structural properties of this cover.
In what follows, we view the graphic matroid parity instance as a linear matroid parity instance via the vertex-edge incidence matrix over . Thus, each edge is also regarded as its corresponding column vector in . We use the same symbol for both the edge and this vector.
This is analogous to the standard situation in bipartite matching, where a failed augmenting-path search yields a minimum vertex cover, which certifies the optimality of the current matching.
The algorithm finds a maximum matroid matching , and a parity partition of . For each , we set . For each , the algorithm finds a set , with and for . For each such that , we define , i.e., the linear combination of the vectors in with all coefficients equal to 1. Finally, we set . The above construction has the following structural property. (See Appendix B for details.)
Lemma 6. [From [GS86,GS85]] Let be a minimum cover produced by Gabow–Stallmann's algorithm for graphic matroid parity [GS86, GS85]. For every such that , the following hold:
(i) if , then ,
(ii) if , then ,
(iii) if , then, for every , .
Here, and for every , so case (i) applies exactly to .
In particular, every relevant space span is generated by , the matched edges , and at most one additional edge.
Using Lemma 6 together with the linear matroid parity min-max theorem (Theorem 4), Gabow–Stallmann proved that, if no augmenting path is found, then the current matroid matching is maximum. Equivalently, the tuple serves as a minimum cover certifying the optimality of .
Adapting Assadi's [Ass25] framework to graphic matroid parity We now adapt the framework of Assadi [Ass25] to graphic matroid parity. Although this adaptation is nontrivial and requires a careful argument, it is not where the main technical novelty of this paper lies. The resulting framework is summarized in Algorithm 1, which computes a -approximate matroid matching. Although this framework extends more generally to linear matroids represented over a constant-size finite field, including binary matroids and hence cographic matroids, we focus on graphic matroids in this paper.
We use the following relaxed notion of a cover. Unlike a cover in Definition 5, the sets below are not required to form a parity partition.
Definition 7. Let be a tuple such that and for every . We say that this tuple covers a line if at least one of the following conditions holds:
The tuple is a pruned cover of if it covers every line .
Here, we can prove that the minimum value of over all pruned covers is equal to .
Algorithm 1 follows the same high-level framework of Assadi's algorithm [Ass25]. It maintains an importance value for each line , with all values initially equal. In each iteration, the algorithm samples lines according to the current importance values and computes a maximum matroid matching together with a minimum cover of the sampled instance. It then removes all sets with , obtaining a pruned cover. Finally, it doubles
Algorithm 1: A (1 - )-approximation algorithm for graphic matroid parity
1 Let ,
2 for t = 1 to T := do
3 Sample each line independently at random with probability
.
4 Apply the algorithm of Gabow–Stallmann [GS86, GS85] to compute a maximum matroid matching and a minimum cover of the sampled instance.
5 Remove every set satisfying from the cover, and reindex the remaining sets as .
6 for do
7 if or (there exists such that ) then
8
9
10
11
12 return a largest matroid matching among
the importance value of every line not covered by this pruned cover. After iterations, the algorithm outputs the largest matroid matching found during the process.
The proof that Algorithm 1 outputs a -approximate solution is almost identical to Assadi's analysis [Ass25]. There is only one additional point that requires some care. We need an upper bound on the number of possible covers produced by the sampled instances. In the bipartite matching case, this is immediate, since the number of vertex covers is at most . For graphic matroid parity, we introduce pruned covers for this purpose. Using the structural properties of the minimum cover obtained from Gabow–Stallmann's algorithm [GS86, GS85], together with the pruning operation described above, we show that the number of pruned covers that can be obtained from the minimum covers of sampled instances is at most . See Lemma 21 for the details. All other parts of the proof follow Assadi's argument without essential changes.
Breaking the -time complexity barrier In Line 7 of Algorithm 1, for each line and each index , we need to check whether , or equivalently, whether . Since the number of sets can be and , a direct implementation would require checking conditions. We give a new way to perform these checks implicitly, without explicitly testing all conditions. This is the main technical contribution of our algorithm, and it is where the main novelty lies.
We first explain how to obtain a -approximation algorithm running in
time, which in turn implies an exact algorithm running in time. Later in this paragraph, we further improve this running time.
We first bound the running time except for the inner for loop (Lines 6–10), which is the
More precisely, we bound the number of possible signatures (span(A); span(A ∪ E_{0}), ..., span(A ∪ E_{k})), rather than the number of pruned covers themselves. The idea of bounding the number of spans is also used in Quanrud's adaptation of Assadi's framework to matroid intersection [Qua24a].
main bottleneck and will be discussed below. In each iteration , the number of sampled lines is with high probability. Therefore, by applying the exact algorithm of Gabow–Stallmann [GS85] to the sampled instance, Line 4 can be implemented in time per iteration, including the computation of a minimum cover. Since the number of iterations is , the total time spent on Line 4 is . Line 3 can be implemented in time per iteration. Line 5 can be implemented in time per iteration, because the minimum cover produced by Gabow–Stallmann’s algorithm contains enough information to determine, for each part , whether . Since , we have . Therefore, it remains to prove that the inner for loop (Lines 6–10) can be implemented in time per iteration.
To evaluate the condition in Line 7, for each line and each index , we need to check whether . Doing this explicitly would require rank-equality tests. To avoid this, we assign to each edge a random -bit value, called its pattern, which serves as a fingerprint of the edge with respect to the current pruned cover.
Roughly speaking, we extend the current matching to a spanning tree and assign random -bit weights to the edges of . For an edge , its pattern is the bitwise XOR of the weights on the unique path in . We emphasize that the use of bitwise XOR is essential for handling indices of case (iii) in Lemma 6. Recall that every vector in has the form with , where is the minimum cover computed in Line 4 and . We write for the family of the sets over all . Since the sets are pairwise disjoint, the sets in are pairwise disjoint subsets of . We note that Line 5 does not change , so may contain the set of a part removed in Line 5. We now define patterns formally.
Definition 8. Let be a matroid matching, so that is a forest. We extend arbitrarily to a spanning tree ^6 Let . We choose a weight function uniformly at random among all assignments satisfying the following constraints: for every , .
^7 Here, denotes bitwise XOR. We call the resulting weighted tree the pattern tree.
For an edge , let denote its fundamental cycle with respect to , i.e., the union of and the unique path in . We define the pattern of an edge by
Remark 9. Viewing each edge as a vector in , for every edge , we have .
Since is a spanning tree, we view this identity as the representation of in the basis . Thus, the definition of is obtained by applying the weight function to this tree-basis representation and taking the bitwise XOR.
We also note that the sets are pairwise disjoint.
Once the weights on are fixed, we can easily build a simple data structure, called the pattern-tree data structure, in preprocessing time that returns the pattern of any edge in time.
^6We may add auxiliary edges not present in , since they are used only for defining .
^7This distribution can be sampled by choosing all but one value in each uniformly at random, and then setting the remaining value so that the XOR over is zero. Here, we regard as a -bit integer when implementing XOR operations.
As a warm-up, we present how to compute the value for any line in time using the pattern-tree data structure. The key observation is that the pattern is a randomized encoding of the fundamental cycle representation of edge vector . That is, we express edge vector as the sum of tree edges on its fundamental cycle over , i.e., , and replace this sum by the XOR of their random weights.
Recall that every vector in has the form with , and that the sets in are pairwise disjoint. The constraint for every ensures that each has pattern value zero. By linearity, every vector in also has value zero. Thus, if , then . Conversely, if , then the representation of in the -basis, as in Remark 9, is not a sum of whole sets in , and the randomness of the weights implies with high probability. Thus, lets us test whether . The same idea applies to a line . From the two pattern values and , we can test whether , and belong to by checking , , and , respectively. These tests determine the value .
Lemma 10. Given the pattern-tree data structure, the following queries can be answered with high probability in time:
• for any edge , determine whether is 0 or 1,
• for any line , determine whether is 0, 1 or 2.
For each , we write . We show that, among all edges satisfying , there are only possible values of . This bound is the key to our fast algorithm. For an edge , write its edge vector using the spanning tree as over . Recall that the pattern is obtained by replacing this sum of
edge vectors with the XOR of the corresponding random weights. By Lemma 6, the space is generated by together with , except in case (iii), where one additional edge is needed. The contribution of every vector in to the pattern is zero by the constraints in the definition of the pattern tree. Thus, in cases (i) and (ii), the value is determined only by how the path intersects . After contracting every connected component of , the set becomes a path in a tree with edges. Since such a tree has only paths, there are only possible intersections. In case (iii), the use of XOR is crucial. The additional generator contributes only a fixed XOR offset to the pattern determined by . Since this intersection has only possibilities, the number of possible patterns remains .
Lemma 11. Fix , and let . Suppose that . There is an algorithm that computes a set of patterns of size such that the following hold:
• for every edge , if , then , and
• with high probability, for every edge , if , then .
We call the pattern set for . The algorithm runs in time.
We now explain how the pattern sets are used to implement Line 7 efficiently. For a line , we call the pair its line pattern. For a fixed , the condition holds if and only if both and hold. Thus, this condition can be tested by checking whether and .
Let be a threshold. We first handle all with together. We construct the pattern sets for all indices with . Using and , the total time for constructing these pattern sets is
For each such , define the line-pattern set . Since , we have . We insert all elements of into a global dictionary. Since , the number of inserted pairs is
After this preprocessing, for any line , we can check whether for some index with using a single dictionary lookup per line. Hence, all lines can be processed in time. Thus, all indices with are handled in time.
It remains to handle all with . There are at most such indices, again because . For each fixed such , we can build a data structure in time that tests, for any line , whether in time. See Lemma 41. Therefore, by scanning all lines for each such index , the total time for handling all indices with is per iteration.
Choosing gives time per iteration.
Further improvement for the span-membership tests We now explain how to implement the inner for loop (Lines 6–10) in time per iteration of the outer for loop. Recall that, for each line , we need to check whether there exists an index with .
The overall plan is the same as in the previous paragraph, where all indices with were handled together in time per iteration. We now improve the bound to . Since for every , we can take and handle all indices together in time, so there is no need to treat indices with separately.
We now sketch the key additional idea for handling all indices with together in time per iteration. See Section 9.4 for the full case analysis.
A direct use of the pattern sets would enumerate all line patterns in , which costs for a single index. Instead, we exploit Lemma 6 more carefully and combine it with data structures such as heavy-light decomposition.
The key additional observation is that, for every edge , there is at most one index such that . Thus, by storing the patterns corresponding to in a dictionary, the pattern of an edge identifies the only possible index.
It remains to handle case (iii) of Lemma 6. In this case, we show that each line needs to be checked against only candidate indices. Consequently, all indices with can be handled in time.
Further improvement by modifying Assadi's framework In Algorithm 1, a maximum matroid matching of the sampled instance is computed from scratch in every iteration. Since the sampled instance has lines, the computation takes time per iteration by Gabow–Stallmann's algorithm, and time over all iterations. To reduce the total time, we slightly modify the framework itself.
In iteration , we add the lines of the matroid matching of the previous iteration to the sampled instance, and, starting from , we repeatedly augment the current matroid matching by the augmenting-path algorithm of Gabow–Stallmann until it becomes maximum
(see Algorithm 3). Each augmentation takes time, and the number of augmentations in iteration is , so the total number of augmentations over all iterations is at most . In addition, in each iteration, the augmenting-path algorithm is applied once more to conclude that the current matroid matching is maximum, which also takes time. Hence, computing maximum matroid matchings in the sampled instances requires time in total over all iterations, which is for .
The approximation guarantee is unaffected by the modification. Intuitively, if we add some extra lines to a properly sampled set of lines and solve the problem on the enlarged instance, the outcome is never worse than that of solving the problem on the sampled lines alone.
Combining the modified framework with the span-membership tests in time per iteration, we obtain a -approximation algorithm running in time, and hence an exact algorithm running in time.
4 Fast exact algorithm for graphic matroid parity (Proof of Theorem 1)
In this section, we derive the exact algorithm of Theorem 1 from the fast -approximation algorithm of Theorem 2. In our exact algorithm, we first compute a -approximate solution. Since any matroid matching has size at most , at most augmentations are needed to obtain an exact solution. We then repeatedly find augmenting paths using the algorithm of Gabow–Stallmann [GS85] until no augmenting path remains, thereby obtaining an exact solution. The proof of Theorem 2 is deferred to Section 8. We restate Theorems 1 and 2 here.
Theorem 1. There is a randomized algorithm that finds a maximum graphic matroid matching with high probability in time.
Theorem 2. For any , there is a randomized algorithm that finds a -approximate maximum graphic matroid matching with high probability in time.
Gabow–Stallmann [GS85] gave an algorithm to find one augmenting path in time.
Lemma 12. [From [GS85]] Given a graphic matroid matching , there is a deterministic algorithm that either finds a graphic matroid matching such that , or concludes that is maximum. The algorithm runs in time.
Remark 13. Lemma 12 is not explicitly stated as a standalone lemma in the paper of Gabow–Stallmann [GS85]. Their paper gives a fast implementation of the augmenting-path algorithm from [GS86] using range-search data structures. The augmenting-path algorithm finds augmenting paths one at a time. Each search is restarted from scratch with respect to the current matroid matching.
By applying the algorithm in Lemma 12 repeatedly, Gabow–Stallmann obtained an exact algorithm running in time. In our -approximation algorithm, we need to solve graphic matroid parity on sampled instances with lines. For this purpose, we use the following theorem as a black box.
Theorem 14 (From [GS85]). There is a deterministic algorithm that finds a maximum graphic matroid matching in time.
We now prove Theorem 1 by combining Theorem 2 with Lemma 12.
Proof of Theorem 1. We may assume , since otherwise the algorithm of Theorem 14 already runs in time.
We first run the -approximation algorithm of Theorem 2 with parameter . We then repeatedly augment the obtained matroid matching by the algorithm of Lemma 12 until it concludes that the matroid matching is maximum. Since any matroid matching has size at most , the number of remaining augmentations is at most . By Lemma 12, each augmentation can be performed in time. Hence, the total running time is .
First, suppose that . Then, , and the running time is
where the equality uses .
Next, suppose that . Then, , and the running time is
where the equality uses . Combining the two cases, the running time is
5 Minimum Covers: Definitions and Structural Properties
In this section, we introduce minimum covers and the structural properties that will be used later. As preparation for defining minimum covers, we first describe the relationship between linear matroid parity and graphic matroid parity. We then define the notion of a minimum cover for linear matroid parity and present structural properties of the minimum cover produced by Gabow–Stallmann’s algorithm for graphic matroid parity [GS86, GS85]. These properties are used both in our adaptation of Assadi’s framework (Section 6) and in our algorithm for breaking the -time complexity barrier (Section 8).
Graphic matroid parity can be viewed as a special case of linear matroid parity via the representation over (see Section 2). Whenever we use terminology from linear matroid parity for a graphic matroid parity instance, we mean the following associated linear matroid parity instance.
Definition 15. Let be a graphic matroid parity instance, where is a multigraph and is a set of lines. Let be the vertex-edge incidence matrix of over . For an edge , the column of indexed by is the vector with 1 in the coordinates and , and 0 elsewhere. The associated linear matroid parity instance is the linear matroid parity instance represented by , together with the same partition of into lines.
Remark 16. In the associated linear matroid parity instance of Definition 15, each edge is regarded as its corresponding column vector in . Throughout this paper, we use the same symbol for both the edge and this vector.
Lovász [Lov80b] proved the following min-max theorem for linear matroid parity. Recall that a parity partition of is a partition of into unions of lines. Equivalently, for every and every , we have if and only if .
Theorem 4. [See [Sch03, Corollary 43.2a] and [GS86]] Let denote the maximum number of lines in a matroid matching. For the linear matroid parity, satisfies
where the minimum is taken over all subsets and all parity partitions of .
The following notion of a cover naturally arises from the min-max theorem (Theorem 4).
Definition 5. A cover of a linear matroid parity instance is a tuple , where and is a parity partition of . The value of a cover is defined as . A cover is called a minimum cover if its value is minimum among all covers.
Gabow–Stallmann [GS86] gave an augmenting-path algorithm for linear matroid parity. They used the min-max theorem (Theorem 4) in their linear matroid parity algorithm to certify the optimality of the matroid matching returned by the algorithm.
For graphic matroid parity, Gabow–Stallmann [GS86] applied this augmenting-path framework to the associated linear matroid parity instance of Definition 15, obtaining an -time algorithm. Using range-searching data structures, Gabow–Stallmann [GS85] later gave a faster implementation of the required operations, reducing the time per augmentation to and the total running time to .
Gabow–Stallmann’s algorithm for graphic matroid parity [GS86,GS85] also can find a minimum cover of the associated linear matroid parity instance, as stated below.
Lemma 17. [From [GS86, GS85]] Given a multigraph , a set of lines, and a maximum matroid matching , there is a deterministic algorithm that, in time, computes a minimum cover of the associated linear matroid parity instance.
More precisely, the algorithm computes a parity partition and sets for , with and for . Let . For each such that , define , where the sum is taken over the linear representation of the graphic matroid over . Then, the set together with the partition forms a minimum cover.
Moreover, the values for all are determined by the construction. The construction also guarantees that the set is linearly independent, and hence .
For the minimum cover found in Lemma 17, the values admit the following structural property.
Lemma 6. [From [GS86, GS85]] Let be a minimum cover produced by Gabow–Stallmann’s algorithm for graphic matroid parity [GS86, GS85]. For every such that , the following hold:
(i) if , then ,
(ii) if , then ,
(iii) if , then, for every , .
Here, and for every , so case (i) applies exactly to .
Remark 18. We store each vector in A only by its support, i.e., the set of coordinates whose entries are equal to 1.
Although Lemmas 17 and 6 are implicit in Gabow–Stallmann’s papers [GS86, GS85], they are not stated there in this form. In particular, Gabow–Stallmann do not explicitly present an algorithm for outputting a minimum cover. However, when an augmenting-path search terminates without finding an augmenting path, the labels, blossoms, buds, and tips maintained by the algorithm contain enough information to construct such a cover. For completeness, we provide the details in Appendix B.
6 Adapting Assadi’s framework to graphic matroid parity
In this section, we adapt Assadi’s [Ass25] framework to graphic matroid parity, obtain Algorithm 1, and prove that it outputs a -approximate matroid matching (Lemma 19). For convenience, Algorithm 1 is restated as Algorithm 2.
In Section 7, we modify Assadi’s framework itself to obtain Algorithm 3, an algorithm for graphic matroid parity that admits a faster implementation. Since the modification to the algorithm is simple, we recommend reading this section first.
Lemma 19. Algorithm 1 outputs -approximate graphic matroid matching with exponentially high probability.
Before describing our graphic matroid parity algorithm (Algorithm 1) and proving Lemma 19, we first introduce the following notion of a pruned cover, which is used in our algorithm. We then prove a property of pruned covers (Lemma 20) that will be needed in the proof of Lemma 19.
Definition 7. Let be a tuple such that and for every . We say that this tuple covers a line if at least one of the following conditions holds:
-
, or
-
there exists such that .
The tuple is a pruned cover of if it covers every line .
The following lemma shows that restricting attention to pruned covers does not change the min-max characterization.
Lemma 20. Let denote the maximum number of lines in a matroid matching. The minimum value of
over all pruned covers is equal to .
Proof. Every cover in Definition 5 is a pruned cover, since each line is contained in one part of the parity partition, and hence . Thus, covers in Definition 5 form a subclass of pruned covers. Therefore, by Theorem 4, the minimum value over all pruned covers is at most .
Conversely, let be a pruned cover. We construct a cover whose value is no larger. For each line , if , we make a singleton part of the parity partition. Otherwise, choose an index such that and assign to . Let be the union of the lines assigned to . Then, for every ,
We write “with exponentially high probability” if the failure probability is at most .
Algorithm 2: Restatement of Algorithm 1: A -approximation algorithm for graphic matroid parity
1 Let ,
2 for to do
3 Sample each line independently at random with probability .
4 Apply the algorithm of Gabow–Stallmann [GS86, GS85] to compute a maximum matroid matching and a minimum cover of the sampled instance.
5 Remove every set satisfying from the cover, and reindex the remaining sets as .
6 for do
7 if or (there exists such that ) then
8
9 else
10
11
12 return a largest matroid matching among
, and hence . Moreover, every singleton part with contributes to the value. Thus, we have
where the second inequality follows from Theorem 4. Therefore, every pruned cover has value at least . This completes the proof.
We now describe our graphic matroid parity algorithm (Algorithm 1). It follows the same high-level framework of Assadi [Ass25]. It maintains an importance value for each line , initially set to 1. In each iteration , the algorithm samples lines with probabilities proportional to their current importance values, and computes a maximum matroid matching together with a minimum cover of the sampled instance using the algorithm of Gabow–Stallmann [GS86, GS85]. It then removes all parts whose rank increment over is at most one, obtaining a pruned cover.
The algorithm next scans the lines one by one and updates their importance values based on whether they are covered by this pruned cover. If a line is covered by the pruned cover, its importance value is kept unchanged. Otherwise, its importance value is doubled. After iterations, the algorithm outputs the largest matroid matching among .
We now prepare several lemmas needed for the proof of Lemma 19, which gives the -approximation guarantee of Algorithm 1. The proof follows the same overall strategy as Assadi's analysis [Ass25]. The only substantial new ingredient is Lemma 21, which provides the counting bound for pruned covers. Once this counting lemma is in place, the proofs of Lemmas 22 and 23 are almost identical to the corresponding proofs in Assadi [Ass25].
A pruned cover is called a candidate pruned cover if it can be obtained in Line 5 of Algorithm 1 for some choice of the sampled lines. For a pruned cover , define its signature as
The next lemma gives a family of signatures that contains the signature of every candidate pruned cover. The key point is that , which allows a union bound over a subset of in the proof of Lemma 22. The family depends only on and , and it contains the signature of the pruned cover obtained from the minimum cover of any subset of lines, not only of the set of sampled lines. The generality with respect to will be used in Section 7. In the proof, we use the structural property of covers produced by Gabow–Stallmann from Section 5.
Lemma 21. Assume that . There is a family of signatures, depending only on and , with and the following property. Let , let be a maximum matroid matching of the instance , and let be the minimum cover of computed from by Lemma 17. Then, the signature of the pruned cover obtained from by removing every part with belongs to .
Proof. We construct the family as follows. Each member of is specified by a sequence of four choices described below. We describe the choices one by one, bounding the number of possibilities at each step, which yields the bound on . We then show that, for every , the signature of the pruned cover obtained from the minimum cover of computed by Lemma 17 arises from one of these sequences of choices, and hence belongs to .
First, choose a matroid matching consisting of at most lines. The number of possible choices of M is at most
where we use and .
Second, choose a partition of into at most labeled parts . Since , the number of possible such partitions is at most , by assigning each element of to one of at most labeled parts.
Third, for each part , choose either nothing or a subset , and let be the set of the vectors over the parts for which a subset is chosen. For a fixed part , there are at most choices, and hence the number of choices over all parts is at most .
Fourth, for each , we choose the subspace associated with the part . Lemma 6 shows that, for a part with , is generated either by , by , or by for some . Accordingly, for each part , we choose one of the following possibilities. The first possibility is that , in which case the part does not appear in the signature. The next two possibilities are that the part is assigned the subspace or the subspace . The remaining possibilities are that the part is assigned the subspace for an element , where we use . The signature determined by the four choices is , where are the indices of the parts for which a subspace is assigned and is the subspace assigned to the part . Therefore,
where we use and . By construction, depends only on and .
We now show that, for every , the signature of the pruned cover obtained from the minimum cover of computed by Lemma 17 belongs to . Let be the edge set of the instance , let be a maximum matroid matching of , and let be the minimum cover of computed from by Lemma 17. Let , , and be as in Lemma 17. Since is a matroid matching consisting of at most lines, it is one of the choices in the first step.
Recall that the signature of the pruned cover consists of and the subspaces over the parts with . For every such part, Lemma 6 gives , and hence . Since is a partition of and , the nonempty sets among form a partition of into at most parts. Labeling these parts in increasing order of gives one of the choices in the second step, and every part with corresponds to one of the labeled parts.
By Lemma 17, , with , which is one of the choices in the third step.
Finally, consider an index corresponding to one of the labeled parts. If , then does not appear in the pruned cover, which corresponds to the first possibility in the fourth step. Otherwise, Lemma 6 shows that is generated either by , by , or by for some , which corresponds to one of the remaining possibilities in the fourth step. Therefore, the signature of the pruned cover arises from the four choices, and hence belongs to .
We first prove the analogue of [Ass25, Lemma 3.3], which gives an upper bound on the total importance.
Lemma 22 (Counterpart of [Ass25, Lemma 3.3]). With exponentially high probability, .
Proof. Fix an iteration . Let be the pruned cover obtained in this iteration, and let be the set of lines not covered by this pruned cover. That is, if and only if and for every .
We first claim that, with exponentially high probability,
To prove the claim, condition on all randomness before iteration . Then, the values and are fixed, and the only remaining randomness is the sampling in iteration .
Let be the family of signatures given by Lemma 21. Recall that depends only on and , and hence it does not depend on the randomness of the algorithm. For a signature , let be the set of lines not covered by any candidate pruned cover with signature , that is, the set of lines such that and for every . We note that whether a line is covered depends only on the signature. Let be the signature of the pruned cover obtained in iteration . By Lemma 21 applied to the set of sampled lines and , we have , and .
Call a signature bad if . Fix a bad signature . If some line has sampling probability , then no pruned cover with signature can be returned for the sampled instance. Thus, we may assume that for every . In this case, for every , we have . Hence, the probability that no line in is sampled is
If some line of is sampled, then no tuple with signature can be a pruned cover for the sampled instance, since that sampled line is left uncovered. Therefore, for every bad signature ,
The claim fails exactly when the returned signature is bad. By a union bound over all bad signatures in , together with from Lemma 21,
which proves the claim for iteration t.
Taking another union bound over all iterations, we may assume that the claim holds for every iteration .
On the event that the claim holds for every iteration , by the update rule of the algorithm and the claim,
Since , iterating the above inequality over iterations gives .
We next prove the analogue of [Ass25, Lemma 3.4], which gives a lower bound on the importance of some line when none of the sampled instances yields a -approximate matroid matching.
Lemma 23 (Counterpart of [Ass25, Lemma 3.4]). Suppose in every iteration , we have . Then, there exists at least one line such that .
Proof. Let be a maximum matroid matching, and let . Then, and .
Fix an iteration , and let be the pruned cover obtained in this iteration. Let be the set of lines covered by this pruned cover, and define . Since is a matroid matching, is also a matroid matching in the restricted instance .
The tuple is a pruned cover for . Hence, by Lemma 20, we have
Let be the minimum cover of the sampled instance before pruning, and let be the pruned cover obtained from it. Here, we have
The first equality follows because every set deleted in Line 5 satisfies , and hence . The second equality follows from the min-max theorem (Theorem 4) for the sampled instance. Therefore,
Thus, in each iteration, at least lines of are not covered by the pruned cover.
By an average argument, this implies that there exists at least one line that is not covered in at least iterations. Hence, by the update rule of the algorithm, the importance of this line increase to at least , which completes the proof.
We now prove Lemma 19 by combining Lemma 22 and Lemma 23. The argument is identical to [Ass25, Proof of Theorem 3.2].
Proof of Lemma 19. Assume that the event in Lemma 22 holds, i.e., . Suppose, toward a contradiction, that Algorithm 1 does not find a -approximate solution. Since the algorithm returns the largest matching among , this means that, for every iteration , we have .
By Lemma 23, there exists a line such that . On the other hand, we have . Therefore,
Using for x>0, we have
Since , the right-hand side is equal to . This contradicts the previous inequality. Hence, on the event of Lemma 22, the algorithm outputs a -approximate graphic matroid matching. Since this event holds with exponentially high probability, the lemma follows.
We also record the following easy sampling bound, which will be used in the complexity analysis.
Lemma 24. With high probability, in every iteration, the total number of sampled lines in Line 3 is .
Proof. Fix an iteration . Here, the expected number of lines sampled in this iteration is at most . By a Chernoff bound, the number of sampled lines in this iteration is with high probability. Taking a union bound over all iterations, the same bound holds for every iteration with high probability. Thus, in every iteration, the number of sampled lines is with high probability.
We now have all the ingredients needed to prove the streaming algorithm result, so we prove Theorem 3, which we restate here. For simplicity, we state the space bound as , although a more careful implementation gives space.
Theorem 3. For any , there is a streaming algorithm that finds a -approximate maximum graphic matroid matching with high probability using space and passes.
Proof of Theorem 3. We implement Algorithm 1 in the streaming model. At the beginning of iteration , we store the pruned covers obtained in the previous iterations. Then, when a line arrives in the stream, we can determine in which previous iterations the line was not covered, and hence compute its current importance value .
Each iteration can be implemented in passes. In one pass, we compute . In another pass, we sample each line with probability and store the sampled instance. By Lemma 24, with high probability, the number of sampled lines is . On the stored sampled instance, we compute a maximum matroid matching and a minimum cover using the algorithm of Gabow–Stallmann [GS86, GS85], prune the cover, and store it for later iterations.
Therefore, the space used in each iteration is , and storing the covers from all iterations uses space. The number of passes is . Finally, by Lemma 19, the algorithm outputs a -approximate graphic matroid matching with high probability.
7 Modifying Assadi's framework for a faster implementation
In this section, we present Algorithm 3, an algorithm for graphic matroid parity that admits a faster implementation than Algorithm 1. To this end, we slightly modify Assadi's [Ass25] framework itself.
In Line 4 of Algorithm 1, a maximum matroid matching of the sampled instance is computed from scratch in every iteration. Since the number of sampled lines is (Lemma 24), the computation takes time per iteration by Theorem 14. Over all iterations, the total time is .
Using a simple idea, we reduce the total time to . Roughly speaking, instead of computing a maximum matroid matching from scratch in every iteration, we reuse the matroid matching computed in the previous iteration. More precisely, let be the set of sampled lines together with the lines of the matroid matching of the previous iteration. Starting from , which is a matroid matching of the instance , we repeatedly augment the current matroid matching by the algorithm of Lemma 12 until it becomes a maximum matroid matching of the instance . Then, in iteration , the number of successful augmentations is , and hence the total number of successful augmentations over all iterations is . The modified algorithm is given as Algorithm 3.
We first establish two simple properties of Algorithm 3.
Observation 25. Algorithm 3 satisfies the following.
(i) For every , is a matroid matching of the instance . Consequently, , and the output is a largest matroid matching among .
(ii) With high probability, for every .
Proof. We first prove (i). Fix . By Line 4, every line of belongs to . Moreover, is a forest, since it is empty when and is a matroid matching of when . Hence, is a matroid matching of the instance . Since is a maximum matroid matching of by Line 5, we have .
We next prove (ii). Line 3 is identical to Line 3 of Algorithm 1, so Lemma 24 gives for every with high probability. Since consists of at most lines and , we obtain .
Algorithm 3: A modified version of Algorithm 1 that reuses the matroid matching of the previous iteration
1 Let , ,
2 for to do
3 \quad Sample each line independently at random with probability , and let be the set of sampled lines.
4 \quad Let .
5 \quad Starting from , repeatedly apply the algorithm of Lemma 12 to the instance until it concludes that the current matroid matching is maximum. Let be the resulting maximum matroid matching of , and compute a minimum cover of by Lemma 17.
6 \quad Remove every set satisfying from the cover, and reindex the remaining sets as .
7 \quad for do
8 \quad \left{ \begin{array}{l} \text{if } (r(A \cup \ell) - r(A) \leq 1) \text{ or (there exists } i \in {0, \ldots, k} \text{ such that } r(E_i \cup A \cup \ell) = r(E_i \cup A)) \text{ then} \ \quad \big| q_\ell^{(t+1)} \leftarrow q_\ell^{(t)} \end{array} \right.
9 \quad \text{else}
10 \quad \left| \begin{array}{l} q_\ell^{(t+1)} \leftarrow q_\ell^{(t)} \cdot 2 \end{array} \right.
11 \quad Q^{(t+1)} \leftarrow \sum_{\ell \in L} q_\ell^{(t+1)}
12 \quad return
Despite the modification, Algorithm 3 still outputs a -approximate graphic matroid matching. For completeness, we give a full proof, but its essence is the same as the analysis of Algorithm 1 in Section 6. Intuitively, if we add some extra lines to a properly sampled set of lines and solve the problem on the enlarged instance, the outcome is never worse than solving the problem on the sampled lines alone.
Lemma 26. Algorithm 3 outputs a -approximate graphic matroid matching with exponentially high probability.
The proof is almost the same as the analysis of Section 6. We first prove the counterparts of Lemmas 22 and 23 for Algorithm 3, and then prove Lemma 26 by combining them.
The following lemma is the counterpart of Lemma 22.
Lemma 27 (Counterpart of Lemma 22). In Algorithm 3, with exponentially high probability, .
The proof is the same as that of Lemma 22. The only point to check is that every sampled line is covered by the pruned cover of iteration , which was used in the proof of Lemma 22. This still holds for Algorithm 3, since the pruned cover of iteration covers every line of and .
Proof of Lemma 27. Fix an iteration . Let be the pruned cover obtained in this iteration, and let be the set of lines not covered by this pruned cover. That is, if and only if and for every .
We first claim that, with exponentially high probability,
To prove the claim, condition on all randomness before iteration . Then, the values and are fixed. Moreover, the matroid matching is also fixed, and hence so is the set added in Line 4. The only remaining randomness is the sampling of in iteration .
Let be the family of signatures given by Lemma 21. Recall that depends only on and , and hence it does not depend on the randomness of the algorithm. For a signature , let be the set of lines not covered by any pruned cover with signature , that is, the set of lines such that and for every . We note that whether a line is covered depends only on the signature. Let be the signature of the pruned cover obtained in iteration . By Lemma 21 applied to the instance and , we have , and .
Call a signature bad if . Fix a bad signature . If some line has sampling probability , then no pruned cover with signature can be returned for the instance . Thus, we may assume that for every . In this case, for every , we have . Hence, the probability that no line in is sampled is
If some line of is sampled, then it belongs to since , and hence no tuple with signature can be a pruned cover for the instance , since that sampled line is left uncovered. Therefore, for every bad signature ,
The claim fails exactly when the returned signature is bad. By a union bound over all bad signatures in , together with from Lemma 21,
which proves the claim for iteration t.
Taking another union bound over all iterations, we may assume that the claim holds for every iteration .
On the event that the claim holds for every iteration , by the update rule of the algorithm and the claim,
Since , iterating the above inequality over iterations gives .
The following lemma is the counterpart of Lemma 23.
Lemma 28 (Counterpart of Lemma 23). Suppose that, in Algorithm 3, for every . Then, there exists a line such that .
The proof differs from that of Lemma 23 only in that the min-max theorem is applied to the instance instead of the set of sampled lines.
Proof of Lemma 28. Let be a maximum matroid matching, and let . Then, and .
Fix an iteration , and let be the pruned cover obtained in this iteration. Let be the set of lines covered by this pruned cover, and define . Since is a matroid matching, is also a matroid matching in the restricted instance .
The tuple is a pruned cover for . Hence, by Lemma 20, we have
Let be the minimum cover of the instance computed in Line 5, and let be the pruned cover obtained from it in Line 6. Here, we have
The first equality follows because every set deleted in Line 6 satisfies , and hence . The second equality follows from the min-max theorem (Theorem 4) for the instance , since is a maximum matroid matching of . Therefore,
Thus, in each iteration, at least lines of are not covered by the pruned cover.
By an average argument, this implies that there exists at least one line that is not covered in at least iterations. Hence, by the update rule of the algorithm, the importance of this line increases to at least , which completes the proof.
We now prove Lemma 26 by combining Lemmas 27 and 28.
Proof of Lemma 26. By Lemma 27, with exponentially high probability, . Assume that this event holds. Using for and ,
Since for every line , no line satisfies . Hence, by Lemma 28, there exists an iteration with . By Observation 25(i), , and hence the output is a -approximate graphic matroid matching.
We next prove the lemma that is the key to the improvement in running time. In Algorithm 1, the corresponding part (Line 4) takes time in total.
Lemma 29. With high probability, the total running time of Lines 4–6 of Algorithm 3 over all T iterations is .
Proof. Fix an iteration , and let . In Line 5, every application of the algorithm of Lemma 12 except the last one returns a matroid matching with exactly one more line than the current one, and the last one concludes that the current matroid matching is maximum. Hence, the algorithm of Lemma 12 is applied exactly times in iteration . By Observation 25(ii), with high probability, for every iteration . Applied to the instance , each of the algorithms of Lemmas 12 and 17 takes time. By Lemma 17, the cover comes with the values for all and , so Line 6 takes time. Thus, Lines 4–6 take time in iteration .
Since and every matroid matching consists of at most lines, we have
Summing over all iterations, the total time is
8 Fast -approximation algorithm for graphic matroid parity
In this section, we prove Theorem 2, which gives our fast -approximation algorithm. We restate the theorem here.
Theorem 2. For any , there is a randomized algorithm that finds a -approximate maximum graphic matroid matching with high probability in time.
The algorithm is Algorithm 3, and its approximation guarantee was proved in Section 7 (Lemma 26). To prove our main approximation theorem (Theorem 2) it remains to perform efficiently the inner for loop (Lines 7–12), which updates the importance values of all lines. In Section 9, we prove the following lemma, which is the main technical contribution of the paper. Once this lemma is established, Theorem 2 follows by combining it with the results of the previous sections.
Lemma 30. Fix an iteration , and let be the pruned cover obtained in this iteration. With high probability, the inner for loop (Lines 7–12) can be implemented in time. More precisely, with high probability, for all lines , we can decide whether
in total time.
We have now assembled all the ingredients needed to obtain a fast -approximation algorithm. We first derive Theorem 2 from Lemma 30 and the results of the previous sections.
Proof of Theorem 2. Without loss of generality, we may assume that and . Indeed, if , then a -approximate matroid matching is a maximum matroid matching since , so we may replace by . Also, we may remove duplicate lines, that is, lines represented by the same pair of vectors, since at most one of them can be used in a matroid matching, which leaves at most lines.
We now run Algorithm 3. By Lemma 26, it outputs a -approximate graphic matroid matching with exponentially high probability. It remains to bound the running time.
Lines 3 and 12 take time per iteration. By Lemma 29, with high probability, Lines 4–6 take time in total over all iterations, where we use . By Lemma 30, with high probability, the inner for loop (Lines 7–12) takes time in each iteration. Since , the total running time is
with high probability.
9 Fast span-membership tests via patterns (Proof of Lemma 30)
In this section, we prove Lemma 30, which is the main technical contribution of the paper and is restated below.
Lemma 30. Fix an iteration , and let be the pruned cover obtained in this iteration. With high probability, the inner for loop (Lines 7–12) can be implemented in time. More precisely, with high probability, for all lines , we can decide whether
in total time.
We recommend first reading the technical overview in Section 3, where we sketch a simpler -time version of our approach.
At first glance, the inner for loop (Lines 7–12) of Algorithm 3 seems to require time. Since there are lines and parts, this gives rank-equality tests, which is when . To avoid this bottleneck, we assign to each edge a random -bit value, called its pattern, which serves as a fingerprint of the edge with respect to the current pruned cover. These patterns allow us to reinterpret the rank-equality tests as a pattern-matching problem and handle many of them simultaneously, rather than checking them one by one. To make this approach work, we crucially exploit the structural properties of the minimum cover produced by Gabow–Stallmann’s algorithm [GS86, GS85] presented in Section 5. The main technical novelty of this paper is the introduction of these patterns and their algorithmic use in updating the importance values efficiently.
We organize the proof as follows. In Section 9.1, we introduce the new notion of patterns. In Section 9.2, we describe the data structures used to manipulate these patterns efficiently. In Section 9.3, we show how to enumerate the relevant pattern set associated with each index i. In Section 9.4, we combine these ingredients to obtain the fast span-membership tests and prove Lemma 30.
Conventions. Throughout this section, we fix an iteration of Algorithm 3 and write . Let be the minimum cover computed in Line 5, and let , , and be as in Lemma 17. Line 6 removes some parts and reindexes the remaining parts as , but it does not change . Each remaining part keeps its sets and , and we use these sets with the new index . Since the three cases of Lemma 6 are distinguished by and , each remaining part falls into exactly one of cases (i), (ii), and (iii), and the lemma applies to the pruned cover with the new indices. As in Section 3, let be the family of the sets over all , taken over all parts before Line 6. The sets in are pairwise disjoint subsets of , and a remaining part satisfies if and only if is in case (ii).
9.1 Patterns
In this subsection, we introduce the new notion of patterns. The purpose of patterns is to assign a random -bit value to each edge so that rank-equality tests can be performed using only these values.
Definition 8. Let be a matroid matching, so that is a forest. We extend arbitrarily to a spanning tree .^9 Let . We choose a weight function uniformly at random among all assignments satisfying the following constraints: for every , .
Here, denotes bitwise XOR. We call the resulting weighted tree the pattern tree.
For an edge , let denote its fundamental cycle with respect to , i.e., the union of e and the unique u-v path in . We define the pattern of an edge e by
We give the following remark, which will be useful for understanding the proofs of the subsequent lemmas.
Remark 9. Viewing each edge as a vector in , for every edge , we have .
Since is a spanning tree, we view this identity as the representation of e in the basis . Thus, the definition of is obtained by applying the weight function w to this tree-basis representation and taking the bitwise XOR.
We also note that the sets are pairwise disjoint.
The following lemma gives a simple data structure, which we call the pattern-tree data structure, for querying pattern values. Once the weights on are fixed, we root arbitrarily and store, for each vertex, the XOR of the weights on the path from the root to that vertex. This preprocessing takes time, and then the pattern of any edge e can be computed in time.
Lemma 31 (Pattern-tree data structure). After the weights on are fixed, there is a data structure that can be constructed in time and returns for any edge in time.
Proof. Root the tree arbitrarily. For each vertex , store
where is the root and is the unique path from to in . These values can be computed by a single BFS traversal of in time.
For any edge , the edges common to the two root paths and cancel under XOR. Hence, is exactly the XOR of the weights on the unique u-v path in . If , this is by definition. If , we simply return . Therefore, can be returned in time.
We may add auxiliary edges not present in G, since they are used only for defining .
This distribution can be sampled by choosing all but one value in each uniformly at random, and then setting the remaining value so that the XOR over is zero. Here, we regard as a -bit integer when implementing XOR operations.
The first basic use of patterns is to test, for each edge , whether , or equivalently, whether . This can be done simply by checking whether . By slightly extending this idea, we can also compute for each line using only the two pattern values and . This is formalized in the following lemma.
Lemma 10. Given the pattern-tree data structure, the following queries can be answered with high probability in time:
• for any edge , determine whether is 0 or 1,
• for any line , determine whether is 0, 1 or 2.
Proof. Let be the linear map obtained by setting for every and extending linearly over . For every edge , we have . Indeed, this is immediate if . If , then over , where denotes its
fundamental cycle. Hence, .
For every , the constraint in Definition 8 gives . Since every vector in is of the form with , we have for every , and hence, by linearity, for every .
Claim 32. For every , if , then we have .
Proof of Claim 32. Since is linearly independent, every vector has a unique representation for some . For this representation, .
For each , the constraint in Definition 8 is . Thus, since the sets in are pairwise disjoint, if is a union of some sets in , then is the sum of the corresponding vectors in , and hence . Therefore, if , then either contains an element not belonging to any set in , or there exists such that is a nonempty proper subset of .
Fix a coordinate , and let be the -th bit of . Let be the -th bit of . Now, we have .
Thus, if contains an entire set , then the contribution of this whole set to is zero. If , then is not a union of sets in . Hence, either contains an element not belonging to any set in , or there exists such that is a nonempty proper subset of .
In the first case, the contribution of such an element to is an independent uniformly random bit. In the second case, conditioned on the constraint , the contribution is an independent uniformly random bit. Since the XOR of an independent uniformly random bit with any other independent value is uniformly random, is uniformly distributed over . Therefore,
We apply the claim to all vectors of the form for and for . There are at most such vectors. Since and , a union bound implies that, with high probability, for all such vectors ,
Condition on this event. For an edge , we have if and only if . By the event above and the identity , this is equivalent to .
Otherwise, . Thus, the first query is answered by checking whether is zero.
For a line , the value is determined by the following three membership tests: , , and . Indeed, the rank increment is 0 if and only if both and belong to . It is at most 1 if and only if some nonzero linear combination of and belongs to . Over , this means that at least one of , and belongs to . Therefore, the rank increment is 1 if it is not 0 and at least one of these three vectors belongs to , and it is 2 otherwise.
By the event above, these three membership tests are equivalent to checking whether , , and , respectively. Indeed, the third condition follows from . The pattern-tree data structure returns in time. Therefore, the first query uses one pattern query, and the second query uses the two pattern queries and . Thus, both queries are answered in time.
9.2 Preliminaries on data structures
In this subsection, we describe the standard data structures required for an efficient implementation: dictionaries implemented by balanced binary search trees, lowest common ancestor (LCA) data structures, heavy-light decomposition, and segment trees for semigroup range queries.
We use the following standard dictionary data structure implemented by balanced binary search trees.
Lemma 33 (Dictionaries via balanced binary search trees; see, e.g., [CLRS22, Chapter 13]). Given key-value pairs with distinct comparable keys, there is a data structure that can be constructed in time and, given a query key , returns the value associated with if it exists, and otherwise reports that is not present, in time.
We also use the standard lowest-common-ancestor (LCA) data structure [BFC00]. For two vertices and in a rooted tree, their LCA is the common ancestor of and that is farthest from the root.
Lemma 34 (LCA data structures from [BFC00]). Given a rooted tree with vertices, there is a data structure that can be constructed in time and answers LCA queries for any two vertices and in time.
Using the LCA data structures in Lemma 34, we obtain the following lemma.
Lemma 35. Given a rooted tree with vertices, there is a data structure that can be constructed in time and answers the following query in time. Given two paths and , specified by their endpoints, the query determines whether the edge-set symmetric difference is empty, is a single path, or can be decomposed into two edge-disjoint paths. In the latter two cases, it returns the endpoints of the resulting path or paths.
The proof is based on the observation that is determined by the four endpoints alone, and a query is answered by computing a constant number of tree distances, each with one LCA query.
Proof. The tree is rooted, and we build the LCA data structure of Lemma 34 in time. For a vertex , let depth denote the number of edges of the path from the root to , which can be computed for all vertices in time. For two vertices and , let denote the number of edges of . Let be the LCA of and . Since and can be found in time by Lemma 34, we can compute in time.
Let , and let be the set of vertices that appear an odd number of times in the sequence . Then, is the set of odd-degree vertices of , and . We now have if , and if .
Suppose that . Partition into two pairs and so that is minimized. Then, and are edge-disjoint. Indeed, if they shared an edge with on the side of and , then , contradicting the minimality. Hence, , since has as its set of odd-degree vertices. The minimizing partition is found by computing for the three partitions of , which takes time.
We use the following data structures that can be obtained by combining segment trees for semigroup range queries (see, e.g., [DB00, Section 10.3] and [KMMP25]) with the heavy-light decomposition from [ST83]. Given a sequence over a semigroup , a segment tree supports queries that return for any interval in time. Given a rooted tree with vertices, a heavy-light decomposition partitions the edge set of into a collection of edge-disjoint paths. Here, every root-to-leaf path in can be expressed as a concatenation of subpaths of paths in .
Lemma 36 (Heavy-light decomposition from [ST83] and segment tree for semigroup range queries). Let be a tree with vertices, let be a semigroup, and suppose that each edge of is assigned a weight . There is a data structure that can be constructed in time and answers the following query in time. Given two vertices and , return , where are the edges on the unique path in .
9.3 Fast enumeration of all patterns
In this subsection, we prove the following lemma, which is a key tool for handling indices with , where is a threshold parameter to be chosen later. For indices with small , we can construct a small pattern set . For every edge , checking whether allows us to determine, with high probability, whether .
Lemma 11. Fix , and let . Suppose that . There is an algorithm that computes a set of patterns of size such that the following hold:
• for every edge , if , then , and
• with high probability, for every edge , if , then .
We call the pattern set for . The algorithm runs in time.
Before giving the construction, we first prove that a pattern set with the desired properties exists.
Claim 37. Fix , and let . Suppose that . Then, there exists a set of patterns with such that the following hold:
• for every edge , if , then , and
• with high probability, for every edge , if , then .
Proof. Let be the linear map obtained by setting for every and extending linearly over . As in the proof of Lemma 10, we have for every edge , and for every .
For each edge , let denote the path in associated with , defined as follows. If , then we set . Otherwise, let be the fundamental cycle of with respect to , and set . Here, we have and .
For each , define .
We first record a simple observation. Contract every connected component of , and let be the contracted tree. The contracted graph is a tree whose edge set is . For any edge , the set is the set of edges of a path in this contracted tree. Since has edges, it has paths. Let be the collection of edge sets of these paths, including the empty path. For each , let . Here, we have for each . Then, , and for every edge , we have , where .
We now define a set . By Lemma 6, under the assumption , one of the following cases holds.
In cases (i) and (ii), the space is generated by or by . In these cases, define .
In case (iii), fix an edge such that is generated by . Let and . In this case, define
In all cases, and . We define . Then, .
We prove the first property. Let satisfy , or equivalently, . Put .
First consider cases (i) and (ii). Then, we can write for some and some , where in case (ii) we may take . Since , we have . Write for some . Here, the set is either or , where the latter can occur only when is used in the representation of . In the latter case, the constraint in the definition of the pattern tree gives . Hence, in either case, . Therefore, .
It remains to consider case (iii). In this case, we can write for some , some , and some . If , the same argument as above gives .
Now suppose that . Write for some . Every vector in is represented over the tree basis using no elements of . Here, the equality implies , where and . Therefore, . Since , we obtain
By the definition of in case (iii), the vector belongs to . Hence .
We now prove the second property. We use Claim 32: for every fixed vector , if , then .
Fix an edge such that , or equivalently, . For any , we have . Therefore, , and in particular . Hence, by Claim 32, we have
Taking a union bound over all and all , the probability that there exists an edge such that and is at most . Since , , , and , this probability is . Therefore, with high probability, for every edge , if , then .
We now give a construction of the pattern set in time, completing the proof of Lemma 11.
Proof of Lemma 11. By Claim 37, it remains to show that the pattern set used in its proof can be constructed in time.
We first construct the set , where is the collection of edge sets of paths in the tree obtained by contracting every connected component of . Assign to each edge the label if , and otherwise. Using the data structure in Lemma 36 to the tree with these labels, we obtain in time a data structure that, given two vertices and , returns in time, where
denotes the unique u-v path in .
Let be the set of endpoints of the edges in . Initialize . For every pair of vertices , query the data structure on and , and insert the returned value into . This enumerates all values for . Indeed, each vertex of the contracted tree is represented by some endpoint of an edge in , and the query on two endpoints returns the XOR of the weights on the corresponding path in the contracted tree. Since , this step requires time.
By the argument in the proof of Claim 37, we define as follows. In cases (i) and (ii), we set . In case (iii), choose an arbitrary edge . We then compute using the pattern-tree data structure (Lemma 31). We also compute by one query to the data structure above. We then set
This is exactly the set from the proof of Claim 37 in case (iii), because .
In all cases, . The construction time is for the data structure in Lemma 36, plus for computing all patterns in . Hence, the total running time is . The correctness of the resulting set follows from Claim 37.
9.4 Fast span-membership tests
In this subsection, we use the results of the previous subsections to give a fast algorithm for the span-membership tests, and prove Lemma 30. To this end, we prove the following lemma. Its statement involves an integer parameter , following the exposition in technical overview (Section 3), although we apply the lemma only with . Since always holds, the lemma with allows us to perform the span-membership tests for all indices in total time.
Lemma 38. With high probability, for all lines , we can decide whether there exists an index satisfying and such that in total time.
The technical overview in Section 3 gives a simpler -time implementation. A simpler -time implementation can be derived rather easily from Lemma 11. Here, we refine it to obtain the bound. The key tool for this refinement is the following lemma.
Lemma 39. For every edge with , there exists at most one index such that .
Proof. It suffices to prove the following statement: if and , then .
Suppose that for two distinct indices and . Then, there exist and sets and such that .
Therefore, .
We use the representation over the tree basis , as in Remark 9. Every vector in is represented over the tree basis by the symmetric difference of some sets in . Each set in is contained in a single part of the partition before Line 6, and these parts are pairwise disjoint. This implies the following: if a vector in is represented only using elements of , then its part in is either empty or , and its part in is either empty or .
Applying this to the vector , we get that and . Hence, . This proves the equivalent statement, and therefore proves the lemma.
We now prove Lemma 38 using Lemmas 11 and 39, together with data structures from Section 9.2.
Proof of Lemma 38. Write , and let
For each , we run the construction in Lemma 11. This gives the pattern set in time. We also keep the auxiliary set constructed in the proof of Lemma 11, which has size . Since , the total time for this construction step is
We build two global dictionaries. The first dictionary stores, for every and every , the key together with one such index . The second dictionary stores, for every and every , the key together with one such index . The total number of stored keys is , so these dictionaries are constructed in time by Lemma 33. We also store each itself as a dictionary, so that membership in can be tested in time.
We will use the following interpretation of these dictionaries. By Lemma 11, with high probability, for every edge and every ,
Similarly, by the same argument applied to the auxiliary sets , with high probability, for every edge and every ,
Hence, for an edge , a lookup of in returns the unique index such that , if such an index exists. The uniqueness follows from Lemma 39.
It remains to describe how to process each line. We first build one more deterministic data structure. Let be the set of indices that fall into case (iii) of Lemma 6. Assign to each edge the label if for some , and assign no label otherwise. Using Lemmas 35 and 36 with the semigroup that computes the minimum and maximum label on a path, we can determine in time whether the edge set contains labels from no index, from exactly one index, or from at least two distinct indices. This data structure is constructed in time.
Now, fix a line . By Lemma 10, we can test in time whether and whether . We consider the following three cases.
(A) Suppose that and . Then for every . Thus, the answer is yes if and only if is nonempty.
(B) Suppose that exactly one of and belongs to . By symmetry, assume that and . Then is covered by some if and only if for some . We decide this by looking up in .
(C) Suppose that and . Let be the index returned by on key , if it exists, and define analogously.
If exists and , then both and belong to , so we answer yes. Similarly, if exists and , then we answer yes.
It remains to consider the case where, for every remaining candidate index , neither nor belongs to . Thus, any remaining solution must come from case (iii) of Lemma 6. That is, for the corresponding edge , both and belong to , but neither belongs to . We inspect the labels appearing on to identify such possible indices.
Let be the set of labels appearing on . We then consider the following three cases.
(a) If , then no remaining solution exists, and we answer no. Indeed, suppose that there is an index in case (iii) such that . Since we are in the remaining case, neither nor belongs to . Therefore, in the expression of or using vectors from , the coefficient of must be 1. Equivalently, there exist and such that
Thus, the two copies of cancel in . Therefore, the representation of over the tree-basis , as in Remark 9, can contain labeled edges only from . Equivalently, the labels on can only be . This contradicts .
(b) If , then, by the argument in (a), is the only candidate index that can satisfy in case (iii). Thus, it remains only to check whether . We therefore answer yes if and only if both and belong to .
(c) Finally, suppose that . If there is an index in case (iii) such that , then, in the expression of using vectors from , the coefficient of each must be 0. Since the two copies of cancel, this implies . We therefore check whether . If not, we answer no. If yes, then differs from by a vector in . Hence, for any index , if , then also . Thus, we answer yes if and only if the lookup of in succeeds.
Each line is processed using only a constant number of dictionary lookups and path queries, so all lines are processed in time. The total running time is therefore .
The correctness holds with high probability by Lemmas 11 and 10, by the analogous guarantee for the auxiliary sets , and by a union bound over all indices in and all queried lines.
Using Lemma 38, we now prove Lemma 30, which is the goal of this section and is restated here.
Lemma 30. Fix an iteration , and let be the pruned cover obtained in this iteration. With high probability, the inner for loop (Lines 7–12) can be implemented in time. More precisely, with high probability, for all lines , we can decide whether
in total time.
Proof of Lemma 30. First, by Lemma 31, we build the pattern-tree data structure in time. Then, by Lemma 10, we can decide, for each line , whether in total time.
Since and , every index satisfies . Hence, by Lemma 38 with , we can decide, for all lines , whether there exists an index with in total time.
Therefore, the total running time is . Correctness holds with high probability by Lemmas 10 and 38, together with a union bound over the polynomially many tests performed above.
Acknowledgments of the use of AI
All key ideas for breaking the -time complexity barrier for graphic matroid parity, which lead to an -time exact algorithm, are due to the author. The key ideas are presented in Sections 6 and 9. After the author had written up the paper with the -time exact algorithm, GPT 6 Astra (OpenAI) found an idea to improve the running time to . The idea is the modification of Assadi's framework in Section 7, which reduces a part of the -approximation algorithm that took time to time.
The author used GPT 5.5, GPT 6 Astra (OpenAI), and Claude Fable 5.1 (Anthropic) for assistance in writing and editing parts of this paper. These tools were also used to draft proofs of some lemmas after the author provided the lemma statements and the corresponding proof ideas. All AI-generated text and proofs were carefully verified and revised by the author, who takes full responsibility for the contents of this paper.
References
[AB21] Sepehr Assadi and Soheil Behnezhad. Beating two-thirds for random-order streaming matching. In Proceedings of the 48th International Colloquium on Automata, Languages, and Programming (ICALP 2021), volume 198, pages 19:1–19:13, 2021.
[AG11] Kook Jin Ahn and Sudipto Guha. Laminar families and metric embeddings: Non-bipartite maximum matching problem in the semi-streaming model. arXiv preprint arXiv:1104.4058, 2011.
[AG13] Kook Jin Ahn and Sudipto Guha. Linear programming in the semi-streaming model with application to the maximum matching problem. Information and Computation, 222:59–79, 2013. Announced at ICALP 2011.
[AG18] Kook Jin Ahn and Sudipto Guha. Access to data and number of iterations: Dual primal algorithms for maximum matching under resource constraints. ACM Transactions on Parallel Computing (TOPC), 4(4):1–40, 2018. Announced at SPAA 2015.
[AHS26] Sepehr Assadi, Gary Hoppenworth, and Janani Sundaresan. Better bounds for semi-streaming single-source shortest paths. In Proceedings of the 37th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2026), pages 5093–5116. SIAM, 2026.
[AJJ 22] Sepehr Assadi, Arun Jambulapati, Yujia Jin, Aaron Sidford, and Kevin Tian. Semi-streaming bipartite matching in fewer passes and optimal space. In Proceedings of the 33rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2022), pages 627–669. SIAM, 2022.
[AK26] Pavel Arkhipov and Vladimir Kolmogorov. Faster algorithms for packing forests in graphs and related problems. In Proceedings of the 37th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2026), pages 4023–4042. SIAM, 2026.
[ALT21] Sepehr Assadi, S Cliff Liu, and Robert E Tarjan. An auction algorithm for bipartite matching in streaming and massively parallel computation models. In Proceedings of the 4th Symposium on Simplicity in Algorithms (SOSA 2021), pages 165–171. SIAM, 2021.
[AMV20] Kyriakos Axiotis, Aleksander Madry, and Adrian Vladu. Circulation control for faster minimum cost flow in unit-capacity graphs. In Proceedings of the 61st Annual Symposium on Foundations of Computer Science (FOCS 2020), pages 93–104. IEEE, 2020.
[Ass25] Sepehr Assadi. A simple -approximation semi-streaming algorithm for maximum (weighted) matching. TheoretICS, 4, 2025. Announced at SOSA 2024.
[BBL 25] Aaron Bernstein, Joakim Blikstad, Jason Li, Thatchaphol Saranurak, and Ta-Wei Tu. Combinatorial maximum flow via weighted push-relabel on shortcut graphs. In Proceedings of the 66th Annual Symposium on Foundations of Computer Science (FOCS 2025), pages 464–485. IEEE, 2025.
[BBST24] Aaron Bernstein, Joakim Blikstad, Thatchaphol Saranurak, and Ta-Wei Tu. Maximum flow by augmenting paths in time. In Proceedings of the 65th Annual Symposium on Foundations of Computer Science (FOCS 2024), pages 2056–2077. IEEE, 2024.
[Ber23] Aaron Bernstein. Improved bounds for matching in random-order streams. Theory of Computing Systems, pages 1–15, 2023. Announced at ICALP 2020.
[BFC00] Michael A Bender and Martin Farach-Colton. The lca problem revisited. In Proceedings of 4th Latin American Symposium on Theoretical Informatics (LATIN 2000), pages 88–94. Springer, 2000.
[BFZ06] Piotr Berman, Martin Fürer, and Alexander Zelikovsky. Applications of the linear matroid parity algorithm to approximating steiner trees. In Proceedings of the 1st International Computer Science Symposium in Russia (CSR 2006), pages 70–79. Springer, 2006.
[Bli21] Joakim Blikstad. Breaking for matroid intersection. In Proceedings of the 48th International Colloquium on Automata, Languages, and Programming (ICALP 2022), volume 198, pages 31:1–31:17, 2021.
[BMNT23] Joakim Blikstad, Sagnik Mukhopadhyay, Danupon Nanongkai, and Ta-Wei Tu. Fast algorithms via dynamic-oracle matroids. In Proceedings of the 55th Annual ACM Symposium on Theory of Computing (STOC 2023), pages 1229–1242, 2023.
[BT25] Joakim Blikstad and Ta-Wei Tu. Efficient matroid intersection via a batch-update auction algorithm. In Proceedings of the 8th Symposium on Simplicity in Algorithms (SOSA 2025), pages 226–237. SIAM, 2025.
[BvdBMN21] Joakim Blikstad, Jan van den Brand, Sagnik Mukhopadhyay, and Danupon Nanongkai. Breaking the quadratic barrier for matroid intersection. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing (STOC 2021), pages 421–432, 2021.
[Căl10] Gruia Călinescu. Min-power strong connectivity. In Proceedings of the International Workshop on Randomization and Approximation Techniques in Computer Science (APPROX/RANDOM 2010), pages 67–80. Springer, 2010.
[Căl16] Gruia Călinescu. 1.61-approximation for min-power strong connectivity with two power levels. Journal of Combinatorial Optimization, 31(1):239–259, 2016.
[CCL15] Yîxin Cao, Jianer Chen, and Yang Liu. On feedback vertex set: New measure and new structures. Algorithmica, 73(1):63–86, 2015. Announced at SWAT 2010.
[CFFK98] Gruia Călinescu, Cristina G Fernandes, Ulrich Finkler, and Howard Karloff. A better approximation algorithm for finding planar subgraphs. Journal of Algorithms, 27(2):269–302, 1998. Announced at SODA 1996.
[CFK+15] Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms. Springer, 2015.
[CGQ15] Chandra Chekuri, Shalmoli Gupta, and Kent Quanrud. Streaming algorithms for submodular function maximization. In Proceedings of the 42nd International Colloquium on Automata, Languages, and Programming (ICALP 2015), pages 318–330. Springer, 2015.
[CK15] Amit Chakrabarti and Sagar Kale. Submodular maximization meets streaming: matchings, matroids, and more. Mathematical Programming, 154:225–247, 2015. Announced at IPCO 2014.
[CK24a] Julia Chuzhoy and Sanjeev Khanna. A faster combinatorial algorithm for maximum bipartite matching. In Proceedings of the 35th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2024), pages 2185–2235. SIAM, 2024.
[CK24b] Julia Chuzhoy and Sanjeev Khanna. Maximum bipartite matching in time via a combinatorial algorithm. In Proceedings of the 56th Annual ACM Symposium on Theory of Computing (STOC 2024), pages 83–94, 2024.
[CKK24] Gruia Călinescu, Hemanshu Kaul, and Bahareh Kudarzi. An improved algorithm for finding maximum outerplanar subgraphs. Discrete Applied Mathematics, 342:207–217, 2024.
[CKL+25] Li Chen, Rasmus Kyng, Yang Liu, Richard Peng, Maximilian Probst Gutenberg, and Sushant Sachdeva. Maximum flow and minimum-cost flow in almost-linear time. Journal of the ACM, 72(3):1–103, 2025. Announced at FOCS 2022.
[CLL14] Ho Yee Cheung, Lap Chi Lau, and Kai Man Leung. Algebraic algorithms for linear matroid parity problems. ACM Transactions on Algorithms (TALG), 10(3):1–26, 2014. Announced at SODA 2011.
[CLRS22] Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2022.
[CLS+19] Deeparnab Chakrabarty, Yin Tat Lee, Aaron Sidford, Sahil Singla, and Sam Chiu-wai Wong. Faster matroid intersection. In Proceedings of the 60th Annual Symposium on Foundations of Computer Science (FOCS 2019), pages 1146–1168. IEEE, 2019.
[CMSV17] Michael B Cohen, Aleksander Madry, Piotr Sankowski, and Adrian Vladu. Negative-weight shortest paths and unit capacity minimum cost flow in time. In Proceedings of the 28th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2017), pages 752–771. SIAM, 2017.
[CQ16] Chandra Chekuri and Kent Quanrud. A fast approximation for maximum weight matroid intersection. In Proceedings of the 27th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2016), pages 445–457. SIAM, 2016.
[CSU19] Parinya Chalermsook, Andreas Schmid, and Sumedha Uniyal. A tight extremal bound on the Lovász cactus number in planar graphs. In Proceedings of the 36th International Symposium on Theoretical Aspects of Computer Science (STACS 2019), volume 126, pages 19:1–19:14, 2019.
[CU24] Gruia Călinescu and Sumedha Uniyal. Local optimization algorithms for maximum planar subgraph. In Proceedings of the 32nd Annual European Symposium on Algorithms (ESA 2024), volume 308, pages 38:1–38:18, 2024.
[Cun86] William H Cunningham. Improved bounds for matroid partition and intersection algorithms. SIAM Journal on Computing, 15(4):948–957, 1986.
[DB00] Mark De Berg. Computational geometry: Algorithms and applications. Springer Science & Business Media, 2000.
[DG26] Aditi Dudeja and Mara Grilnberger. A weighted-to-unweighted reduction for matroid intersection. arXiv preprint arXiv:2602.15702, 2026. To appear in IPCO 2026.
[Edm65] Jack Edmonds. Paths, trees, and flowers. Canadian Journal of mathematics, 17:449–467, 1965.
[Edm70] Jack Edmonds. Submodular functions, matroids, and certain polyhedra. In Combinatorial Structures and Their Applications, pages 69–87, 1970.
[Edm79] Jack Edmonds. Matroid intersection. In Annals of Discrete Mathematics, volume 4, pages 39–49. Elsevier, 1979.
[EHM16] Hossein Esfandiari, MohammadTaghi Hajiaghayi, and Morteza Monemizadeh. Finding large matchings in semi-streaming. In Proceedings of the 16th International Conference on Data Mining Workshops (ICDMW 2016), pages 608–614. IEEE, 2016.
[EK75] Shimon Even and Oded Kariv. An algorithm for maximum matching in general graphs. In Proceedings of the 16th Annual Symposium on Foundations of Computer Science (FOCS 1975), pages 100–112. IEEE, 1975.
[EKMS12] Sebastian Eggert, Lasse Kliemann, Peter Munstermann, and Anand Srivastav. Bipartite matching in the semi-streaming model. Algorithmica, 63(1):490–508, 2012.
[EKS09] Sebastian Eggert, Lasse Kliemann, and Anand Srivastav. Bipartite graph matchings in the semi-streaming model. In Proceedings of the 17th Annual European Symposium on Algorithms (ESA 2009), pages 492–503. Springer, 2009.
[EN19] Alina Ene and Huy L. Nguyen. Towards nearly-linear time algorithms for submodular maximization with a matroid constraint. In Proceedings of the 46th International Colloquium on Automata, Languages, and Programming (ICALP 2019), volume 132, pages 54:1–54:14, 2019.
[FGM88] Merrick L Furst, Jonathan L Gross, and Lyle A McGeoch. Finding a maximum-genus graph imbedding. Journal of the ACM (JACM), 35(3):523–534, 1988.
[FJF56] Lester R Ford Jr and Delbert R Fulkerson. Maximal flow through a network. Canadian journal of Mathematics, 8:399–404, 1956.
[FKK18] Moran Feldman, Amin Karbasi, and Ehsan Kazemi. Do less, get more: Streaming submodular maximization with subsampling. Advances in Neural Information Processing Systems 31: Proceedings of the 32th Annual Conference on Neural Information Processing Systems (Neurips 2018), 31, 2018.
[FKM 05] Joan Feigenbaum, Sampath Kannan, Andrew McGregor, Siddharth Suri, and Jian Zhang. On graph problems in a semi-streaming model. Theoretical Computer Science, 348(2-3):207–216, 2005. Announced at ICALP 2004.
[FMU22] Manuela Fischer, Slobodan Mitrović, and Jara Uitto. Deterministic -approximate maximum matching with poly passes in the semi-streaming model and beyond. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing (STOC 2022), pages 248–260, 2022.
[FS24] Moran Feldman and Ariel Szarf. Maximum matching sans maximal matching: A new approach for finding maximum matchings in the data stream model. Algorithmica, 86(4):1173–1209, 2024. Announced at APPROX/RANDOM 2022.
[FX95] Satoru Fujishige and Zhang Xiaodong. An efficient cost scaling algorithm for the independent assignment problem. Journal of the Operations Research Society of Japan, 38(1):124–136, 1995.
[Gab76] Harold N Gabow. An efficient implementation of Edmonds' algorithm for maximum matching on graphs. Journal of the ACM (JACM), 23(2):221–234, 1976.
[Gab91] Harold N Gabow. A matroid approach to finding edge connectivity and packing arborescences. In Proceedings of the 23rd annual ACM symposium on Theory of Computing (STOC 1991), pages 112–122, 1991.
[Gab98] Harold N Gabow. Algorithms for graphic polymatroids and parametrics-sets. Journal of Algorithms, 26(1):48–86, 1998. Announced at SODA 1995.
[Gab17] Harold N Gabow. The weighted matching approach to maximum cardinality matching. Fundamenta Informaticae, 154(1-4):109–130, 2017.
[GJ79] Michael R Garey and David S Johnson. Computers and intractability: A guide to the theory of NP-completeness. W.H. Freeman and company, 1979.
[GJS23] Paritosh Garg, Linus Jordan, and Ola Svensson. Semi-streaming algorithms for submodular matroid intersection. Mathematical Programming, 197(2):967–990, 2023. Announced at IPCO 2021.
[GK04] Andrew V Goldberg and Alexander V Karzanov. Maximum skew-symmetric flows and matchings. Mathematical Programming, 100(3):537–568, 2004.
[GKK12] Ashish Goel, Michael Kapralov, and Sanjeev Khanna. On the communication and streaming complexity of maximum bipartite matching. In Proceedings of the 23rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2012), pages 468–485. SIAM, 2012.
[GKMS19] Buddhima Gamlath, Sagar Kale, Slobodan Mitrovic, and Ola Svensson. Weighted matchings via unweighted augmentations. In Proceedings of the 38th Symposium on Principles of Distributed Computing (PODC 2019), pages 491–500, 2019.
[GS85] Harold N Gabow and Matthias Stallmann. Efficient algorithms for graphic matroid intersection and parity. In Proceedings of the 12th Colloquium on Automata, Languages and Programming (ICALP 1985), pages 210–220. Springer, 1985.
[GS86] Harold N Gabow and Matthias Stallmann. An augmenting path algorithm for linear matroid parity. Combinatorica, 6(2):123–150, 1986. Announced at FOCS 1984.
[GT79] Harold N Gabow and Robert E Tarjan. Efficient algorithms for simple matroid intersection problems. In Proceedings of the 20th Annual Symposium on Foundations of Computer Science (FOCS 1979), pages 196–204. IEEE, 1979.
[GT83] Harold N Gabow and Robert Endre Tarjan. A linear-time algorithm for a special case of disjoint set union. In Proceedings of the 15th Annual ACM Symposium on Theory of Computing (STOC 1983), pages 246–251, 1983.
[GT91] Harold N Gabow and Robert E Tarjan. Faster scaling algorithms for general graph matching problems. Journal of the ACM (JACM), 38(4):815–853, 1991.
[GW88] Harold Gabow and Herbert Westermann. Forests, frames, and games: algorithms for matroid sums and applications. In Proceedings of the 20th Annual ACM Symposium on Theory of Computing (STOC 1988), pages 407–421, 1988.
[GX89] Harold N Gabow and Ying Xu. Efficient algorithms for independent assignment on graphic and linear matroids. In Proceedings of the 30th Annual Symposium on Foundations of Computer Science (FOCS 1989), pages 106–111. IEEE Computer Society, 1989.
[GX96] Harold N Gabow and Ying Xu. Efficient theoretic and practical algorithms for linear matroid intersection problems. Journal of Computer and System Sciences, 53(1):129–147, 1996.
[Har07] Nicholas JA Harvey. An algebraic algorithm for weighted linear matroid intersection. In Proceedings of the 8th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2007), pages 444–453, 2007.
[Har09] Nicholas JA Harvey. Algebraic algorithms for matching and matroid problems. SIAM Journal on Computing, 39(2):679–702, 2009. Announced at FOCS 2006.
[HI26] Kou Hamada and Satoru Iwata. A shortest augmenting path algorithm for linear matroid parity. arXiv preprint arXiv:2610.03030, 2026. To appear in FOCS'26.
[HK73] John E Hopcroft and Richard M Karp. An algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing, 2(4):225–231, 1973.
[HK26] Chien-Chung Huang and Yusuke Kobayashi. Auction-based algorithms for matroid intersection: Near-Linear query complexity and constant-pass semi-streaming. arXiv preprint arXiv:2609.38685, 2026.
[HKK19] Chien-Chung Huang, Naonori Kakimura, and Naoyuki Kamiyama. Exact and approximation algorithms for weighted matroid intersection. Mathematical Programming, 177(1-2):85–112, 2019. Announced at SODA 2016.
[HKKT26] Chien-Chung Huang, Naonori Kakimura, Yusuke Kobayashi, and Tatsuya Terao. Polynomial kernels with reachability for weighted d-matroid intersection. arXiv preprint arXiv:2603.17345, 2026. To appear in IPCO 2026.
[HLVZ23] Monika Henzinger, Paul Liu, Jan Vondrák, and Da Wei Zheng. Faster submodular maximization for several classes of matroids. In Proceedings of the 50th International Colloquium on Automata, Languages, and Programming (ICALP 2023), volume 261, pages 74:1–74:18, 2023.
[HS23] Shang-En Huang and Hsin-Hao Su. (1 – ε)-approximate maximum weighted matching in poly(1/ε, log n) time in the distributed and parallel settings. In Proceedings of the 42nd Symposium on Principles of Distributed Computing (PODC 2023), pages 44–54, 2023.
[HS24] Chien-Chung Huang and François Sellier. Robust sparsification for matroid intersection with applications. In Proceedings of the 35th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2024), pages 2916–2940. SIAM, 2024.
[HTW20] Chien-Chung Huang, Theophile Thiery, and Justin Ward. Improved multi-pass streaming algorithms for submodular maximization with matroid constraints. In Proceedings of the 23th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX 2020) and the 24th International Workshop on Randomized and Computation (RANDOM 2020), volume 176, pages 62:1–62:19, 2020.
[HW23] Chien-Chung Huang and Justin Ward. FPT-algorithms for the ℓ-matchoid problem with a coverage objective. SIAM Journal on Discrete Mathematics, 37(2):1053–1078, 2023.
[IK21a] Satoru Iwata and Yusuke Kobayashi. A weighted linear matroid parity algorithm. SIAM Journal on Computing, 51(2):STOC17–238, 2021. Announced at STOC 2017.
[IK21b] Yoichi Iwata and Yusuke Kobayashi. Improved analysis of highest-degree branching for feedback vertex set. Algorithmica, 83(8):2503–2520, 2021. Announced at IPEC 2019.
[IKY25] Taisuke Izumi, Naoki Kitamura, and Yutaro Yamaguchi. Forgetting alternation and blossoms: A new framework for fast matching augmentation and its applications to sequential/distributed/streaming computation. arXiv preprint arXiv:2511.08210, 2025.
[JK82] Per M Jensen and Bernhard Korte. Complexity of matroid property algorithms. SIAM Journal on Computing, 11(1):184–190, 1982.
[Kap13] Michael Kapralov. Better bounds for matchings in the streaming model. In Proceedings of the 24th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2013), pages 1679–1697. SIAM, 2013.
[KMM12] Christian Konrad, Frédéric Magniez, and Claire Mathieu. Maximum matching in semi-streaming with few passes. In Proceedings of the 15th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (AP-PROX 2012) and the 16th International Workshop on Randomized and Computation (RANDOM 2012), pages 231–242. Springer, 2012.
[KMMP25] Alexander S. Kulikov, Ivan Mikhailin, Andrey Mokhov, and Vladimir V. Podolskii. Complexity of linear operators. Theory of Computing, 21(9):1–32, 2025.
[KNS23] Christian Konrad, Kheeran K. Naidu, and Arun Steward. Maximum matching via maximal matching queries. In Proceedings of the 40th International Symposium on Theoretical Aspects of Computer Science (STACS 2023), volume 254, pages 41:1–41:22, 2023.
[Kon18] Christian Konrad. A simple augmentation method for matchings with applications to streaming algorithms. In Proceedings of the 43rd International Symposium on Mathematical Foundations of Computer Science (MFCS 2018), pages 74–1, 2018.
[KP14] Tomasz Kociumaka and Marcin Pilipczuk. Faster deterministic feedback vertex set. Information Processing Letters, 114(10):556–560, 2014.
[KPS26] Sanjeev Khanna, Aaron Putterman, and Junkai Song. Optimal parallel basis finding in graphic and related matroids. In Proceedings of the 53rd International Colloquium on Automata, Languages, and Programming (ICALP 2026), volume 374, pages 125:1–125:22, 2026.
[KT17] Sagar Kale and Sumedh Tirodkar. Maximum matching in two, three, and a few more passes over graph streams. In Proceedings of the 20th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX 2017) and the 21st International Workshop on Randomized and Computation (RAN-DOM 2017), volume 81, pages 15:1–15:21, 2017.
[Law76] Eugene L. Lawler. Combinatorial Optimization: Networks and Matroids. Holt, Rinehart and Winston, 1976.
[LLZ26] George Z. Li, Jason Li, and Junkai Zhang. Maximum cardinality matching in time. arXiv preprint arXiv:2610.40591, 2026.
[Lov78] László Lovász. The matroid matching problem. In Algebraic Methods in Graph Theory, volume 25 of Colloq. Math. Soc. János Bolyai, pages 495–517. 1978.
[Lov80a] László Lovász. Matroid matching and some applications. Journal of Combinatorial Theory, Series B, 28(2):208–236, 1980.
[Lov80b] László Lovász. Selecting independent lines from a family of lines in a space. Acta Scientiarum Mathematicarum, 42:121–131, 1980.
[LS19] Yin Tat Lee and Aaron Sidford. Solving linear programs with linear system solves. arXiv preprint arXiv:1910.08033, 2019.
[LS20] Yang P Liu and Aaron Sidford. Faster energy maximization for faster maximum flow. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing (STOC 2020), pages 803–814, 2020.
[LSV13] Jon Lee, Maxim Sviridenko, and Jan Vondrák. Matroid matching: The power of local search. SIAM Journal on Computing, 42(1):357–379, 2013. Announced at STOC 2010.
[LSW15] Yin Tat Lee, Aaron Sidford, and Sam Chiu-wai Wong. A faster cutting plane method and its implications for combinatorial and convex optimization. In Proceedings of the 56th Annual Symposium on Foundations of Computer Science (FOCS 2015), pages 1049–1065. IEEE, 2015.
[Mad13] Aleksander Madry. Navigating central path with electrical flows: From flows to matchings, and back. In Proceedings of the 54th Annual Symposium on Foundations of Computer Science (FOCS 2013), pages 253–262. IEEE, 2013.
[McG05] Andrew McGregor. Finding graph matchings in data streams. In Proceedings of the 8th International Workshop on Approximation Algorithms for Combinatorial Optimization Problems (APPROX 2005) and the 9th International Workshop on Randomized and Computation (RANDOM 2005), pages 170–181. Springer, 2005.
[MMSS25] Slobodan Mitrović, Anish Mukherjee, Piotr Sankowski, and Wen-Horng Sheu. Faster semi-streaming matchings via alternating trees. In Proceedings of the 52nd International Colloquium on Automata, Languages, and Programming (ICALP 2025), volume 334, pages 119:1–119:19, 2025.
[MV80] Silvio Micali and Vijay V Vazirani. An algorithm for finding maximum matching in general graphs. In Proceedings of the 21st Annual Symposium on Foundations of Computer Science (FOCS 1980), pages 17–27. IEEE, 1980.
[Ngu19] Huy L Nguyen. A note on Cunningham's algorithm for matroid intersection. arXiv preprint arXiv:1904.04129, 2019.
[Ope26] OpenAI. Almost-linear-time maximum-cardinality matching in general graphs. OpenAI Math Release preprint OAI:Almost-Linear-Time-Maximum-Cardinality-Matching-in-Sparse-General-Graphs-September-24-2026, 2026.
[Orl08] James B Orlin. A fast, simpler algorithm for the matroid parity problem. In Proceedings of the 13th International Conference on Integer Programming and Combinatorial Optimization (IPCO 2008), pages 240–258. Springer, 2008.
[OV25] Étienne Objois and Adrian Vladu. Adaptive sparsification for linear programming. arXiv preprint arXiv:2510.08348, 2025. To appear in ESA 2026.
[OVV90] James B Orlin and John H Vande Vate. Solving the linear matroid parity problem as a sequence of matroid intersection problems. Mathematical Programming, 47(1):81–106, 1990.
[Oxl06] James G Oxley. Matroid theory, volume 3. Oxford University Press, USA, 2006.
[PS97] Hans Jürgen Prömel and Angelika Steger. RNC-approximation algorithms for the Steiner problem. In Proceedings of the 14th Annual Symposium on Theoretical Aspects of Computer Science (STACS 1997), pages 559–570. Springer, 1997.
[Qua24a] Kent Quanrud. Adaptive sparsification for matroid intersection. In Proceedings of the 51st International Colloquium on Automata, Languages, and Programming (ICALP 2024), volume 297, pages 118:1–118:20, 2024.
[Qua24b] Kent Quanrud. Faster exact and approximation algorithms for packing and covering matroids via push-relabel. In Proceedings of the 35th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2024), pages 2305–2336. SIAM, 2024.
[RT85] James Roskind and Robert E Tarjan. A note on finding minimum-cost edge-disjoint spanning trees. Mathematics of Operations Research, 10(4):701–708, 1985.
[Sch03] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer, 2003.
[SI95] Maiko Shigeno and Satoru Iwata. A dual approximation approach to weighted matroid intersection. Operations Research Letters, 18(3):153–156, 1995.
[ST83] Daniel D Sleator and Robert Endre Tarjan. A data structure for dynamic trees. Journal of Computer and System Sciences, 26(3):362–391, 1983. Announced at STOC 1981.
[Szi03] Zoltán Szigeti. On the graphic matroid parity problem. Journal of Combinatorial Theory, Series B, 88(2):247–260, 2003.
[Ter25a] Tatsuya Terao. Deterministic -approximation of matroid intersection using nearly-linear independence-oracle queries. In Proceedings of the 19th International Symposium on Algorithms and Data Structures (WADS 2025), volume 349, pages 50:1–50:18, 2025.
[Ter25b] Tatsuya Terao. Faster matroid partition algorithms. ACM Transactions on Algorithms (TALG), 21(2):1–26, 2025. Announced at ICALP 2023.
[Ter26a] Tatsuya Terao. Faster approximate linear matroid intersection. In Proceedings of the 20th Scandinavian Symposium on Algorithm Theory (SWAT 2026), volume 370, pages 39:1–39:19, 2026.
[Ter26b] Tatsuya Terao. A faster auction algorithm for weighted matroid intersection. arXiv preprint arXiv:2610.00920, 2026.
[Tir18] Sumedh Tirodkar. Deterministic algorithms for maximum matching on general graphs in the semi-streaming model. In Proceedings of the 38th IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2018). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2018.
[Tu22] Ta-Wei Tu. Subquadratic weighted matroid intersection under rank oracles. In Proceedings of the 33rd International Symposium on Algorithms and Computation (ISAAC 2022), volume 248, pages 63:1–63:14, 2022.
[Vaz24] Vijay V Vazirani. A theory of alternating paths and blossoms from the perspective of minimum length. Mathematics of Operations Research, 49(3):2009–2047, 2024.
[VDBCK+23] Jan Van Den Brand, Li Chen, Rasmus Kyng, Yang P Liu, Richard Peng, Maximilian Probst Gutenberg, Sushant Sachdeva, and Aaron Sidford. A deterministic almost-linear time algorithm for minimum-cost flow. In Proceedings of the 64th Annual Symposium on Foundations of Computer Science (FOCS 2023), pages 503–514. IEEE, 2023.
[vdBLN+20] Jan van den Brand, Yin-Tat Lee, Danupon Nanongkai, Richard Peng, Thatchaphol Saranurak, Aaron Sidford, Zhao Song, and Di Wang. Bipartite matching in nearly-linear time on moderately dense graphs. In Proceedings of the 61st Annual Symposium on Foundations of Computer Science (FOCS 2020), pages 919–930. IEEE, 2020.
[XG94] Ying Xu and Harold N Gabow. Fast algorithms for transversal matroid intersection problems. In Proceedings of the 5th International Symposium on Algorithms and Computation (ISAAC 1994), pages 625–633. Springer, 1994.
A Matroids
For the basics of matroid theory, see, e.g., the excellent textbooks of Oxley [Oxl06] or Schrijver [Sch03].
A pair of a finite set and a non-empty set family is called a matroid if the following properties are satisfied.
-
If and , then .
-
If and , then there exists such that .
A set is called independent if and dependent otherwise.
B Gabow–Stallmann’s algorithm
Lemmas 17 and 6 in Section 5 are implicit in Gabow–Stallmann’s papers [GS86, GS85], but they are not stated there in this form. In this section, for completeness, we explain these lemmas, which we restate here.
Lemma 17. [From [GS86, GS85]] Given a multigraph , a set of lines, and a maximum matroid matching , there is a deterministic algorithm that, in time, computes a minimum cover of the associated linear matroid parity instance.
More precisely, the algorithm computes a parity partition and sets for , with and for . Let . For each such that , define , where the sum is taken over the linear representation of the graphic matroid over . Then, the set together with the partition forms a minimum cover.
Moreover, the values for all are determined by the construction. The construction also guarantees that the set is linearly independent, and hence .
Lemma 6. [From [GS86, GS85]] Let be a minimum cover produced by Gabow–Stallmann’s algorithm for graphic matroid parity [GS86, GS85]. For every such that , the following hold:
(i) if , then ,
(ii) if , then ,
(iii) if , then, for every , .
Here, and for every , so case (i) applies exactly to .
Gabow–Stallmann [GS86] gave an augmenting-path algorithm for linear matroid parity. For graphic matroid parity, Gabow–Stallmann [GS85] applied this algorithm to the associated linear matroid parity instance (Definition 15) and gave a faster implementation using range-searching data structures. In particular, their implementation finds one augmenting path in time. See also Remark 13.
We first briefly describe Gabow–Stallmann’s augmenting-path algorithm. The algorithm searches for an augmenting path in an auxiliary graph, called a dependence graph, as in the matroid intersection algorithm. As in graph matching algorithms, the search creates blossoms. Roughly, when a blossom is formed, the algorithm designates one element as its bud and some elements of the blossom as its tips. An element that was once a tip of a blossom but ceases to be a tip when that blossom is absorbed into a larger blossom is called an old tip. See Gabow–Stallmann [GS86, Definition 3.2] for the formal definition. In addition, each element is assigned a label during the search. (An element may also be unlabeled.)
The final unsuccessful search yields a certificate of optimality. This is analogous to the graph matching algorithm, where the absence of an augmenting path yields a structure attaining equality in the Tutte–Berge formula. In the linear matroid parity algorithm of Gabow–Stallmann [GS86], the corresponding certificate is a cover in the sense of Definition 5. More precisely, to certify the optimality of the final matroid matching using the min-max theorem (Theorem 4), they construct a cover whose value is equal to , i.e., a minimum cover. The labels, blossoms, buds, and tips maintained at the end of the final unsuccessful search define this cover as follows. (See [GS86, p. 145].)
,
is either for a blossom , or a pair (in ) with exactly one of labeled, .
We note that a blossom may contain a transform that is not in . Let , where is the final matroid matching. They define as follows:
Here, when the block corresponds to a blossom, the set is the set of current tips of the blossom. Since every blossom has at least one current tip, in this case. In the other case, where , the definition of makes it a singleton. Hence, for , we have . The vector is then defined as follows.
Here, is a bud of , and is the coefficient that determines adjacency in the dependence graph: exactly when and are adjacent in the dependence graph. Let is defined}.
In the graphic case, and more generally in the binary case, [GS86, Corollary 4.3(i)] implies that for any . We note, however, that this property is not essential in the proofs in Sections 6 and 8. What is essential is that can be written as for some .
To prove the constructed cover is a minimum cover, Gabow–Stallmann need to determine the values . See [GS86, p. 146]. For this purpose, they prove the following properties. Using [GS86, Lemma 4.8], they show that is a base of , and that is a base of for every with . Moreover, using [GS86, Lemmas 4.8 and 4.9], they show that, for every with and every , the set is a base of . Since and for every , these properties imply Lemma 6.
Gabow–Stallmann then show that , where
The discussion in [GS86, p. 136] implies that every unlabeled element in a current blossom is either a current tip of that blossom or an old tip. They then explicitly state that, if , then consists of the tips of B in [GS86, p. 145].
[GS86, Corollary 4.3(i)] states that the bud b of a blossom B is adjacent to all tips of B.
Note that the sets are pairwise disjoint subsets of the independent set , and that whenever is defined. Hence, the vectors in are linearly independent, and thus . Then, they show that is equal to . By the min-max theorem (Theorem 4), they show that the final matroid matching is maximum. Therefore, the constructed cover is minimum in the sense of Definition 5.
The implementation of Gabow and Stallmann [GS85] for graphic matroid parity provides enough information about the labels, blossoms, buds, and tips maintained during the search. Using this information, we can construct a minimum cover for the associated linear matroid parity instance. Therefore, given a maximum matroid matching , we can obtain a minimum cover in time. Indeed, we run one augmenting-path search from . Since is maximum, this search terminates without finding an augmenting path, and the labels, blossoms, and tips maintained at termination define the minimum cover described above. The discussion here gives Lemma 17.
C Handling indices with large
In the technical overview (Section 3), we described a simpler version of the span-membership tests, which fixes an integer parameter and handles the indices with and those with separately. The simpler version takes time, whereas the final version in Section 9 takes time (Lemma 30). The final version applies Lemma 38 with , under which every index satisfies , and hence the indices with need no separate treatment. For completeness, we present here the lemma for the indices with , which is used only in the simpler version described in the technical overview.
Lemma 40. With high probability, for all lines , we can decide whether there exists an index satisfying and such that in total time.
Write . Since the sets are disjoint subsets of the matroid matching , we have . Hence, there are only indices with . Therefore, it suffices to design, for a fixed index , a data structure that answers each line query in time. Then, by scanning all lines for all such indices, we obtain the desired time. The required data structure is given by the following lemma.
Lemma 41. Fix an index such that . There is a data structure that can be constructed in time and answers the following query in time. Given a line , decide whether . For each query, the answer is correct with high probability.
Proof. Let . We build an auxiliary pattern tree for the fixed index . Starting from the same spanning tree , we choose the weights as in Definition 8, with the additional constraints
We then build the pattern-tree data structure of Lemma 31. This takes time. Let denote the pattern of an edge with respect to this auxiliary pattern tree.
Let be the linear map corresponding to this auxiliary pattern tree, so that for every edge . The constraints in Definition 8 imply that for every , and the additional constraints imply that for every . Hence, for every . Moreover, the same argument as Claim 32 in the proof of Lemma 10 implies the following claim.
Claim 42. For every , if , then we have .
We first consider cases (i) and (ii) of Lemma 6. In both cases, we have . Therefore, if , then . Conversely, if , then , and hence with high probability. Thus, in cases (i) and (ii), membership of an edge in is tested by checking whether .
It remains to consider case (iii). Fix any edge . By Lemma 6, we have . If , then either or . Hence, . Conversely, if , then neither nor belongs to . Therefore, by Claim 42, if , we have
Thus, in case (iii), membership of an edge in is tested by checking whether .
Finally, for a line , we have if and only if both and belong to . We therefore apply the above membership test to both and . Each pattern value is returned in time by the pattern-tree data structure, so the query time is . The answer is always correct when the equality holds, and is correct with high probability otherwise.
We prove Lemma 40 using Lemma 41.
Proof of Lemma 40. Write . Since the sets are disjoint subsets of , we have . Hence, there are only indices with .
Fix such an index . Since we are working with the pruned cover, we have , and hence Lemma 41 applies. Then, by scanning all lines , we can decide in time whether for each line .
Therefore, for all lines , we can decide whether there exists an index with such that in total time.
The correctness holds with high probability by Lemma 41 and a union bound over the line queries performed above.