Faster Approximate Linear Matroid Intersection
Abstract
We consider a fast approximation algorithm for the linear matroid intersection problem. In this problem, we are given two matrices and , and the objective is to find a largest set of columns that are linearly independent in both and . We design a -approximation algorithm with time complexity , where denotes the number of nonzero entries in for , denotes the maximum size of a common independent set, and denotes the matrix multiplication exponent. Our approximation algorithm is faster than the exact algorithm by Harvey [FOCS’06 & SICOMP’09] and Cheung–Kwok–Lau [STOC’12 & JACM’13], which runs in time.
We also develop a fast -approximation algorithm for the weighted version of the linear matroid intersection problem. In fact, we design a -approximation algorithm for weighted linear matroid intersection with time complexity . Our algorithm improves upon the -approximation algorithm by Huang–Kakimura–Kamiyama [SODA’16 & Math. Program.’19], which runs in time.
To obtain these results, we combine Quanrud’s adaptive sparsification framework [ICALP’24] with a simple yet effective method for efficiently checking whether a given vector lies in the linear span of a subset of vectors, which is of independent interest.
Keywords and phrases:
Linear matroid intersection, fast approximation algorithm2012 ACM Subject Classification:
Theory of computation Algorithm design techniques ; Mathematics of computing Matroids and greedoidsAcknowledgements:
We thank Yusuke Kobayashi for his insightful comments, generous support, and valuable feedback on the manuscript. In particular, his input greatly helped us establish Lemma 11. We also thank Kou Hamada for helpful conversations that contributed to the initial motivation for this work. We are grateful to Takashi Noguchi for his helpful comments, which simplified the proof of Lemma 11. Finally, we thank the anonymous reviewers for their careful reading and valuable suggestions.Funding:
This work was partially supported by the joint project of Kyoto University and Toyota Motor Corporation, titled “Advanced Mathematical Science for Mobility Society” and by JSPS KAKENHI Grant Number JP24KJ1494.Editor:
Pierre FraigniaudSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
Fast Algorithms for Linear Matroid Problems.
Matroids are combinatorial structures that abstract linear independence and provide a unifying framework capturing fundamental properties of matrices and graphs. We focus on fast algorithms for problems on linear matroids that are given explicitly as the columns of an matrix over a field .
Motivated by the view that running time should reflect not only the matrix dimensions but also its sparsity, we design faster algorithms whose complexity depends on (the number of nonzero entries of ) in addition to and . In fact, many commonly studied matroids admit sparse linear representations. For example, it is well known that a graphic matroid can be represented by a vertex-edge incidence matrix with exactly two nonzero entries per edge, resulting in a total of nonzero entries, where is the number of edges (see e.g., [47, Section 5.1]).
From this perspective, an important contribution is due to Cheung–Kwok–Lau [14], who developed a remarkable sketching technique and, as a result, presented a surprising algorithm for computing the rank of a matrix in time.111The notation omits polylog factors. Note that even checking whether a given subset of vectors is independent already requires time, and reading the input takes time.
Nguyn [44] presented an elegant algorithm for computing a maximum-weight base of a linear matroid represented by a matrix . While a direct application of the sketching technique of Cheung–Kwok–Lau would only yield a running time of , his refined use of this technique leads to . This problem has also been studied, under the name column rank profile problem [19, 36, 52, 20], which asks for the lexicographically smallest sequence of column indices such that the corresponding columns of the matrix are linearly independent. Dumas–Pernet–Sultan [20] achieved the same time complexity for the column rank profile problem.
Linear Matroid Intersection.
In this work, we consider fast approximation algorithms for linear matroid intersection. This linear matroid intersection problem can be described without relying on matroid terminology as follows: Given two matrices and over a field , where the columns in and are indexed by , the objective is to find a set of maximum size such that the columns indexed by are linearly independent in both and . Many important problems in combinatorial optimization, such as bipartite matching, rainbow spanning tree, arborescence, and spanning tree packing, can be viewed as special cases of linear matroid intersection.
For the linear matroid intersection problem, Cunningham [16] gave a combinatorial algorithm with time complexity . Gabow–Xu [28, 29] proposed a faster combinatorial algorithm with time complexity , where is the exponent of matrix multiplication, known to satisfy [3]. Here, denotes the maximum size of a common independent set. Harvey [33] developed an algebraic algorithm with time complexity . Cheung–Kwok–Lau [14] combined their elegant sketching technique with Harvey’s algorithm [33], obtaining an algorithm with running time . In fact, simply applying their sketching technique reduces an input matrix to an matrix while preserving linear dependence among the columns.
Given the progress on the case of a single matroid [14, 20, 44], it is natural to ask whether linear matroid intersection can be solved in time. Note that even checking whether a given subset is independent in a single matroid already requires time, and reading the input takes time. Avoiding the dependence on is most meaningful when , a regime that arises naturally, for example, for graphic matroids. However, achieving a running time of seems quite challenging. To achieve such a running time, one must avoid explicitly computing the product of an matrix and an matrix, which would already take time. Here, it is well known that and have a common base if and only if , where is a diagonal matrix with variables on the diagonal (see for e.g., [31, Lemma 2.5]). Using this matrix formulation, a standard approach to the decision version of linear matroid intersection, i.e., deciding whether a common base exists, requires computing the product of an matrix and an matrix. Hence, to our knowledge, no prior result has shown that the time complexity for merely estimating the size of a maximum common independent set can be faster than that of Cheung–Kwok–Lau.
Our Result for Maximum Cardinality Linear Matroid Intersection.
Our main result is to develop a -approximation algorithm for linear matroid intersection running in time.222The notation omits polylog factors and polynomial factors in . We note that our algorithm is applicable over any field.
Theorem 1.
For any , a -approximate solution to the maximum cardinality linear matroid intersection problem can be computed with high probability333We say “with high probability” if the failure probability is at most . in time.
Our approximation algorithm in Theorem 1 is faster than the exact algorithm obtained by combining Harvey’s algorithm [33] with the sketching technique of Cheung–Kwok–Lau [14], which runs in time. Even when and are dense and , our approximation algorithm achieves a running time of , which is faster than the time required by Harvey’s exact algorithm [33]. Surprisingly, our complexity is almost the same as that of computing the rank of a matrix [14], and also that of finding a maximum-weight base of a single linear matroid [20, 44].
Weighted Linear Matroid Intersection.
We also consider the weighted version of the linear matroid intersection problem. In this problem, we are given two matrices and over a field , whose columns are indexed by , and a weight function . The objective is to find a set such that the columns indexed by are linearly independent in both and , and the total weight is maximized. Gabow–Xu [28, 29] gave a combinatorial algorithm with time complexity , where is the largest given weight. Harvey [32] proposed an algebraic algorithm with time complexity . Huang–Kakimura–Kamiyama [35] presented a -approximation algorithm with time complexity , where is the maximum size of a common independent set.
Our Result for Maximum Weight Linear Matroid Intersection.
Using a similar idea to that used to obtain Theorem 1, we also develop a -approximation algorithm for weighted linear matroid intersection running in time. We note that our algorithm is applicable over any field.
Theorem 2.
For any , a -approximate solution to the weighted linear matroid intersection problem can be computed with high probability in time.
1.1 Technical Overview
Adaptive Sparsification Framework of Quanrud [48].
Our linear matroid intersection algorithm builds upon the adaptive sparsification framework of Quanrud [48], which was developed to obtain a fast -approximation algorithm for matroid intersection in the oracle model. However, we emphasize that a direct application of Quanrud’s framework does not yield the running time achieved by our algorithm.
In Quanrud’s framework, the original problem over elements is reduced to primal-dual instances of matroid intersection, each over elements, where is the maximum size of a common independent set. For linear matroid intersection, computing primal and dual solutions to sparsified instances can be done straightforwardly using Harvey’s exact algorithm for linear matroid intersection [33]. Applied to the sparsified instance of size , Harvey’s algorithm runs in time, which is sufficiently fast. To adaptively construct sparsified instances, it is necessary to compute and , where denotes a dual solution to the sparsified instance. For linear matroids, a straightforward method can compute the spans in time, but this is still too slow for our purpose.
Challenge in Computing a Span.
Without using matroid terminology, our task is as follows: Given an matrix and a subset , determine whether each column vector lies in the linear span of the set , where denote the vectors corresponding to the columns of . We present a simple randomized algorithm that solves this task in time, which is of independent interest.
In the oracle model, where an algorithm accesses a matroid through an independence oracle, the span
of a set can be computed naively using a linear number of queries. However, when the matroid is given via a matrix representation, the standard approaches are too inefficient for our purpose. Naively, each independence query takes time, and thus the most straightforward implementation requires time. The standard Gaussian elimination approach takes time to compute the span. Using the fact that the linear representation of , the matroid obtained by contracting by , can be computed in time (see [33, Fact 4.1]), we can reduce the time complexity to . However, this complexity is still inefficient for obtaining a linear matroid intersection algorithm that outperforms the best known exact algorithm. To compute the span faster than time, one must avoid computing the product of an matrix and an matrix, which is a challenging task.
To overcome this difficulty, our fast span computation algorithm shares a similar spirit with the famous Freivalds’ algorithm [24] (see e.g., [42, Section 7.1]) for verifying matrix multiplication without actually performing the multiplication. In our approach, we sample a vector from the orthogonal complement of , which can be computed in time. Then, for each column vector , we check whether . It is obvious that if , then always holds. Furthermore, we can show that if , then with high probability. The total time required to compute all inner products for all is . Therefore, the total running time of our span computation algorithm is , which is efficient enough to enable the design of a linear matroid intersection algorithm that outperforms the best known exact algorithm.
Challenge for Weighted Linear Matroid Intersection.
For weighted linear matroid intersection, a naive combination of the adaptive sparsification framework of Quanrud [48] and our fast span computation algorithm yields a -approximation algorithm with time complexity . This additional factor arises because, in the weighted setting, we need to test membership in not for a single candidate set , but for different candidates. To improve the running time to , we carefully employ the fast Gram–Schmidt orthonormalization algorithm of van den Brand [57]. Concretely, we use van den Brand’s algorithm to compute, for each set in the support of the dual solution in the weighted setting, a basis for the corresponding subspace as well as a basis for its orthogonal complement.
When considering matrices over the real field , the idea of employing the fast Gram– Schmidt orthonormalization algorithm of van den Brand works correctly in conjunction with the techniques described above. However, over an arbitrary field , the argument may fail. This is because, when considering matrices over a field other than , it may happen that a linear subspace satisfies and ,444For example, consider over the binary field . Then, . In this case, neither nor holds. where is the orthogonal complement of (i.e., ). This issue matters in our setting because we need to maintain bases for subspaces corresponding to many different sets, and for this purpose, our algorithm relies on the property that and .
To design an algorithm applicable to any field, we replace the Euclidean inner product with the bilinear form , where we choose independently and uniformly at random from , and define a diagonal matrix such that . Here, we define the orthogonal complement with respect to the bilinear form as . For a fixed linear subspace , we can show that both and hold with high probability.
To determine whether , it suffices to check whether . Here, is a vector sampled from the orthogonal complement of with respect to the bilinear form . We make use of a fast orthogonalization algorithm with respect to the bilinear form , which is a modified version of the fast Gram–Schmidt orthonormalization algorithm of van den Brand [57].
1.2 Related Work
Faster Matroid Intersection under Oracle Models.
In addition to the linear matroid model, another standard model for handling matroids is the oracle model. In this model, an algorithm accesses a matroid through an oracle that answers queries about its structure. In recent years, the development of faster algorithms for matroid intersection under oracle models has attracted significant attention. Starting the work of Edmonds [21, 22], many fast algorithms in the oracle model have been studied [2, 55, 38, 16, 25, 51, 39, 13, 35, 45, 12, 9, 6, 56, 7, 48, 53, 8, 18]. There have also been many studies on fast matroid intersection algorithms for several important specific classes of matroids [27, 26, 16, 28, 29, 59, 32, 33, 35]. Recently, Blikstad–Mukhopadhyay–Nanongkai–Tu [7] proposed a remarkable new oracle model, called dynamic oracle, which unifies various results on fast matroid intersection algorithms for specific classes of matroids; see [7, Table 2].
Additional Related Work.
There are several studies on fast algebraic algorithms for problems that generalize linear matroid intersection, such as linear matroid parity [15], fractional linear matroid parity [46], and linear delta-matroid parity [37]. Matoya–Oki [41] derandomized Harvey’s [33] linear matroid intersection algorithm for a special case known as a Pfaffian pair. Linear matroid intersection has also been well studied in parallel and other computational models [43, 31, 30, 1]. The intersection of multiple linear matroids has also attracted interest in the parameterized algorithm community; see, for example, [17, Section 12.3] and [5, 40, 10, 23].
Concurrent Work.
Independent of our work, Dudeja–Grilnberger [18] presented a remarkable reduction in the independence oracle model that converts any -approximation algorithm for unweighted matroid intersection into a -approximation algorithm for weighted matroid intersection, while increasing the running time by only a factor of , where denotes the aspect ratio. Thus, one might hope that, when combined with our unweighted result in Theorem 1, their reduction could yield a weighted result comparable to Theorem 2. However, their reduction relies on several subroutines, including a procedure for greedily computing a common independent set, and it is unclear whether all of these subroutines can be implemented efficiently for linear matroids. Accordingly, it is unclear whether their reduction, combined with Theorem 1, can yield a result comparable to Theorem 2.
2 Preliminaries
2.1 Basic Notation
The set is denoted by . If is a set, then denotes the set of all its subsets of size .
Consider a matrix over a field . Let denote the number of nonzero entries in . Let denote the submatrix consisting of columns indexed by . Let denote the submatrix consisting of the rows indexed by and the columns indexed by . Let denote the matrix whose columns consist of those of , followed by those of . We write to denote the identity matrix. Let denote the linear span of the set of vectors .
2.2 Assumptions and Conventions
When is a finite field, we can assume that by the following well-known lemma. As a result of this assumption, the running time of our algorithm increases by a multiplicative factor of .
Lemma 3 (from [14, Lemma 2.1]).
Let be an matrix over a field with elements. We can construct a finite field with elements and an injective mapping so that the image of is a subfield of . Then, the matrix where satisfies the following property: a set of columns of is independent if and only if the corresponding set of columns of is independent. This preprocessing step takes time. Each field operation in can be performed using field operations in .
When is an infinite field, we assume the exact arithmetic model where each field operation is performed in one unit of time. In the algorithm, we also require the ability to sample a random element from an arbitrary subset of size in . This assumption is needed for the application of the Schwartz–Zippel Lemma.555The Schwartz–Zippel Lemma is used in Harvey’s exact algorithm for linear matroid intersection [33] and in the sketching technique of Cheung–Kwok–Lau [14], both of which are components of our algorithm.
Lemma 4 (Schwartz–Zippel Lemma [50]).
Let be a nonzero polynomial of total degree over a field . Let be a finite subset of and let be chosen independently and uniformly at random from . Then, the probability that is at most .
2.3 Matroid Preliminaries
For the basics of matroid theory, see, for example, the excellent textbooks of Oxley [47] or Schrijiver [49].
A pair of a finite set and a non-empty set family is called a matroid if the following properties are satisfied.
- (Downward closure property)
-
If and , then .
- (Augmentation property)
-
If and , then there exists such that .
A set is called independent if and dependent otherwise.
Matroid Rank and Span.
Motivated by linear algebra, matroids have associated notions of a rank function and a span function, defined as follows. For a matroid , the rank of is . In addition, for any , the rank of is . Moreover, for any , the span of is .
Matroid Intersection.
In the matroid intersection problem, we are given two matroids and , and the objective is to find a common independent set of maximum size.
Edmonds [21] proved the following min-max theorem, which is now well known.
Theorem 5 (Matroid intersection theorem [21]; see also [49, Theorem 41.1]).
Let , be matroids, with rank function and , respectively. Then,
Here, is called a dual solution to matroid intersection, where and minimize the right-hand side of the equation in Theorem 5.
In our linear matroid intersection algorithm, we use Harvey’s exact algorithm for linear matroid intersection [33] to compute primal and dual solutions to sparsified instances.
Theorem 6 (Harvey’s exact linear matroid intersection algorithm; see [33, Section 4.6]).
An exact solution to the maximum cardinality linear matroid intersection problem can be computed with high probability in time. Furthermore, an exact dual solution can also be computed with high probability in time.
2.4 Sketching Technique of Cheung–Kwok–Lau
In our algorithm, we use the sketching technique of Cheung–Kwok–Lau [14]. Using this technique, we can reduce the dimension of the input matrix from to .
Lemma 7 (Sketching technique of Cheung–Kwok–Lau [14]; from [14, Lemma 2.9]).
There is an algorithm that, given an matrix over a field , returns an matrix over a field in time, with , such that for any set of size at most , if the columns indexed by are linearly independent in , then the columns of indexed by are also linearly independent with probability at least .
In our fast span computation algorithm, we use the following lemma.
Lemma 8 (Fast computation of a basis of the orthogonal complement of the column space).
There is a randomized algorithm that, given an matrix over a field , finds a basis of the orthogonal complement of the column space of with high probability in time.
Lemma 8 can be easily derived from the following lemma, which was obtained using the sketching technique of Cheung–Kwok–Lau. Here, the null space of a matrix is the subspace of vectors such that .
Lemma 9 (from [14, Theorem 1.3(2)]; see also [14, Section 4.1.2]).
There is a randomized algorithm that, given an matrix over a field , finds a basis of the null space of with high probability in time.
Let denote the column space of an matrix , i.e., , where are the column vectors of . The orthogonal complement of , denoted by , is defined as . Now, if and only if for any . We have . Therefore, to find a basis of the orthogonal complement of the column space of , we simply compute a basis of the null space of using Lemma 9. Note that is an matrix. Hence, Lemma 8 follows from Lemma 9.
2.5 Fast Gram–Schmidt Orthonormalization
For our maximum weight linear matroid intersection algorithm for matrices over , we use the fast Gram–Schmidt orthonormalization algorithm of van den Brand [57].
Lemma 10 (Fast Gram–Schmidt orthonormalization; from van den Brand [57, Section 4.5]).
Given an matrix with over , where are column vectors of , there is an algorithm that repeatedly computes , where denotes the orthogonal projection of onto , and then normalizes if . The total running time of this process is .
To extend our algorithm to arbitrary fields, we modify a fast Gram–Schmidt orthonormalization algorithm of van den Brand into a fast orthogonalization algorithm with respect to the bilinear form ; see the full version [54] for details.
3 Fast Span Computation Algorithm
As part of our technical contribution, we develop a fast span computation algorithm, which is used as a subroutine in our maximum cardinality linear matroid intersection algorithm. The following lemma states its running time guarantee.
Lemma 11.
There is a randomized algorithm that, given an matrix over a field whose columns are the representation of elements of a matroid , and a set ,666Although in our application the size of is always , we state the lemma in a general form for potential broader applicability., computes with high probability in time.
We note that our algorithm is applicable over any field.
The core idea of our algorithm is very simple. In our algorithm, we first sample a vector from the orthogonal complement of , where denote the vectors corresponding to the columns of the input matrix . Then, we output the set as . See Algorithm 1 for the pseudocode of our algorithm.
Let . The orthogonal complement of , denoted by , is defined as . When considering matrices over a field other than , it may occur that does not satisfy or . Nevertheless, for our purpose it suffices that , which in fact holds over any field.777This can be verified by a simple argument in linear algebra. Now, fix any . For any , we have . Thus, , and hence . Moreover, the Rank–nullity theorem implies that and . Therefore, , which, together with , yields .
Note that we assume . Recall that, by Lemma 3, this assumption can be made without loss of generality.
Proof.
In our algorithm, we first compute a basis of the orthogonal complement of by applying Lemma 8 to . This step takes time.
Next, we choose independently and uniformly at random from a finite subset with , and compute
which takes time, since and each is an -dimensional vector.
We claim that the value of satisfies the following two properties. Here, denote the vectors corresponding to the columns of the matrix .
-
If , then we have for every possible choice of , since lies in the orthogonal complement of .
-
If , then we have with probability at least . This can be shown as follows. Consider the multivariate polynomial
Here, to show that is a nonzero polynomial, we prove the following claim.888Over the real number field , the claim is immediate. However, over an arbitrary field , one cannot in general rely on or , so some care is required. For completeness, we give a careful proof, which uses only the identity . Recall that we are assuming .
Claim 12.
There exists some such that .
Proof of Claim 12.
Let . Here, we have . Suppose, for the sake of contradiction, that for all , where form a basis of . Then, is orthogonal to every vector in , which implies that , contradicting the assumption . Therefore, there exists some such that , which completes the proof. By Claim 12, is a nonzero polynomial of total degree . Since are chosen independently and uniformly at random from a finite subset , by the Schwartz–Zippel Lemma (Lemma 4), the probability that
is at most .
Then, we only need to check, for each , whether . The total time required to compute all inner products for all is . Finally, we output the set as .
There are at most operations that check whether , and each fails with probability at most . Therefore, the probability that at least one of them fails is at most , where we recall that .
In summary, we can compute with high probability in time.
4 Adaptive Sparsification Framework of Quanrud
In this section, we describe the adaptive sparsification framework of Quanrud [48], which was developed to obtain a fast -approximation algorithm for matroid intersection in the independence oracle model. Our linear matroid intersection algorithm builds upon this framework.
Quanrud’s framework employs a multiplicative weight update method, inspired by Assadi’s semi-streaming maximum matching algorithm [4]. In this framework, we maintain a weight for each element and repeat the following iterations: In each iteration, we sample elements, in proportion to their weight, compute primal and dual solutions over the sampled elements, and then update the weights of elements. In Quanrud’s paper, is set to , where denote the maximum size of a common independent set.999When we apply Quanrud’s framework to linear matroid intersection, we set instead of .
4.1 Maximum Cardinality Matroid Intersection
In this subsection, we describe Quanrud’s framework for maximum cardinality matroid intersection. The pseudocode is shown in Algorithm 2.
We maintain a weight function over the elements, where all elements initially have equal weights. We then repeat the following process for iterations: In each iteration, we first sample elements in proportion to . Then, we compute a maximum common independent set and a dual solution for the subproblem over .101010In Quanrud’s paper, a -approximate solution is computed in Line 4 of Algorithm 2. However, when applying Quanrud’s framework to linear matroid intersection, we compute an exact solution. It is clear that this does not affect the correctness. Note that . We extend these sets to their spans, setting and . Finally, we update the weights by setting for all elements . After iterations, we output with the largest cardinality among all iterations.
4.2 Maximum Weight Matroid Intersection
In this subsection, we describe Quanrud’s framework for maximum weight matroid intersection. The high-level approach in the weighted case is similar to that in the unweighted case, but requires additional technical sophistication. The pseudocode is shown in Algorithm 3.
Here, we refer to a solution , where , of the following LP as a dual solution. This LP is the dual of the LP relaxation of the weighted matroid intersection problem.
| (1) | ||||
Quanrud defines to be compact if the supports of and satisfy the following conditions:
Here, and are two sequences of elements.
As in the unweighted case, we maintain a weight function with initially equal weights, and repeat the following process for iterations: In each iteration, we first sample elements in proportion to . Then, we compute a -approximate maximum-weight common independent set and a compact -approximate dual solution for the subproblem over . We then construct from by setting
We set (resp. ) for any not of the form with (resp. with ). Here, = denote rounding up to the nearest power of . Since is compact, there exists a sequence such that every set in the support of has the form . Then, every set in the support of has the form . Symmetrically, the same property holds for , with a different sequence of elements determined by . Thus, is also compact. Finally, we update the weights by setting for all elements such that holds. After iterations, we output that maximizes over all iterations.
When applying Quanrud’s framework to maximum weight linear matroid intersection, we use the -approximate weighted linear matroid intersection algorithm by Huang–Kakimura–Kamiyama [35] to implement Line 4 of Algorithm 3. To implement Line 6, we combine our fast span computation algorithm presented in Section 3 with the fast Gram–Schmidt orthonormalization algorithm of van den Brand [57] (Lemma 10). See Section 5.2 for details.
5 Linear Matroid Intersection Algorithms
In this section, we prove Theorems 1 and 2 by combining the sparsification framework of Quanrud [48] (see Section 4 for details) with our fast span computation algorithm presented in Section 3.
When we apply Quanrud’s framework to linear matroid intersection, we set instead of . In the proofs of Theorems 1 and 2, we apply Quanrud’s framework to matrices that have been suitably preprocessed using the sketching technique of Cheung–Kwok–Lau [14] (Lemma 7). For the preprocessed matrices, the maximum size of a common independent set is within a constant factor of the number of rows, which justifies setting .111111Actually, sampling elements, instead of , in each iteration does not affect the correctness of Quanrud’s framework. This is because the approximation guarantee relies on Lemma 9 (and Lemma 13 in the weighted case) in Quanrud’s paper [48], which states that sampling elements is sufficient.
5.1 Maximum Cardinality Linear Matroid Intersection
We first show the following theorem, and then prove Theorem 1 using this theorem.
Theorem 13.
For any , a -approximate solution to the maximum cardinality linear matroid intersection problem can be computed with high probability in time.
Proof.
We show that, when the matroids are given by matrix representations, Quanrud’s maximum cardinality matroid intersection algorithm (Algorithm 2) can be implemented in time. By using Harvey’s exact algorithm for linear matroid intersection (Theorem 6), Line 4 can be implemented in time, since the number of elements in the sparsified set is . By applying Lemma 11, Line 5 can be implemented in time. Furthermore, Lines 3 and 6 can be implemented in time. Since the number of iterations of the for loop is , the total running time is the desired bound of , which completes the proof.
Proof of Theorem 1.
We assume without loss of generality that .
Given an integer , we consider the task of finding a set of size at least such that the columns indexed by are linearly independent in both and . Using Lemma 7 with , we compress the input matrices and into matrices and , in and time, respectively. We have and . Furthermore, for any set of size at most , if the columns indexed by are linearly independent in both and , then the columns indexed by are also linearly independent in both and with probability at least . Consequently, the maximum size of a common independent set for and is with high probability. Then, we apply the algorithm in Theorem 13 to find a -approximate solution to the linear matroid intersection problem on and , which runs in time.
To find a solution of size at least , we set and apply the above algorithm until there is no solution of size . The total running time of this algorithm is , which completes the proof.
5.2 Maximum Weight Linear Matroid Intersection
We first show the following theorem, and then prove Theorem 2 using this theorem.
Theorem 14.
For any , a -approximate solution to the maximum weight linear matroid intersection problem can be computed with high probability in time.
In Quanrud’s framework, we need to compute a -approximate maximum-weight common independent set and a compact -approximate dual solution for the sparsified instances. When implementing Quanrud’s framework for linear matroids, we use the following lemma to compute compact primal-dual solutions. This lemma is obtained by combining the -approximation algorithm for the weighted matroid intersection by Huang–Kakimura–Kamiyama [35] with the argument of Quanrud’s paper [48]. See the full version [54] for the proof of Lemma 15.
Lemma 15.
Given two matrix and over a field , and a weight function , there is an algorithm that computes a -approximate maximum-weight common independent set , along with a compact -approximate dual solution , with high probability in time.
To efficiently implement Line 6 of Algorithm 3, we present the following lemma. This lemma is obtained by combining our fast span computation algorithm described in Section 3 with the fast Gram–Schmidt orthonormalization algorithm of van den Brand (Lemma 10).
Lemma 16.
Let be an matrix over a field , and let be a set of indices. Here, denote the vectors corresponding to the columns of . Then, there is an algorithm that answers the following query: given and , determine whether with high probability in time. This algorithm requires time for preprocessing.
Here, we provide a proof only for matrices over . The extension to matrices over an arbitrary field is deferred to the full version [54]. To make the algorithm applicable over arbitrary fields, the key modification is to replace the Euclidean inner product with the bilinear form (see the full version [54] for details).
Proof of Lemma 16 for matrices over .
We first describe the preprocessing algorithm. First, we apply the fast Gram–Schmidt orthonormalization algorithm of van den Brand [57] (Lemma 10) to the sequence of vectors , which takes time. Here, is the standard basis vector (i.e., the vector with in the -th coordinate and elsewhere). Then, we obtain a vector sequence . We note that this vector sequence includes the zero vector . We then choose independently and uniformly at random from a finite subset of size (e.g., ). Next, for each , we compute a vector . This can be implemented in time by computing the sums in reverse order. We note that lies in the orthogonal complement of .
Next, we describe how to answer the query. It suffices to check whether , which can be done in time. As in the proof of Lemma 11, if holds, then always holds, otherwise holds with probability at least . Therefore, checking whether suffices to decide whether , which completes the proof.
We now present the proof of Theorem 14.
Proof of Theorem 14.
We show that, when the matroids are given by matrix representations, Quanrud’s maximum weight matroid intersection algorithm (Algorithm 3) can be implemented in time. By Lemma 15, Line 4 can be implemented in time, since the number of elements in the sparsified set is .
In our algorithm, we do not explicitly compute computed in Line 5. Here, computed in Line 5 is compact, and thus we can write
| (2) | ||||
for two sequences of elements and . Here, let (resp. ) denote the matroid represented by the matrix (resp. ). The elements and belong to the sparsified set, and are computed in Line 4. To implement Line 5, we simply compute the value of and for each , which takes time. Note that we do not explicitly compute or .
It remains to bound the running time of Line 6.
In this line, for each , we need to check whether .
Here, (resp. ) denote the vectors corresponding to the columns of (resp. ).
As preprocessing, for all , we compute
which takes time. Furthermore, we apply the preprocessing algorithm of Lemma 16 to and , which takes time; we do the same for and .
We now describe how to check whether holds for each in time. We can binary search for the first index (resp. ) such that (resp. ). Note that, for all , we have . By Lemma 16, this binary search process takes time. Here, we have , so this value can be computed in time. Thus, for each , we can check whether in time. Therefore, Line 6 can be implemented in time, which completes the proof.
Proof of Theorem 2.
As a first step, we compute a -approximate solution to the maximum cardinality linear matroid intersection for the input matrices and , using Theorem 1, in time. We then apply Lemma 7 with . Note that and . The lemma compresses the input matrices and into matrices and , in and time, respectively. We have and . Furthermore, for any set of size at most , if the columns indexed by are linearly independent in both and , then the columns indexed by are also linearly independent in both and with probability at least . We then apply the algorithm in Theorem 14 to the compressed matrices and to find a -approximate solution to the maximum weight linear matroid intersection problem. This algorithm runs in time.
References
- [1] Aryan Agarwala, Yaroslav Alekseev, and Antoine Vinciguerra. Linear matroid intersection is in catalytic logspace. In Proceedings of the 17th Innovations in Theoretical Computer Science Conference (ITCS 2026), volume 362, pages 3:1–3:23, 2026. doi:10.4230/LIPIcs.ITCS.2026.3.
- [2] Martin Aigner and Thomas A Dowling. Matching theory for combinatorial geometries. Transactions of the American Mathematical Society, 158(1):231–245, 1971. doi:10.1090/S0002-9947-1971-0286689-5.
- [3] Josh Alman, Ran Duan, Virginia Vassilevska Williams, Yinzhan Xu, Zixuan Xu, and Renfei Zhou. More asymmetry yields faster matrix multiplication. In Proceedings of the 36th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2025), pages 2005–2039. SIAM, 2025. doi:10.1137/1.9781611978322.63.
- [4] Sepehr Assadi. A simple -approximation semi-streaming algorithm for maximum (weighted) matching. TheoretiCS, 4, 2025. Preliminary version in SOSA 2024. doi:10.46298/theoretics.25.16.
- [5] Alexander I Barvinok. New algorithms for linear -matroid intersection and matroid -parity problems. Mathematical Programming, 69(1):449–470, 1995. doi:10.1007/BF01585571.
- [6] 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. doi:10.4230/LIPIcs.ICALP.2021.31.
- [7] 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. doi:10.1145/3564246.3585219.
- [8] 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. doi:10.1137/1.9781611978315.18.
- [9] 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. doi:10.1145/3406325.3451092.
- [10] Cornelius Brand and Kevin Pratt. Parameterized applications of symbolic differentiation of (totally) multilinear polynomials. In Proceedings of the 48th International Colloquium on Automata, Languages, and Programming (ICALP 2021), pages 38:1–38:19, 2021. doi:10.4230/LIPIcs.ICALP.2021.38.
- [11] James R Bunch and John E Hopcroft. Triangular factorization and inversion by fast matrix multiplication. Mathematics of Computation, 28(125):231–236, 1974.
- [12] 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. doi:10.1109/FOCS.2019.00072.
- [13] 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. doi:10.1137/1.9781611974331.ch33.
- [14] Ho Yee Cheung, Tsz Chiu Kwok, and Lap Chi Lau. Fast matrix rank algorithms and applications. Journal of the ACM (JACM), 60(5):1–25, 2013. Preliminary version in STOC 2012. doi:10.1145/2528404.
- [15] 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. Preliminary version in SODA 2011. doi:10.1145/2601066.
- [16] William H Cunningham. Improved bounds for matroid partition and intersection algorithms. SIAM Journal on Computing, 15(4):948–957, 1986. doi:10.1137/0215066.
- [17] Marek Cygan, Fedor V Fomin, Łukasz Kowalik, Daniel Lokshtanov, Dániel Marx, Marcin Pilipczuk, Michał Pilipczuk, and Saket Saurabh. Parameterized algorithms. Springer, 2015. doi:10.1007/978-3-319-21275-3.
- [18] Aditi Dudeja and Mara Grilnberger. A weighted-to-unweighted reduction for matroid intersection. arXiv preprint arXiv:2602.15702, 2026. doi:10.48550/arXiv.2602.15702.
- [19] Jean-Guillaume Dumas, Clément Pernet, and Ziad Sultan. Simultaneous computation of the row and column rank profiles. In Proceedings of the 38th International Symposium on Symbolic and Algebraic Computation (ISSAC 2013), pages 181–188, 2013. doi:10.1145/2465506.2465517.
- [20] Jean-Guillaume Dumas, Clément Pernet, and Ziad Sultan. Fast computation of the rank profile matrix and the generalized bruhat decomposition. Journal of Symbolic Computation, 83:187–210, 2017. doi:10.1016/j.jsc.2016.11.011.
- [21] Jack Edmonds. Submodular functions, matroids, and certain polyhedra. In Combinatorial Structures and Their Applications, pages 69–87, 1970.
- [22] Jack Edmonds. Matroid intersection. In Annals of Discrete Mathematics, volume 4, pages 39–49. Elsevier, 1979. doi:10.1016/S0167-5060(08)70817-3.
- [23] Eduard Eiben, Tomohiro Koana, and Magnus Wahlström. Determinantal sieving. TheoretiCS, 4, 2025. Preliminary version in SODA 2024. doi:10.46298/theoretics.25.21.
- [24] Rūsiņš Freivalds. Fast probabilistic algorithms. In Proceedings of the 8th International Symposium on Mathematical Foundations of Computer Science (MFCS 1979), pages 57–69. Springer, 1979.
- [25] 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.
- [26] 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. doi:10.1007/BFb0015746.
- [27] 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. doi:10.1109/SFCS.1979.14.
- [28] 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. doi:10.1109/SFCS.1989.63463.
- [29] 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. doi:10.1006/jcss.1996.0054.
- [30] Rohit Gurjar, Taihei Oki, and Roshan Raj. Fractional linear matroid matching is in Quasi-NC. In Proceedings of the 32nd Annual European Symposium on Algorithms (ESA 2024), volume 308, pages 63:1–63:14, 2024. doi:10.4230/LIPIcs.ESA.2024.63.
- [31] Rohit Gurjar and Thomas Thierauf. Linear matroid intersection is in Quasi-NC. computational complexity, 29(2):9, 2020. Preliminary version in STOC 2017. doi:10.1007/s00037-020-00200-z.
- [32] 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. URL: http://dl.acm.org/citation.cfm?id=1283383.1283430.
- [33] Nicholas JA Harvey. Algebraic algorithms for matching and matroid problems. SIAM Journal on Computing, 39(2):679–702, 2009. Preliminary version in FOCS 2006. doi:10.1137/070684008.
- [34] Nicholas James Alexander Harvey. Matchings, matroids and submodular functions. PhD thesis, Massachusetts Institute of Technology, 2008.
- [35] Chien-Chung Huang, Naonori Kakimura, and Naoyuki Kamiyama. Exact and approximation algorithms for weighted matroid intersection. Mathematical Programming, 177(1-2):85–112, 2019. Preliminary version in SODA 2016. doi:10.1007/s10107-018-1260-x.
- [36] Claude-Pierre Jeannerod, Clément Pernet, and Arne Storjohann. Rank-profile revealing gaussian elimination and the cup matrix decomposition. Journal of Symbolic Computation, 56:46–68, 2013. doi:10.1016/j.jsc.2013.04.004.
- [37] Tomohiro Koana and Magnus Wahlström. Faster algorithms on linear delta-matroids. In Proceedings of 42nd International Symposium on Theoretical Aspects of Computer Science (STACS 2025), volume 327, pages 62:1–62:19, 2025. doi:10.4230/LIPIcs.STACS.2025.62.
- [38] Eugene L Lawler. Matroid intersection algorithms. Mathematical Programming, 9(1):31–56, 1975. doi:10.1007/BF01681329.
- [39] 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. doi:10.1109/FOCS.2015.68.
- [40] Dániel Marx. A parameterized view on matroid optimization problems. Theoretical Computer Science, 410(44):4471–4479, 2009. Preliminary version in ICALP 2006. doi:10.1016/j.tcs.2009.07.027.
- [41] Kazuki Matoya and Taihei Oki. Pfaffian pairs and parities: Counting on linear matroid intersection and parity problems. SIAM Journal on Discrete Mathematics, 36(3):2121–2158, 2022. Preliminary version in IPCO 2021. doi:10.1137/21m1421751.
- [42] Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge University Press, 1995. doi:10.1017/cbo9780511814075.
- [43] Harihar Narayanan, Huzur Saran, and Vijay V Vazirani. Randomized parallel algorithms for matroid union and intersection, with applications to arborescences and edge-disjoint spanning trees. SIAM Journal on Computing, 23(2):387–397, 1994. Preliminary version in SODA 1992. doi:10.1137/S0097539791195245.
- [44] Huy L Nguyen. Fast greedy for linear matroids. In Proceedings of the 30th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2019), pages 516–524. SIAM, 2019. doi:10.1137/1.9781611975482.32.
- [45] Huy L Nguyen. A note on Cunningham’s algorithm for matroid intersection. arXiv preprint arXiv:1904.04129, 2019. doi:10.48550/arXiv.1904.04129.
- [46] Taihei Oki and Tasuku Soma. Algebraic algorithms for fractional linear matroid parity via noncommutative rank. SIAM Journal on Computing, 54(1):134–162, 2025. Preliminary version in SODA 2023. doi:10.1137/22m1537096.
- [47] James G Oxley. Matroid theory, volume 3. Oxford University Press, USA, 2006.
- [48] 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. doi:10.4230/LIPIcs.ICALP.2024.118.
- [49] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer, 2003.
- [50] Jacob T Schwartz. Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM (JACM), 27(4):701–717, 1980. doi:10.1145/322217.322225.
- [51] Maiko Shigeno and Satoru Iwata. A dual approximation approach to weighted matroid intersection. Operations Research Letters, 18(3):153–156, 1995. doi:10.1016/0167-6377(95)00047-X.
- [52] Arne Storjohann and Shiyun Yang. Linear independence oracles and applications to rectangular and low rank linear systems. In Proceedings of the 39th International Symposium on Symbolic and Algebraic Computation (ISSAC 2014), pages 381–388, 2014. doi:10.1145/2608628.2608673.
- [53] 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. doi:10.4230/LIPIcs.WADS.2025.50.
- [54] Tatsuya Terao. Faster approximate linear matroid intersection. arXiv preprint arXiv:2604.11725, 2026. doi:10.48550/arXiv.2604.11725.
- [55] Nobuaki Tomizawa and Masao Iri. An algorithm for determining the rank of a triple matrix product AXB with application to the problem of discerning the existence of the unique solution in a network. Electronics and Communications in Japan (Scripta Electronica Japonica II), 57(11):50–57, 1974.
- [56] 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. doi:10.4230/LIPIcs.ISAAC.2022.63.
- [57] Jan van den Brand. Unifying matrix data structures: Simplifying and speeding up iterative algorithms. In Proceedings of Symposium on Simplicity in Algorithms (SOSA 2021), pages 1–13. SIAM, 2021. doi:10.1137/1.9781611976496.1.
- [58] Jan van den Brand, Danupon Nanongkai, and Thatchaphol Saranurak. Dynamic matrix inverse: Improved algorithms and matching conditional lower bounds. In Proceedings of the 60th Annual Symposium on Foundations of Computer Science (FOCS 2019), pages 456–480. IEEE, 2019. doi:10.1109/FOCS.2019.00036.
- [59] 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. doi:10.1007/3-540-58325-4_231.
