Manuscript Offprint
arXiv:2610.32798Proximity Theorem and FPT Algorithm for Minimum Group-labeled Matroid Bases
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Let be a matroid, let be a labeling of its elements by an abelian group, and let be finite. A base is -avoiding if the label sum of its elements is not in . We prove that, for arbitrary costs, a min-cost -avoiding base can be obtained from any min-cost base using at most exchanges. This resolves the weighted proximity conjecture by Hörsch, Imolay, Mizutani, Oki, and Schwarz. Our main technical tool is to replace the assumption of Schrijver–Seymour Conjecture in Liu and Xu's earlier work with Kemperman–Scherk Theorem. The proximity theorem combined with approaches in earlier work gives an FPT algorithm that finds a min-cost -avoiding base parameterized by . We additionally give an FPT algorithm parameterized by , answering a question of Hörsch et al.
1 Introduction
Let be a finite matroid on ground set , let be an abelian (additive) group, let label the elements, and write for a subset . For a finite set , a base is -avoiding if . Constraining encodes parity, congruency, exact-target, and forbidden-value side constraints, which have been studied for matchings [PY82, MVV87], arborescences [BP87], submodular function minimization [GR95, NSZ19], minimum cuts [NZ20], paths in group-labeled graphs [CGG+06], and matroid bases [Rie91, CGM92, DAKS24, HIM+24, GMO+25]. We study the min-cost -avoiding bases: additionally given a cost function over the ground set , we are interested in finding a min-cost -avoiding base, where the cost of a base is . Here, a min-cost -avoiding base refers to one with the smallest cost among all -avoiding bases; it does not have to have the smallest cost among all bases. The distance between bases and is , which equals the number of basis exchanges needed to reach one from the other. We ask how far an unconstrained optimum is from a constrained one: given an arbitrary min-cost base, how far is the closest base that is of minimum cost among the -avoiding bases?
The unweighted version with costs has received more attention and substantial progress has been made recently. Namely, given an arbitrary base, how far is the closest -avoiding base, provided that an -avoiding base exists? For , a base is a -base if . Liu and Xu [LX24] conjectured that, for every finite abelian group , every attainable target , and every prescribed base, the closest -base to it has distance at most . This is a special case of the -avoiding setting by putting . Liu and Xu proved the conjecture for cyclic groups whose size is a prime-power, as well as for groups whose size is a product of two primes. More interestingly, they reduce the conjecture to an old conjecture of Schrijver and Seymour [SS90] on counting labels of bases. Hörsch, Imolay, Mizutani, Oki, and Schwarz [HIM 24]
*Carnegie Mellon University, Pittsburgh, USA. E-mail: siyueliu@andrew.cmu.edu.
Institute for Chemical Reaction Design and Discovery (ICReDD), Hokkaido University, Sapporo, Hokkaido, Japan. D3 Center, The University of Osaka, Osaka, Japan. Center for Advanced Intelligence Project, RIKEN, Tokyo, Japan. E-mail: oki@icredd.hokudai.ac.jp.
University of Electronic Science and Technology of China, Chengdu, China. E-mail: the.chao.xu@gmail.com.
proposed the proximity conjecture for general -avoiding bases, which states that every base has an -avoiding base within distance , provided that an -avoiding base exists. For , the conjecture essentially follows from Rieder's characterization of base lattices [Rie91]. Hörsch et al. [HIM24] proved the conjecture when , when the group is ordered, and for strongly base-orderable matroids. Garamvölgyi, Mizutani, Oki, Schwarz, and Yamaguchi [GMO25] proved the conjecture when , via a computer-assisted case analysis, and for sparse paving matroids. Most recently, Chen [Che26] proved the conjecture for representable matroids, and derived a sharp proximity bound for the more general setting where multiple labelings are given, which was introduced in [GMO25]. Bhardwaj [Bha26] independently gave an alternative proof of the proximity conjecture for representable matroids.
Liu and Xu [LX24] also proposed the weighted generalization of their conjecture with the same proximity bound, and Hörsch et al. [HIM 24] further generalized it to the F-avoiding setting, which is known as the weighted proximity conjecture. Namely, every min-cost base has a min-cost F-avoiding base within distance , provided that an F-avoiding base exists. Very little progress was made towards the weighted proximity conjecture compared with the unweighted one. Liu and Xu proved in the special case of a stronger bound , where is the Davenport constant, for strongly base-orderable matroids, and for groups of size at most four. Hörsch et al. [HIM 24] proved the weighted conjecture for the special case where .
In this paper, we prove the weighted proximity conjecture in full, formally stated as follows.
Theorem 1 (Proximity). Let be a matroid, be an abelian group, be a finite subset, be a labeling, and be a cost function. For every min-cost base , there exists a min-cost -avoiding base such that , provided that an -avoiding base exists.
The bound is sharp: in the rank-r partition matroid with partition classes and capacity 1 for each part, labels and over , zero cost, and with , every -avoiding base contains at least elements , so the base has distance at least from every min-cost -avoiding base. For a finite group and an attainable , taking makes the -avoiding bases exactly the -bases, so the conjecture of Liu and Xu follows. For the unweighted -base case and groups not covered by [LX24], the best previously known bounds were for cyclic and in general, derived in [GMO25] from the sensitivity theorem of Eisenbrand, Rohwedder, and Wegrzycki [ERW24].
The proximity theorem alone yields an algorithm finding a min-cost -avoiding base with independence-oracle queries, where , by enumerating the bases within distance of a min-cost base, and Hörsch et al. asked whether finding an -avoiding base is fixed-parameter tractable in [HIM24]. We answer the question affirmatively even for the weighted case: an -avoiding base can be found in time, and a min-cost -avoiding base can be found in time, where and denote the running times of unweighted and weighted matroid intersection, respectively, for two matroids over elements. In this sense, fixed-parameter tractability is best possible: no algorithm, even randomized, finds an -avoiding base in time polynomial in and . Indeed, labeling each element by its integer weight and taking , where is the total weight, encodes deciding whether a base of weight exactly exists, which requires time superpolynomial in and in the independence-oracle model [DAKS24, Theorem 3].
The analogous proximity conjecture for several simultaneous labelings, posed in together with a lower bound of for labelings, remains open for arbitrary matroids.
Theorem 2 (Schrijver–Seymour [SS90]). Let be a matroid with rank function and let for some prime number . Then,
where for .
For general abelian groups, the same statement does not hold. Instead, Schrijver and Seymour proposed the following conjecture for general groups that generalizes Theorem 2. For a subset , the stabilizer of is defined by . It is not hard to see that is a subgroup of .
Conjecture 3 (Schrijver–Seymour [SS90], see also [DGM09]). Let be a matroid with rank function and let for some finite abelian group . Let be the stabilizer of . Then,
where for .
To the best of our knowledge, Conjecture 3 is solved when is a product of two primes or for a prime and a positive integer [DGM09]. Liu and Xu [LX24] prove that Conjecture 3 implies the unweighted version of Theorem 1 in the special case where : for every base , there exists a -base such that , if one exists. Thus, for finite groups and , one possible route to the unweighted version of Theorem 1 is via the Schrijver–Seymour conjecture.
We bypass the difficulty by proving an analogue of Theorem 2 for general groups, under the additional assumption that there is a base of such that its label is unique. The main tool is the Kemperman–Scherk theorem from additive number theory (Theorem 8) [Sch55, Kem56, Kem60]. In fact, we prove the following weighted generalization of this analogue, which bounds from below the number of distinct colors of the bases of small cost, in terms of the rank sum of color classes filtered by the cost of the smallest element of . For a matroid , a labeling function , a cost function , and , let is a base of with .
Theorem 4. Let be a matroid with rank function , be an abelian group, be a labeling, and be a cost function. Suppose that is the unique min-cost -base of . Then,
where .
To see how this counting approach implies the weighted proximity Theorem 1, we follow ideas of [LX24]. Pick a min-cost base A and a min-cost F-avoiding base B of M such that is minimized. We consider the matroid obtained from deleting elements outside and contracting elements inside . The matroid is a block matroid, which means its ground set can be partitioned into two bases. The crucial observation is that is the unique min-cost -avoiding base of for the shifted label set . Moreover, is a min-cost base of . A refined form of Theorem 4 (Theorem 14) in block matroids then shows that the bases of of cost at most attain at least distinct labels. On the other hand, there should be at most distinct labels, since every base of of cost at most other than itself has label in by the uniqueness. Hence .
FPT algorithms. For a subset , its signature is the vector , where . The label of is determined by its signature as . Therefore, the search for -bases can be reduced to the search for signatures that give the target label . Moreover, for subsets , one has . In particular, if bases of satisfy , then . Therefore, the closeness of bases from the proximity theorem implies the closeness of signatures. Assuming the proximity theorem, Liu and Xu [LX24] use these ideas to obtain an FPT algorithm by searching for correct signatures of short distances. Their approach easily extends to finding min-cost -avoiding bases.
Given a finite , a positive integer , and a base , we call a vector a -close valid signature for if the following conditions hold:
Here, denotes the rank of . When is finite, assuming Theorem 1 with proximity bound in place of gives an -time algorithm. First, find a min-cost base by the greedy algorithm. By proximity, it suffices to consider bases with , and hence their -close valid signatures. For each valid signature , the requirement can be encoded by a partition matroid whose parts are and whose capacities are . A min-cost base with signature can therefore be found by weighted matroid intersection. There are at most valid signatures, giving the claimed running time. Applying the bound from Theorem 1 yields an -time algorithm, which is FPT parameterized by , but not by .
Our idea is to construct a finite set that contains the labels of all elements in for a min-cost base and some min-cost -avoiding base , with bounded by a function of . This guarantees for all , so the number of relevant valid signatures depends on and , rather than on .
In the unweighted case, let . If some component of contains elements with , a circuit exchange yields bases and whose labels differ by an element outside , so at least one is -avoiding. Otherwise, shifting the labels in each component by the label of a fixed reference element, and translating accordingly, gives an equivalent instance whose element labels all lie in . Since , taking and in the signature-enumeration subroutine gives an FPT algorithm (Theorem 16).
The weighted case requires a different construction of because an -avoiding base obtained by a single exchange from a min-cost base need not be min-cost. After perturbing the cost function so that all relevant optima are unique, the algorithm recursively finds a min-cost -avoiding base for each , whenever one exists. It then constructs , whose size is by Theorem 1. For every , the algorithm constructs a label set consisting of all labels reachable from by at most derivation steps, each of which adds an element of or its inverse. Every such set has size . For each such , we apply signature enumeration with . Using Schrijver's exchange lemma for linking systems [Sch79], we show that one of these sets contains the labels of all elements in for the min-cost -avoiding base , thus yielding an FPT algorithm (Theorem 17).
1.2 Organization
The rest of this paper is organized as follows. Section 2 provides preliminaries. Section 3 proves Theorem 1. Finally, Section 4 presents the FPT algorithms for finding F-avoiding bases.
2 Preliminaries
Let be an abelian group written additively, let be a labeling function, and let be a cost function. For , write and . For , write for the set of labels occurring on , in contrast to the sum .
We use standard matroid terminology, following [Oxl11]. A matroid consists of a pair formed by a finite ground set and a set family over such that , implies , and for with , there exists such that . A subset is called independent if and dependent otherwise. A base is a maximal independent set. Every base has the same cardinality, called the rank of . A matroid is a block matroid if its ground set can be partitioned into two bases. For bases and , write . We will need the following perfect matching lemma.
Lemma 5 (perfect matching [Bru69]). For any bases A and B, there is a bijection such that is a base for every .
Lemma 6 (multiple exchange [Gre73]). For every bases A, B and every subset , there exists a subset such that both and are bases.
A circuit is a minimal dependent set. For a base of and , the fundamental circuit of wrt is the unique circuit in which necessarily contains . The rank function of a matroid is defined by for . The closure of , denoted by , is the unique maximal set with . We use the following lemma on a base and a circuit.
Lemma 7. Let be a matroid, be a base, and be a circuit. Then, for every , there exists such that is a base.
Proof. Suppose not. Since is independent and no element in can be added to while maintaining independence, we have . This implies
which contradicts the independence of B.
For a matroid and , the restriction to , the deletion of , and the contraction of are matroids defined by , and , respectively, where is any base of . The direct sum of matroids and with is . A (connected) component of is an equivalence class under the equivalence relation on defined by if either or has a circuit containing . If are the components of , then ; in particular, every base of is the disjoint union of bases of .
Let be an arbitrary base of , the exchangeability graph is the bipartite graph where the vertex bipartition is , and each and are adjacent if is a base. The connected components of for an arbitrary base are precisely the components of [Kro77].
For a matroid , a labeling function , and a finite set , a base of is -avoiding if . Given a weight function in addition, a min-cost -avoiding base is one of minimum cost among all -avoiding bases. Let
for .
We use the following theorem from [Sch55, Kem56, Kem60] (see also [Lev05]).
Theorem 8 (Kemperman–Scherk [Sch55, Kem56, Kem60]). Let be an abelian group, be a group element, and be finite nonempty subsets. If has a unique representation as with and , then , where .
3 Proximity Theorem
This section is devoted to proving Theorem 1. Throughout this section, let be a matroid with rank function , let be a labeling function, let be a cost function, and suppose that is the unique min-cost -base. Abusing notation, we also write for the rank of itself. The case is immediate, so assume throughout this section. For , denote by .
3.1 Counting colors in general matroids
In this subsection, we prove Theorem 4. Denote by the unique min-cost -base throughout this subsection.
Order the elements in as so that . For , let , , , and for . For , let and define
Finally, set for and . In particular, and , and then for all . Below we show that such a representation of is unique.
Lemma 9. For every , the element has a unique representation as with and .
Proof. Pick an arbitrary and such that . By the definition of , there exists a base of with and , which implies is a base of . By the definition of , we have . Therefore, since otherwise which is a contradiction. Then, there exists such that is a base of , which means is a base of . Moreover,
which is the same as the label of B by the definition of g. Further,
Therefore, by the uniqueness of , we have , which implies and . In particular, and . This completes the proof that the representation of is unique as .
We are ready to prove Theorem 4, which is the main theorem of this section, restated below for readability.
Theorem 4. Let be a matroid with rank function , be an abelian group, be a labeling, and be a cost function. Suppose that is the unique min-cost -base of . Then,
where .
Proof. For every , , and , there is a base of with and , and there is such that is a base of . Moreover, and , so . Since has a unique representation in by Lemma 9, Theorem 8 gives
Denote by the rank function of matroid . Next, we claim for and that
For , the inequality gives , and this inclusion also holds for by the definition . Hence . Since ,
This implies (3) by the definition of . Therefore,
Here, the first inequality follows from (2). The second inequality follows from (3). The last equality follows from the facts that , , and has rank zero.
We state the following simple form of the unweighted corollary.
Corollary 10. Let be a matroid with rank function , be an abelian group, be a labeling, and be a cost function. Suppose that is the -base of . Then,
3.2 Counting colors in block matroids
In this subsection, we prove a refined version of Theorem 4, namely Theorem 14. Throughout this subsection, assume that is a block matroid of rank , where can be partitioned into bases such that is a min-cost base, and is the unique min-cost -base. We use the same notations as in Section 3.1 for , , , , , and .
We start with several lemmas.
Lemma 11. For every circuit C of M, we have .
Proof. Suppose not. Then, every max-cost element of is in . Pick an arbitrary max-cost element . Since is a base of , it follows from Lemma 7 that there exists such that is a base. However, , and thus , which is a contradiction to the minimality of .
Lemma 12. is independent for every .
Proof. Suppose the statement is false for some . Then, there exists a circuit . By Lemma 11, has a max-cost element . It follows from Lemma 7 that there exists such that is a base. Moreover, since , and have the same label , and thus . Further, as is a max-cost element in circuit . This is a contradiction to the uniqueness of .
Lemma 13. For every and , if and only if .
Proof. The reverse implication is immediate because . For the forward implication, suppose that . If , then , and the conclusion is immediate. Otherwise, there is a circuit of with . We claim that every element of has cost at most . Suppose not; then the maximum cost of an element in is greater than . Lift to a circuit of . Since for every , the max-cost element of circuit belongs to . Then, it follows from Lemma 11 that one can choose a max-cost element of so that . By Lemma 7, there is such that is a base. Since , this base has label and cost at most , contradicting the uniqueness of . Thus , and hence .
In a block matroid under our assumptions, we can prove a refined version of Theorem 4.
Theorem 14. Let be a rank-r matroid where , be an abelian group, be a labeling, and be a cost function. Suppose that is a min-cost base and is the unique min-cost -base of . Then, .
Proof. Let be the rank function of . We claim that for each and ,
Indeed,
where we use Lemma 13 for the penultimate equality.
Therefore,
where the first inequality is from (2); the second equality is (4); the fourth equality follows from Lemma 12.
3.3 Proof of the proximity theorem
We prove Proximity Theorem 1, restated below, following ideas from [LX24].
Theorem 1 (Proximity). Let be a matroid, be an abelian group, be a finite subset, be a labeling, and be a cost function. For every min-cost base , there exists a min-cost -avoiding base such that , provided that an -avoiding base exists.
Proof. We prove the theorem for matroid and its min-cost base . If is -avoiding, it is a min-cost -avoiding base, and we are done. Otherwise, among all min-cost -avoiding bases choose minimizing . Delete elements not in and contract elements in . Denote the resulting matroid by and by , . Then is a block matroid whose ground set can be partitioned into bases . Let be the rank of . Let be the translated forbidden set.
We claim that is a min-cost base and is the unique min-cost -avoiding base of . Indeed, for every base of , is a base of , and then . For every -avoiding base of , is a base of . Moreover, . Since is a min-cost -avoiding base in , . Further, since and , we have , which implies
Therefore, it has to be , since otherwise is also a min-cost -avoiding base in , but its distance to is smaller, which is a contradiction to the choice of . This completes the proof that is the unique min-cost -avoiding base in . In particular, is the unique min-cost -base of .
Recall that for every . It follows from Lemma 12 that is independent for every . Applying Theorem 14 to and the bases , we obtain
Since is the unique min-cost -avoiding base in , all labels in but are in . Therefore, . Then, , which is the desired bound.
4 FPT algorithms for finding F-avoiding bases
Throughout this section, we denote the size of by and the rank of by . When is fixed, Theorem 1 gives a polynomial-time local-search algorithm for finding a min-cost -avoiding base. Namely, the algorithm finds a min-cost base by the greedy algorithm, enumerates all the bases with , and outputs a min-cost -avoiding base among them. Since the number of bases with is at most , the running time is polynomial when is fixed. However, this enumeration algorithm is XP rather than FPT when parameterized by .
In this section, we give FPT algorithms parameterized by . Section 4.1 presents a signature-enumeration subroutine common to the unweighted and weighted settings. Using it, Section 4.2 gives an FPT algorithm for finding an -avoiding base in the unweighted case where , and Section 4.3 extends it to the case of general .
We assume that a matroid is given by an independence oracle, and independence queries and group operations in take unit time. Let and denote the running times of unweighted and weighted matroid intersection algorithms, respectively, for two rank-r matroids over elements. For example, one may take as and using the deterministic and randomized algorithms of Blikstad [Bli21], respectively, and using the weighted matroid intersection algorithm of Brezovec, Cornuéjols, and Glover [BCG86].
4.1 Signature enumeration
The following lemma formalizes the signature-enumeration step in a form usable for our algorithms. It restricts the exchanged elements to a prescribed label set , so that the number of valid signatures is governed by and the proximity bound . Recall that .
Lemma 15. Let be a base, let be finite subsets, and let be a positive integer. There is an algorithm that finds a min-cost base among the ones satisfying
or correctly reports that no such base exists in time. When , can be replaced by .
Proof. For , let and . Note that every base with satisfies for all . We may assume without loss of generality that by restricting to and by noting that the case where is trivial.
Recall that -close valid signatures are the ones satisfying (1). Enumerate all -close valid signatures that additionally satisfy
For each such , form a partition matroid on whose partition classes and capacities are: part with capacity for all , a single part with capacity equal to its size, and the part of all remaining elements with capacity zero. Find a min-cost common base of and , if one exists. Run the above weighted matroid intersection algorithm for and every , and return the one with the smallest cost, or report that no base satisfying (5) exists if every instance is infeasible.
We show that the union of common bases for all instances is precisely the set of bases satisfying (5), which proves the correctness of the algorithm. A common base of and for an instance has ; hence and according to (1). Moreover,
where the first equality follows from the fact that is a base of ; the first inequality follows from the fact that is independent in ; the penultimate equality follows from (6); the last equality follows from (1). Therefore, equality holds throughout, which implies saturates every part: it contains all elements of , exactly elements of for each , and nothing else. It follows that , which means . Conversely, for every base satisfying (5), its signature is -close and valid by definition, and satisfies (6) because and only differ by elements with labels in .
Next, we bound the number of signatures satisfying (1) and (6). Each decomposes uniquely as , where have disjoint supports and satisfy by and (6). Since the number of vectors in is exactly , the number of signatures in the enumeration is at most .
Finally, for each , computing takes group operations by , checking the -avoiding condition and constructing the partition matroid from the precomputed classes take time, and a min-cost common base is found in time. As , the total running time is as claimed.
The algorithm of Liu and Xu corresponds to applying Lemma 15 with and . The dependence on of its running time thus arises from the dimension of the signatures. Consequently, a naïve extension of this approach to an arbitrary forbidden label set yields an algorithm that is FPT parameterized by , not . Our algorithms below instead construct label sets whose sizes are bounded by functions of .
4.2 Unweighted algorithm
Here, for the case where , we provide an FPT algorithm for finding an F-avoiding base parameterized by . Our idea is to either find an F-avoiding base directly, or modify the labeling so that the number of appearing group elements can be bounded by a function of .
Theorem 16. Let be a matroid with rank function , let be an abelian group, let be finite, and let be a labeling. There is an time algorithm that decides whether has an -avoiding base, and if so, returns one.
Proof. We may assume that and that is loopless, since the case is trivial and loops may be deleted. Define the set of difference of labels as . First, compute the components of by computing connected components of the exchangeability graph for an arbitrary base . Next, search for elements in the same component of such that . If such elements exist, then as . Let be a circuit containing . As is independent, it extends to a base , having as the fundamental circuit of . Hence, both and are bases. Since , at least one of and is -avoiding. In an actual implementation, we apply a matroid intersection algorithm to and . Since and belong to the same component, these two matroids have a common base . Then, is a base such that the associated fundamental circuit of contains .
Suppose otherwise that any two elements in the same component have the label difference in . Let be the components of . Fix arbitrary for and define a new label function by for and . Then, only takes values in . Moreover, since every base of is the disjoint union of bases of for , . Therefore, is -avoiding under if and only if is -avoiding under , where .
The rest of the algorithm is the signature enumeration procedure from Section 4.1. Fix an arbitrary base A. By Theorem 1 with , there is an -avoiding base B under with
if an -avoiding base exists. Run Lemma 15 with the labeling , the base , the forbidden set , the label set , and the proximity bound . Since takes values in , the label condition of Lemma 15 is automatic, and hence Lemma 15 finds a base if and only if an -avoiding base exists. If a base is found, return it, as it is -avoiding under ; otherwise, report that no -avoiding base exists.
The running time is analyzed as follows. The components of can be found in time, and a pair as above can be found by checking the label difference of pairs which takes time . If such a pair is found, we apply a matroid intersection algorithm once. Otherwise, Lemma 15 takes time. By , we obtain the claimed complexity.
4.3 Weighted algorithm
We now extend Theorem 16 to a general cost function c.
Theorem 17. Let be a matroid with rank function , let be an abelian group, let be finite, let be a labeling, and let be a cost function. There is an algorithm that either returns a min-cost -avoiding base or reports that none exists in time.
4.3.1 Preparation
Towards proving Theorem 16, we prepare lemmas on basis exchangeability. We call a subset an exchangeable set for a base if is a base. In particular, this requires that and have the same cardinality. The following lemma from [Sch79] is originally stated in for linking systems (also known as bimatroids), and translates to the form following through the correspondence between linking systems and matroids with a distinguished base [Sch79, Theorem 3.2]. We include a proof for completeness.
Lemma 18 (Schrijver [Sch79, Section 4, Lemma]). Let be a base, and let be disjoint subsets. Suppose that is not a base for all and . Then, is exchangeable for if and only if both and are exchangeable for .
Proof. Let , and let and for . Then, and bipartitions of and , respectively, because . Let be the exchangeability graph of restricted to . By hypothesis, there are no edges between and .
Suppose first that is exchangeable for , which means that is a base. By the multiple exchange Lemma 6, there exists such that both and are bases. By the perfect matching Lemma 5, contains a perfect matching between and . Since there are no edges between and , we have . As , it follows that . The two bases above are therefore and .
Conversely, suppose that is a base for each . Set . The set is independent, being a subset of . Extend to a base by adding elements from . Write , where and . By Lemma 5, there is a perfect matching in between and . Every vertex of must be matched into , so . Consequently, . Since , we also have . Hence , proving that is a base.
Let be a base, let be a subset such that and have the same cardinality, and let be a bijection. Let be the pairing between and defined by the bijection. Define the auxiliary digraph on the pairs as follows: place an arc for distinct pairs , if and only if is a base. For a subset , denote by , , and . The following lemma characterizes the exchangeability of in terms of the strongly connected components of .
Lemma 19. Let be a base, let be a subset such that and have the same cardinality, and let be a bijection. Then, is exchangeable for if and only if is exchangeable for for every strongly connected component of .
Proof. Let be the pairing defined by ; then . We proceed by induction on the number of strongly connected components of . The assertion is immediate when this number is at most one. Suppose that there are at least two strongly connected components. Let be a sink strongly connected component, which means there is no outgoing arc from to . Equivalently, is not a base for any and . Applying Lemma 18 with , , , and , we see that is exchangeable if and only if both and are exchangeable. Further, letting be restricted to , we have . Since has fewer strongly connected components, the induction hypothesis implies that is exchangeable if and only if is exchangeable for every strongly connected component of , which are precisely the strongly connected components of contained in . Combining these equivalences proves the lemma.
This lemma essentially establishes the equivalence of exchanging individual strongly connected components of and the union of them. We remark that when the pairing forms the unique perfect matching of the exchangeability graph of , the digraph is acyclic, and thus every strongly connected component is a singleton. Hence, Lemma 19 specializes to the classical unique perfect matching lemma of Krogdahl [Kro77]. The analogous factorization over the connected components of such a bipartite graph appears as Theorem 4.4 of [Sch79].
4.3.2 Algorithm
Throughout this and the following subsections, we assume that distinct bases have distinct costs. To achieve this, fix an arbitrary ordering of , and replace the cost of each element by the ordered pair , where is the position of in the ordering. Pairs are added coordinate-wise and compared lexicographically. The min-cost base with respect to in every nonempty family of bases is unique and is minimum with respect to . The same ordering of the bases can also be induced by the real-valued cost for sufficiently small . Consequently, Theorem 1 applies to the tie-broken cost. We suppress the tilde below. Under this assumption, the min-cost base of , denoted by throughout, is unique. Moreover, for every finite for which an -avoiding base exists, the min-cost -avoiding base is unique.
The algorithm of Theorem 17 is the recursive procedure SOLVE(F) shown in Algorithm 1, invoked on the input forbidden set. For a nonnegative integer , a q-step derivation of is a subset consisting of the elements that can be obtained from by a sequence of steps , for some and for some for every .
4.3.3 Analysis
We now turn to proving the correctness of Algorithm 1. Every base collected in B is an F-avoiding base, by construction in Line 8 and by Lemma 15 in Line 12. The remaining task is to show
Algorithm 1 SOLVE(F)
1: 2: if then 3: return A 4: 5: for do 6: if SOLVE( ) returns a base then 7: 8: 9: for do 10: -step derivation of 11: if Lemma 15 for returns a base then 12: 13: if then 14: return 15: else 16: return no -avoiding base exists
that contains the min-cost -avoiding base, which we establish in Lemmas 20 to 23 under the following setting.
Consider an invocation of SOLVE(F) such that an F-avoiding base exists, but the unique min-cost base A is not F-avoiding. Denote by B the unique min-cost F-avoiding base throughout. Denote by . We have by and Theorem 1. Assume that every call in Line 6 returns the min-cost -avoiding base whenever one exists. Then, for every returned base by Theorem 1. If an F-avoiding base of the form exists, its cost is at least ; if equality holds, by uniqueness and is already collected in Line 8. Hence we may assume that every such base has cost .
Call a pair with and exchangeable pair if is an exchangeable set for , i.e., is a base. It is a light exchangeable pair if additionally . For a light exchangeable pair , the cost . By our standing assumption concerning single exchanges, is not -avoiding, which means . Observe that if two elements are connected by at most light exchangeable pairs, then their labels can go from one to the other by a -step derivation. By our standing assumption, , and thus one can always add to the previous label in a derivation sequence. Therefore, a -step derivation is a subset of a -step derivation.
To prove the correctness of the algorithm, it suffices to show that for some , a -step derivation of contains , where is constructed in Line 7 of Algorithm 1. Indeed, this would imply that in line Line 11 of the algorithm, the base lies in the search range of Lemma 15 and will be returned as the unique min-cost -avoiding base. To achieve this, we crucially use the light exchangeable pairs to connect to .
Let be the exchangeability graph of restricted to the light exchangeable pairs. We consider the graph restricted to and shorten it by . Let be the vertex sets of the connected components of . The proof discusses two cases: (1) every component either intersects or is incident to by a light exchangeable pair; (2) not the first case. The first case is great because can go to any element in by at most steps and thus traverse in at most steps. Therefore, we mainly focus on the second case in the following. Below we show in Lemma 21 that the union of an arbitrary subset of the components is exchangeable for . To prove this we go to the auxiliary digraph defined before Lemma 19 for a bijection from the perfect matching Lemma 5, and show that every is a union of strongly connected components of the auxiliary digraph. Combining with the additional assumption that there exists a component that does not satisfy the condition in (1), we prove that for some (Lemma 22); in particular . Thus, we only need to add to one additional element to reach in at most steps.
We formalize the argument below. First, we need the following lemma.
Lemma 20. Let , let , and let be a bijection such that for every and . Then, every arc from to inside a strongly connected component of gives a light exchangeable pair .
Proof. By the strong connectivity, there is a simple directed path in such that for every , which together with the arc forms a directed cycle. By the definition of , is a base for every , where . This implies for every . Moreover,
where the first inequality follows from the fact that for every . As all terms in the sum are nonnegative, we have for each . In particular, . As is a base, is a light exchangeable pair.
Lemma 21. Let be the connected components of . Then, for every , is an exchangeable set for . In particular, for every , is an exchangeable set for both and .
Proof. Let and note that partitions . Denote by and . Let be a bijection such that is a base for every , which exists by Lemma 5. Then for each , as is the unique min-cost base. Moreover, since , the pair is light for every . In particular, and lie in the same connected component of . By Lemma 20, every arc inside each strongly connected component of gives a light exchangeable pair that joins and . Consequently, lies in a connected component of . Therefore, every connected component is a union of strongly connected components of . Since is a base, i.e., is exchangeable for , Lemma 19 implies that is exchangeable for every strongly connected component . Consider an arbitrary subset , and then is also a union of strongly connected components of . Apply Lemma 19 again with being restricted to , we conclude that is exchangeable because every strongly connected component of D^\pi'(A) is a strongly connected component of and thus exchangeable. Finally, is exchangeable for by taking and exchangeable for by taking .
Recall that the set constructed in Line 7 of Algorithm 1 is the union of for bases returned in Line 6.
Lemma 22. Suppose Z is a connected component of such that it neither intersects K nor is incident to K by a light exchangeable pair. Then, for some , the base returned in Line 6 satisfies .
Proof. Denote by and ; then the sets and are both bases by Lemma 21. As is the unique min-cost base, we have , i.e., . Thus, , implying that is not -avoiding by the fact that is the min-cost -avoiding base. Let . As avoids , the call SOLVE(F \ {f}) in Line 6 returns a base with , which implies is not F-avoiding. However, avoids , which forces . Denote by , and by and . Since by the definition of , the assumption that does not intersect implies that . Then, as , it holds that and . Hence, satisfies
It remains to show that is a base, which would imply by the uniqueness, as needed. By Lemma 5 applied to the pairs of bases and , there exist bijections and such that and are bases for every and . We define as the union of and , which is a well-defined bijection as . Consider the auxiliary digraph on pairs .
We claim that and are both unions of strongly connected components of . Suppose not, which means there exists a strongly connected component that intersects both and . In particular, contains an arc from some to some , which corresponds to a basis exchange . Below we show that is a light exchangeable pair, which contradicts the assumption, as it would be a light exchangeable pair joining and . To this end, note that for every because is a base whose cost is larger than . Moreover, . It follows from Lemma 20 that is a light exchangeable pair, as needed.
Finally, apply Lemma 19 to for both , we obtain that every strongly connected component of is exchangeable for . Therefore, applying Lemma 19 again to proves that is exchangeable, i.e., is a base. As is an -avoiding base of cost at most , the minimality and uniqueness of give .
Lemma 23. Line 12 adds the min-cost F-avoiding base B to B.
Proof. It suffices to show that there exists , so that the -step derivation of satisfies . Denote by the -step derivation of , and then for every . Recall that by our standing assumption, for every light exchangeable pair .
We claim that for two vertices in , if contains a path of length at most from to , then is in the -step derivation of . Indeed, let be the path for some . For each , either or is a light exchangeable pair, depending on which endpoint is in . Then, either or . Picking or so that , we obtain that , and thus is in the -step derivation of by definition. Since by assumption, is in the -step derivation of by adding additional 's to the remaining steps.
Let be the connected components of . Suppose first that, for every , intersects or is incident to by a light exchangeable pair. By , it suffices to show that contains for every . By the claim above, it suffices to show that for every , every vertex in is connected to by a path of length at most . This follows from the fact that the path has length at most by Theorem 1.
Consider the remaining case where some neither intersects nor is incident to by a light exchangeable pair. By Lemma 22, we have for some . Then, , and hence by . Picking a vertex , every vertex in can be reached from by a path of length at most . By the claim, the -step derivation contains .
We are now ready to prove Theorem 17.
Proof of Theorem 17. We first show by induction on that returns the min-cost -avoiding base or correctly reports that none exists. If , then is the min-cost -avoiding base and Line 3 is correct; this covers . Hence assume . If no -avoiding base exists, then since every base collected in is -avoiding, and the report in Line 16 is correct. Otherwise, let be the min-cost -avoiding base. By the induction hypothesis, every call in Line 6 returns the min-cost -avoiding base whenever one exists. If some -avoiding base of the form has cost , then it equals and by Line 8; otherwise the setting of Lemmas 20 to 23 is realized, and by Lemma 23. In both cases, since every base in is -avoiding and hence has cost at least , Line 14 returns .
We then analyze the running time; recall that each cost operation takes time under the perturbation. Consider one invocation of Algorithm 1 with , excluding the recursive calls in Line 6. Lines 1, 7 and 8 take time. Since for every base returned in Line 6, we have and hence . By commutativity, each element of a -step derivation is determined by an initial group element and a multiset of at most signed elements of . Thus, for every , the -step derivation of satisfies
Each in Line 10 can be constructed in time by enumerating these multisets and removing duplicate labels. Apply Lemma 15 with and since
it takes , where the factor accounts for additions and comparisons of the symbolically perturbed weights. We call Lemma 15 for every , so this cost is multiplied by . Selecting a min-cost base in Line 14 takes time per collected base. As , one invocation thus takes time. The recursion has at most invocations. The total running time is therefore , since .
Acknowledgments
Siyue Liu was supported in part by the Air Force Office of Scientific Research under agreement number FA9550261B210. Taihei Oki was supported by JST FOREST Grant Number JPMJFR232L, JST BOOST Grant Number JPMJBY25A6, and JSPS KAKENHI Grant Number JP18J22141. We thank Avinash Bhardwaj for sharing the progress on representable matroids [Bha26], and acknowledge that both results were discovered independently.
AI disclosure. The authors acknowledge the use of GPT-5.6 Sol in the discovery and exploration of the proofs. All arguments were independently verified by the authors. The manuscript was written entirely by the authors, who take full responsibility for its content.
References
[BCG86] Carl Brezovec, Gérard Cornuéjols, and Fred Glover. Two algorithms for weighted matroid intersection. Mathematical Programming, 36:39–53, 1986.
[Bha26] Avinash Bhardwaj. Sharp proximity for group-labeled matroid bases. https://optimization-online.org/2026/10/sharp-proximity-for-group-labeled-matroid-bases/, October 2026. Optimization Online preprint, updated October 20, 2026.
[Bli21] Joakim Blikstad. Breaking for matroid intersection. In 48th International Colloquium on Automata, Languages, and Programming, volume 198 of Leibniz International Proceedings in Informatics (LIPIcs), pages 31:1–31:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021.
[BP87] Francisco Barahona and William R. Pulleyblank. Exact arborescences, matchings and cycles. Discrete Applied Mathematics, 16(2):91–99, 1987.
[Bru69] Richard A. Brualdi. Comments on bases in dependence structures. Bulletin of the Australian Mathematical Society, 1(2):161–167, 1969.
[CGG 06] Maria Chudnovsky, Jim Geelen, Bert Gerards, Luis Goddyn, Michael Lohman, and Paul Seymour. Packing non-zero A-paths in group-labelled graphs. Combinatorica, 26(5):521–532, 2006.
[CGM92] Paolo M. Camerini, Giulia Galbiati, and Francesco Maffioli. Random pseudopolynomial algorithms for exact matroid problems. Journal of Algorithms, 13(2):258–273, 1992.
[Che26] Lizhong Chen. Sharp proximity bounds for group-labelled matroid bases. https://doi.org/10.5281/zenodo.22885939, September 2026. Zenodo preprint, version v1.
[DAKS24] Ilan Doron-Arad, Ariel Kulik, and Hadas Shachnai. Lower bounds for matroid optimization problems with a linear constraint. In 51st International Colloquium on Automata, Languages, and Programming, volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 56:1–56:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024.
[DGM09] Matt DeVos, Luis Goddyn, and Bojan Mohar. A generalization of Kneser's addition theorem. Advances in Mathematics, 220(5):1531–1548, 2009.
[ERW24] Friedrich Eisenbrand, Lars Rohwedder, and Karol Węgrzycki. Sensitivity, proximity and FPT algorithms for exact matroid problems. In 65th IEEE Symposium on Foundations of Computer Science, pages 1610–1620, 2024.
[GMO 25] Dániel Garamvölgyi, Ryuhei Mizutani, Taihei Oki, Tamás Schwarz, and Yutaro Yamaguchi. Towards the proximity conjecture on group-labeled matroids. In 52nd International Colloquium on Automata, Languages, and Programming, volume 334 of Leibniz International Proceedings in Informatics (LIPIcs), pages 85:1–85:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025.
[GR95] Michel X. Goemans and V. S. Ramakrishnan. Minimizing submodular functions over families of sets. Combinatorica, 15(4):499–513, 1995.
[Gre73] Curtis Greene. A multiple exchange property for bases. Proceedings of the American Mathematical Society, 39(1):45–50, 1973.
[HIM 24] Florian Hörsch, András Imolay, Ryuhei Mizutani, Taihei Oki, and Tamás Schwarz. Problems on group-labeled matroid bases. In 51st International Colloquium on Automata, Languages, and Programming, volume 297 of Leibniz International Proceedings in Informatics (LIPIcs), pages 86:1–86:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024.
[Kem56] J. H. B. Kemperman. On complexes in a semigroup. Indagationes Mathematicae, 18:247–254, 1956.
[Kem60] J. H. B. Kemperman. On small sumsets in an abelian group. Acta Mathematica, 103(1–2):63–88, 1960.
[Kro77] Stein Krogdahl. The dependence graph for bases in matroids. Discrete Mathematics, 19(1):47–59, 1977.
[Lev05] Vsevolod F. Lev. Restricted set addition in abelian groups: Results and conjectures. Journal de Théorie des Nombres de Bordeaux, 17(1):181–193, 2005.
[LX24] Siyue Liu and Chao Xu. On the congruency-constrained matroid base. In Integer Programming and Combinatorial Optimization, pages 280–293, 2024.
[MVV87] Ketan Mulmuley, Umesh V. Vazirani, and Vijay V. Vazirani. Matching is as easy as matrix inversion. Combinatorica, 7(1):105–113, 1987.
[NSZ19] Martin Nägele, Benny Sudakov, and Rico Zenklusen. Submodular minimization under congruency constraints. Combinatorica, 39(6):1351–1386, 2019.
[NZ20] Martin Nägele and Rico Zenklusen. A new contraction technique with applications to congruency-constrained cuts. Mathematical Programming, 183(1):455–481, 2020.
[Oxl11] James G. Oxley. Matroid Theory. Number 21 in Oxford Graduate Texts in Mathematics. Oxford University Press, Oxford, 2 edition, 2011.
[PY82] Christos H. Papadimitriou and Mihalis Yannakakis. The complexity of restricted spanning tree problems. Journal of the ACM, 29(2):285–309, 1982.
[Rie91] Jörg Rieder. The lattices of matroid bases and exact matroid bases. Archiv der Mathematik, 56(6):616–623, 1991.
[Sch55] Peter Scherk. Distinct elements in a set of sums (solution to problem 4466). The American Mathematical Monthly, 62(1):46–47, 1955.
[Sch79] Alexander Schrijver. Matroids and linking systems. Journal of Combinatorial Theory, Series B, 26(3):349–369, 1979.
[SS90] Alexander Schrijver and Paul D. Seymour. Spanning trees of different weights. In William J. Cook and Paul D. Seymour, editors, Polyhedral Combinatorics, volume 1 of DIMACS Series in Discrete Mathematics and Theoretical Computer Science, pages 281–288. American Mathematical Society, 1990.