1 Introduction
Matching in bipartite graphs is one of the fundamental topics in combinatorics and optimization. Due to its diverse applications, various optimality criteria of matchings have been proposed based on the number of edges, the total weight of edges, etc. The concept of rank maximality is one of them, which is especially studied in the context of matching problems under preferences [2, 7]. In this setting, we are given a partition of the edge set that represents a priority order, and a matching is rankmaximal if is maximized, and subject to this, is maximized, and so on. As pointed out in several papers [2, 7, 4, 1] (on generalized problems), the problem of finding a rankmaximal solution can be reduced to the usual weightmaximization setting by using sufficiently dispersed weights, e.g., by assigning for each element in . (Clearly, it is not enough to assign arbitrary weights that are consistent with the priority order.)
In this paper, we explore the relation between rankmaximality and optimality in the weighted setting for two generalizations of bipartite matching: matching in general graphs and matroid intersection. To avoid confusion, we hereafter replace the term “rank” with “lex(icographical)” because we also deal with ranks in matroids. The main results of the paper (Theorems 2.1 and 2.2) state that, in both problems, the equivalence between lexmaximality and weighted optimality holds if the minimum ratio of two distinct weight values is larger than . This implies that we can choose the base of exponential weights as any constant larger than (instead of ) in the aforementioned reduction. Furthermore, we show that if the minimum ratio is at most , say , then a lexmaximal solution achieves approximation of the maximum weight, and this bound is tight.
2 Results
We assume the basic notation and terminology on graphs and matroids (see, e.g., [8]).
Throughout the paper, let be a finite ground set and be a positive weight function on . For a subset , the weight is defined as the sum of its elements. Let be the distinct values of in descending order. We assume (otherwise, the results are trivial), and define
For a subset and , we denote by the restriction of to the elements of weight , and define and accordingly , , and . For two subsets , we say that is lexlarger than (or is lexsmaller than ) if there exists an index such that for any and . For a family of subsets of , we say that is lexmaximal if no is lexlarger than . Note that a lexmaximal subset may not be unique but the sequence is unique.
A weighted matching instance consists of an undirected graph and a weight function on the edge set. We denote by the optimal value, i.e., the maximum weight of a matching in . In addition, we denote by the weight of a lexmaximal matching in (where is the family of matchings in ), which takes as many edges of weight as possible, and subject to this, takes as many edges of weight as possible, and so on.
A weighted matroid intersection instance consists of two matroids and and a weight function on the common ground set. We denote by the optimal value, i.e., the maximum weight of a common independent set in . In addition, we denote by the weight of a lexmaximal common independent set (where ), which takes as many elements of weight as possible, and subject to this, takes as many elements of weight as possible, and so on.
The main theorems are stated as follows.
Theorem 2.1.
Let be a weighted matching instance. If , then
Otherwise, a lexmaximal matching is a maximumweight matching, and vice versa.
Theorem 2.2.
Let be a weighted matroid intersection instance. If , then
Otherwise, a lexmaximal common independent set is a maximumweight common independent set, and vice versa.
We remark that the approximation ratio is tight as the weighted bipartite matching problem is included as a common special case. Let be a bipartite graph with and . Define , , and . We then have (as and ), , and .
3 Proofs
We prove both theorems using the same strategy. The key definition and lemmas are as follows.
Definition 3.1.
Let be a feasible solution that is not lexmaximal in a weighted matching or matroid intersection instance, and be the smallest index such that is not lexmaximal in the restricted instance whose ground set is . We say that a feasible solution in the original instance is eligible if the following three conditions are satisfied:

for any ,

, and

