Ranking and Rank Aggregation with
Matroid Prefix Constraints
July 08, 2026
We study ranking and rank aggregation under the Kendall tau distance, subject to matroid or flag matroid constraints on prefixes of the output ranking. In the matroid case, the top-\(k\) prefix is required to form a base of a matroid; in the flag matroid case, several prescribed prefixes are required to form bases of a sequence of matroids linked by quotient relations. This framework contains the previously studied notions of \(k\)-fairness and block-fairness as special cases, and also captures more general hierarchical and assignment-type lower- and upper-quota constraints.
We provide a polynomial-time algorithm for finding, given a single input ranking, a closest feasible ranking under flag matroid prefix constraints. The algorithm is a natural greedy procedure, and its optimality is proved via a Bruhat order argument on the symmetric group. As a consequence, existing approximation frameworks for fair rank aggregation carry over to the matroidal setting. We also prove that rank aggregation with matroid constraints is NP-hard for every fixed number \(m\ge 2\) of input rankings, even under partition matroid constraints.
Ranking a set of alternatives and aggregating multiple rankings into a single consensus ranking are fundamental tasks in social choice, information retrieval, meta-search, recommendation, and many other applications [1], [2]. Throughout the paper, a ranking of a finite set \(E\) is a total order on \(E\), which we identify with a bijection \(\pi:[n]\to E\) where \([n]=\{1,\dots,n\}\), \(n=|E|\), and \(\pi(i)\) is the element placed at position \(i\).
To compare rankings, we use the Kendall tau distance (a.k.a. bubble-sort distance). For two rankings \(\pi\) and \(\sigma\), their Kendall tau distance, denoted by \(d_{\mathrm{KT}}(\pi,\sigma)\), is the number of unordered pairs of elements on which \(\pi\) and \(\sigma\) disagree. This is one of the most standard distances in rank aggregation and voting theory. In the unconstrained setting, minimizing the sum of Kendall tau distances to the input rankings yields the classical Kemeny rule [3]–[5]. The Kemeny aggregation rule has strong axiomatic justification, but its computational side is difficult: computing an optimal Kemeny ranking is NP-hard [6], [7]. On the positive side, constant-factor approximations and even a PTAS are known [8], [9].
In this paper, we study constrained versions of ranking and rank aggregation problems. One natural source of constraints is fairness. Recent work on fair ranking has imposed group-fair representation requirements on top positions of a ranking. For instance, Celis–Straszak–Vishnoi [10] studied top-position fairness under metrics other than Kendall tau. In the Kendall tau setting, the closest fair ranking (CFR) problem and the fair rank aggregation (FRA) problem have been studied under proportionate fairness notions [11], [12]. In the model of Chakraborty–Das–Khan–Subramanian [11], the candidate set is partitioned into groups, and \(k\)-fairness requires the top-\(k\) prefix to satisfy lower and upper bounds on the number of candidates from each group. The stronger notion of block-fairness imposes analogous constraints on multiple prescribed prefixes. Under these notions, CFR admits exact polynomial-time algorithms, whereas FRA has mainly been studied via approximation algorithms [11]–[13].
Our starting point is the observation that the fairness constraints studied in CFR and FRA have a matroidal structure. The \(k\)-fairness constraint can be expressed as the requirement that the top-\(k\) set forms a base of an appropriate matroid, while the stronger block-fairness constraint naturally gives rise to a flag matroid, i.e., a sequence of matroids linked by quotient relations [14]–[17]. For matroids \(M\) and \(N\) on the same ground set, \(N\) is a quotient of \(M\) if their rank functions satisfy \(\mathrm{rk}_N(Y)-\mathrm{rk}_N(X)\leq \mathrm{rk}_M(Y)-\mathrm{rk}_M(X)\) for any \(X\subseteq Y\subseteq E\).
We study matroidal generalizations of closest fair ranking (CFR) and fair rank aggregation (FRA). In Matroid-CFR, given a ranking \(\pi\) and a matroid \(M\) of rank \(k\) on \(E\), the task is to find a ranking \(\sigma\) minimizing \(d_{\mathrm{KT}}(\sigma, \pi)\) subject to the top \(k\) elements of \(\sigma\) forming a base of \(M\). In Flag-Matroid-CFR, the constraint is given by a flag matroid \(\boldsymbol{M}=(M_1,M_2,\dots,M_s)\) with rank \(k_1<k_2<\cdots<k_s\): for each \(i\in[s]\), the top \(k_i\) elements of the output \(\sigma\) must form a base of \(M_i\). The corresponding aggregation problems are Matroid-FRA and Flag-Matroid-FRA, where multiple rankings \(\pi_1, \pi_2,\dots, \pi_m\) are given and the objective is \(\sum_{i=1}^m d_{\mathrm{KT}}(\sigma,\pi_i)\).
Our main contribution is an exact polynomial-time algorithm for Flag-Matroid-CFR.
Matroid-CFR, i.e., a special case with a single matroid, serves as a warm-up. Once the top-\(k\) set is fixed, the optimal relative order of the chosen elements and of the remaining elements is inherited from the input ranking \(\pi\), and the objective reduces to a linear weight sum over the chosen base. Thus Matroid-CFR reduces to a minimum-weight base problem (Theorem 4).
The main difficulty lies in the genuine flag matroid case, where several prefix constraints must be satisfied simultaneously. Even after fixing the feasible prefixes, the objective does not decompose into independent layer-wise terms, because \(d_{\mathrm{KT}}(\cdot,\pi)\) depends on pairwise relative positions, including pairs crossing different layers. A natural integer-programming formulation therefore leads to a quadratic objective, and we are not aware of a direct reduction to a known polynomial-time solvable combinatorial optimization problem.
Our algorithm is nonetheless a simple greedy-type algorithm. The nontrivial part is proving that its output is indeed optimal. After relabeling the candidates so that \(\pi=\mathrm{id}\), minimizing \(d_{\mathrm{KT}}(\sigma,\pi)\) is equivalent to minimizing the inversion number \(\mathrm{inv}(\sigma)\). We then compare feasible rankings via the Bruhat order on the symmetric group and prove, using the tableau criterion of Björner–Brenti [18], that the greedy output is the Bruhat-minimum among all feasible rankings. This establishes the correctness of our greedy-type algorithm for Flag-Matroid-CFR (Corollary 1).
Once the closest-ranking problem becomes tractable, existing approximation frameworks for fair rank aggregation by Chakraborty–Das–Dey–Yan [13] extend to the matroidal setting because these algorithms use CFR-type procedures as subroutines. With appropriate generalizations of these procedures, we obtain a \((2+\varepsilon)\)-approximation algorithm for Matroid-FRA for every constant \(\varepsilon>0\) and a \(2.881\)-approximation algorithm for Flag-Matroid-FRA.
To demonstrate the scope of the framework, Section 3.3 presents explicit classes of matroids and flag matroids that can arise naturally in ranking and aggregation settings. While many examples of flag matroids in the literature come from algebraic or geometric constructions [14]–[16] or special combinatorial families such as lattice paths [19], our examples arise from familiar combinatorial constraint structures. Starting from a partition, a bipartite eligibility graph, or a laminar family, we show that two compatible parameter choices yield matroids in a quotient relation, and hence a flag matroid. These classes model, for instance, assignment-type feasibility constraints in reserve-based market design [20] and hierarchical group quotas in fairness-motivated selection and ranking settings [21], [22], beyond the original partition-based constraints.
We also study matroid-constrained rank aggregation when the number \(m\) of voters is fixed. For the unconstrained Kemeny problem, the complexity with constant number of voters has been well studied, where polynomial-time solvability is known for \(m\le 2\) (as folklore), whereas NP-hardness is known for every even \(m\ge 4\) [1] and every odd \(m\ge 7\) [23]; the cases \(m=3\) and \(m=5\) remain open [23], [24]. In contrast, we prove that Matroid-FRA is NP-hard for every fixed number of voters \(m\ge 2\), already under partition matroid constraints. Thus the constrained setting exhibits a sharp dichotomy: the case \(m=1\) is tractable, since it coincides with Matroid-CFR, whereas every fixed case \(m\ge 2\) is NP-hard.
Classical rank aggregation under Kendall tau distance has been studied extensively from the viewpoints of social choice, approximation algorithms, and parameterized complexity; see, e.g., [2]–[5], [8], [23]–[26]. On the fairness side, recent work has considered both post-processing methods for fair rankings and aggregation under group-based quota constraints [10]–[13], [27]. Our work extends this line by replacing quota systems with general matroid and flag matroid feasibility constraints.
Matroids and matroid quotients are classical objects in matroid theory [28], [29]. Flag matroids are matroidal analogues of flags and form a special class of Coxeter matroids [14]–[16]. Recent work studies quotients in the broader framework of M-convex sets [17]. Our analysis of Flag-Matroid-CFR uses the Bruhat order on the symmetric group; for background, we refer to [18], [30].
The rest of the paper is organized as follows. We begin with preliminaries on rankings and Kendall tau distance in Section 2, and on matroids and flag matroids in Section 3. We then study the closest ranking problems in Section 4. After that, we present approximation consequences for the aggregation problems in Section 5 and prove hardness results for a fixed number of voters in Section 6. Proofs of statements marked with \((\star)\) are postponed to the appendices.
Let \(E\) be a finite ground set with \(|E|=n\), whose elements we regard as candidates to be ranked. We use the notation \([k]=\{1,2,\dots, k\}\) for any positive integer \(k\).
A ranking of \(E\) is a bijection \(\pi:[n]\to E\), where \(\pi(i)\) denotes the \(i\)th ranked element. We also identify \(\pi\) with the list \((\pi(1),\pi(2),\dots,\pi(n))\) in which elements are arranged from best to worst. For \(e,f\in E\), we write \(e\prec_\pi f\) if \(\pi^{-1}(e)<\pi^{-1}(f)\) and write \(e\preceq_\pi f\) if \(e\prec_\pi f\) or \(e=f\). The notations \(e\succ_\pi f\) and \(e\succeq_\pi f\) are defined similarly.
For rankings \(\pi,\sigma:[n]\to E\), the Kendall tau distance between \(\pi\) and \(\sigma\) is defined by \[d_{\mathrm{KT}}(\pi,\sigma) = \left| \left\{ (e,f)\in E\times E \;\middle|\; e \prec_{\pi} f \text{ and } e \succ_{\sigma} f \right\} \right|.\] Equivalently, \(d_{\mathrm{KT}}(\pi,\sigma)\) counts the number of unordered pairs of elements on which \(\pi\) and \(\sigma\) disagree. It is well known that \(d_{\mathrm{KT}}\) is a metric on the set of rankings [1].
We now recall the fairness notions introduced in [11]. These notions aim to protect minorities while preventing any group from dominating the top positions. For a ranking \(\pi:[n]\to E\) and an integer \(k\in[n]\), let \(\mathsf{Top}_k(\pi)\mathrel{\vcenter{:}}= \{\pi(1),\pi(2),\dots,\pi(k)\}\) denote the set of top-\(k\) candidates in \(\pi\).
Definition 1 (\((\boldsymbol{\alpha},\boldsymbol{\beta})\)-\(k\)-fairness [11]). Let \(E\) be a set of \(n\) candidates partitioned into \(g\) groups \(G_1,\dots,G_g\). Let \(\boldsymbol{\alpha}= (\alpha_1,\dots,\alpha_g) \in [0,1]^g\), \(\boldsymbol{\beta}= (\beta_1,\dots,\beta_g) \in [0,1]^g\), and \(k \in [n]\). A ranking \(\pi:[n]\to E\) is \((\boldsymbol{\alpha},\boldsymbol{\beta})\)-\(k\)-fair (or \(k\)-fair) if \[\lfloor \alpha_i k \rfloor \le |\mathsf{Top}_k(\pi)\cap G_i| \le \lceil \beta_i k \rceil \qquad \text{for all } i\in[g].\]
This notion imposes the constraint only at a single prefix length, namely \(k\). The next notion strengthens this requirement by imposing analogous constraints on multiple prefixes.
Definition 2 (\((\boldsymbol{\alpha},\boldsymbol{\beta})\)-block-\(k\)-fairness [11]). Let \(E\) be a set of \(n\) candidates partitioned into \(g\) groups \(G_1,\dots,G_g\). Let \(\boldsymbol{\alpha}= (\alpha_1,\dots,\alpha_g) \in [0,1]^g\), \(\boldsymbol{\beta}= (\beta_1,\dots,\beta_g) \in [0,1]^g\), and \(k,b\in[n]\), where we assume that \(b\alpha_i\) and \(b\beta_i\) are integers for all \(i\in[g]\). A ranking \(\pi:[n]\to E\) is \((\boldsymbol{\alpha},\boldsymbol{\beta})\)-block-\(k\)-fair (or block-\(k\)-fair) if \[\alpha_i h \le |\mathsf{Top}_h(\pi)\cap G_i| \le \beta_i h \quad \text{for all } i\in[g] \text{ and all } h\in[n] \text{ with } h\ge k \text{ and } h\equiv 0 \!\!\pmod{b}.\]
The Closest Fair Ranking (CFR) problem, investigated in [11], asks, given a ranking \(\pi\) on \(E=\bigsqcup_{i=1}^g G_i\), vectors \(\boldsymbol{\alpha},\boldsymbol{\beta}\in [0,1]^g\), and an integer \(k\), to find a \(k\)-fair ranking \(\sigma\) minimizing the Kendall tau distance \(d_{\mathrm{KT}}(\sigma,\pi)\).
The Fair Rank Aggregation (FRA) problem, investigated in [11], [13], asks, given \(m\) rankings \(\pi_1, \dots, \pi_m\) on \(E=\bigsqcup_{i=1}^g G_i\), vectors \(\boldsymbol{\alpha},\boldsymbol{\beta}\in [0,1]^g\), and an integer \(k\), to find a \(k\)-fair ranking \(\sigma\) minimizing \(\sum_{j=1}^m d_{\mathrm{KT}}(\sigma,\pi_j)\).
The block-fairness versions of these problems can also be defined. Efficient algorithms for CFR were given for the \(k\)-fair and block-\(k\)-fair versions [11]. In contrast, FRA is a generalization of the NP-hard Kemeny consensus problem, and previous work has focused on approximation [11], [13].
We briefly recall standard facts on matroids and then introduce some basics of flag matroids; see, e.g., [28], [29] for more details on matroids and [14]–[16] for details on flag matroids. We also provide examples of flag matroids that arise from combinatorial structures.
A matroid is a pair \(M=(E,\mathcal{I})\) consisting of a finite set \(E\) and a family \(\mathcal{I}\subseteq 2^E\) satisfying the following three axioms: (I1) \(\emptyset\in \mathcal{I}\), (I2) If \(I\subseteq J\in \mathcal{I}\), then \(I\in \mathcal{I}\), and (I3) If \(I,J\in \mathcal{I}\) and \(|I|<|J|\), then there exists \(e\in J\setminus I\) such that \(I\cup\{e\}\in \mathcal{I}\).
The set \(E\) is called the ground set, and \(\mathcal{I}\) the independent set family of \(M\). The base family \(\mathcal{B}\) of \(M\) consists of the inclusion-wise maximal members of \(\mathcal{I}\). By (I3), all members of \(\mathcal{B}\) have the same cardinality, say \(k\); this number is called the rank of \(M\).
A matroid can be specified by its base family, i.e., when \(\mathcal{B}\) is the base family of a matroid, the independent set family is given as \(\mathcal{I}=\set{I\subseteq E |\exists B\in \mathcal{B}: I\subseteq B}\).
In this paper, we mainly use the base-family viewpoint; we suppose that a matroid is represented in the form \(M=(E, \mathcal{B})\) using the base family. For algorithmic purposes, however, we assume access to an independence oracle, following the usual convention.
The rank function \(\mathrm{rk}_M:2^E\to \mathbb{Z}_+\) of a matroid \(M=(E, \mathcal{B})\) is given by \[\mathrm{rk}_M(S)=\max\{\,|S\cap B|\mid B\in \mathcal{B}\,\}\quad (S\subseteq E).\] It is also written with the independent set family \(\mathcal{I}\) as \(\mathrm{rk}_M(S)=\max\{\,|I|\mid I\in \mathcal{I}, I\subseteq S\,\}\).
Below, we fix a finite set \(E\) and write \(n=|E|\). For any ranking \(\pi:[n]\to E\) and any integer \(k\in [n]\), the Gale order on \(\binom{E}{k}\) induced by \(\pi\) is the partial order \(\preceq_\pi^{\mathrm G}\) on \(\binom{E}{k}\) defined as follows. For \(A,B\in \binom{E}{k}\), write \[\begin{align} A&=\{a_1,a_2,\dots,a_k\}, \quad a_1\prec_\pi a_2\prec_\pi \cdots \prec_\pi a_k,\\ B&=\{b_1,b_2,\dots,b_k\}, \quad b_1\prec_\pi b_2\prec_\pi \cdots \prec_\pi b_k, \end{align}\] and define \(\preceq_\pi^{\mathrm G}\) by \[A\preceq_\pi^{\mathrm G} B \quad\Longleftrightarrow\quad a_i\preceq_\pi b_i\;(i=1,2,\dots, k).\] One reformulation of Gale’s theorem [31] states that a family \(\mathcal{B}\subseteq \binom{E}{k}\) is the base family of a matroid on \(E\) if and only if, for every ranking \(\pi\) over \(E\), the family \(\mathcal{B}\) has a unique \(\preceq_\pi^{\mathrm G}\)-minimum member.
The unique \(\preceq_\pi^{\mathrm G}\)-minimum base is known to be computable by the greedy algorithm. For a matroid \(M=(E,\mathcal{B})\) and a ranking \(\pi\), the greedy algorithm on \(M\) with respect to \(\pi\) works as follows: start with \(X=\emptyset\), and for each \(i=1,2,\dots,n\), if \(X\cup\{\pi(i)\}\in \mathcal{I}\), then update \(X\gets X\cup\{\pi(i)\}\). The output is the final set \(X\). Clearly, this algorithm requires \(O(n)\) oracle calls. The algorithm is also known to compute a minimum-weight base. We summarize these well-known facts in the following proposition; see [29] and also [31], [32].
Proposition 1. Let \(M=(E, \mathcal{B})\) be a matroid and \(\pi:[n]\to E\) be a ranking. The output of the greedy algorithm on \(M\) with respect to \(\pi\) coincides with the unique \(\preceq_\pi^{\mathrm G}\)-minimum base \(B^*\in \mathcal{B}\). In addition, \(B^*\) is a minimum-weight base with respect to any weight function compatible with \(\pi\) (i.e., \(w\in\mathbb{R}^E\) such that \(e\prec_{\pi} f\implies w(e)\leq w(f)\)).
As in the previous subsection, \(E\) is a finite set with \(|E|=n\). Let \(\boldsymbol{k}=(k_1,\dots,k_s)\) be a strictly increasing sequence of integers with \(0\le k_1<\cdots<k_s\le n\). A flag of rank \(\boldsymbol{k}\) on \(E\) is a chain \[F_1\subsetneq F_2\subsetneq \cdots \subsetneq F_s \subseteq E \qquad\text{with}\qquad |F_i|=k_i \;\;(i=1,2,\dots,s).\] We write \(\mathcal{F}^{\boldsymbol{k}}_{E}\) for the set of all such flags.
A flag matroid of rank \(\boldsymbol{k}\) on \(E\) is a sequence \(\boldsymbol{M}=(M_1,\dots,M_s)\) of matroids on the same ground set \(E\) such that \(M_i\) has rank \(k_i\) for each \(i\in[s]\) and \(M_i\) is a quotient of \(M_{i+1}\) for each \(i\in[s-1]\). For matroids \(M\) and \(N\) on the same ground set, \(N\) is a quotient of \(M\) if \[\mathrm{rk}_N(Y)-\mathrm{rk}_N(X)\leq \mathrm{rk}_M(Y)-\mathrm{rk}_M(X)\quad \text{for all X\subseteq Y\subseteq E}.\] Various equivalent definitions of matroid quotient in terms of bases, circuits, and flats are known; see, e.g., [17], [33], and [15]. If \(\mathcal{B}_i\) denotes the base family of \(M_i\), then the associated family of flag bases is \[\mathcal{F}(\boldsymbol{M}) = \set{(B_1,\dots,B_s)| B_i\in \mathcal{B}_i \;(i=1,2,\dots,s),\;B_1\subsetneq B_2\subsetneq \cdots \subsetneq B_s}.\]
As with ordinary matroids, flag matroids admit a characterization via Gale order. To state it, we extend the Gale order from \(\binom{E}{k}\) to \(\mathcal{F}^{\boldsymbol{k}}_{E}\). For a ranking \(\pi\) over \(E\) and any two flags \(\boldsymbol{F}=(F_1,\dots,F_s), \boldsymbol{G}=(G_1,\dots,G_s)\in \mathcal{F}^{\boldsymbol{k}}_{E}\), we define \(\preceq_\pi^{\mathrm G}\) by \[\boldsymbol{F}\preceq_{\pi}^{\mathrm G} \boldsymbol{G} \quad\Longleftrightarrow\quad F_h\preceq_{\pi}^{\mathrm G} G_h \;\;(h=1,2,\dots,s).\]
Similarly to the case of matroids, a flag matroid is characterized by the existence of a minimum flag base with respect to Gale order [34]; a nonempty family \(\mathcal{F}\subseteq \mathcal{F}^{\boldsymbol{k}}_{E}\) is the family of flag bases of a flag matroid on \(E\) if and only if, for every ranking \(\pi\) over \(E\), the family \(\mathcal{F}\) has a unique \(\preceq_{\pi}^{\mathrm G}\)-minimum member.
For algorithmic purposes, we provide here a constructive proof of the “only if” direction.
Proposition 2. For a flag matroid \(\boldsymbol{M}=(M_1,\dots,M_s)\) on \(E\) and a ranking \(\pi:[n]\to E\), the outputs \(B_i^*~(i\in[s])\) of the greedy algorithm on \(M_i\) with respect to \(\pi\) form a chain \(B_1^*\subsetneq B_2^*\subsetneq \cdots \subsetneq B_s^*\), and \((B_1^*, B_2^*, \cdots, B_s^*)\) is the unique \(\preceq_{\pi}^{\mathrm G}\)-minimum flag base.
Proof. For each \(i\in[s]\), let \(\mathcal{I}_i\) denote the independent set family of \(M_i\). Consider running the greedy algorithm on all \(M_i\) simultaneously. Start with \((X_1,\dots, X_s)=(\emptyset,\dots, \emptyset)\), and scan \(\pi(j)\) for \(j=1,2,\dots,n\) sequentially as follows: for each \(i\in [s]\), if \(X_i\cup\{\pi(j)\}\in \mathcal{I}_i\), then update \(X_i\gets X_i\cup\{\pi(j)\}\). After scanning the last element \(\pi(n)\), output the final set \((X_1,\dots, X_s)\). Clearly, each \(X_i\) in the output coincides with \(B_i^*\), since its construction is exactly the usual greedy algorithm on \(M_i\). We now show by induction that \((X_1,\dots, X_s)\) is always a chain during the algorithm.
The claim clearly holds before the algorithm scans \(\pi(1)\). For any \(j\in[n]\), suppose that the claim holds just before the algorithm scans \(\pi(j)\). Observe that, just before \(\pi(j)\) is scanned, for any \(i\in [s]\), the set \(X_i\) is an inclusion-wise maximal independent subset of \(\mathsf{Top}_{j-1}(\pi)=\{\pi(1),\dots, \pi(j-1)\}\) in \(M_i\) (this follows from (I2)). Therefore, \(X_i\cup\{\pi(j)\}\in \mathcal{I}_i\) holds if and only if \(\mathrm{rk}_{M_i}(\mathsf{Top}_{j}(\pi))-\mathrm{rk}_{M_i}(\mathsf{Top}_{j-1}(\pi))=1\) (this follows from (I3) and the definition of \(\mathrm{rk}_{M_i}\)). By repeated application of the quotient property, for any \(i'>i\), if \(\mathrm{rk}_{M_i}(\mathsf{Top}_{j}(\pi))-\mathrm{rk}_{M_i}(\mathsf{Top}_{j-1}(\pi))=1\), then \(\mathrm{rk}_{M_{i'}}(\mathsf{Top}_{j}(\pi))-\mathrm{rk}_{M_{i'}}(\mathsf{Top}_{j-1}(\pi))=1\), which is equivalent to \(X_{i'}\cup\{\pi(j)\}\in \mathcal{I}_{i'}\). Therefore, whenever \(\pi(j)\) is added to \(X_i\), it is also added to \(X_{i'}\) for all \(i'>i\). Thus, \((X_1,\dots, X_s)\) remains a chain.
By Proposition 1, for each \(i\in[s]\), the set \(B_i^*\) is the unique \(\preceq_{\pi}^{\mathrm G}\)-minimum base of \(M_i\). Hence, for any flag base \((B_1,\dots,B_s)\in \mathcal{F}(\boldsymbol{M})\), we have \(B_i^*\preceq_{\pi}^{\mathrm G} B_i\) for all \(i\in[s]\), and hence \((B_1^*,\dots,B_s^*)\) is the unique \(\preceq_{\pi}^{\mathrm G}\)-minimum flag base. ◻
We present three classes of matroids relevant to constrained ranking and aggregation and identify sufficient conditions under which members of the same class are in a quotient relation.
The first example directly captures \(k\)-fairness; see [35] and [36].
Example 1 (Generalized Partition Matroid). Let \(E=G_1\sqcup \cdots \sqcup G_g\) be a partition, let \(\boldsymbol{\ell}=(\ell_i)_{i\in [g]}\in \mathbb{Z}_+^g\) and \(\boldsymbol{u}=(u_i)_{i\in [g]}\in \mathbb{Z}_+^g\) with \(0\le \ell_i \le u_i \le |G_i|~(i\in[g])\), and let \(k\in \mathbb{Z}_{+}\) satisfy \(\sum_{i=1}^g \ell_i \le k \le \sum_{i=1}^g u_i\). Then the family \[\mathcal{B}_{k,\boldsymbol{\ell},\boldsymbol{u}} = \set{B\subseteq E |~ |B|=k,\;\;\ell_i \le |B\cap G_i|\le u_i \;\text{for all } i\in[g]\,}\] is the base family of a matroid, called a generalized partition matroid.
A usual partition matroid is the case \(\ell_i=0~(i\in[g])\) and \(k=\sum_{i\in[g]} u_i\).
The \(k\)-fairness condition in Section 2 is captured by a generalized partition matroid: if we set \(\ell^*_i=\lfloor \alpha_i k \rfloor\) and \(u^*_i=\lceil \beta_i k \rceil\) for each \(i\in[g]\), then a ranking \(\pi\) over \(E\) is \((\boldsymbol{\alpha},\boldsymbol{\beta})\)-\(k\)-fair if and only if \(\mathsf{Top}_k(\pi)\in \mathcal{B}_{k,\boldsymbol{\ell}^*, \boldsymbol{u}^*}\), provided that this family is nonempty.
The next proposition gives a sufficient condition for quotient relations between generalized partition matroids, and hence for obtaining flag matroids. The proof is in Appendix 9.
propositionPropPartitionQuotient Let \(N\) and \(M\) be generalized partition matroids defined from the same partition \(E=G_1\sqcup \cdots \sqcup G_g\), but with different parameters \((k, \boldsymbol{\ell}, \boldsymbol{u})\) and \((k', \boldsymbol{\ell}', \boldsymbol{u}')\), respectively, where \(k<k'\) and neither \(\mathcal{B}_{k,\boldsymbol{\ell},\boldsymbol{u}}\) nor \(\mathcal{B}_{k',\boldsymbol{\ell}',\boldsymbol{u}'}\) is empty. Then \(N\) is a quotient of \(M\) if \[\ell_i\leq \ell'_i\leq \lfloor\tfrac{k'}{k}\ell_i\rfloor, \qquad u_i\leq u'_i\leq \lfloor\tfrac{k'}{k}u_i \rfloor \qquad \text{for all } i\in[g].\]
Consequently, any sequence \(M_1,\dots,M_s\) such that each pair \((M_j,M_{j+1})\) satisfies Proposition [prop:quotient-partition] forms a flag matroid. In particular, block-\(k\)-fairness is a special case; as we formally prove in the appendix as Corollary 2, if we define a flag matroid \(\boldsymbol{M}=(M_1, \dots, M_s)\) and its rank \((h_1, \dots, h_s)\) appropriately, we have that a ranking \(\pi\) is \((\boldsymbol{\alpha},\boldsymbol{\beta})\)-block-\(k\)-fair if and only if \((\mathsf{Top}_{h_1}(\pi), \dots, \mathsf{Top}_{h_s}(\pi))\in \mathcal{F}(\boldsymbol{M})\).
We next give two more general examples.
One is a generalized transversal matroid, which is the size-\(k\) truncation of the generalized matroid in [37]. It models assignment-type feasibility constraints. For example, the top-\(k\) prefix of a consensus ranking may have to be assignable to eligible departments, tracks, or reserved positions under capacity or reserve requirements. A related reserve-graph formulation uses transversal matroids to encode eligibility for reserved positions [20]; our generalized version further allows lower and upper quotas for each position type.
Example 2 (Generalized Transversal Matroid). Let \(E\) and \(D\) be disjoint finite sets, let \(\Gamma:D\to 2^E\), let \(\boldsymbol{p}=(p_d)_{d\in D}\in \mathbb{Z}_+^D\) and \(\boldsymbol{q}=(q_d)_{d\in D}\in \mathbb{Z}_+^D\) with \(0\leq p_d\leq q_d\leq |\Gamma(d)|~(d\in D)\), and let \(k\in \mathbb{Z}_+\). Define \[\mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}} = \left\{\, B\subseteq E \;\middle|\; \begin{array}{l} |B|=k,\;\exists \varphi:B\to D \text{ such that}\\ \qquad \varphi^{-1}(d)\subseteq \Gamma(d),\; p_d\le |\varphi^{-1}(d)|\le q_d ~~\,\text{for all}~d\in D \end{array} \right\}.\] If nonempty, \(\mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\) is the base family of a matroid, called a generalized transversal matroid.
When \(p_d=0\) and \(q_d=1\) for all \(d\in D\), this reduces to the size-\(k\) truncation of the usual transversal matroid.
We give a sufficient condition for two generalized transversal matroids defined from the same bipartite structure to have a quotient relation.
propositionPropTransversalQuotient Let \(N\) and \(M\) be generalized transversal matroids on \(E\) defined with the same \(D\), \(\Gamma\), but with different parameters \((k,\boldsymbol{p},\boldsymbol{q})\) and \((k',\boldsymbol{p}',\boldsymbol{q}')\), respectively, where \(k<k'\) and neither \(\mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\) nor \(\mathcal{B}^{\rm tv}_{k',\boldsymbol{p}',\boldsymbol{q}'}\) is empty. Then \(N\) is a quotient of \(M\) if \[p_d\le p'_d\le \lfloor\tfrac{k'}{k}\,p_d\rfloor, \qquad q_d\le q'_d\le \lfloor\tfrac{k'}{k}\,q_d\rfloor \qquad \text{for all } d\in D.\]
We postpone the proof of Proposition [prop:quotient-transversal] to Appendix 9 and describe only its main ingredient here. The proof is based on induction by a bipartite graph, an operation that constructs a new matroid from a given one. Brandenburg–Loho–Smith [17] showed that induction preserves quotient relations. Proposition [prop:quotient-transversal] then follows by applying Proposition [prop:quotient-partition] to suitable generalized partition matroids and then using induction.
A second example is what we call a generalized laminar matroid. It is the fixed-cardinality restriction of the laminar lower/upper-quota family, which is a generalized matroid [37]. Unlike the partition-based constraints, these constraints allow nested groups, so one can impose quotas simultaneously on broad groups and their subgroups. Similar hierarchical constraints have appeared in fairness-motivated committee selection and ranking. Bredereck et al. [21] study committee selection with label-wise cardinality constraints and explicitly discuss laminar label structures such as countries and continents; Gorantla et al. [22] consider laminar protected groups in fair ranking.
Example 3 (Generalized Laminar Matroid). Let \(E\) be a finite set, \(\mathcal{L}\subseteq 2^E\) be a laminar family, \(g,f:\mathcal{L}\to \mathbb{Z}_{+}\) be functions with \(g(L)\leq f(L)\) for all \(L\in \mathcal{L}\), and \(k\in \mathbb{Z}_+\). Define \[\mathcal{B}^{\rm lam}_{k,g,f} =\set{ B\subseteq E| ~|B|=k,~~g(L)\leq |B\cap L|\leq f(L) \text{~for all~} L\in \mathcal{L}}.\] If nonempty, \(\mathcal{B}^{\rm lam}_{k,g,f}\) forms the base family of a matroid, called a generalized laminar matroid.
When \(g(L)=0\) for all \(L\in \mathcal{L}\), this reduces to a size-\(k\) truncation of the usual laminar matroid.
We give a sufficient condition for two generalized laminar matroids defined on the same laminar family to have a quotient relation.
propositionPropLaminarQuotient Suppose that generalized laminar matroids \(N\) and \(M\) are defined with the same laminar family \(\mathcal{L}\), but with different parameters \((k,g,f)\) and \((k',g',f')\), respectively, where \(k<k'\) and neither \(\mathcal{B}^{\rm lam}_{k,g,f}\) nor \(\mathcal{B}^{\rm lam}_{k',g',f'}\) is empty. Then \(N\) is a quotient of \(M\) if \[g'(L)=\lfloor \tfrac{k'}{k}\,g(L)\rfloor, \qquad f'(L)=\lfloor \tfrac{k'}{k}\,f(L)\rfloor \qquad \text{for all } L\in \mathcal{L}.\]
We remark that, in contrast to the partition case, the condition in Proposition [prop:quotient-laminar] cannot in general be weakened to inequalities analogous to those in Proposition [prop:quotient-partition].
Remark 3. For all matroids in this subsection, the independence oracle can be implemented from the defining structure and parameters using network flow algorithms. In particular, given any ranking \(\pi\), the \(\preceq_\pi^{\mathrm G}\)-minimum base can be computed efficiently; see, e.g., [37].
Other sources of flag matroids are also available. For partition matroids, i.e., partition constraints without lower quotas, the weaker condition \(u_i\leq u'_i~(i\in [g])\) suffices. Similar relaxations are possible in the transversal and laminar settings when lower quotas are absent. Another source comes from matroid union: if \(N_1, N_2, \dots, N_s\) are matroids on the same ground set and \(M_i\) is the matroid union of \(N_1, \dots, N_i\) for each \(i=1,\dots,s\), then \((M_1, M_2,\dots, M_s)\) forms a flag matroid (after removing repetitions of the same matroid if any).
We propose the following two problems as generalizations of Closest Fair Ranking (CFR) studied in [11], [13] and reviewed in Section 2. The first generalizes CFR with \(k\)-fairness.
Matroid Closest Feasible Ranking (Matroid-CFR)
Input: A ranking \(\pi\) over \(E\) and a matroid \(M=(E,\mathcal{B})\) of rank \(k\).
Output: A ranking \(\sigma\) over \(E\) minimizing \(d_{\mathrm{KT}}(\sigma,\pi)\) subject to \(\mathsf{Top}_k(\sigma)\in \mathcal{B}\).
The second problem below generalizes CFR with block-\(k\)-fairness.
Flag Matroid Closest Feasible Ranking (Flag-Matroid-CFR)
Input: A ranking \(\pi\) over \(E\) and a flag matroid \(\boldsymbol{M}=(M_1, \dots, M_s)\) of rank \(\boldsymbol{k}=(k_1, \dots, k_s)\), where the base family of \(M_i\) is denoted by \(\mathcal{B}_i\).
Output: A ranking \(\sigma\) over \(E\) minimizing \(d_{\mathrm{KT}}(\sigma,\pi)\) subject to \(\mathsf{Top}_{k_i}(\sigma)\in \mathcal{B}_i~(i\in[s])\).
Note that Matroid-CFR is a special case of Flag-Matroid-CFR with \(s=1\). However, we will treat this special case separately, since it is much easier than the case \(s\geq 2\).
We first provide a basic observation that can be used in both problems. Given an instance of Flag-Matroid-CFR as above, any ranking \(\sigma\) satisfying \(\mathsf{Top}_{k_i}(\sigma)\in \mathcal{B}_i~(i\in[s])\) is determined by the following two pieces of data: (1) a choice of a flag base \((B_1, B_2,\dots, B_s)\in \mathcal{F}(\boldsymbol{M})\) such that \(B_i=\mathsf{Top}_{k_i}(\sigma)~(i\in[s])\), and (2) an ordering of each of the parts \(B_i \setminus B_{i-1}\) for \(i\in[s+1]\), where for convenience we set \(B_0=\emptyset\) and \(B_{s+1}=E\).
For any flag base \(\boldsymbol{B}=(B_1, B_2, \dots, B_s)\) of \(\boldsymbol{M}\), which forms a chain by definition, we define a ranking \(\pi_{\boldsymbol{B}}\) on \(E\) as follows: the elements are ordered by concatenating \(B_1\), \(B_2 \setminus B_1\), \(B_3 \setminus B_2\), \(\dots\), \(B_s \setminus B_{s-1}\), and \(E \setminus B_s\); within each part, the elements are ordered according to the input ranking \(\pi\). See Figure 1.
observationObsOptRanking For a ranking \(\pi:[n]\to E\) and any flag base \(\boldsymbol{B}=(B_1, B_2,\dots, B_s)\), among rankings \(\sigma\) satisfying \(\mathsf{Top}_{k_i}(\sigma)=B_i~(i\in[s])\), the one minimizing \(d_{\mathrm{KT}}(\sigma, \pi)\) is \(\pi_{\boldsymbol{B}}\).
We postpone the proof to Appendix 10 but it is summarized as follows. The constraints \(\mathsf{Top}_{k_i}(\sigma)=B_i~(i\in[s])\) fix the order of the blocks \(B_1\), \(B_2 \setminus B_1\), \(B_3 \setminus B_2\), \(\dots\), \(B_s \setminus B_{s-1}\), and \(E \setminus B_s\) in \(\sigma\). Hence, among the pairs counted in \(d_{\mathrm{KT}}(\sigma,\pi)\), those from different blocks contribute a constant independent of the internal ordering of each block. Therefore, it suffices to minimize the contribution of pairs within each block, which is achieved by ordering the elements of every block according to \(\pi\).
Therefore, once a flag base \(\boldsymbol{B}=(B_1,\dots,B_s)\in \mathcal{F}(\boldsymbol{M})\) is fixed, the ranking \(\sigma\) minimizing \(d_{\mathrm{KT}}(\sigma,\pi)\) is uniquely determined as \(\pi_{\boldsymbol{B}}\). Hence, Flag-Matroid-CFR reduces to the problem of finding a flag base \(\boldsymbol{B}\in \mathcal{F}(\boldsymbol{M})\) that minimizes \(d_{\mathrm{KT}}(\pi_{\boldsymbol{B}},\pi)\).
We first apply Observation [obs:fixedbase] to the case \(s=1\), i.e., Matroid-CFR. For this special case, the objective function can be written explicitly.
lemmaLemOptRanking Given an instance \((\pi, (E, \mathcal{B}))\) of Matroid-CFR, where the rank of \((E, \mathcal{B})\) is \(k\), for any base \(B\in \mathcal{B}\), we have \(d_{\mathrm{KT}}(\pi_{B}, \pi)= \sum_{e \in B} \pi^{-1}(e)-\frac{k(k+1)}{2}\).
The proof is given in Appendix 10, but the idea is simple. Starting from \(\pi\), consider obtaining \(\pi_B\) by moving the elements of \(B\) to the top \(k\) positions while preserving their relative order in \(\pi\). If \(e\in B\) is the \(h\)th highest element of \(B\) in \(\pi\), then it moves left by exactly \(\pi^{-1}(e)-h\) positions, creating one inversion at each step. Summing over all \(e\in B\) gives the formula.
Since \(-\frac{k(k+1)}{2}\) is a constant independent of the choice of \(B\), Lemma [lem:MatroidCFR] shows that Matroid-CFR reduces to the minimum-weight base problem with weights \(w(e)=\pi^{-1}(e)\). Then Proposition 1 immediately implies the following.
Theorem 4. Given an instance \((\pi, (E, \mathcal{B}))\) of Matroid-CFR, let \(B^*\) denote the unique \(\preceq_\pi^{\mathrm G}\)-minimum base in \(\mathcal{B}\). Then \(\pi_{B^*}\) is the unique optimal solution to Matroid-CFR. Thus, Matroid-CFR can be solved efficiently.
By Proposition 2, for a flag matroid \(\boldsymbol{M}=(M_1, M_2,\dots, M_s)\), the unique \(\preceq_\pi^{\mathrm G}\)-minimum bases \(B_{i}^*\) of the matroids \(M_i\) form a chain \(B_1^*\subsetneq B_2^*\subsetneq \cdots \subsetneq B_s^*\), and hence give a flag base \(\boldsymbol{B}^*=(B^*_1,\dots, B^*_s)\). As a generalization of Theorem 4, we expect that \(\pi_{\boldsymbol{B}^*}\) gives the unique optimal solution to Flag-Matroid-CFR. This is indeed true, as we will show. However, the single-matroid proof does not extend directly.
We demonstrate that analyzing Flag-Matroid-CFR is not straightforward when \(s\geq 2\). Take any flag base \(\boldsymbol{B}=(B_1, B_2, \dots, B_s)\) and consider the corresponding ranking \(\pi_{\boldsymbol{B}}\), which arranges the blocks \(B_1, B_2\setminus B_1, \dots, B_s\setminus B_{s-1}\) and \(E\setminus B_s\) in this order, where within each block the elements are arranged in the order of \(\pi\). Let us write \(d_{\mathrm{KT}}(\pi_{\boldsymbol{B}}, \pi)\) in a way mimicking Lemma [lem:MatroidCFR]. One possible expression is then \[d_{\mathrm{KT}}(\pi_{\boldsymbol{B}}, \pi)=\sum_{e\in B_1}\pi^{-1}(e)~+\!\!\!\sum_{e\in B_2\setminus B_1}(\pi|_{E\setminus B_1})^{-1}(e)~+~\cdots ~+\!\!\!\sum_{e\in B_s\setminus B_{s-1}}(\pi|_{E\setminus B_{s-1}})^{-1}(e)~+ \text{constant}\] where the notation \((\pi|_X)^{-1}(e)\) represents the rank of \(e\) among \(X\subseteq E\). Here, the first term is simply the weight of \(B_1\) with respect to the weights \(w(e)=\pi^{-1}(e)\), but the weights for the \(i\)th term \((i\geq 2)\) are affected by the choice of \(B_{i-1}\). It is then possible that taking a non-optimal earlier base reduces the latter terms; for example, consider an instance where \(s=2\), \(\pi\) is the identity on \(E=\{1,2,3\}\), and \(\mathcal{B}_1=\{\{1\}, \{3\}\}\) and \(\mathcal{B}_2=\{\{1,3\}\}\). Then \(B_2\) must be \(\{1,3\}\). Choosing \(B_1=\{1\}\) minimizes the first term but then the second term is \(2\) as \((\pi|_{\{2,3\}})^{-1}(3)=2\), whereas choosing \(B_1=\{3\}\) makes the second term smaller (i.e., \(1\)) since \((\pi|_{\{1,2\}})^{-1}(1)=1\). Thus, we cannot divide the objective value into \(s\) separate linear optimization problems, and the optimality of each \(B_i\) with respect to weights \(\pi^{-1}\) does not simply imply the optimality of the whole objective value.
Indeed, if we represent the objective function using binary variables \(x_{ei}\) such that \(x_{ei}=1\Leftrightarrow e\in B_i\setminus B_{i-1}\) for each \(e\in E\) and \(i\in[s+1]\) (with \(B_0=\emptyset\) and \(B_{s+1}=E\)), then this natural formulation yields a quadratic objective function. For a pair of elements \(e,f\) with \(e\prec_\pi f\), its contribution to the objective function can be written as \(\sum_{i,j\in [s+1]: i<j} x_{fi}x_{ej}\). Summing over all pairs \(e\prec_\pi f\), we obtain a quadratic objective function.
Another possible strategy for proving the optimality of \(\pi_{\boldsymbol{B}^*}\) is to suppose, for contradiction, that an optimal solution \(\pi_{\boldsymbol{B}'}\) differs from \(\pi_{\boldsymbol{B}^*}\), and then use the matroid exchange property to modify \(\pi_{\boldsymbol{B}'}\) so as to obtain a solution with a strictly better objective value.3 However, the usual matroid exchange argument does not seem to extend directly, because to modify a flag base while preserving feasibility, we have to guarantee exchangeability with respect to all bases related to the exchanged elements, and such a property does not simply hold for a general flag base. Indeed, [14] shows that flag matroids do not satisfy the strong exchange property in general.
As explained above, except in the case \(s=1\), it seems difficult to reduce Flag-Matroid-CFR to a known combinatorial optimization problem. Here, using the notion of the Bruhat order from the theory of Coxeter groups (in particular, the symmetric group), we show that we can establish the optimality of the greedy solution in a simple way.
Let us identify \(E\) as the set \([n]=\{1,2,\dots, n\}\). Then, the set of all rankings is nothing but the set \(S_n\) of permutations on \([n]\), i.e., the symmetric group. Assume without loss of generality that the input ranking \(\pi\) is the identity permutation \(\mathrm{id}\), i.e., \(\pi(i)=\mathrm{id}(i)=i\) for every \(i\in[n]\). For any permutation (ranking) \(\sigma\in S_n\), the Kendall tau distance \(d_{\mathrm{KT}}(\sigma, \mathrm{id})\) coincides with the inversion number of \(\sigma\), which is defined as \[\mathrm{inv}(\sigma)=|\set{(i,j)\in [n]\times[n]| i<j,~\sigma(i)>\sigma(j)}|.\] Thus, Flag-Matroid-CFR can be seen as the problem of finding \(\sigma\in S_n\) minimizing \(\mathrm{inv}(\sigma)\) subject to \((\mathsf{Top}_{k_1}(\sigma), \dots, \mathsf{Top}_{k_s}(\sigma))\in \mathcal{F}(\boldsymbol{M})\).
We recall the Bruhat order (also called the strong Bruhat order) on \(S_n\) following [30]. For the Bruhat order for general Coxeter groups, see [30].
Bruhat order is a partial order (i.e., a reflexive, antisymmetric, and transitive relation) on the elements of a Coxeter group. Here is a definition of Bruhat order specialized to \(S_n\), where we adopt a characterization given in [30] as a definition.
Definition 3 (Bruhat Order on \(S_n\)). Define a binary relation \(\vartriangleleft\) on \(S_n\) so that \(\sigma \vartriangleleft \tau\) if and only if \(\tau\) is obtained from \(\sigma\) by swapping the positions of some \(i,j\in [n]\) satisfying \(i<j\), \(\sigma(i)<\sigma(j)\), and there is no \(h\) such that \(i<h<j\) and \(\sigma(i)<\sigma(h)<\sigma(j)\).
The Bruhat order \(\leq^{\rm B}\) on \(S_n\) is the transitive and reflexive closure of \(\vartriangleleft\).
We write \(\sigma<^{\rm B} \tau\) if \(\sigma \leq^{\rm B} \tau\) and \(\sigma\neq \tau\). Observe that, by definition, when \(\sigma \vartriangleleft \tau\), we have \(\mathrm{inv}(\tau)=\mathrm{inv}(\sigma)+1\). More precisely, when \(i,j\) satisfy the stated properties, by swapping the positions of \(i\) and \(j\), the inversion status of pairs not involving \(i\) or \(j\) does not change. Among pairs involving \(i\) or \(j\), the only possible changes besides the pair \((i,j)\) occur for indices \(h\) with \(\sigma(i)<\sigma(h)<\sigma(j)\). However, by assumption there is no such \(h\) with \(i<h<j\); hence every such \(h\) satisfies \(h<i<j\) or \(i<j<h\), and its total contribution with \(i\) and \(j\) to the inversion number remains unchanged after the swap. Therefore, only the pair \((i,j)\) changes, from a noninversion to an inversion. As this observation implies, Bruhat order on \(S_n\) satisfies \[\sigma<^{\rm B} \tau~~~\Longrightarrow~~~ \mathrm{inv}(\sigma)<\mathrm{inv}(\tau).\]
Therefore, if we can compute \(\sigma^*\in S_n\) that is minimum with respect to the Bruhat order among all \(\sigma\in S_n\) satisfying \((\mathsf{Top}_{k_1}(\sigma), \dots, \mathsf{Top}_{k_s}(\sigma))\in \mathcal{F}(\boldsymbol{M})\), then \(\sigma^*\) is the optimal solution to Flag-Matroid-CFR. In fact, we can show this by using the following characterization of Bruhat order by Björner–Brenti [18] (also presented in [30]).
Theorem 5 (Tableau Criterion [18]). For \(\sigma,\tau\in S_n\), let \(\sigma_{i,h}\) be the \(i\)th element in the increasing rearrangement of \(\sigma(1), \sigma(2),\dots, \sigma(h)\) and similarly define \(\tau_{i,h}\). Then, \(\sigma\leq^{\rm B} \tau\) if and only if \(\sigma_{i,h}\leq \tau_{i,h}\) for all \(h\in D_R(\sigma)\) and \(i\in[h]\), where \(D_R(\sigma)=\set{h'\in[n-1]| \sigma(h')>\sigma(h'+1)}\).
This can be used to identify the optimal solution of Flag-Matroid-CFR. Recall that, for a flag base \(\boldsymbol{B}=(B_1,\dots, B_s)\in \mathcal{F}(\boldsymbol{M})\), the ranking \(\pi_{\boldsymbol{B}}\) is defined by arranging \(B_1\), \(B_2 \setminus B_1\), \(B_3 \setminus B_2\), \(\dots\), \(B_s \setminus B_{s-1}\), and \(E \setminus B_s\) in this order, where the elements in each part are ordered according to \(\pi\).
Theorem 6. Given an instance \((\pi, \boldsymbol{M})\) of Flag-Matroid-CFR, suppose without loss of generality that \(\pi=\mathrm{id}\). Let \(\boldsymbol{B}^*\in \mathcal{F}(\boldsymbol{M})\) be the unique \(\preceq_{\pi}^{\mathrm G}\)-minimum flag base. Then, for any other flag base \(\boldsymbol{D}\in \mathcal{F}(\boldsymbol{M})\), we have \(\pi_{\boldsymbol{B}^*}<^{\rm B} \pi_{\boldsymbol{D}}\) (and hence \(\mathrm{inv}(\pi_{\boldsymbol{B}^*})<\mathrm{inv}(\pi_{\boldsymbol{D}})\)).
Proof. We write \(\boldsymbol{k}=(k_1, k_2,\dots, k_s)\) for the rank of \(\boldsymbol{M}\). We let \(\boldsymbol{B}^*=(B_1^*,\dots,B_s^*)\) and \(\boldsymbol{D}=(D_1,\dots, D_s)\). Since \(\pi=\mathrm{id}\), by the construction of \(\pi_{\boldsymbol{B}^*}\), when \(\pi_{\boldsymbol{B}^*}\) is regarded as a sequence, in each of the blocks \(B_1^*,~ B_2^* \setminus B_1^*,~ \dots, B_s^* \setminus B_{s-1}^*,~ E \setminus B_s^*\), the elements are in increasing order, and hence \(D_R(\pi_{\boldsymbol{B}^*})\subseteq \{k_1, k_2,\dots, k_s\}\).
For each \(h\in \{k_1, k_2,\dots, k_s\}\), we write \(b_{i,h}\) (resp., \(d_{i,h}\)) for the \(i\)th element in the increasing rearrangement of the elements \(\pi_{\boldsymbol{B}^*}(1),\dots, \pi_{\boldsymbol{B}^*}(h)\) (resp., \(\pi_{\boldsymbol{D}}(1),\dots, \pi_{\boldsymbol{D}}(h)\)). Note that, if \(h=k_j\), then \(\{\pi_{\boldsymbol{B}^*}(1),\dots, \pi_{\boldsymbol{B}^*}(h)\}=B_j^*\) and \(\{\pi_{\boldsymbol{D}}(1),\dots, \pi_{\boldsymbol{D}}(h)\}=D_j\). By Theorem 5, to show \(\pi_{\boldsymbol{B}^*}\leq^{\rm B} \pi_{\boldsymbol{D}}\), it is sufficient to show \(b_{i,h}\leq d_{i,h}\) for all \(h\in D_R(\pi_{\boldsymbol{B}^*})\) and \(i\in [h]\). Since \(D_R(\pi_{\boldsymbol{B}^*})\subseteq \{k_1,k_2,\dots, k_s\}\), it is enough to show the stronger condition that \(b_{i,h}\leq d_{i,h}\) for all \(h\in\{k_1,k_2,\dots, k_s\}\) and \(i\in [h]\). This condition is exactly equivalent to \(\boldsymbol{B}^* \preceq_{\pi}^{\mathrm G} \boldsymbol{D}\), and thus it is satisfied by the definition of \(\boldsymbol{B}^*\). Therefore, \(\pi_{\boldsymbol{B}^*}\leq^{\rm B} \pi_{\boldsymbol{D}}\). Since \(\boldsymbol{D}\neq \boldsymbol{B}^*\), we have \(\pi_{\boldsymbol{D}}\neq \pi_{\boldsymbol{B}^*}\), and hence \(\pi_{\boldsymbol{B}^*}<^{\rm B} \pi_{\boldsymbol{D}}\). ◻
This implies the tractability of Flag-Matroid-CFR.
Corollary 1. Flag-Matroid-CFR can be solved efficiently. The optimal solution is \(\pi_{\boldsymbol{B}^*}\), where \(\boldsymbol{B}^*\) is the unique \(\preceq_{\pi}^{\mathrm G}\)-minimum flag base.
We describe the construction of the optimal solution in algorithmic form in Algorithm 2.
For the correctness of the algorithm, a flag matroid structure, i.e., quotient relations between matroids, is critical. In Appendix 8, we demonstrate that if this condition is relaxed, even in a way that the greedy algorithm remains well defined, optimality is no longer guaranteed.
Using the exact algorithms for Matroid-CFR and Flag-Matroid-CFR from Section 4 as subroutines (in a generalized form for the former), we can extend the approximation frameworks in [13] to the following settings while preserving the approximation ratios.
Matroid Feasible Rank Aggregation (Matroid-FRA)
Input: \(m\) rankings \(\pi_1,\dots,\pi_m\) over \(E\), and a matroid \(M=(E,\mathcal{B})\) of rank \(k\).
Output: A ranking \(\sigma\) over \(E\) minimizing \(\sum_{i=1}^m d_{\mathrm{KT}}(\sigma,\pi_i)\) subject to \(\mathsf{Top}_k(\sigma)\in \mathcal{B}\).
Flag Matroid Feasible Rank Aggregation (Flag-Matroid-FRA)
Input: \(m\) rankings \(\pi_1,\dots,\pi_m\) over \(E\), and a flag matroid \(\boldsymbol{M}=(M_1, \dots,
M_s)\) of rank \(\boldsymbol{k}=(k_1, \dots, k_s)\), where the base family of \(M_i\) is denoted by \(\mathcal{B}_i\).
Output: A ranking \(\sigma\) over \(E\) minimizing \(\sum_{i=1}^m d_{\mathrm{KT}}(\sigma,\pi_i)\) subject to \(\mathsf{Top}_{k_i}(\sigma)\in \mathcal{B}_i\) for each \(i=1,2,\dots, s\).
theoremThmApproxMat For any constant \(\varepsilon>0\), there exists a \((2+\varepsilon)\)-approximation algorithm for Matroid-FRA.
theoremThmApproxFlag There exists a \(2.881\)-approximation algorithm for Flag-Matroid-FRA.
The \((2+\varepsilon)\)-approximation for Matroid-FRA is obtained by replacing the colorful bi-partition subproblem in their framework with a matroidal analogue and then applying the PTAS by Kenyon-Mathieu and Schudy [9] to the two resulting parts. The \(2.881\)-approximation for Flag-Matroid-FRA follows from their generic black-box framework once Flag-Matroid-CFR is polynomial-time solvable. We defer the details to Appendix 11.
In the classical Kemeny consensus (i.e., rank aggregation without constraints), the complexity of the problem with a fixed number \(m\) of voters has been investigated, and the cases \(m=3\) and \(m=5\) remain open [1], [23], [24].
In this section, we show that Matroid-FRA with \(m\) voters is NP-hard for any constant \(m\geq 2\). Note that the case \(m=1\) coincides with Matroid-CFR and is thus already solved in Theorem 4. Indeed, to obtain the hardness result for all \(m\geq 2\), it is sufficient to show the hardness for the cases \(m=2\) and \(m=3\), since for any \(m'>3\), the problem with \(m'\) voters can be reduced to the problem with \(m'-2\) voters (see the proof of Corollary [cor:all95m]).
theoremThmHardTwo Matroid-FRA with \(2\) voters is NP-hard.
theoremThmHardThree Matroid-FRA with \(3\) voters is NP-hard.
As suggested by the current complexity status of the unconstrained setting, odd numbers of voters are harder to handle. Indeed, proving Theorem [thm:three] requires an involved construction of three input rankings. Both proofs use only simple partition matroids. See Appendix 12 for the proofs and Figures 4 and 5 for illustrations of the reductions.
corollaryCorAll For any \(m\geq 2\), Matroid-FRA with \(m\) voters is NP-hard. The statement holds even when matroids are restricted to partition matroids.
We thank Yuya Ryuzaki for helpful discussions at an early stage of this work. The second author was supported by JST ERATO Grant Number JPMJER2301, JST CRONOS Grant Number JPMJCS24K2, and JSPS KAKENHI Grant Number JP26K14706.
In [11], the authors give an exact algorithm for Closest Fair Ranking under block-\(k\)-fairness constraints. When specialized to this setting, our algorithm for Flag-Matroid-CFR produces the same ranking as theirs.
They establish optimality by an exchange argument, aiming to show that a ranking different from the algorithm’s output admits a feasible exchange of two elements that improves the objective value. However, to the best of our understanding, the exchange step as stated requires an additional justification: the proposed swap need not preserve all block-prefix constraints simultaneously. We explain the issue in [11], using the notation of the present paper.
The key point is that block-\(k\)-fairness is a simultaneous feasibility condition: By its definition, a block-\(k\)-fair ranking must satisfy the fairness constraint for every block-prefix of length at least \(k\). By contrast, the swap argument proved in their Theorem 3.2 concerns fairness for one fixed prefix length only. Thus, when Theorem 3.2 is invoked inside their Claim 3.8 to conclude that swapping two elements produces another block-\(k\)-fair ranking, this conclusion does not follow from Theorem 3.2 alone.
This issue can already be seen in a small example. Consider the groups \[G_1=\{a_1,a_2\},\qquad G_2=\{b_1,b_2\},\qquad G_3=\{c\}\] with block length \(b=2\) and \(k=2\), and let \[\alpha_1=\alpha_2=\alpha_3=0,\qquad \beta_1=\tfrac12,\qquad \beta_2=\beta_3=1.\] Then block-\(k\)-fairness requires that the top-\(2\) prefix may contain at most one element of \(G_1\), and the top-\(4\) prefix may contain at most two elements of \(G_1\). There are no other constraints, since \(\alpha_1=\alpha_2=\alpha_3=0\) and \(\beta_2=\beta_3=1\) impose nothing.
Now consider the input ranking \[\pi=(a_1,a_2,b_1,b_2,c).\] Then, the output of the algorithm in [11] (which coincides with our algorithm’s output) is \[\sigma=(a_1,b_1,a_2,b_2,c).\] Consider a block-\(k\)-fair ranking \[\pi^*=(a_1,c,b_1,b_2,a_2).\] This satisfies block-\(k\)-fairness and also preserves the intra-group orderings (i.e., the input ordering in each group). Since \(\mathsf{Top}_{4}(\sigma)\neq \mathsf{Top}_{4}(\pi^*)\), following the argument in [11], take the elements \(a_2\in \mathsf{Top}_{4}(\sigma)\setminus \mathsf{Top}_{4}(\pi^*)\) and \(c\in \mathsf{Top}_{4}(\pi^*)\setminus \mathsf{Top}_{4}(\sigma)\). The intended argument is that, by swapping \(a_2\) and \(c\) in \(\pi^*\), one obtains a block-\(k\)-fair ranking \(\pi^{**}\) that is closer to \(\pi\) than \(\pi^*\). As we have \(a_2\prec_{\pi} c\), swapping \(a_2\) and \(c\) indeed reduces the objective value. However, the resulting ranking \[\pi^{**}=(a_1,a_2,b_1,b_2,c)\] contains more than one element of \(G_1\) in its top-\(2\) prefix, violating block-\(k\)-fairness.
Therefore, the step in Claim 3.8 asserting that the exchanged ranking is still block-\(k\)-fair does not seem to follow as stated without an additional argument. The same concern also applies to Claim 3.9. Thus, the exchange-based proof of Theorem 3.4 appears to require an additional justification at this step.
Importantly, Claims 3.8 and 3.9 and Theorem 3.4 themselves are true; our proof based on Bruhat order establishes their correctness.
As a generalization of block-\(k\)-fairness, we consider flag matroid constraints on rankings. However, for a sequence of matroids, one can consider weaker conditions, and it is natural to ask to what extent the tractability of Flag-Matroid-CFR extends. We do not know a clear answer, but here we provide some observations.
Suppose that we have a sequence \((M_1, M_2,\dots, M_s)\) of matroids on the same ground set \(E\) with ranks \(k_1<k_2<\cdots <k_s\). Each matroid is given as \(M_i=(E, \mathcal{B}_i)\).
Note that, if we have no additional assumption at all, then even finding a feasible ranking is NP-hard when \(s\geq 3\). This follows easily from the fact that 3-matroid intersection is NP-hard.
We then consider imposing some assumptions on \((M_1,M_2,\dots, M_s)\) to obtain a reasonable class. As gradual restrictions, we can consider the following three settings:
The independent set families satisfy \(\mathcal{I}_1\subseteq \mathcal{I}_2\subseteq \cdots\subseteq \mathcal{I}_s\). This is equivalent to the condition that for every \(i\in[s-1]\) and \(B\in\mathcal{B}_i\), there exists \(B'\in \mathcal{B}_{i+1}\) with \(B\subseteq B'\).
The above condition holds, and in addition, for every \(i\in[s]\setminus \{1\}\) and \(B\in\mathcal{B}_i\), there exists \(B'\in \mathcal{B}_{i-1}\) with \(B'\subseteq B\).
\((M_1,M_2,\dots, M_s)\) forms a flag matroid.
Clearly, 2 implies 1. It is also not hard to see that 3 implies 2; a quotient relation implies \(\mathrm{rk}_{M_{i}}(X)-\mathrm{rk}_{M_{i}}(\emptyset)\leq \mathrm{rk}_{M_{i+1}}(X)-\mathrm{rk}_{M_{i+1}}(\emptyset)\) for every \(X\subseteq E\), which implies \(\mathcal{I}_i\subseteq \mathcal{I}_{i+1}\). In addition, for any \(B\in \mathcal{B}_i\), we have \(\mathrm{rk}_{M_{i-1}}(E)-\mathrm{rk}_{M_{i-1}}(B)\leq \mathrm{rk}_{M_{i}}(E)-\mathrm{rk}_{M_{i}}(B)=0\), which implies \(\mathrm{rk}_{M_{i-1}}(B)=\mathrm{rk}_{M_{i-1}}(E)\) and hence the existence of \(B'\in \mathcal{B}_{i-1}\) with \(B'\subseteq B\).
There are indeed gaps between any two of these three classes. An example satisfying 1 but violating 2 is given by \(\mathcal{B}_1=\{\{1,2\}\}\) and \(\mathcal{B}_2=\{\{1,2,3\}, \{1,2,4\},\{1,3,4\}\}\). An example of a matroid pair satisfying 2 but violating 3 is given in Figure 3.
Given an input ranking \(\pi\), consider the following two greedy algorithms.
Let \(B_0=\emptyset\) and for \(i=1,2,\dots, s\), do the following.
Let \(X\gets B_{i-1}\).
For each \(e\in E\setminus B_{i-1}\), in the ascending order of \(\pi\), if \(X\cup \{e\}\in \mathcal{I}_i\), then \(X\gets X\cup \{e\}\).
Set \(B_i\gets X\).
Let \(\boldsymbol{B}=(B_1, \dots, B_s)\) and output \(\pi_{\boldsymbol{B}}\) as defined in Section 4.
Let \(B_{s+1}= E\) and for \(i=s, s-1,\dots, 1\), do the following.
Let \(X\gets \emptyset\).
For each \(e\in B_{i+1}\), in the ascending order of \(\pi\), if \(X\cup \{e\}\in \mathcal{I}_i\), then \(X\gets X\cup \{e\}\).
Set \(B_i\gets X\).
Let \(\boldsymbol{B}=(B_1, \dots, B_s)\) and output \(\pi_{\boldsymbol{B}}\) as defined in Section 4.
Then the following hold.
In setting 3, i.e., when the matroids form a flag matroid, both algorithms output the same ranking, and it is the unique optimal solution to Flag-Matroid-CFR.
In setting 2, both algorithms always output feasible rankings, but it is possible that neither output is optimal. We demonstrate this below.
In setting 1, the Forward Greedy Algorithm always outputs a feasible ranking, while the backward one may not.
We provide an example that satisfies the conditions in setting 2 and on which neither of the two greedy algorithms finds an optimal solution.
Consider a pair of matroids \(M_1\) and \(M_2\) on \(E=\{1,2,\dots, 12\}\), which are both partition matroids defined as in Figure 3. The smaller matroid \(M_1\) has rank \(6\) and is defined by the partition drawn in blue. The numbers written in blue show the upper quotas of those classes. The larger matroid \(M_2\) has rank \(8\), and its partition classes are given by the red dashed regions, whose upper quotas are also shown. This pair belongs to setting 2, while it does not fit setting 3, since \(\mathrm{rk}_{M_1}(\{1,2,5\})-\mathrm{rk}_{M_1}(\{1,2\})=1>0=\mathrm{rk}_{M_2}(\{1,2,5\})-\mathrm{rk}_{M_2}(\{1,2\})\).
Suppose that the input ranking \(\pi\) is the identity permutation.
We can observe that the output \(\sigma_{\rm f}\) of the forward greedy algorithm and the output \(\sigma_{\rm b}\) of the backward greedy algorithm are, respectively, \[\begin{align} \sigma_{\rm f}&= (1,4,5,7,9,10,6,12,2,3,8,11),\\ \sigma_{\rm b}&= (1,4,6,7,10,12,2,8,3,5,9,11). \end{align}\] The Kendall tau distances to \(\pi\) are \(d_{\mathrm{KT}}(\sigma_{\rm f},\pi)=21\) and \(d_{\mathrm{KT}}(\sigma_{\rm b},\pi)=21\). However, the feasible ranking \[\sigma^*\mathrel{\vcenter{:}}= (1,4,6,7,9,10,2,12,3,5,8,11)\] has smaller Kendall tau distance \(d_{\mathrm{KT}}(\sigma^*,\pi)=20\).
Thus, neither of the two greedy algorithms finds an optimal solution on this example.
In this section, we provide proofs omitted in Section 3.
In the proofs of Propositions [prop:quotient-partition] and [prop:quotient-laminar] (sufficient condition for generalized partition matroids or generalized laminar matroids to have a quotient relation), we use the following characterization of a matroid pair with quotient relation.
Theorem 7 (e.g.,). Let \(M\) and \(N\) be matroids on the same ground set, and let \(\mathcal{B}(M)\) and \(\mathcal{B}(N)\) be their base families, respectively. Then \(N\) is a quotient of \(M\) if and only if the following condition holds:
For any \(X\in \mathcal{B}(N)\), \(Y\in \mathcal{B}(M)\), and \(x\in X\setminus Y\), there exists \(y\in Y\setminus X\) such that \[X\setminus\{x\}\cup\{y\}\in \mathcal{B}(N), \quad Y\cup\{x\}\setminus \{y\}\in \mathcal{B}(M).\]
In the proof of Proposition [prop:quotient-transversal] (sufficient condition for generalized transversal matroids to have a quotient relation), we use an operation of matroid induction, which is defined as follows. Given a bipartite graph \(G=(U,V; F)\) and a matroid \(M_V=(V, \mathcal{B}_V)\), define \[\mathcal{B}_U\mathrel{\vcenter{:}}= \set{\partial X\cap U \mid X\subseteq F \text{ is a matching and } \partial X\cap V\in \mathcal{B}_V},\] where \(\partial X\subseteq U\cup V\) is the set of vertices covered by \(X\). If this \(\mathcal{B}_U\) is nonempty, then \(M_U=(U, \mathcal{B}_U)\) forms a matroid on \(U\) (see, e.g., [38], [39]). This operation is called an induction by the bipartite graph \(G\); here \(M_U\) is induced from \(M_V\).
It was shown by Brandenburg–Loho–Smith [17] that the induction operation preserves quotient relations. Although the original statement proves a more general result for M-convex sets and linking systems, we state only the special case needed for our present purpose.
Lemma 1 (Induction Preserves Quotients [17]). Let \(G=(U,V;F)\) be a bipartite graph and let \(M_V\) and \(N_V\) be matroids on \(V\) such that \(N_V\) is a quotient of \(M_V\). Suppose that \(M_U\) and \(N_U\) are induced via \(G\) from \(M_V\) and \(N_V\), respectively (i.e., the corresponding families are nonempty). Then \(N_U\) is a quotient of \(M_U\).
We provide omitted proofs from Section 3 in order.
Proof. Recall that the base family \(\mathcal{B}(N)=\mathcal{B}_{k,\boldsymbol{\ell},\boldsymbol{u}}\) of \(N\) is defined as \[\mathcal{B}(N)= \set{B\subseteq E |~|B|=k,\;\;\ell_i \le |B\cap G_i|\le u_i \;\text{for all } i\in[g]}\] and the base family \(\mathcal{B}(M)=\mathcal{B}_{k',\boldsymbol{\ell}',\boldsymbol{u}'}\) of \(M\) is defined similarly using \((k', \boldsymbol{\ell}',\boldsymbol{u}')\).
We show that they satisfy the axiom (Q) in Theorem 7. Take any \(X\in \mathcal{B}(N)\), \(Y\in \mathcal{B}(M)\), and \(x\in X\setminus Y\). For each \(i\in[g]\), we write \(X_i=X\cap G_i\) and \(Y_i=Y\cap G_i\). Let \(i^*\in [g]\) be the index such that \(x\in X_{i^*}\). If \(Y_{i^*}\setminus X_{i^*}\neq \emptyset\), then any \(y\in Y_{i^*}\setminus X_{i^*}\) is the desired element. Indeed, the sets \(X'\mathrel{\vcenter{:}}= X\setminus \{x\}\cup \{y\}\) and \(Y'\mathrel{\vcenter{:}}= Y\cup\{x\}\setminus \{y\}\) satisfy \(|X'\cap G_i|=|X_i|\) and \(|Y'\cap G_i|=|Y_i|\) for every \(i\in [g]\), and thus \(X'\in \mathcal{B}(N)\) and \(Y'\in \mathcal{B}(M)\).
For the rest of the proof, we assume \(Y_{i^*}\setminus X_{i^*}=\emptyset\). Since we have \(x\in X_{i^*}\setminus Y_{i^*}\), we then have \(Y_{i^*}\subsetneq X_{i^*}\), and hence \(\ell_{i^*}\leq \ell'_{i^*}\leq |Y_{i^*}|<|X_{i^*}|\leq u_{i^*}\leq u'_{i^*}\), where inequalities other than the center one are due to \(X\in \mathcal{B}(N)\), \(Y\in\mathcal{B}(M)\) and the conditions on \(\boldsymbol{\ell}', \boldsymbol{u}'\). This sequence of inequalities in particular implies \[\label{eq:i-star} |Y_{i^*}|<|X_{i^*}|,\quad \ell_{i^*}<|X_{i^*}|, \quad |Y_{i^*}|<u'_{i^*}.\tag{1}\] We show that there exists \(j\in [g]\) such that \[\label{eq:j} |X_{j}|<|Y_{j}|,\quad \ell'_{j}<|Y_{j}|, \quad |X_{j}|<u_{j}.\tag{2}\] Indeed, if there is \(j\in [g]\) satisfying 2 , then \(|X_{j}|<|Y_{j}|\) implies that \(Y_j\setminus X_j \neq \emptyset\) and for any \(y\in Y_j\setminus X_j\), the second and third inequalities in 1 and 2 imply that \(X'\mathrel{\vcenter{:}}= X\setminus \{x\}\cup \{y\}\) and \(Y'\mathrel{\vcenter{:}}= Y\cup\{x\}\setminus \{y\}\) satisfy the lower and upper quotas of all \(i\in[g]\). Thus, showing the existence of \(j\in [g]\) satisfying 2 completes the proof.
Suppose, to the contrary, that there is no such \(j\in [g]\). Then, for any \(i\in [g]\), we have at least one of (a) \(|X_{i}|\geq |Y_{i}|\), (b) \(\ell'_{i}=|Y_{i}|\), or (c) \(|X_{i}|=u_{i}\).
In case (a), since \(\frac{k'}{k}>1\), we have \(|Y_i|\leq |X_i|\leq \lfloor\tfrac{k'}{k}\cdot |X_i|\rfloor\).
In case (b), we have \(|Y_i|=\ell'_i\leq \lfloor\tfrac{k'}{k}\,\ell_i\rfloor\leq \lfloor\tfrac{k'}{k}\cdot |X_i|\rfloor\).
In case (c), we have \(|Y_i|\leq u'_i\leq \lfloor\tfrac{k'}{k}\,u_i\rfloor= \lfloor\tfrac{k'}{k}\cdot |X_i|\rfloor\).
Thus, \(|Y_i|\leq \lfloor\tfrac{k'}{k}\cdot |X_i|\rfloor\) for all \(i\in[g]\). Note that we have \(|Y_{i^*}|<|X_{i^*}|\), which implies \(|Y_{i^*}|< \lfloor\tfrac{k'}{k}\cdot |X_{i^*}|\rfloor\). Thus, by summing these inequalities over all \(i\in[g]\), we obtain \[k'=|Y|=\sum_{i\in [g]}|Y_i|<\sum_{i\in[g]}\lfloor\tfrac{k'}{k}\cdot |X_{i}|\rfloor\leq \tfrac{k'}{k}\sum_{i\in [g]}|X_i|=\tfrac{k'}{k}\cdot |X|=k',\] a contradiction. ◻
Corollary 2. Let \(E=G_1\sqcup \cdots \sqcup G_g\), \(\boldsymbol{\alpha}, \boldsymbol{\beta}\in [0,1]^g\), and \(k,b\in[n]\) be given as in Definition 2. Then there exists a flag matroid \(\boldsymbol{M}=(M_1, \dots, M_s)\) of rank \((h_1, \dots, h_s)\) such that, for any ranking \(\pi:[n]\to E\), we have that \(\pi\) is \((\boldsymbol{\alpha},\boldsymbol{\beta})\)-block-\(k\)-fair if and only if \((\mathsf{Top}_{h_1}(\pi), \dots, \mathsf{Top}_{h_s}(\pi))\in \mathcal{F}(\boldsymbol{M})\).
Proof. Let \(\{h_1, \dots, h_s\}=\set{h\in[n]\mid h\ge k,\;h\equiv 0 \pmod b}\), where \(h_1<h_2<\cdots <h_s\), and for each \(j=1,\dots,s\) define a matroid \(M_j=(E, \mathcal{B}_j)\) by letting \(\mathcal{B}_j\) be the family of sets \(B\subseteq E\) with \(|B|=h_j\) and \(\alpha_i h_j\leq |B\cap G_i|\leq \beta_i h_j\) for all \(i\in[g]\).
For any \(j\in[s-1]\), we have \(h_j=bd\) and \(h_{j+1}=b(d+1)\) for some integer \(d\). Since \(\alpha_i b\) is an integer (as assumed in Definition 2), both \(\alpha_i h_j\) and \(\alpha_i h_{j+1}\) are integers, and they satisfy \(\alpha_i h_{j+1}=\frac{h_{j+1}}{h_j}\,\alpha_i h_j\). The same holds for \(\beta_i\). Hence, the sufficient condition in Proposition [prop:quotient-partition] is satisfied. Thus, \(M_j\) is a quotient of \(M_{j+1}\) for all \(j\), and hence \((M_1,\dots,M_s)\) forms a flag matroid. Then, the claim is clear from the definition of block-\(k\)-fairness. ◻
Proof. Let \(\widehat{E}\mathrel{\vcenter{:}}= E\times D\) and \(\widehat{E}_d\mathrel{\vcenter{:}}= \set{(e,d)\in \widehat{E} \mid e\in E}\) for each \(d\in D\). Then, \(\{\widehat{E}_d\}_{d\in D}\) forms a partition of \(\widehat{E}\). Using this partition and the given parameters, define two generalized partition matroids \(N_{\rm part}=(\widehat{E},\mathcal{B}_{k,\boldsymbol{p},\boldsymbol{q}})\) and \(M_{\rm part}=(\widehat{E},\mathcal{B}_{k',\boldsymbol{p}',\boldsymbol{q}'})\) as in Example 1. By Proposition [prop:quotient-partition], \(N_{\rm part}\) is a quotient of \(M_{\rm part}\).
Next, define a bipartite graph \(G=(E,\widehat{E};F)\) by \(F\mathrel{\vcenter{:}}= \set{(e,(e,d))\in E\times \widehat{E} \mid e\in \Gamma(d)}\). Let \(N=(E, \mathcal{B})\) and \(M=(E, \mathcal{B}')\) be the matroids induced via \(G\) from \(N_{\rm part}\) and \(M_{\rm part}\), respectively. Then, by Lemma 1, \(N\) is a quotient of \(M\).
It remains to show that \(\mathcal{B}=\mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\) and \(\mathcal{B}'=\mathcal{B}^{\rm tv}_{k',\boldsymbol{p}',\boldsymbol{q}'}\). We prove only the former, since the latter is identical. If \(B\in \mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\), then there is a map \(\varphi:B\to D\) such that \(\varphi^{-1}(d)\subseteq \Gamma(d)\) and \(p_d\le |\varphi^{-1}(d)|\le q_d\) for all \(d\in D\). Then \(X_\varphi\mathrel{\vcenter{:}}= \{(e,(e,\varphi(e))) \mid e\in B\}\) is a matching in \(G\), and we have \(\partial X_\varphi\cap E=B\) and \(\partial X_\varphi\cap \widehat{E}\in \mathcal{B}_{k,\boldsymbol{p},\boldsymbol{q}}\). Hence \(B\in \mathcal{B}\).
Conversely, if \(B\in \mathcal{B}\), then there is a matching \(X_B\subseteq F\) such that \(\partial X_B\cap E=B\) and \(\partial X_B\cap \widehat{E}\in \mathcal{B}_{k,\boldsymbol{p},\boldsymbol{q}}\). For each \(e\in B\), since \(X_B\) is a matching, there is a unique \(d\in D\) with \((e,(e,d))\in X_B\); define \(\varphi_B(e)\mathrel{\vcenter{:}}= d\). Then \((e,(e,d))\in F\) implies \(e\in \Gamma(d)\). Moreover, since \(\partial X_B\cap \widehat{E}\in \mathcal{B}_{k,\boldsymbol{p},\boldsymbol{q}}\), we have \(|B|=k\) and \(p_d\le |\varphi_B^{-1}(d)|\le q_d\) for all \(d\in D\). Hence \(B\in \mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\).
Therefore \(\mathcal{B}=\mathcal{B}^{\rm tv}_{k,\boldsymbol{p},\boldsymbol{q}}\). The proof of \(\mathcal{B}'=\mathcal{B}^{\rm tv}_{k',\boldsymbol{p}',\boldsymbol{q}'}\) is identical. ◻
Proof. We first prepare some terminology and assumptions on the laminar family \(\mathcal{L}\subseteq 2^E\). For two members \(L, L'\in \mathcal{L}\), we say that \(L'\) is a child of \(L\) (and also \(L\) is a parent of \(L'\)) if \(L'\subsetneq L\) and there is no \(L''\in\mathcal{L}\) with \(L'\subsetneq L''\subsetneq L\). For any \(L\in \mathcal{L}\), we write \(\mathsf{ch}(L)\) for the set of children of \(L\). A member \(L\in \mathcal{L}\) with \(\mathsf{ch}(L)=\emptyset\) is called a leaf. We assume the following on the laminar family \(\mathcal{L}\).
\(E\in \mathcal{L}\).
If \(L\in \mathcal{L}\) is not a leaf, then \(L\) is partitioned into its children.
Indeed, we can impose these assumptions without loss of generality. If the original \(\mathcal{L}\) does not satisfy the first condition, then we can add \(E\) to \(\mathcal{L}\) and set \(g(E)=f(E)=k\) and \(g'(E)=f'(E)=k'\). If the second condition is not satisfied for some \(L\in \mathcal{L}\), then add \(L^*\mathrel{\vcenter{:}}= L\setminus \cup_{L'\in \mathsf{ch}(L)} L'\) to \(\mathcal{L}\) and set \(g(L^*)=0\), \(f(L^*)=|L^*|\), \(g'(L^*)=0\), and \(f'(L^*)=\lfloor \tfrac{k'}{k}|L^*|\rfloor\). Each of these operations does not change the base families \(\mathcal{B}^{\rm lam}_{k,g,f}\) and \(\mathcal{B}^{\rm lam}_{k',g',f'}\) and preserves the condition in Proposition [prop:quotient-laminar].
As we have \(E\in \mathcal{L}\), the laminar family \(\mathcal{L}\) can be seen as a tree rooted at \(E\). For each \(L\in \mathcal{L}\), its ancestor path is a path from \(L\) to \(E\) on this tree.
We show that \(\mathcal{B}(N)=\mathcal{B}^{\rm lam}_{k,g,f}\) and \(\mathcal{B}(M)=\mathcal{B}^{\rm lam}_{k',g',f'}\) satisfy (Q) in Theorem 7. Take any \(X\in \mathcal{B}(N)\), \(Y\in \mathcal{B}(M)\), and \(x\in X\setminus Y\). Let \(L^x\in \mathcal{L}\) be the unique leaf containing \(x\). If \((Y\setminus X)\cap L^x\neq \emptyset\), then we see that any \(y\in (Y\setminus X)\cap L^x\) satisfies the desired conditions in (Q) and we are done. Thus, in the rest, assume that \((Y\setminus X)\cap L^x=\emptyset\).
As we have \(x\in (X\setminus Y)\cap L^x\), we obtain \(Y\cap L^x\subsetneq X\cap L^x\). In particular, we have \(|Y\cap L^x|<|X\cap L^x|\le \lfloor\tfrac{k'}{k}|X\cap L^x|\rfloor\). Along the ancestor path of \(L^x\), take the ancestor \(L^*\) closest to \(L^x\) subject to \[|Y\cap L^*|\geq \lfloor\tfrac{k'}{k}|X\cap L^*|\rfloor.\] Such an ancestor must exist because the root ancestor \(E\) satisfies \(|Y\cap E|=k'=\lfloor\tfrac{k'}{k}k\rfloor=\lfloor\tfrac{k'}{k}|X\cap E|\rfloor\). In addition, \(L^*\) must not be a leaf by definition. From this \(L^*\) we go down the tree toward a leaf using the following claims.
Claim 8. There exists a child \(L\) of \(L^*\) that satisfies \(|Y\cap L|> \lfloor\tfrac{k'}{k}|X\cap L|\rfloor\).
Proof. Suppose, to the contrary, there is no child satisfying the required condition. Then, every \(L\in \mathsf{ch}(L^*)\) satisfies \(|Y\cap L|\leq \lfloor\tfrac{k'}{k}|X\cap L|\rfloor\). By the choice of \(L^*\), the child of \(L^*\) on the ancestor path from \(L^x\) to \(L^*\), denoted by \(L'\), satisfies \(|Y\cap L'|< \lfloor\tfrac{k'}{k}|X\cap L'|\rfloor\). Since \(L^*\) is partitioned into \(\mathsf{ch}(L^*)\), we have \[|Y\cap L^*|~=\sum_{L\in \mathsf{ch}(L^*)} |Y\cap L|~~<\sum_{L\in \mathsf{ch}(L^*)} \lfloor\tfrac{k'}{k}|X\cap L|\rfloor~\leq~ \lfloor\tfrac{k'}{k}|X\cap L^*|\rfloor,\] while we have \(|Y\cap L^*|\geq \lfloor\tfrac{k'}{k}|X\cap L^*|\rfloor\), a contradiction. ◻
Claim 9. If \(L\in \mathcal{L}\) satisfies \(|Y\cap L|> \lfloor\tfrac{k'}{k}|X\cap L|\rfloor\) and is not a leaf, then at least one of its children \(L'\in \mathsf{ch}(L)\) also satisfies \(|Y\cap L'|> \lfloor\tfrac{k'}{k}|X\cap L'|\rfloor\).
Proof. Suppose, to the contrary, no child of \(L\) satisfies the required condition. Then, every \(L'\in \mathsf{ch}(L)\) satisfies \(|Y\cap L'|\leq \lfloor\tfrac{k'}{k}|X\cap L'|\rfloor\), but then summing this inequality implies \[|Y\cap L|=\sum_{L'\in \mathsf{ch}(L)} |Y\cap L'|\leq \sum_{L'\in \mathsf{ch}(L)} \lfloor\tfrac{k'}{k}|X\cap L'|\rfloor \leq \lfloor\tfrac{k'}{k}|X\cap L|\rfloor,\] contradicting the assumption of the claim. ◻
By combining Claims 8 and 9, we can find a path from \(L^*\) to a leaf such that every member \(L\) on this path except \(L^*\) satisfies \(|Y\cap L|>\lfloor\tfrac{k'}{k}|X\cap L|\rfloor\). Let \(L^y\) be this terminal leaf. To summarize, we have found \(L^*\) and \(L^y\) such that
\(L^*\) is a common ancestor of \(L^x\) and \(L^y\),
\(|Y\cap L|<\lfloor\tfrac{k'}{k}|X\cap L|\rfloor\) for every \(L\) on the \(L^x\)–\(L^*\) ancestor path excluding \(L^*\), and
\(|Y\cap L|>\lfloor\tfrac{k'}{k}|X\cap L|\rfloor\) for every \(L\) on the \(L^y\)–\(L^*\) ancestor path excluding \(L^*\).
The third condition in particular implies \(|Y\cap L^y|>\lfloor\tfrac{k'}{k}|X\cap L^y|\rfloor\geq |X\cap L^y|\), and hence \((Y\setminus X)\cap L^y\neq \emptyset\). Take any \(y\in (Y\setminus X)\cap L^y\). We show that this is our desired \(y\), i.e., \[X'\mathrel{\vcenter{:}}= X\setminus\{x\}\cup\{y\}\in \mathcal{B}(N), \quad Y'\mathrel{\vcenter{:}}= Y\cup\{x\}\setminus \{y\}\in \mathcal{B}(M).\] To this end, we need to show that \(g(L)\leq |X'\cap L|\leq f(L)\) and \(g'(L) \leq |Y'\cap L|\leq f'(L)\) for every \(L\in \mathcal{L}\). By the definitions of \(X'\) and \(Y'\), the following hold.
\(|X'\cap L|=|X\cap L|-1\) and \(|Y'\cap L|=|Y\cap L|+1\) for every \(L\) on the \(L^x\)–\(L^*\) ancestor path excluding \(L^*\),
\(|X'\cap L|=|X\cap L|+1\) and \(|Y'\cap L|=|Y\cap L|-1\) for every \(L\) on the \(L^y\)–\(L^*\) ancestor path excluding \(L^*\), and
\(|X'\cap L|=|X\cap L|\) and \(|Y'\cap L|=|Y\cap L|\) for all other \(L\in\mathcal{L}\).
As we have conditions (b) and (c) listed above, to prove \(g(L)\leq |X'\cap L|\leq f(L)\) and \(g'(L) \leq |Y'\cap L|\leq f'(L)\) for every \(L\in \mathcal{L}\), it suffices to show the following two claims hold for any \(L\in \mathcal{L}\).
Claim 10. If \(|Y\cap L|<\lfloor\tfrac{k'}{k}|X\cap L|\rfloor\), then \(g(L)< |X\cap L|\) and \(|Y\cap L|< f'(L)\).
Proof. We show the contraposition. Suppose that we have \(g(L)=|X\cap L|\) or \(|Y\cap L|= f'(L)\). In the former case, we have \(|Y\cap L|\geq g'(L)=\lfloor\tfrac{k'}{k} g(L)\rfloor=\lfloor\tfrac{k'}{k} |X\cap L|\rfloor\). In the latter case, we have \(|Y\cap L|=f'(L)=\lfloor\tfrac{k'}{k} f(L)\rfloor\geq \lfloor\tfrac{k'}{k} |X\cap L|\rfloor\). Thus, in both cases, we obtain \(|Y\cap L|\geq \lfloor\tfrac{k'}{k}|X\cap L|\rfloor\). ◻
Claim 11. If \(|Y\cap L|>\lfloor\tfrac{k'}{k}|X\cap L|\rfloor\), then \(|X\cap L|<f(L)\) and \(g'(L)<|Y\cap L|\).
Proof. The proof is similar to the above claim. Suppose that \(|X\cap L|=f(L)\) or \(g'(L)=|Y\cap L|\). In the former case, we have \(|Y\cap L|\leq f'(L)=\lfloor\tfrac{k'}{k} f(L)\rfloor=\lfloor\tfrac{k'}{k} |X\cap L|\rfloor\). In the latter case, we have \(|Y\cap L|=g'(L)=\lfloor\tfrac{k'}{k} g(L)\rfloor\leq \lfloor\tfrac{k'}{k} |X\cap L|\rfloor\). Thus, in both cases, \(|Y\cap L|\leq \lfloor\tfrac{k'}{k}|X\cap L|\rfloor\). ◻
By combining (b), (d), and Claim 10, we see that \(g(L)\leq |X'\cap L|\leq f(L)\) and \(g'(L) \leq |Y'\cap L|\leq f'(L)\) for every \(L\in \mathcal{L}\) on the \(L^x\)–\(L^*\) ancestor path excluding \(L^*\). By combining (c), (e), and Claim 11, the same inequalities hold for members on the \(L^y\)–\(L^*\) ancestor path excluding \(L^*\). For all other members of \(\mathcal{L}\), (f) guarantees that the required inequalities are preserved. Thus, we have shown that \(X'\in \mathcal{B}(N)\) and \(Y'\in \mathcal{B}(M)\). ◻
Here we provide a few proofs omitted from Section 4.
Proof. Let \(P_i=B_i\setminus B_{i-1}\) for \(i\in[s+1]\), where we set for convenience \(B_0=\emptyset\) and \(B_{s+1}=E\). Then any ranking \(\sigma\) satisfying \(\mathsf{Top}_{k_i}(\sigma)=B_i~(i\in[s])\) must place the blocks \(P_1,P_2,\dots,P_{s+1}\) in this order. Now, the pairs of elements counted in \(d_{\mathrm{KT}}(\sigma,\pi)\) are partitioned into two types: pairs belonging to different blocks, and pairs belonging to the same block. For pairs of elements belonging to different blocks, their relative order in \(\sigma\) is completely determined by the fixed block order \(P_1,P_2,\dots,P_{s+1}\). Hence the total contribution of such pairs to \(d_{\mathrm{KT}}(\sigma,\pi)\) is the same for all rankings \(\sigma\) satisfying \(\mathsf{Top}_{k_i}(\sigma)=B_i~(i\in[s])\).
Therefore, to minimize \(d_{\mathrm{KT}}(\sigma,\pi)\), it suffices to minimize the contribution of pairs belonging to the same block. For each block \(P_i\), this contribution is exactly the number of inversions of the order induced by \(\sigma\) on \(P_i\) relative to the order induced by \(\pi\) on \(P_i\). This number is minimized, and equal to \(0\), when the elements of \(P_i\) are ordered according to \(\pi\). Thus, the ranking \(\pi_{\boldsymbol{B}}\) is optimal. ◻
Proof. By the construction of \(\pi_B\), the value \(d_{\mathrm{KT}}(\pi_{B}, \pi)\) coincides with the number of pairs \((e,f)\in B\times (E\setminus B)\) with \(f \prec_{\pi} e\). Therefore, \[\begin{align} d_{\mathrm{KT}}(\pi_B, \pi) &= \sum_{e \in B} ~\big|\set{ f \in E\setminus B | f \prec_{\pi} e }\big| \\ &= \sum_{e \in B} \big( \pi^{-1}(e) - 1 - |\set{ f \in B | f \prec_{\pi} e }| \,\big) \\ &= \sum_{e \in B} \pi^{-1}(e) - k - \sum_{e \in B} \big|\set{f \in B |f \prec_{\pi} e}\big|\\ &= \sum_{e \in B} \pi^{-1}(e) -k -\sum_{j=1}^{k}(j-1) = \sum_{e \in B} \pi^{-1}(e) -\frac{k(k+1)}{2}. \end{align}\] Thus, the required equality is obtained. ◻
In Section 5, we provide only the statements of our results on approximation algorithms for Matroid-FRA and Flag-Matroid-FRA. Here we provide their details.
This part is devoted to the proof of the following theorem on Matroid-FRA (Matroid Feasible Rank Aggregation). See Section 5 for the definition of the problem.
For FRA with \(k\)-fairness criteria (i.e., a special case of Matroid-FRA with a generalized partition matroid), Chakraborty et al. [13] show that there exists a \((2+\varepsilon)\)-approximation algorithm for any constant \(\varepsilon>0\). Their algorithm consists of the following steps:
Find an appropriate bi-partition \(\{B, E\setminus B\}\) such that \(B\) has size \(k\) and satisfies \(k\)-fairness by solving the colorful bi-partition problem (described below in a generalized form).
Apply the known PTAS for rank aggregation (without constraints) by Kenyon-Mathieu and Schudy [9] to each of \((\pi_i|_{B})_{i\in [m]}\) and \((\pi_i|_{E\setminus B})_{i\in [m]}\) to obtain \(\sigma_B\) and \(\sigma_{E\setminus B}\).
Output a concatenation of \(\sigma_B\) and \(\sigma_{E\setminus B}\) as \(\sigma\).
To generalize their algorithm to Matroid-FRA, we consider solving the following generalized version of the colorful bi-partition subproblem. As in the original version, we describe the instance by a weighted tournament. In this paper, a weighted tournament is a directed graph \(T=(E,A)\) in which, for every pair of distinct vertices \(e,f\in E\), both arcs \((e,f)\) and \((f,e)\) belong to \(A\), together with a weight function \(c:A\to\mathbb{R}\).4 A weighted tournament arises from a collection of rankings as follows. Consider a weighted tournament with \(E\) being the set of candidates and, for each \(e,f\in E\), set the weight \(c(e,f)\) to be the fraction of voters preferring \(e\) to \(f\) among all voters. Then we see that the weights satisfy the following properties:
Probability Constraints: \(c(e,f)+c(f,e)=1\) for any distinct \(e,f\in E\), and
Triangle Inequality: \(c(e,g)\leq c(e,f)+c(f,g)\) for any distinct \(e,f,g\in E\).
The following problem is a matroidal generalization of the colorful bi-partition problem in [13]. For a weighted tournament \(T=(E,A)\) and any vertex subset \(S\subseteq E\), we define \(\mathrm{cost}(S)=\sum_{(e,s)\in A:\, s\in S,\, e\in E\setminus S}c(e,s)\). Also, for any vertex \(e\in E\), we define \(\delta^{-}(e)=\sum_{f\in E\setminus\{e\}} c(f,e)\).
Matroid Bi-partition
Input: A weighted tournament \((T=(E,A),c)\) and a matroid \(M=(E,\mathcal{B})\) of rank \(k\).
Output: A base \(B\in\mathcal{B}\) minimizing \(\mathrm{cost}(B)=\sum_{(e,b)\in A:\, b\in B,\, e\in E\setminus B} c(e,b)\).
Lemma 2. When the weights \(c\) satisfy the probability constraints, for any base \(B\in \mathcal{B}\), we have \(\mathrm{cost}(B)=\sum_{b\in B}\delta^{-}(b)-\frac{k(k-1)}{2}\).
Proof. For any base \(B\in \mathcal{B}\), we have \[\sum_{b \in B}\delta^{-}(b) = \sum_{b \in B} \sum_{e \in E\setminus\{b\}} c(e,b) = \sum_{b\in B}\sum_{b' \in B\setminus\{b\}} c(b',b) + \sum_{b \in B,\, e \in E\setminus B} c(e,b).\] The second term is \(\mathrm{cost}(B)\). By the probability constraints, the first term is \(\frac{k(k-1)}{2}\), since for each unordered pair \(\{b,b'\}\subseteq B\) we have \(c(b,b')+c(b',b)=1\). Thus, the lemma follows. ◻
By this lemma, we see that Matroid Bi-partition reduces to the minimum-weight base problem for matroids, which can be solved by the greedy algorithm with \(O(|E|)\) calls to the independence oracle.
Lemma 3. Matroid Bi-partition can be solved in polynomial time when the weights satisfy the probability constraints.
Proof. Define a weight function \(w:E\to\mathbb{R}\) by \(w(e)=\delta^{-}(e)\). By the previous lemma, for every base \(B\in\mathcal{B}\), \[\mathrm{cost}(B)=\sum_{b\in B}w(b)-\frac{k(k-1)}{2}.\] Hence minimizing \(\mathrm{cost}(B)\) over \(B\in\mathcal{B}\) is equivalent to finding a minimum-weight base of the matroid \(M\), which can be done by the greedy algorithm in polynomial time. ◻
We modify the algorithm by Chakraborty et al. [13] by replacing the subroutine solving colorful bi-partition with the one solving Matroid Bi-partition. Specifically, we construct a ranking \(\sigma^*\) in the following manner:
Given an instance \(I=(\pi_1,\dots, \pi_m, M=(E,\mathcal{B}))\) of Matroid-FRA, define a weighted tournament \((T=(E, A), c)\) by setting \(c(e,f)=\frac{1}{m}|\set{j\in [m]\mid e\prec_{\pi_j} f}|\).
Let \(B^*\) be the optimal solution to Matroid Bi-partition for the input \((T, c)\) and \(M\).
Apply the known PTAS for rank aggregation (without constraints) by Kenyon-Mathieu and Schudy [9] to each of \((\pi_i|_{B^*})_{i\in [m]}\) and \((\pi_i|_{E\setminus B^*})_{i\in [m]}\) to obtain \(\sigma_{B^*}\) and \(\sigma_{E\setminus B^*}\).
Output a concatenation of \(\sigma_{B^*}\) and \(\sigma_{E\setminus B^*}\) as \(\sigma^*\).
We reproduce the analysis of approximation ratio in [13] for completeness.
Lemma 4. The ranking \(\sigma^*\) constructed as above is a \((2+\varepsilon)\)-approximate solution to Matroid-FRA.
Proof. For any subset \(S\subseteq E\) and any ranking \(\tau\) over \(S\), define \[\mathrm{RA}(S,\tau)\mathrel{\vcenter{:}}= \sum_{i=1}^m d_{\mathrm{KT}}(\tau,\pi_i|_{S}),\] and let \(\mathrm{OPT}(S)\mathrel{\vcenter{:}}= \min\set{\mathrm{RA}(S,\tau)| \tau \text{ is a ranking over } S}\). Also, let \(\mathrm{OPT}\) denote the optimal objective value of the given instance of Matroid-FRA, and let \(\hat{\sigma}\) be an optimal feasible ranking. Put \(\hat{B}\mathrel{\vcenter{:}}= \mathsf{Top}_k(\hat{\sigma})\).
Fix any base \(B\in \mathcal{B}\), and let \(\sigma\) be any ranking with \(\mathsf{Top}_k(\sigma)=B\). Then the unordered pairs of elements of \(E\) are partitioned into three types: pairs contained in \(B\), pairs contained in \(E\setminus B\), and pairs with one endpoint in each of \(B\) and \(E\setminus B\). Hence \[\label{eq:matroid-fra-decomp} \sum_{i=1}^m d_{\mathrm{KT}}(\sigma,\pi_i) = m\cdot \mathrm{cost}(B) + \mathrm{RA}(B,\sigma|_B) + \mathrm{RA}(E\setminus B,\sigma|_{E\setminus B}).\tag{3}\] Indeed, for every pair \((b,e)\in B\times (E\setminus B)\), the ranking \(\sigma\) places \(b\) before \(e\), so the contribution of this pair to the total Kendall tau distance is exactly the number of voters \(j\in[m]\) with \(e\prec_{\pi_j} b\), i.e., \(m\cdot c(e,b)\). Summing over all such pairs gives the term \(m\cdot\mathrm{cost}(B)\).
Applying 3 to the optimal ranking \(\hat{\sigma}\) and its top-\(k\) set \(\hat{B}\), we obtain \(m\cdot \mathrm{cost}(\hat{B})\leq \mathrm{OPT}\). Since \(B^*\) is an optimal solution to Matroid Bi-partition, it follows that \[\label{eq:cross-bound} m\cdot \mathrm{cost}(B^*)\leq m\cdot \mathrm{cost}(\hat{B})\leq \mathrm{OPT}.\tag{4}\] By the guarantee of the PTAS for unconstrained rank aggregation, \[\mathrm{RA}(B^*,\sigma_{B^*})\leq (1+\varepsilon)\mathrm{OPT}(B^*), \qquad \mathrm{RA}(E\setminus B^*,\sigma_{E\setminus B^*})\leq (1+\varepsilon)\mathrm{OPT}(E\setminus B^*).\] On the other hand, the restrictions \(\hat{\sigma}|_{B^*}\) and \(\hat{\sigma}|_{E\setminus B^*}\) are rankings over \(B^*\) and \(E\setminus B^*\), respectively. Therefore, \[\mathrm{OPT}(B^*)+\mathrm{OPT}(E\setminus B^*) \leq \mathrm{RA}(B^*,\hat{\sigma}|_{B^*})+\mathrm{RA}(E\setminus B^*,\hat{\sigma}|_{E\setminus B^*}).\] The right-hand side counts only the contributions of pairs contained entirely in \(B^*\) or entirely in \(E\setminus B^*\), and hence it is at most the whole objective value of \(\hat{\sigma}\). Thus, \[\label{eq:inside-bound} \mathrm{OPT}(B^*)+\mathrm{OPT}(E\setminus B^*)\leq \mathrm{OPT}.\tag{5}\]
Finally, applying 3 to \(\sigma^*\) and \(B^*\), and using 4 and 5 , we get \[\begin{align} \textstyle \sum_{i=1}^m d_{\mathrm{KT}}(\sigma^*,\pi_i) &= m\cdot \mathrm{cost}(B^*) + \mathrm{RA}(B^*,\sigma_{B^*}) + \mathrm{RA}(E\setminus B^*,\sigma_{E\setminus B^*})\\ &\leq m\cdot \mathrm{cost}(B^*) + (1+\varepsilon)\bigl(\mathrm{OPT}(B^*)+\mathrm{OPT}(E\setminus B^*)\bigr)\\ &\leq \mathrm{OPT}+(1+\varepsilon)\mathrm{OPT}\\ &= (2+\varepsilon)\mathrm{OPT}. \end{align}\] Therefore, \(\sigma^*\) is a \((2+\varepsilon)\)-approximate solution to Matroid-FRA. ◻
In the previous subsection, we considered a matroidal generalization of FRA with \(k\)-fairness, i.e., only one prefix is required to satisfy the constraint. In this subsection, we consider the flag matroid analogue, which includes FRA with block-\(k\)-fairness as a special case.
We apply the generic framework by Chakraborty et al. [13]. They proved that, if there is an efficient procedure to solve the closest feasible ranking problem with some constraint, then we can obtain an efficient \(2.881\)-approximation algorithm for the rank aggregation problem with the same constraint. Since we have shown that Flag-Matroid-CFR is solvable in polynomial time, the framework applies directly to the flag matroid constraint, and we obtain the following.
Proof. The claim follows immediately from the generic \(2.881\)-approximation framework of Chakraborty et al. [13] together with the polynomial-time solvability of Flag-Matroid-CFR shown in Corollary 1. ◻
We provide proofs of the hardness results for Matroid-FRA with a constant number of voters. Specifically, we show NP-hardness for the cases of \(2\) voters and \(3\) voters, and then deduce hardness for all larger constant values of \(m\).
In the proofs, we use the terminology that \(\pi\) and \(\sigma\) are inconsistent on an unordered pair \(\{e,f\}\subseteq E\) if either \(e\prec_\pi f\) and \(e\succ_\sigma f\), or \(e\succ_\pi f\) and \(e\prec_\sigma f\).
To obtain the theorem, we show NP-completeness of the following decision version.
Theorem 12. It is NP-complete to determine, given an instance \(I\) of Matroid-FRA with \(m=2\) and a number \(\theta\), whether \(I\) admits a feasible ranking with objective value at most \(\theta\).
Proof. It is clear that the problem is in NP. We show NP-hardness by a reduction from Perfect \(3\)-Dimensional Matching (\(3\)DM), a classical NP-complete problem [40], [41]. An instance of \(3\)DM consists of three pairwise disjoint sets \(X\), \(Y\), and \(Z\) with \(|X| = |Y| = |Z| = q\), and a set \(T \subseteq X \times Y \times Z\) of triples. The question is whether there exists a perfect \(3\)-dimensional matching, i.e., a subset \(N \subseteq T\) of size \(q\) such that every element of \(X \cup Y \cup Z\) appears in exactly one triple of \(N\). Without loss of generality, we may assume that every element of \(X\cup Y\cup Z\) appears in at least one triple of \(T\), since otherwise the instance is trivially a no-instance.
Given an instance \(I\) of \(3\)DM as described above, we construct an instance \(I'\) of Matroid-FRA with a target value \(\theta\) as follows. (See Figure 4.) For each triple \(t=(x,y,z)\in T\), we create three elements \(e_{tx}, e_{ty}, e_{tz}\). Thus, the ground set in \(I'\) is \(E=\bigcup_{t=(x,y,z)\in T}\{e_{tx}, e_{ty}, e_{tz}\}\), and \(|E|=3|T|\). We next define a matroid. For each \(v\in X\cup Y\cup Z\), let \[P_v\mathrel{\vcenter{:}}= \set{e_{tv}\in E | v\in t\in T}.\] Then, the family \(\set{P_v | v\in X\cup Y\cup Z}\) forms a partition of \(E\). The matroid \(M=(E,\mathcal{B})\) is defined as the partition matroid with respect to this partition, i.e., \[\mathcal{B}=\set{B\subseteq E | \;|B\cap P_v|=1~\text{for all}~v\in X\cup Y\cup Z}.\] This matroid has rank \(k=3q\).
We next define the two rankings \(\pi_1\) and \(\pi_2\) over \(E\). For each \(t\in T\), let \(L_t\) be the ordered list \((e_{tx}, e_{ty}, e_{tz})\) of the three elements generated from \(t\). The underlying sets of these lists form a partition of \(E\). Fix an arbitrary total order \(\rho\) over \(T\) and define the rankings \(\pi_1\) and \(\pi_2\) over \(E\) by concatenating these short lists as follows: \[\begin{align} \pi_1&=L_{\rho(1)}L_{\rho(2)}\cdots L_{\rho(|T|)},\\ \pi_2&=L_{\rho(|T|)}L_{\rho(|T|-1)}\cdots L_{\rho(1)}. \end{align}\] Set a target objective value \(\theta=\binom{3|T|}{2}-3|T|\). This completes the construction of \(I'\). We first make the following observation.
Claim 13. For any (possibly infeasible) ranking \(\sigma\) over \(E\), its objective value \(\sum_{i=1}^2 d_{\mathrm{KT}}(\sigma,\pi_i)\) is at least \(\theta\). It is exactly \(\theta\) if and only if \(e_{tx}\prec_{\sigma}e_{ty}\prec_{\sigma}e_{tz}\) for every \(t=(x,y,z)\in T\).
Proof. For any ranking \(\sigma\) over \(E\) and any pair \(\{e,f\}\subseteq E\), let \(\Delta_{\sigma}(\{e,f\})\) be the number of \(\pi_i\) \((i\in\{1,2\})\) such that \(\pi_i\) and \(\sigma\) are inconsistent on \(\{e,f\}\). Then \(\Delta_{\sigma}(\{e,f\})\in \{0,1,2\}\). Using this, the objective value can be written as \[\sum_{i=1}^2 d_{\mathrm{KT}}(\sigma,\pi_i)=\sum_{\{e,f\}\subseteq E}\Delta_{\sigma}(\{e,f\}).\]
For any \(\{e,f\}\subseteq E\), we have \(\Delta_{\sigma}(\{e,f\})\in\{0,2\}\) if \(\pi_1\) and \(\pi_2\) are consistent on \(\{e,f\}\), and otherwise \(\Delta_{\sigma}(\{e,f\})=1\). Observe that \(\pi_1\) and \(\pi_2\) are consistent on \(\{e,f\}\) if and only if \(e\) and \(f\) belong to the same list \(L_t\). Therefore, \(3|T|\) pairs take values in \(\{0,2\}\), while \(\binom{|E|}{2}-3|T|=\theta\) pairs take value \(1\). This immediately implies that the objective value is at least \(\theta\).
The objective value is exactly \(\theta\) if and only if \(\Delta_{\sigma}(\{e,f\})=0\) for every pair \(\{e,f\}\) belonging to the same short list \(L_t\). This condition is equivalent to the condition that for each \(t=(x,y,z)\in T\), the three elements \(e_{tx}, e_{ty}, e_{tz}\) appear in this order in \(\sigma\). ◻
Using this claim, we show both directions. We first show that if \(I\) admits a perfect \(3\)-dimensional matching \(N\), then there is a feasible ranking with objective value \(\theta\). Suppose that such an \(N\) exists, and define \(B_N=\bigcup_{t=(x,y,z)\in N}\{e_{tx}, e_{ty}, e_{tz}\}\). Then \(|B_N\cap P_v|=1\) for every \(v\in X\cup Y\cup Z\), and hence \(B_N\in \mathcal{B}\). Define a ranking \(\sigma_N\) over \(E\) so that (1) the top \(3q\) elements consist of \(B_N\), obtained by concatenating the \(q\) short lists \(L_t\) for \(t\in N\) in an arbitrary order, and (2) the remaining bottom part is obtained by concatenating the \(|T|-q\) short lists \(L_t\) for \(t\in T\setminus N\) in an arbitrary order. Then, for every \(t=(x,y,z)\in T\), it satisfies \(e_{tx}\prec_{\sigma_N}e_{ty}\prec_{\sigma_N}e_{tz}\). This ranking \(\sigma_N\) is feasible because \(\mathsf{Top}_k(\sigma_N)=B_N\in \mathcal{B}\) and attains the objective value \(\theta\) by Claim 13.
We next show the other direction. Suppose that \(I'\) admits a feasible ranking \(\sigma\) whose objective value is \(\theta\). For convenience, write \(Z=\{z_1,z_2,\dots,z_q\}\). Since \(\mathsf{Top}_k(\sigma)\in \mathcal{B}\), for each \(z_i\), we have \(|\mathsf{Top}_k(\sigma)\cap P_{z_i}|=1\). Let \(t_i\in T\) be such that \(\mathsf{Top}_k(\sigma)\cap P_{z_i}=\{e_{t_i z_i}\}\), and let \(x_i\) and \(y_i\) be its \(X\)- and \(Y\)-elements, i.e., \(t_i=(x_i,y_i,z_i)\in T\). Then \(t_1,t_2,\dots,t_q\) are all distinct, since their \(Z\)-elements are distinct (while the \(x_i\)’s and \(y_i\)’s are not guaranteed to be distinct at this point). Set \(N_\sigma=\set{t_i=(x_i,y_i,z_i)| i\in\{1,2,\dots,q\}}\). We now show that \(N_\sigma\) is a perfect \(3\)-dimensional matching in \(I\). For each \(i\in \{1,2,\dots,q\}\), Claim 13 implies \(e_{t_i x_i}\prec_{\sigma}e_{t_i y_i}\prec_{\sigma}e_{t_i z_i}\), and hence \(e_{t_i z_i}\in \mathsf{Top}_k(\sigma)\) implies \(e_{t_i x_i}, e_{t_i y_i}\in \mathsf{Top}_k(\sigma)\). Since \(k=3q\) and all \(t_i\) are distinct, \(\mathsf{Top}_k(\sigma)\) coincides with \(\bigcup_{i=1}^q\{e_{t_i x_i},e_{t_i y_i},e_{t_i z_i}\}\). The condition \(\mathsf{Top}_k(\sigma)\in \mathcal{B}\) then forces \(\textstyle{\left|\bigcup_{i=1}^q\{e_{t_i x_i},e_{t_i y_i},e_{t_i z_i}\}\cap P_v\right|=1}\) for each \(v\in X\cup Y\cup Z\), implying that \(x_1,\dots,x_q\), \(y_1,\dots,y_q\), and \(z_1,\dots,z_q\) are all distinct. This shows that \(N_{\sigma}\) is a perfect \(3\)-dimensional matching. ◻
To obtain the theorem, we show NP-completeness of the following decision version.
Theorem 14. It is NP-complete to determine, given an instance \(I\) of Matroid-FRA with \(m=3\) and a number \(\theta\), whether \(I\) admits a feasible ranking with objective value at most \(\theta\).
Proof. Clearly, the problem is in NP. We show NP-hardness by a reduction from Exact Cover by \(3\)-Sets (X3C), a classical NP-complete problem [41]. An instance of X3C consists of a finite set \(U\) and a family \(\mathcal{C}=\{C_1, \dots,C_q\} \subseteq 2^U\) with \(|C_j|=3\) for each \(j=1,\dots, q\). The question is whether there exists a subfamily \(\mathcal{X}\subseteq \mathcal{C}\) such that each \(u\in U\) is contained in exactly one set of \(\mathcal{X}\). We may also assume that every element of \(U\) belongs to at least one set in \(\mathcal{C}\), since otherwise the instance is trivially a no-instance.
Given an instance \(I\) of X3C as described above, we construct an instance \(I'\) of Matroid-FRA with a target value \(\theta\) as follows. Without loss of generality, we may assume that \(q=2^h\) for some integer \(h\), since otherwise we can add copies of existing \(C_j\) to \(\mathcal{C}\) (so that \(\mathcal{C}\) becomes a multiset) to satisfy this condition; the size of the resulting \(\mathcal{C}\) is at most twice the original size. Thus, \(h=\log_2 q\). Set \(d\mathrel{\vcenter{:}}= h+2\) and let \(E=\{0,1,2\}^d\). Then \(|E|=3^d=9\cdot q^{\log_2 3}\), which is polynomial in the input size. To define the three rankings \(\pi_1, \pi_2, \pi_3\) over \(E\), we first define the underlying rankings \(\rho_1,\rho_2,\rho_3\) over \(\{0,1,2\}\) as follows: \[0 \prec_{\rho_1} 1 \prec_{\rho_1} 2,\qquad 1 \prec_{\rho_2} 2 \prec_{\rho_2} 0, \qquad 2 \prec_{\rho_3} 0 \prec_{\rho_3} 1.\] For each \(i=1,2,3\), the ranking \(\pi_i\) is defined as the lexicographic order with respect to \(\rho_i\). To be more precise, for any \(e\in E=\{0,1,2\}^d\), let \(e_j\) denote its \(j\)th digit. Then, \[e\prec_{\pi_i}f ~~\Longleftrightarrow~~ \text{there exists }\ell\in [d]\text{ such that } e_j=f_j \text{ for all }j\in[\ell-1]\text{ and } e_\ell\prec_{\rho_i}f_\ell.\]
Before specifying the matroid, we analyze the behavior of the objective value. We use the notation \(\{0,1,2\}^{<d}\mathrel{\vcenter{:}}= \{\varepsilon\} \cup \{0,1,2\}^1\cup \{0,1,2\}^2\cup \cdots \cup \{0,1,2\}^{d-1}\), where \(\varepsilon\) denotes the empty sequence. For each \(\alpha\in \{0,1,2\}^{<d}\), we write \(\llbracket \alpha \rrbracket\mathrel{\vcenter{:}}=\set{\beta\in \{0,1,2\}^d | \text{\beta has \alpha as a prefix}}\), where \(\varepsilon\) is a prefix of every element of \(E\).
Let \(\sigma\) be any ranking over \(E\). Similarly to the proof of Claim 13, for any pair \(\{e,f\}\subseteq E\), let \(\Delta_{\sigma}(\{e,f\})\) be the number of \(\pi_i\) \((i\in\{1,2,3\})\) such that \(\pi_i\) and \(\sigma\) are inconsistent on \(\{e,f\}\).
We partition the set \(\binom{E}{2}\) of pairs into classes according to the longest common prefix. For each \(\alpha\in \{0,1,2\}^{<d}\), let \[\mathcal{P}_\alpha=\set{\{e,f\}\subseteq E | \text{\alpha is the longest common prefix of e and f}}.\] That is, \(\mathcal{P}_\alpha\) consists of all unordered pairs \(\{e,f\}\) such that, after possibly swapping \(e\) and \(f\), the ordered pair \((e,f)\) belongs to \((\llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket)\cup (\llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket)\cup (\llbracket \alpha 2 \rrbracket\times \llbracket \alpha 0 \rrbracket)\).
By definition, \(\{\mathcal{P}_\alpha\}_{\alpha\in \{0,1,2\}^{<d}}\) is a partition of \(\binom{E}{2}\). For each \(\alpha\in \{0,1,2\}^{<d}\), define \[H_{\alpha}(\sigma)=\sum_{\{e,f\}\in \mathcal{P}_\alpha}\Delta_{\sigma}(\{e,f\}).\] Thus, \(H_\alpha(\sigma)\) is the contribution to the objective value from the pairs in \(\mathcal{P}_\alpha\).
For each \(\alpha\in \{0,1,2\}^{<d}\), let \(|\alpha|\) denote the length (i.e., the number of digits) of \(\alpha\), and let \(n_{\alpha}\mathrel{\vcenter{:}}= 3^{d-|\alpha|-1}\), which is the size of each of the sets \(\llbracket \alpha 0 \rrbracket\), \(\llbracket \alpha 1 \rrbracket\), and \(\llbracket \alpha 2 \rrbracket\).
Claim 15. For any \(\alpha\in \{0,1,2\}^{<d}\), the following hold.
We always have \(H_{\alpha}(\sigma)\geq 4\cdot n_\alpha^2\).
The equality holds if and only if, for every triple \((e,f,g)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket\), the elements \(e,f,g\) are ordered in \(\sigma\) in this order or in a cyclic shift of this order.
If the equality holds, then for any positive integer \(\ell\), one of the following must hold:
\(\llbracket \alpha 0 \rrbracket\) or \(\llbracket \alpha 1 \rrbracket\) or \(\llbracket \alpha 2 \rrbracket\) is completely contained in \(\mathsf{Top}_\ell(\sigma)\), or
\(\llbracket \alpha 0 \rrbracket\) or \(\llbracket \alpha 1 \rrbracket\) or \(\llbracket \alpha 2 \rrbracket\) is disjoint from \(\mathsf{Top}_\ell(\sigma)\).
Proof. Note that each pair \(\{e,f\}\in \mathcal{P}_\alpha\) consists of elements taken from two distinct sets among \(\llbracket \alpha 0 \rrbracket\), \(\llbracket \alpha 1 \rrbracket\), and \(\llbracket \alpha 2 \rrbracket\), each of which has size \(n_{\alpha}\). By the definition of \(\pi_i\) \((i=1,2,3)\), which are the lexicographic orders with respect to \(\rho_i\), we have \[(e,f)\in (\llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket) \cup (\llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket)\cup (\llbracket \alpha 2 \rrbracket\times \llbracket \alpha 0 \rrbracket)\implies \Delta_{\sigma}(\{e,f\})= \begin{cases} 1 & \text{if } e\prec_{\sigma} f,\\ 2 & \text{if } f\prec_{\sigma} e. \end{cases} \label{onetwo}\tag{6}\] We next show the following equality: \[\sum_{\{e,f\}\in \mathcal{P}_\alpha}\Delta_{\sigma}(\{e,f\})=\frac{1}{n_{\alpha}}\cdot \sum_{(e,f,g)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket}\left(\Delta_{\sigma}(\{e,f\})+\Delta_{\sigma}(\{f,g\})+\Delta_{\sigma}(\{g,e\})\right).\] To see this, fix any pair in \(\mathcal{P}_\alpha\), say \(\{e^*,f^*\}\in \mathcal{P}_{\alpha}\). Assume without loss of generality that \((e^*,f^*)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\). Then on the right-hand side, the term \(\Delta_{\sigma}(\{e^*,f^*\})\) appears \(n_\alpha\) times as \((e^*,f^*, g)\) with different \(g\in \llbracket \alpha 2 \rrbracket\). Thus this equality holds.
Take any \((e,f,g)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket\). By 6 , each term of \(\Delta_{\sigma}(\{e,f\})+\Delta_{\sigma}(\{f,g\})+\Delta_{\sigma}(\{g,e\})\) is \(1\) or \(2\), but it is impossible that all of them are \(1\), since otherwise we would have \(e\prec_\sigma f\prec_\sigma g\prec_\sigma e\), a contradiction. Thus, the minimum value of the sum of these three terms is \(4\), and it is attained if and only if we have either \(e\prec_\sigma f\prec_\sigma g\), \(f\prec_\sigma g\prec_\sigma e\), or \(g\prec_\sigma e\prec_\sigma f\), i.e., \(e,f,g\) appear in \(\sigma\) in this order or in a cyclic shift of this order. Then \[H_{\alpha}(\sigma)=\sum_{\{e,f\}\in \mathcal{P}_\alpha}\Delta_{\sigma}(\{e,f\}) \geq \frac{1}{n_{\alpha}}\cdot n_\alpha^3 \cdot 4 =4\cdot n_{\alpha}^2 =4\cdot 3^{2(d-|\alpha|-1)},\] and the equality holds if and only if for every triple \((e,f,g)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket\), the elements \(e,f,g\) are ordered in \(\sigma\) in this order or in a cyclic shift of this order. Thus, the first and second statements of the claim are shown.
To prove the third statement, suppose for the sake of contradiction that we have \(H_\alpha(\sigma)=4\cdot 3^{2(d-|\alpha|-1)}\) while none of \(\llbracket \alpha 0 \rrbracket\), \(\llbracket \alpha 1 \rrbracket\), and \(\llbracket \alpha 2 \rrbracket\) is contained in or disjoint from \(\mathsf{Top}_\ell(\sigma)\). Then, there exist \(e_1, e_2\in \llbracket \alpha 0 \rrbracket\), \(f_1, f_2\in \llbracket \alpha 1 \rrbracket\), and \(g_1, g_2\in \llbracket \alpha 2 \rrbracket\) such that \(e_1, f_1, g_1\in \mathsf{Top}_\ell(\sigma)\) and \(e_2, f_2, g_2\in E\setminus \mathsf{Top}_\ell(\sigma)\).
Consider the triple \((e_1, f_1, g_2)\). By the above discussion, for \(H_{\alpha}(\sigma)\) to be \(4\cdot n_\alpha^2\), these three elements must appear in this order or in a cyclic shift of it. However, since \(g_2\in E\setminus \mathsf{Top}_\ell(\sigma)\) cannot precede \(e_1,f_1\in \mathsf{Top}_\ell(\sigma)\), we must have \(e_1\prec_\sigma f_1\prec_\sigma g_2\). Similar arguments applied to the triples \((e_2,f_1, g_1)\) and \((e_1,f_2, g_1)\) respectively imply \(f_1\prec_\sigma g_1\prec_\sigma e_2\) and \(g_1\prec_\sigma e_1\prec_\sigma f_2\). However, these relations imply \(e_1\prec_\sigma f_1\prec_\sigma g_1 \prec_\sigma e_1\), a contradiction. ◻
By the definition of \(H_\alpha(\sigma)\) and Claim 15, the objective value satisfies \[\sum_{i=1}^3 d_{\mathrm{KT}}(\sigma,\pi_i)=\sum_{\alpha\in \{0,1,2\}^{<d}}H_{\alpha}(\sigma)\geq \sum_{\alpha\in \{0,1,2\}^{<d}}4\cdot n_{\alpha}^2,\] for any ranking \(\sigma\) over \(E\). We set the target objective value in \(I'\) as \(\theta=\sum_{\alpha\in \{0,1,2\}^{<d}}4\cdot n_{\alpha}^2\), i.e., the right-hand side of the above inequality.
Figure 5: An illustration of the constructed Matroid-FRA instance with three voters, obtained by a reduction from X3C. The ground set is \(\{0,1,2\}^d\), and each triangle represents a set of elements sharing a common prefix. The figure on the right shows the set of elements with a common prefix in \(\{0,1\}^{d-4}\), while the enlarged figure on the left zooms in on the subset corresponding to a common prefix \(\alpha \in \{0,1\}^{d-3}\). The three input rankings are defined lexicographically from the underlying orders \(\rho_1, \rho_2, \rho_3\), shown at the upper right of the figure. Each 3-set in the X3C instance corresponds to a smallest triangle containing three uncolored elements of \(\{0,1,2\}^d\). For each element of the ground set of the X3C instance, there is a partition class consisting of the corresponding elements of \(\{0,1,2\}^d\). Elements colored in gray indicate forbidden elements (loops), and those colored in orange indicate mandatory elements that must be included in every matroid base..
To define the matroid, recall that \(d=h+2\) and \(2^h=q\), where \(q\) is the number of size-\(3\) sets in the X3C instance \(I\). Let us enumerate the elements of \(\{0,1\}^h\) as \(\{0,1\}^h=\{\beta_1,\dots,\beta_q\}\). Observe that for each \(j=1,\dots, q\), since \(|\beta_j|=h=d-2\), the set \(\llbracket \beta_j \rrbracket\) is partitioned into the following three sets: \[\begin{align} \llbracket \beta_j 0 \rrbracket&=\{\beta_j 00, \beta_j 01, \beta_j 02\},\\ \llbracket \beta_j 1 \rrbracket&=\{\beta_j 10, \beta_j 11, \beta_j 12\},\\ \llbracket \beta_j 2 \rrbracket&=\{\beta_j 20, \beta_j 21, \beta_j 22\}. \end{align}\] We use the sets \(\llbracket \beta_j 0 \rrbracket\) to implement the size-\(3\) sets \(C_j=\{u_{j,0}, u_{j,1}, u_{j,2}\}\). (See Figure 5.) For each element \(u\in U\) in \(I\), define a partition class \[P_u=\set{\beta_j 0\ell | j\in [q],\, \ell\in\{0,1,2\},\, u=u_{j,\ell}},\] and assign capacity \(1\) to it. In contrast, the elements in \(\llbracket \beta_j 1 \rrbracket\) and \(\llbracket \beta_j 2 \rrbracket\) are all used as forbidden or mandatory elements as follows. For each of \(\beta_j 10, \beta_j 11, \beta_j 20, \beta_j 21\), we consider a partition class consisting only of that single element and having capacity \(1\), which forces any base to include these elements; i.e., these are mandatory. We let \(\beta_j 12\) and \(\beta_j 22\) be loops (dependent singletons) in the matroid, meaning that these are forbidden elements. Thus, for every base, neither \(\llbracket \beta_j 1 \rrbracket\) nor \(\llbracket \beta_j 2 \rrbracket\) is contained in or disjoint from the base.
We have thus specified the roles of the elements in \(\llbracket \beta \rrbracket\) for all \(\beta\in \{0,1\}^h=\{0,1\}^{d-2}\). For each remaining element in \(E=\{0,1,2\}^d\), i.e., each element \(e\in E\) in which \(2\) appears in the first \(h\) digits at least once, we declare it to be a forbidden element. This completes the definition of the matroid \(M\). Let \(E_{\rm mand}\) and \(E_{\rm forb}\) be the sets of mandatory and forbidden elements, respectively. Then, the base family \(\mathcal{B}\) is written as \[\mathcal{B}=\set{ B\subseteq E | |B\cap P_u|=1~(u\in U),~E_{\rm mand}\subseteq B,~E_{\rm forb}\cap B=\emptyset}.\] The rank of \(M\) is \(k=|U|+|E_{\rm mand}|\). This completes the construction of the Matroid-FRA instance \(I'\).
We prove both directions in turn.
First, suppose that \(I'\) admits a feasible ranking \(\sigma\) with objective value \(\theta\). We show that the X3C instance \(I\) admits an exact cover. Since the objective value is \(\theta=\sum_{\alpha\in \{0,1,2\}^{<d}}4\cdot n_{\alpha}^2\), the third statement of Claim 15 implies that, for each \(\alpha\in \{0,1,2\}^{<d}\), at least one of \(\llbracket \alpha 0 \rrbracket\), \(\llbracket \alpha 1 \rrbracket\), and \(\llbracket \alpha 2 \rrbracket\) is completely contained in or disjoint from \(\mathsf{Top}_k(\sigma)\). In particular, when applied to \(\beta_j\) \((j=1,\dots, q)\), this implies that \(\llbracket \beta_j 0 \rrbracket\) is either contained in or disjoint from \(\mathsf{Top}_k(\sigma)\), because feasibility of \(\sigma\) implies that \(\mathsf{Top}_k(\sigma)\) includes \(\beta_j 10, \beta_j 11, \beta_j 20, \beta_j 21\) and excludes \(\beta_j 12\) and \(\beta_j 22\). Thus, we have \(|\llbracket \beta_j 0 \rrbracket\cap \mathsf{Top}_k(\sigma)|\in\{0,3\}\) for each \(j=1,\dots, q\). Let \(\mathcal{X}_{\sigma}=\set{C_j| \llbracket \beta_j 0 \rrbracket\subseteq \mathsf{Top}_k(\sigma)}\). Since \(\mathsf{Top}_k(\sigma)\) is a base, for each \(u\in U\), we have \(|P_u\cap \mathsf{Top}_k(\sigma)|=1\), which means that exactly one set \(C_j\) in \(\mathcal{X}_{\sigma}\) contains \(u\). Thus, \(\mathcal{X}_{\sigma}\) is an exact cover in \(I\).
We next show the other direction. Suppose that the X3C instance \(I\) admits an exact cover \(\mathcal{X}\subseteq \mathcal{C}\). We show that \(I'\) admits a feasible ranking \(\sigma\) with objective value \(\theta\). Let \(B_{\mathcal{X}}=\left(\bigcup_{j:C_j\in \mathcal{X}}\llbracket \beta_j 0 \rrbracket\right)\cup E_{\rm mand}\). Since \(\mathcal{X}\) is an exact cover, we have \(|B_{\mathcal{X}}\cap P_u|=1\) for every \(u\in U\), and hence \(B_{\mathcal{X}}\in \mathcal{B}\). We now construct a ranking \(\hat{\sigma}\) satisfying \(\mathsf{Top}_k(\hat{\sigma})=B_{\mathcal{X}}\). We define the order \(\hat{\sigma}\) recursively.
For each \(\alpha\in \{0,1,2\}^d\), let \(\hat{\sigma}_\alpha\) be the trivial ranking on the singleton \(\{\alpha\}\).
For each \(\alpha\in \{0,1,2\}^{<d}\), we define \(\hat{\sigma}_{\alpha}\) using \(\hat{\sigma}_{\alpha 0}\), \(\hat{\sigma}_{\alpha 1}\), and \(\hat{\sigma}_{\alpha 2}\) as follows. First, partition the set \(\llbracket \alpha \rrbracket\) into the following subsets: \[\begin{align} E_1&=\llbracket \alpha 0 \rrbracket\cap B_{\mathcal{X}},\quad F_1=\llbracket \alpha 1 \rrbracket\cap B_{\mathcal{X}},\quad G_1=\llbracket \alpha 2 \rrbracket\cap B_{\mathcal{X}},\\ E_2&=\llbracket \alpha 0 \rrbracket\setminus B_{\mathcal{X}},\quad F_2=\llbracket \alpha 1 \rrbracket\setminus B_{\mathcal{X}},\quad G_2=\llbracket \alpha 2 \rrbracket\setminus B_{\mathcal{X}}. \end{align}\] By the definition of \(B_{\mathcal{X}}\) and the set \(E_{\rm mand}\), at least one of \(E_1=\emptyset\) or \(E_2=\emptyset\) or \(G_1=\emptyset\) holds. (The first or second holds when \(|\alpha|\geq d-2\), and otherwise the third holds.)
Define a ranking \(\hat{\sigma}_{\alpha}\) on \(\llbracket \alpha \rrbracket\) as follows.
If \(E_1=\emptyset\), let \(\hat{\sigma}_{\alpha}\) arrange the blocks in the order \(F_1\, G_1\, G_2\, E_2\, F_2\).
If \(E_2=\emptyset\), let \(\hat{\sigma}_{\alpha}\) arrange the blocks in the order \(G_1\, E_1\, F_1\, F_2 \, G_2\).
If \(G_1=\emptyset\), let \(\hat{\sigma}_{\alpha}\) arrange the blocks in the order \(E_1\, F_1\, F_2\, G_2\, E_2\).
Here, the ordering inside \(E_1\cup E_2\) (resp., \(F_1\cup F_2\), \(G_1\cup G_2\)) is given by the orderings \(\hat{\sigma}_{\alpha 0}\) (resp., \(\hat{\sigma}_{\alpha 1}\), \(\hat{\sigma}_{\alpha 2}\)).
Let \(\hat{\sigma}=\hat{\sigma}_{\varepsilon}\) be the ranking on \(E\) obtained in this way. In each of the three cases in the construction, all elements of \(\llbracket \alpha\rrbracket\cap B_{\mathcal{X}}\) are placed before all elements of \(\llbracket \alpha\rrbracket\setminus B_{\mathcal{X}}\). Hence, by induction on the recursion, every element of \(B_{\mathcal{X}}\) precedes every element of \(E\setminus B_{\mathcal{X}}\) in \(\hat{\sigma}\). Therefore \(\mathsf{Top}_k(\hat{\sigma})=B_{\mathcal{X}}\).
By construction, for every \(\alpha\in \{0,1,2\}^{<d}\), the restriction of \(\hat{\sigma}\) to \(\llbracket \alpha \rrbracket\) coincides with \(\hat{\sigma}_{\alpha}\). The construction also ensures that every \((e,f,g)\in \llbracket \alpha 0 \rrbracket\times \llbracket \alpha 1 \rrbracket\times \llbracket \alpha 2 \rrbracket\) is ordered in \(\hat{\sigma}_{\alpha}\) in this order or in a cyclic shift of this order (note that \(e\in E_1\cup E_2\), \(f\in F_1\cup F_2\), and \(g\in G_1\cup G_2\) in the above construction). Therefore, by the second statement of Claim 15, we have \(H_{\alpha}(\hat{\sigma})=4\cdot n_\alpha^2\) for every \(\alpha\in \{0,1,2\}^{<d}\), and hence the objective value \(\sum_{i=1}^3 d_{\mathrm{KT}}(\hat{\sigma},\pi_i)\) coincides with \(\sum_{\alpha\in \{0,1,2\}^{<d}}4\cdot n_{\alpha}^2=\theta\). ◻
Proof. If \(m\) is even, we start from the NP-hard case \(m=2\); if \(m\) is odd, we start from the NP-hard case \(m=3\). To increase the number of voters by \(2\), add an arbitrary ranking \(\pi\) and its reverse \(\pi^{\mathrm{rev}}\) on the same ground set. For every ranking \(\sigma\), \(d_{\mathrm{KT}}(\sigma,\pi)+d_{\mathrm{KT}}(\sigma,\pi^{\mathrm{rev}}) = \binom{|E|}{2}\), which is independent of \(\sigma\). Hence each added pair shifts the objective value by the same constant and does not affect which feasible rankings are optimal. Repeating this extension yields NP-hardness for every \(m>1\). ◻
Department of Mathematical and Computing Science, School of Computing, Institute of Science Tokyo, Tokyo 152-8552, Japan. Email: ando.s.373d@m.isct.ac.jp↩︎
Department of Mathematical and Computing Science, School of Computing, Institute of Science Tokyo, Tokyo 152-8552, Japan. Email: yokoi@comp.isct.ac.jp↩︎
A related exchange-based argument appears in the correctness proof of the algorithm for CFR with block-fairness [11]. To the best of our understanding, some additional justification is needed to ensure that the proposed swap preserves all block-prefix constraints; see Appendix 7 for details.↩︎
This terminology is used in some works on weighted rank aggregation. In graph theory, a tournament usually means an orientation of a complete graph.↩︎