.
Intuitively, an eligible solution lexicographically improves the original solution at the most significant improvable class by sacrificing at most two lighter elements.
Lemma 3.2.
For any weighted matching instance and any matching that is not lexmaximal, there exists an eligible matching .
Lemma 3.3.
For any weighted matroid intersection instance and any common independent set that is not lexmaximal, there exists an eligible common independent set .
Proof of Theorems 2.1 and 2.2.
Let be an optimal solution. Starting with , we repeatedly update to an eligible until it becomes lexmaximal. Let be the lexmaximal solution that is finally obtained.
In any update from to , we have
If , then we have , which cannot happen at the beginning when . Thus, is lexmaximal. As any lexmaximal solution has the same weight, we also see that any lexmaximal solution is optimal, and we are done for the second statements.
Suppose that . Since we always have and , we see that is nondecreasing during the process and each appears in the righthand side at most times in total. Thus, by repeating the above inequalities, we obtain
which implies the first statements. ∎
3.1 Matching: Proof of Lemma 3.2
We prove Lemma 3.2 by contradiction.^{1}^{1}1We could give an algorithmic proof similar to the matroid intersection case in the next section, but we here describe an alternative proof because it is slightly simpler and may be extended to other problems. Suppose to the contrary that there exists a counterexample, and take a minimal one in the following sense. First, the ground set is minimized as the first priority, and subject to this, a counterexample matching (that is not lexmaximal but admits no eligible matching ) and a lexmaximal matching are taken so that the symmetric difference is minimized.
By the minimality, we have . Indeed, if there exists an edge , then we obtain a smaller counterexample by removing (no eligible matching can newly appear), a contradiction. Similarly, if there exists , then we obtain a smaller counterexample again by removing (note that no edge is adjacent to as and are matchings), a contradiction.
Claim 3.4.
There are no adjacent edges of the heaviest weight.
Proof.
Suppose to the contrary that and are adjacent (at ) and . If (i.e., and are parallel), then is a smaller counterexample, a contradiction. Otherwise, consider the instance obtained by contracting the two edges and , i.e., by merging and into a single vertex, removing the vertex together with the incident edges, and restricting the weight function to the remaining set of edges.
As is a matching that is not lexmaximal, this is true for after the contraction. By the minimality of the counterexample, there exists an eligible matching . Since at most one of and is matched by in the original graph, we can add or to to obtain a matching in the original instance. Moreover, the thus obtained is eligible by definition even if is added since for any , contradicting our indirect assumption. ∎
Claim 3.5.
.
Proof.
Suppose to the contrary that there exists an edge . Then, by Claim 3.4, we have for each adjacent edge . Thus, we can obtain a lexlarger matching from by adding and by removing all the (at most two) adjacent edges, a contradiction. ∎
By Claim 3.5, we have . Let be an edge with . Then, we can obtain an eligible matching from by adding and by removing all the (at most two) adjacent edges, a contradiction. This concludes the proof of the lemma.
3.2 Matroid Intersection: Proof of Lemma 3.3
The proof relies on (the correctness of) an augmenting path algorithm for the weighted matroid intersection problem, which was first described in [6]. We first review the basic facts based on [8, Sections 41.2 and 41.3].
Let be a weighted matroid intersection instance. For each matroid , we denote the independent set family, the rank function, and the span function^{2}^{2}2This is also called the closure function; we follow the terminology of [8] for simplicity. by , , and , respectively. For a set and elements and , we write and as and , respectively.
Let be a common independent set. The exchangeability graph with respect to is a directed bipartite graph defined as follows. Let , where
We also define
where elements in and in are called sources and sinks, respectively. Note that and depend only on , and and depend only on . Let be a cost function on the vertex set defined as follows:
(3.1) 
An – path in is cheapest if the total cost of its vertices is minimized. Subject to this, is shortest if the number of its vertices is minimized.
For a nonnegative integer , a common independent set is said to be extreme if is maximized subject to and . The following lemma leads to a simple augmenting path algorithm for the weighted matroid intersection problem. The key is that one can augment any extreme solution to some extreme solution (if exists) by simply exchanging elements along a path.
Lemma 3.6 (cf. [8, Theorems 41.3, 41.5, and 41.6]).
Let be an extreme common independent set, and suppose that there exists a common independent set with . Then, contains an – path, which may consist of a single vertex in . Let be a shortest cheapest – path in with respect to the cost function defined as (3.1). Then, no inner vertex of is a source or a sink, and is an extreme common independent set.
Now we start the proof of Lemma 3.3. Let be a common independent set that is not lexmaximal, and let be the smallest index such that is not lexmaximal in the restricted instance whose ground set is .
Claim 3.7.
There exists a common independent set such that for any , , , and .
Proof.
Define an auxiliary weight function by for each , where . As remarked in the introduction, the lexicographical order coincides with the weighted order, i.e., for any two subsets , is lexlarger than if and only if .
Let . Then, is extreme in the restricted instance , which has a larger common independent set. By Lemma 3.6, one can obtain an extreme common independent set by flipping along a sourcesink path in the exchangeability graph. Note that for any and by the choice of and the definition of .
If consists of a single vertex (which is a source and a sink), then the claim immediately follows since for some element . Otherwise, let and be the first and last vertices of , respectively. By the definitions of the exchangeability graph and the sources and sinks, for every and for every (recall that any is not a source and any is not a sink). Hence, we have and , and then
which implies that the equality holds everywhere. Thus we have and , which completes the proof. ∎
Take a subset satisfying the conditions in Claim 3.7. We then obtain an eligible common independent set from by removing at most two elements in as follows. If , then and we do not need to remove any element. Suppose that . As , we have , and hence . This implies that contains exactly one circuit of , which must intersect since . Hence, there exists an element such that . The same holds for . Thus we obtain a common independent set with , which is eligible.
4 Concluding Remarks
In this paper, we have analyzed how good a lexmaximal solution is in the weighted matching and matroid intersection problems based on how dispersed the distinct weight values are. It is wellknown that, subject to a single matroid, a lexmaximal solution is always optimal, which can be found by a greedy algorithm. For more general independence systems, Jenkyns [3] and Korte and Hausmann [5] independently analyzed the worstcase approximation ratio of a greedy algorithm. In particular, the worst ratio is in the weighted matching and matroid intersection problems, while a lexmaximal solution (which is a possible output of a greedy algorithm) always achieves the maximum weight if the distinct weight values are sufficiently dispersed. From this perspective, we have filled the gap between these two situations.
A natural question is as follows: how about a further (common) generalization, e.g., the weighted matroid parity problem? We just remark that it seems difficult to extend our algorithmic proof straightforwardly bacause no counterpart of augmentation from any extreme solution to some extreme solution along a path (Lemma 3.6) is known. A minimal counterexample proof (like the matching case) also seems nontrivial; in particular, we have found no counterpart of Claim 3.4.
Acknowledgments
We are grateful to Naoyuki Kamiyama for giving comments on a literature on rankmaximal matchings.
Kristóf Bérczi was supported by the Lendület Programme of the Hungarian Academy of Sciences – grant number LP20211/2021 and by the Hungarian National Research, Development and Innovation Office – NKFIH, grant number FK128673. Tamás Király was supported by the Hungarian National Research, Development and Innovation Office – NKFIH, grant number K120254. Yutaro Yamaguchi was supported by JSPS KAKENHI Grant Numbers JP20K19743 and JP20H00605 and by Overseas Research Program in Graduate School of Information Science and Technology, Osaka University. Yu Yokoi was supported by JSPS KAKENHI Grant Number JP18K18004.
“Application Domain Specific Highly Reliable IT Solutions” project has been implemented with the support provided from the National Research, Development and Innovation Fund of Hungary, financed under the Thematic Excellence Programme TKP2020NKA06 (National Challenges Subprogramme) funding scheme.
References
 [1] C.C. Huang, N. Kakimura, and N. Kamiyama. Exact and approximation algorithms for weighted matroid intersection. Mathematical Programming, 177(12):85–112, 2019.
 [2] R. W. Irving, T. Kavitha, K. Mehlhorn, D. Michail, and K. E. Paluch. Rankmaximal matchings. ACM Transactions on Algorithms (TALG), 2(4):602–610, 2006.
 [3] T. A. Jenkyns. The efficacy of the “greedy” algorithm. In Proceedings of the 7th Southeastern Conference on Combinatorics, Graph Theory and Computing, pages 341–350, 1976.
 [4] N. Kamiyama. Matroid intersection with priority constraints. Journal of the Operations Research Society of Japan, 56(1):15–25, 2013.

[5]
B. Korte and D. Hausmann.
An analysis of the greedy heuristic for independence systems.
In Annals of Discrete Mathematics, volume 2, pages 65–74. Elsevier, 1978.  [6] E. L. Lawler. Matroid intersection algorithms. Mathematical Programming, 9(1):31–56, 1975.
 [7] D. Michail. Reducing rankmaximal to maximum weight matching. Theoretical Computer Science, 389(12):125–132, 2007.
 [8] A. Schrijver. Combinatorial Optimization: Polyhedra and Efficiency. Springer, 2003.
Comments
There are no comments yet.