Finding Diverse Solutions in Combinatorial Problems with a Distributive Lattice Structure
Abstract
We generalize the polynomial-time solvability of -Diverse Minimum s-t Cuts (De Berg et al., ISAAC’23) to a wider class of combinatorial problems whose solution sets have a distributive lattice structure. We identify three structural conditions that, when met by a problem, ensure that a -sized multiset of maximally-diverse solutions – measured by the sum of pairwise Hamming distances – can be found in polynomial time. We apply this framework to obtain polynomial-time algorithms for finding diverse minimum - cuts, diverse stable matchings, and diverse market-clearing price vectors. Moreover, we show that the framework extends to two other natural measures of diversity. Lastly, we present a simpler algorithmic framework for finding a largest set of pairwise disjoint solutions in problems that meet these structural conditions.
Keywords and phrases:
Diversity, Lattice Theory, Submodular Function MinimizationCopyright and License:
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsFunding:
This research was supported by the European Union’s Horizon 2020 research and innovation programme under the Marie Skłodowska-Curie grant agreement no. 945045, and by the NWO Gravitation project NETWORKS under grant no. 024.002.003.Editors:
Ho-Lin Chen, Wing-Kai Hon, and Meng-Tsung TsaiSeries and Publisher:
Leibniz International Proceedings in Informatics, Schloss Dagstuhl – Leibniz-Zentrum für Informatik
1 Introduction
In combinatorial optimization problems, the objective is typically to identify a single optimal solution. However, this approach may be inadequate or impractical in real-world situations, where some constraints and factors are often overlooked or unknown in advance. This motivates the development of algorithms capable of finding multiple solutions, with diversity playing a key role. A growing body of research has focused on finding diverse solutions in classical combinatorial problems, much of it emerging from the field of fixed-parameter tractability [1, 9, 12, 23, 24, 32, 38, 29]. These studies show that finding diverse solutions is, in general, computationally more challenging than finding a single one. For instance, while Maximum Matching is solvable in polynomial time, finding two edge-disjoint perfect (or maximum) matchings is NP-hard, even on 3-regular graphs [12].
In this paper, we aim to develop theoretically efficient algorithms that produce a collection of maximally diverse solutions. We use the sum of pairwise Hamming distances between solutions as our measure of diversity. In contrast with the aforementioned literature, we show that a broader class of diverse problems is computationally no harder than finding a single solution in polynomial time. Specifically, we generalize the polynomial-time solvability of -Diverse Minimum s-t Cuts by De Berg et al. [7] to a class of combinatorial problems whose solution sets form a distributive lattice.
We state our main result in terms of a unified general problem: Max-Sum -Diverse Solutions. Let be a finite set with elements, and let be a set of feasible solutions. For two feasible solutions , the symmetric difference, or Hamming distance, between them is defined as . Let be a collection of subsets of . We consider the pairwise-sum diversity measure: . We define Max-Sum -Diverse Solutions as follows.
Max-Sum -Diverse Solutions.
Given a finite set of size , an implicitly defined family of subsets of , referred to as feasible solutions, and a membership oracle for , find a -multiset with , such that is maximum.
Here, is a fixed constant; i.e., is not part of the input. Our main result is as follows.
Theorem 1.
Max-Sum -Diverse Solutions can be solved in polynomial time if the set of feasible solutions satisfies the following three properties:
-
1.
There is a relation such that the poset can be expressed as a disjoint union of chains, and each feasible solution contains exactly one element from each chain.
-
2.
The set of feasible solutions with componentwise order defines a distributive lattice.
-
3.
A compact representation of this lattice can be constructed in polynomial time.
Similar to the approach of De Berg et al. [7], we achieve this result via a reduction to the submodular function minimization problem (SFM) on a distributive lattice, which is known to be solvable in polynomial time [20, 27, 36]. More precisely, we show that the pairwise-sum measure (reformulated as a minimization objective) is a submodular function on a distributive lattice of appropriately ordered -sized collections of feasible solutions. By applying this result, in Section 4, we obtain polynomial-time algorithms for finding maximally diverse -sized collections of stable matchings and market-clearing price vectors, while also reproducing the findings of De Berg et al. for minimum - cuts.
For simplicity, we present our results in terms of the measure. However, in Section 5 we will show that the framework extends to at least two other measures of diversity: the coverage () and absolute-difference () measures. Lastly, we consider the problem of finding a largest set of pairwise disjoint solutions in problems whose feasible solution set satisfies properties 1 and 2 of Theorem 1. In Section 6 we present an algorithm for this problem that bypasses the need for SFM.
Remark.
Recently and independently from us, Iwamasa et al. [26] also presented a general framework for solving Max-Sum Diverse Solutions (and Max-Cov Diverse Solutions; see definition in Section 5) under certain conditions on the set of feasible solutions. They show that the conditions in our Theorem 1 imply the conditions in their framework. In the full version of this paper, we show that the reverse is true as well. Thus, their conditions and our conditions are, in fact, equivalent. Their approach reduces the problem to network flow, avoiding SFM and resulting in faster algorithms for computing diverse minimum - cuts and diverse stable matchings. However, in contrast to their framework, ours also supports the absolute-difference measure and thus, potentially applies to a broader range of problems.
2 Preliminaries
In this section, we introduce the notation and some basic results used throughout the paper. For a more comprehensive discussion on sets and posets, we refer to [25, 40], and for a detailed introduction to lattice theory, we refer to [2, 6, 19].
Sets, Multisets, and Tuples.
For , we use to denote the set . The power set of a set is denoted by . For any set , we use the symbol for the cartesian product; . The disjoint union of two sets is simply their union, but with the additional information that the two sets have no elements in common.
A multiset is a set in which elements can appear multiple times. The number of times an element appears in a multiset is referred to as its multiplicity. The sum of two multisets and , denoted by , is a multiset in which each element appears with a multiplicity equal to the sum of its multiplicity in and in . We refer to a multiset of cardinality as a -multiset. For a set , we denote by a -multiset with elements drawn from .
Unlike a multiset, where elements are unordered, a tuple is a collection of possibly repeated elements that is ordered. A -tuple is a tuple of elements. We denote a tuple by listing its elements within parenthesis and separated by commas; e.g., . Note that the cartesian product of sets is a -tuple.
Posets.
A partially ordered set (poset) consists of a ground set along with a binary relation on that satisfies reflexivity, antisymmetry, and transitivity. When the relation is evident from the context, we often use the same notation for both the poset and its ground set. In case a poset is indexed by a subscript , we use to denote its order relation. The Hasse diagram of , is a directed graph where each element of is represented as a node, and an edge exists from element to element if and no intermediate element satisfies . Vertices are arranged so that edge directions are implicitly understood as pointing upward.
A poset is called a subposet of another poset if (i) and (ii) for any if then . If the other direction of (ii) also holds, then we call the subposet of induced by , and write . Given two posets and , their disjoint union is the disjoint union of and together with relation where if one of the following conditions holds: (i) and , or (ii) and . Thus, the Hasse diagram of consists of the disconnected Hasse diagrams of and drawn together.
A chain is a subset of a poset in which every pair of elements is comparable, and an antichain is a subset of a poset in which no two (distinct) elements are comparable. For any two elements and in a chain with order relation , we say that (resp. ) is a chain-predecessor (chain-successor) of if . A poset is called a chain decomposition if the poset can be expressed as the disjoint union of chains.
For a poset , an ideal is a set where implies that for all . In terms of its Hasse diagram , a subset of is an ideal if and only if there is no incoming edge from . We use to denote the family of all ideals of . If in the poset, then the closed interval from to , denoted by , is the poset with ground set together with relation .
Now we introduce the notion of componentwise order. Let , be posets, with a positive integer, and let . The componentwise order on is an order relation defined as follows: Given two tuples and , we write iff for all . Note that we drop the subscript in whenever the order relation is a component-wise order. If the posets , , are all the same poset , we use to denote the componentwise order on and refer to it as the product order.
Lattices.
A lattice is a poset in which any two elements have a (unique) greatest lower bound, or meet, denoted by , as well as a (unique) least upper bound, or join, denoted by . We can uniquely identify by the tuple . The bottom, or minimum, element in the lattice is denoted by . Likewise, the top, or maximum, element of is given by . A lattice is a sublattice of if and has the same meet and join operations as . In this paper we only consider distributive lattices, which are lattices whose meet and join operations satisfy distributivity; that is, and , for any . Note that a sublattice of a distributive lattice is also distributive. Every chain is a distributive lattice with as join () and as meet ().
Suppose we have a collection of lattices with . The (direct) product lattice is a lattice with ground set and join and meet operations acting component-wise; that is, and for any . The lattice is the product lattice of copies of , and is called the -th power of . If is a distributive lattice, then is also distributive.
A crucial notion in this paper is that of join-irreducibles. An element of a lattice is called join-irreducible iff and it cannot be expressed as the join of two elements with . In a lattice, any element is equal to the join of all join-irreducible elements lower than or equal to it. The set of join-irreducible elements of is denoted by . Note that is a poset whose order is inherited from . Due to Birkhoff’s representation theorem – a fundamental tool for studying distributive lattices – every distributive lattice is isomorphic to the lattice of ideals of its poset of join-irreducibles, with union and intersection as join and meet operations. See Figure 1 for an illustration.
Theorem 2 (Birkhoff’s Representation Theorem [2]).
Any distributive lattice can be represented as the poset of its join-irreducibles , with the order induced from .
Hence, a distributive lattice can be uniquely recovered from and can thus be represented as the Hasse diagram of its poset of join-irreducibles, denoted by . We refer to as a compact representation of , since is usually exponentially smaller than . This representation is useful when designing algorithms, as the size of is , while can have as many as elements. Keep in mind, however, that Theorem 2 only guarantees the existence of such a compact representation; it does not provide a method to efficiently find the set .
Submodular Function Minimization.
Let be a real-valued function on a lattice . We say that is submodular on if , for all . If is submodular in , then we say that is supermodular in and just modular if is both sub and supermodular. The submodular function minimization problem (SFM) on lattices is, given a submodular function on , to find an element such that is minimum. An important fact that we use in our work is that the sum of submodular functions is also submodular. Also, note that minimizing is equivalent to maximizing . It is known that a submodular function on a distributive lattice can be minimized in polynomial time in – the number of join-irreducibles of [20, 27, 36, 4].
3 The Reduction to SFM
In this section, we prove Theorem 1 by reducing Max-Sum -Diverse Solutions to SFM on a distributive lattice, under the assumption that the feasible solution set satisfies properties 1–3 of the theorem. The core ideas of this proof were already established by De Berg et al. [7] in the context of minimum - cuts. We include the argument here for completeness, while adapting and generalizing it to a broader setting.
The proof is divided into four parts, each supported by a corresponding lemma. The Distributivity Lemma (Lemma 4) shows that the set of (yet to be defined) left-right ordered -tuples of feasible solutions, with product order, defines a distributive lattice . The Cost-Equivalence Lemma (Lemma 7) further shows that optimizing the diversity over this lattice is the same as optimizing over the original set of -multisets of . Hence, we can restrict ourselves to the elements of . Next, the Submodularity Lemma (Lemma 11) establishes that the pairwise-sum measure (reformulated as a minimization objective) is a submodular function on . Finally, the Compactness Lemma (Lemma 12) ensures that a compact representation of can be constructed in polynomial time.
We begin by establishing some consequences of properties 1–3 of Theorem 1. Consider a ground set and a set of feasible solutions for which the properties hold. By property 1, we know that there is a poset associated to that is the disjoint union of chains , , and that each feasible solution contains exactly one element from each chain, meaning and . Then, the set , with componentwise order , forms a poset of feasible solutions . Furthermore, by properties 1 and 2, this poset is a distributive lattice, with join () and meet () given by componentwise maximum and minimum. Let us now consider the poset of -tuples of feasible solutions, with product order . We say that a -tuple in is in left-right order if for all . That is, the feasible solutions in are arranged in non-decreasing order according to relation . Let denote the subset of left-right ordered -tuples.
Part 1: Distributivity.
We now establish the first of the four lemmas.
Lemma 4 (Distributivity Lemma).
The poset is a distributive lattice.
Proof.
By property 2 of Theorem 1, is a distributive lattice. Now, let be the -th power of . We know that the product of distributive lattices is distributive; hence is a distributive lattice. Moreover, since , the poset is a sublattice of . As any sublattice of a distributive lattice is itself distributive, the lemma follows.
Part 2: Cost equivalence.
Following the proof of the Distributivity Lemma, we now establish an equivalence between the costs of maximum diversity solutions in the sets and . (Note that this is the same as establishing the equivalence between the sets and , since a -multiset over has the same diversity as each of its up to permutations – each a -tuple – in .) For this, we use the notion of element multiplicity. Let be a -tuple of solutions. The multiplicity of an element , with respect to , is the number of feasible solutions in that contain . Since a feasible solution contains no repeated elements, is also the number of times appears in the multiset sum of the solutions in . An immediate consequence of property 1 of Theorem 1 is the following.
Observation 5.
For any two , we have .
Proof.
Let and , with and , where is the -th chain in the chain decomposition of . By property 1, we know that the meet and join of two elements are given by componentwise minimum and maximum. That is,
Hence, if , the element appears twice in the multiset sum and twice in the sum . If , then appears in either the join or the meet of and , and similarly for element . Finally, if an element is not in , then it is neither the minimum nor maximum of any entry and therefore cannot appear in . Since this holds for each , the observation is proven.
Observation 5 implies that the join and meet operations of the lattice of feasible solutions preserve element multiplicities. Consequently, any -tuple in can be reordered into a left-right ordered form while preserving element multiplicities, as stated in the following claim (see the proof in the full version).
Claim 6.
For every -tuple there exists a left-right ordered -tuple such that for all .
Now, consider the pairwise-sum diversity measure introduced in Section 1. We can rewrite it directly in terms of the multiplicity as
| (1) |
which results from observing that , for any , with the cardinality of each solution in . This formulation highlights that maximizing depends only on the distribution of elements across feasible solutions, rather than their specific ordering within a tuple . Since the terms outside the latter summation in Eq. (1) are constant, the following lemma is an immediate consequence of Claim 6.
Lemma 7 (Cost-Equivalence Lemma).
For any there exists such that .
Lemma 7 tells us that in order to solve Max-Sum -Diverse Solutions, we do not need to optimize over the set of -element multisets of . Instead, we can optimize over the set of -tuples that are in left-right order. Moreover, it follows from Eq. (1) that maximizing is equivalent to minimizing
| (2) |
Hence, solving Max-Sum -Diverse Solutions reduces to minimizing in the lattice . All we have left to do to complete the reduction to SFM is show that is submodular in the lattice .
Part 3: Submodularity.
We begin with two claims regarding the multiplicity function on . These claims rely crucially on property 1 of Theorem 1. Their proofs can be found in the full version of the paper. We use to denote the set of elements for a tuple .
Claim 8.
The multiplicity function is modular on .
Claim 9.
For any two and , it holds that .
We observe that Claim 8 holds in the lattice , not just in the sublattice of left-right ordered -tuples. In contrast, Claim 9 is specific to the sublattice . The following proposition is an immediate consequence of these two claims and the convexity of the square function.
Proposition 10.
For any two and any , we have .
Proposition 10 states that, for each element , the square of the multiplicity function is submodular in the lattice . Then, taking the sum of over all elements is also a submodular function; that is
Each sum in this inequality corresponds to the definition of applied to the arguments , , and , respectively. Hence, we obtain the following.
Lemma 11 (Submodularity Lemma).
The function is submodular in .
Part 4: Compactness.
While Lemmas 4, 7, and 11 already demonstrate the reduction of Max-Sum -Diverse Solutions to SFM, this reduction alone does not guarantee an efficient algorithm. To complete the proof of Theorem 1, it remains to show that a compact representation of the left-right ordered lattice exists and can be constructed efficiently. By Birkhoff’s representation theorem, we need only specify the set of join-irreducibles of to obtain a compact representation in time. This is done in the following lemma, whose proof can be found in the full version of this work.
Lemma 12 (Compactness Lemma).
The set of join-irreducibles of is of size and is given by
, where .
4 Applications of the Framework
We now present examples of combinatorial problems whose feasible solution sets meet each of the conditions outlined in Theorem 1, allowing for the generation of maximally diverse solutions within our framework. Specifically, we discuss minimum - cuts (Section 4.1), stable matchings (Section 4.2), and market-clearing price vectors (Section 4.3).
4.1 Minimum - cuts
In the Minimum - Cut problem we are given a directed graph , along with two special vertices , and are tasked with finding a subset of minimum cardinality that separates vertices and , meaning that removing these edges from ensures there is no path from to . Such a set is called a minimum - cut or - mincut. Here, we consider the problem of finding diverse minimum - cuts, formally defined below.
Max-Sum -Diverse Minimum s-t Cuts.
Given are a directed graph and vertices . Let be the set of minimum - cuts in , and let be the set of -multisets over . Find such that .
Using our framework, we reproduce the findings of De Berg et al. [7] for Max-Sum -Diverse Minimum s-t Cuts by showing that the set of minimum - cuts satisfies properties 1-3 of Theorem 1. We prove these statements in order.
Lemma 13 (Property 1).
There is a chain decomposition of the edge set into disjoint chains, such that each minimum - cut contains exactly one element from each chain.
Proof.
We construct the chains as follows. Let be an (arbitrary) set of edge-disjoint - paths in with maximum cardinality . Define as the set of edges traversed by the path . For each path , consider the order relation defined as follows: for any , we say if and only if path meets edge before edge , or if and are the same edge. Since every pair of edges within a path is comparable under this relation, each poset , for , forms a chain. Moreover, these chains are disjoint by the definition of the set . By Menger’s theorem, the size of a minimum - cut in equals the maximum number of edge-disjoint - paths, which is . Consequently, any minimum - cut must include exactly one edge from each chain , . Otherwise, if contained fewer than edges, it would not be a valid - cut, and if it contained more, it would not be of minimum size. Hence, .
Consider now the edges in . We call these edges residual edges. Observe that these edges can never be part of a minimum - cut. This follows because such a cut must contain exactly one edge from each chain in , and cutting any additional edge from would only increase the cut size, violating minimality. Hence, we simply distribute the residual edges arbitrarily over the chains. This does not change the fact that the chains are disjoint, or that the set of minimum - cuts is a subset of the cartesian product of the augmented chains. This completes the proof.
By Lemma 13, the set of minimum - cuts with componentwise order – defined by: for iff for all – forms a poset . It is well known that this poset defines a distributive lattice [11, 31, 22]. Specifically, proving that is closed under the joins and meets induced by suffices to establish this property (see e.g., [7, Claim A.1]). Thus, property 2 of Theorem 1 follows directly.
Lemma 14 (Property 2).
The set of minimum - cuts with componentwise order defines a distributive lattice .
Next, we note that a compact representation of the lattice of minimum - cuts can be constructed in polynomial time. This result is well known from the work of Picard and Queyranne [35], who gave an algorithm to build such a representation using a residual graph. Specifically, the resulting graph has vertex set and total size at most , and can therefore be constructed in time.
Lemma 15 (Property 3).
A compact representation of the lattice - mincuts can be constructed in polynomial time.
Then, by Theorem 1 and Lemmas 13-15, we obtain a polynomial time algorithm for Max-Sum -Diverse Minimum s-t Cuts via submodular function minimization.
Theorem 16.
Max-Sum -Diverse Minimum s-t Cuts is poly-time solvable.
Remark 17.
Since the edge version of Menger’s theorem is known to hold for multigraphs, our results for unweighted directed graphs extend naturally to weighted graphs by replacing each edge of weight with parallel edges.
Remark 18.
Similar results to those presented in Lemmas 13-15 can be established for minimum - vertex cuts. Since a vertex-connectivity version of Menger’s theorem also exists, the arguments in Lemma 13 remain valid when replacing with . Moreover, the poset of minimum - vertex cuts, ordered componentwise, forms a distributive lattice, which can be demonstrated analogously to Lemma 14. Finally, a compact representation of this lattice can be computed efficiently, as shown by Bonsma [5, Sec. 6], or via the constructive version of Birkhoff’s theorem for computing a slice, as described by Garg [33] (see also [15, Ch. 10]).
4.2 Stable Matchings
In the Stable Matching problem, we are given a complete bipartite graph along with a linear ordering over for each vertex , and similarly a linear ordering over for each vertex . For a vertex (resp. ), the poset (resp. ) is referred to as its preference list. The task is to find a perfect matching in such that no two vertices and prefer each other over their matched partners. Such a set of edges is called a stable matching. We now consider the problem of finding diverse stable matchings.
Max-Sum -Diverse Stable Matching.
Given are a complete bipartite graph , along with preference lists and for each and . Let be the set of stable matchings in , and let denote the set of -multisets over . Find such that .
We show that Max-Sum -Diverse Stable Matching can be solved in polynomial time by proving that the set of stable matchings satisfies properties 1-3 of Theorem 1.
Lemma 19 (Property 1).
There is a chain decomposition of the edge set into disjoint chains, such that each stable matching contains exactly one element from each chain.
Proof.
Let . Note that the posets and are chains. We claim that the chains , define a disjoint chain decomposition of the ground set .111Note that we may also choose the chains , and get similar results. First, we argue for disjointness. Let denote the set of edges defined by the preference list of an arbitrary vertex . Since is bipartite, there are no edges between the vertices of . This implies that for all distinct . Moreover, . Hence, the chains , define a disjoint chain decomposition of .
Now, we argue that a stable matching must contain exactly one element from each chain . This follows immediately from the definition of perfect matching, which requires every vertex in to be matched to exactly one vertex in . Consequently, each stable matching selects precisely one edge from for each . This completes the proof.
To establish property 2, we use the following well-known result from the stable matchings literature [28, 3].
Claim 20 ([28, Thm. 7 & Cor. 1]).
Given any two stable matchings and , then
are also stable matchings.
By standard results in lattice theory (see e.g., [19]), the cartesian product , with componentwise order , forms a distributive lattice . Then, by Lemma 19 and Claim 20, the poset is a sublattice of , which implies that is also distributive.
Lemma 21 (Property 2).
The set of stable matchings with componentwise order defines a distributive lattice .
It only remains to verify that property 3 of Theorem 1 is satisfied by the set of stable matchings. This property follows directly, since the so-called poset of rotations introduced by Gusfield [21] provides the required structure (see also, e.g., [14, Sec 2.3]).
Lemma 22 (Property 3 [21, Lemma 3.3.2]).
A compact representation of the lattice of stable matchings can be constructed in time.
Theorem 23.
Max-Sum -Diverse Stable Matching is poly-time solvable.
4.3 Market Clearing Price Vectors
As a final example, we consider the problem of finding an integer market-clearing price in a matching market (see e.g., [10, Ch. 10] for details). Such a market consists of a set of items and a set of bidders, where each item can be assigned to at most one bidder, and each bidder wants to buy at most one item. Each bidder assigns a valuation to every item , where is an integer between 0 and . We assume that .
The Market Clearing Price problem asks for a price vector assigning a price to each item , such that the bipartite graph defined by
has a perfect matching. (Informally, an edge connects item to bidder if gives their highest payoff – valuation minus price.) A price vector that yields such a graph is called a market-clearing price vector.
We now turn to the problem of finding diverse market-clearing price vectors.
Max-Sum -Diverse Market Clearing Price.
Given is a matching market where is a set of items, is a set of bidders, and is a valuation function. Let be the set of market-clearing price vectors in , and let be the set of -multisets over . Find such that .
At this point, the reader may wonder whether is a good choice for vectors; we return to this question later. For now, we show that Max-Sum -Diverse Market Clearing Price can be solved in polynomial time by verifying that satisfies properties 1–3 of Theorem 1. The first property follows immediately from the definition of a price vector.
Lemma 24 (Property 1).
There is a chain decomposition of the ground set into disjoint chains, such that each market-clearing price vector contains exactly one element from each chain.
Proof.
By definition, a market-clearing price vector is an element of the power set . Hence, the chain decomposition of consists of copies of the integer interval , with elements from different chains deemed incomparable. The ordering of each chain is the natural ordering.
It is clear that the power set with product order forms a distributive lattice, where join () and meet () are determined by componentwise maximum and minimum. Shapley et al. [37] (see also [39]) establish that the poset is closed under these join and meet operations, hence is a sublattice of , and thus, is distributive.
Lemma 25 (Property 2 [37]).
The poset is a distributive lattice, with the meet and join defined appropriately.
As for property 3, Garg [16, 17] recently established that the set of join-irreducibles of the lattice of market-clearing price vectors can be determined efficiently (in polynomial time) via an algorithm for detecting so-called lattice-linear predicates (see also [18] and [15, Ch. 10]). We thus get the following result.
Lemma 26 (Property 3 [17]).
A compact representation of the lattice of market-clearing price vectors can be constructed in polynomial time.
Theorem 27.
Max-Sum -Diverse Market-Clearing Price is poly-time solvable.
Let us briefly reflect on the choice of diversity measure. The pairwise-sum measure captures whether elements differ, but not by how much; an important aspect for price vectors, where the magnitude of values matters more than their identity (unlike in cuts or matchings). In the next section, we extend our framework to support alternative measures, such as the absolute-difference measure, which better captures diversity in price vectors.
5 Other Diversity Measures
The proof of Theorem 1 relies on four lemmas, with the diversity measure playing a role in only two of them: the Cost-Equivalence (Lemma 7) and Submodularity (Lemma 11) lemmas. For simplicity, we have presented our main result in terms of the diversity measure. However, the framework is not limited to this specific measure. Just as it applies to problems whose solution sets satisfy the properties of Theorem 1, it also extends to other diversity measures, provided they satisfy both the Cost-Equivalence and Submodularity lemmas.
Here, we mention two such diversity measures: the coverage diversity , and the - or absolute-difference diversity . Let be a finite set with elements, and let be a set of feasible solutions. Given a -tuple of feasible solutions , these measures are defined as follows:
| (3) | ||||
| (4) |
where for any two .
The coverage diversity measures the number of distinct elements appearing across solutions, while the absolute-difference diversity quantifies diversity by summing coordinate-wise differences between solutions. Notice that the latter applies only to solutions representable as -tuples, since requires component-wise comparisons, and it assumes a notion of difference between elements in (e.g., -dimensional integer vectors in , with ).
Each of these two measures gives rise to a corresponding optimization problem, defined in the same way as Max-Sum Diverse Solutions but with replaced by or . We refer to these as Max-Cov -Diverse Solutions and Max-Abs -Diverse Solutions, respectively. Our main result for these problems is the following:
Theorem 28.
Max-Cov -Diverse Solutions and Max-Abs -Diverse Solutions can be solved in polynomial time if the set of feasible solutions satisfies the three properties of Theorem 1.
We establish this result by showing that both and satisfy the Cost-Equivalence and Submodularity lemmas from Section 3. Due to space constraints, the proofs for are deferred to the full version (see also [7, Thm. 14]). Here, we prove these lemmas for .
Proof of Cost-Equivalence.
The following lemma is an immediate consequence of Claim 6, which states that any -tuple in can be reordered into a left-right ordered form while preserving element multiplicities.
Lemma 29 (Cost-Equivalence Lemma).
Let such that . Then there exists such that .
Proof.
Let be an arbitrary -tuple of solutions, and let be its reordering into left-right order by the algorithm of Claim 6. For a feasible solution , let denote its -th component.
Consider the -tuples and , where , for all . These represent the -th component of each solution in and , respectively. Now, define the function as:
By Claim 6, the multiplicity of each element in is preserved in , implying that . Since the absolute-difference diversity measure decomposes as:
it follows that . In particular, this holds for tuples that achieve maximum diversity.
Proof of Submodularity.
In this case, the Submodularity Lemma actually becomes a Modularity Lemma. First, consider the function defined by , where , , and denotes the -th component of a solution . We can rewrite the absolute difference diversity measure as:
If we can establish that is modular in , then, because the sum of modular functions is modular, would also be modular. We prove this in the following lemma.
Lemma 30 (Modularity Lemma).
The function is modular in .
Proof.
We prove that, for any two , the function is modular in the lattice , where is the componentwise order of the poset of feasible solutions. Since the sum of modular functions is modular, and can be written as a sum of functions over all , the modularity of follows.
Let and . By definition, the join () and meet () of and are given by componentwise maximum and minimum. Then, for each ,
Consider an arbitrary . Because and are each in left-right order, we have: and . Consider then the intervals and . Without loss of generality, assume that . There are three possibilities for the interaction of and : (i) the intervals are disjoint (i.e., ), they overlap (i.e., ), or (iii) one is contained in the other (i.e., ). We now compare the sums and in each of these cases.
In cases (i) and (ii), we have that and . Hence,
and thus, modularity is satisfied.
In case (iii), we have and . Then:
which again satisfies modularity.
Therefore, the function is modular in , and the lemma is proved.
6 A Simple Framework for Disjoint Solutions
Finally, we consider the special case of diversity where solutions are required to be pairwise disjoint. Specifically, we consider the problem Max-Disjoint Solutions, defined below, and outline an algorithm for solving it that bypasses the need for submodular function minimization, provided that properties 1 and 2 of Theorem 1 are satisfied.
Max-Disjoint Solutions.
Given a finite set of size , an implicitly defined family of subsets of , referred to as feasible solutions, and a membership oracle for , find a set such that for all , and is as large as possible.
We assume that the set of feasible solutions satisfies properties 1 and 2 of Theorem 1. That is, there is a poset that is the disjoint union of chains , , and the set , with componentwise order , forms a distributive lattice.
The idea behind the algorithm is simple: start by finding the bottom element of the lattice of feasible solutions (using the oracle below), remove it along with any other solutions that overlap with it (enabled by the oracle below), and then repeat this process on the remaining sublattice until no feasible solutions remain. Of course, we want to avoid working on the lattice directly, as it can be of exponential size. Instead, we assume that the algorithm has access to the following oracles, or subroutines:
-
Minimal/Maximal Solution Oracles ( and ): On input , the minimal solution oracle () returns the bottom element of the distributive lattice , while the maximal solution oracle () returns its top element; i.e.,
-
Disjoint Successors Oracle (): For a feasible solution , the subset of disjoint successors of consists of all feasible solutions that are both disjoint from and successors of with respect to the order ; that is, Given an input , this oracle returns the subposet of induced by the subset of elements of that appear in the disjoint succesors of ; i.e.,
In this general framework, we achieve the following result.
Theorem 31.
Max-Disjoint Solutions can be solved in oracle calls.
In other words, if subroutines , , and could be computed in polynomial time, we could solve Max-Disjoint Solutions in polynomial time as well. Note that these subroutines are problem-specific and must be designed and implemented based on the particular problem defined by and . This framework has been applied implicitly in prior work on disjoint minimum - cuts [7] and stable matchings [13], where the oracles above run in near-linear time. Our algorithm extends these ideas to a more general setting – namely, to problems satisfying properties 1 and 2 of Theorem 1.
Next, we give a formal description of the algorithm and prove its correctness and complexity, completing the proof of Theorem 31.
Preliminaries.
Before we formally describe the algorithm, we require some results and notation. Throughout, let denote the distributive lattice . We use and to denote the top and bottom elements of a lattice , respectively, which are the two elements that satisfy for all . For a feasible solution , we use to denote the element in the -th component of . Note that . The following observation is a necessary condition for the existence of disjoint solutions in .
Observation 32.
Let be an element of both and . Then must be present in every feasible solution in .
Proof.
Consider an arbitrary feasible solution . Without loss of generality, let . By definition of bottom element of , we have , and thus . On the other hand, by definition of top element of , we have , which implies . By antisymmetry of the partial order , it follows that . Hence, , proving the fact.
We also make the following observation about the set of disjoint successors of a feasible solution. With a slight abuse of notation, we use to denote to the componentwise ordering arising from and any induced suposet.
Proof.
We start with the first property. Let denote the subposet induced by . This subposet then consists of the disjoint chains of but restricted to the elements appearing in . By definition of both and , each solution in must contain exactly one element from each chain in . Hence, property 1 is satisfied.
As for the second property, it is clear that . Moreover, because the join () and meet () operations in are defined as the componentwise maximum and minimum, respectively, remains closed under these operations. This means that the poset is a sublattice of and thus, a distributive lattice. Hence, property 2 is satisfied.
With these results, we are ready to describe and analyze the algorithm.
The algorithm.
Given an input , the algorithm begins by determining the bottom element and the top element of lattice by querying the oracles and with the input . If these two solutions share an element, the algorithm stops, as Observation 32 ensures that no disjoint solutions exist. Otherwise, it proceeds by querying to determine the subposet induced by .
By Observation 33, the set satisfies properties 1 and 2 of Theorem 1, with the poset serving as the corresponding chain decomposition. Let be the associated sublattice of disjoint successors of . The algorithm proceeds by querying with the input to identify the bottom element of . Once more, if is disjoint from , the algorithm queries to determine the subposet induced by the set of disjoint successors of . This process repeats as long as continues to return solutions that are disjoint from . Throughout the execution, the algorithm maintains a set that stores all solutions found that are disjoint from and returns this set upon termination. The algorithm is presented below as Algorithm 1.
Correctness.
The solutions in the set returned by Algorithm 1 are clearly disjoint by construction, as the poset returned by the oracle at each step is induced by the set of disjoint successors of the solution identified in the precious step. Moreover, the set is, in fact, a left-right ordered tuple. This follows again by construction, as each newly identified solution is determined from the subset of elements that are chain-successors of elements included in previously identified solutions. Note that the notion of left-right order here is strict, meaning that for any .
To analyze this further, let us go back for a moment to Section 3. Note that the measure is maximum whenever its input consists of disjoint solutions. Consider then an arbitrary -tuple of disjoint feasible solutions, for some . We know, by Claim 6, that there exists a -tuple of disjoint feasible solutions that is in left-right order. In particular, this is true for a disjoint-solutions tuple of maximum cardinality . Then, as we did in Section 3, we may restrict our arguments to the set of -tuples that are in left-right order without loss of generality.
To complete the correctness of Algorithm 1, it remains to show that the tuple returned by the algorithm is of maximum cardinality .
Lemma 34.
Algorithm 1 outputs a longest tuple of disjoint feasible solutions.
Proof.
Let be the -tuple of disjoint feasible solutions returned by Algorithm 1. For the sake of contradiction, suppose that is a longest left-right ordered tuple of disjoint feasible solutions with .
By definition of bottom element, we know that solution is a predecessor of every other feasible solution in . This implies that ; otherwise, we could append to the start of and obtain a longer tuple of left-right ordered disjoint solutions. Then, we have , and we may replace in with to generate a new -tuple of disjoint solutions.
By Observation 33, and the definition of bottom element, we know that solution found by the algorithm is a predecessor of every feasible solution in ; that is, is a predecessor of every feasible solution disjoint from . By the same argument as before, . We then have , and we may replace in with to generate a new -tuple of disjoint solutions.
By repeating this procedure times, we end up with the -tuple
of left-right ordered disjoint solutions. Then, there exists a feasible solution that is a strict successor of – the last element of tuple . But this implies that is disjoint with the top element of , which we know to be false by construction of . Thus, we get the necessary contradiction.
Time complexity.
The oracles and are called times, and is upper bounded by the length of the shortest chain in , which, in the worst case, has length . This completes the proof of Theorem 31.
7 Concluding Remarks
We showed that Max-Cov -Diverse Solutions can be solved in polynomial time by reducing it to submodular function minimization on a distributive lattice, provided the feasible solution set satisfies three structural properties. This gives a general framework for designing polynomial-time algorithms for diverse variants of combinatorial problems. We applied it to Minimum - Cut, Stable Matching, and Market Clearing Price, and showed it extends beyond the pairwise-sum measure to the coverage and absolute-difference measures. We also showed that in the special case where diversity is defined by pairwise disjointness, the problem can be solved without relying on submodular function minimization.
A natural direction for future work is identifying more problems that satisfy the structural properties of Theorem 1, and to characterize which diversity measures are compatible with the framework. It remains open whether the reliance on SFM can be avoided without losing generality.
References
- [1] Julien Baste, Lars Jaffke, Tomáš Masařík, Geevarghese Philip, and Günter Rote. Fpt algorithms for diverse collections of hitting sets. Algorithms, 12(12):254, 2019. doi:10.3390/A12120254.
- [2] Garrett Birkhoff. Rings of sets. Duke Mathematical Journal, 3(3):443–454, 1937.
- [3] Charles Blair. The lattice structure of the set of stable matchings with multiple partners. Mathematics of operations research, 13(4):619–628, 1988. doi:10.1287/MOOR.13.4.619.
- [4] Mohammadreza Bolandnazar, Woonghee Tim Huh, S Thomas McCORMICK, and Kazuo Murota. A note on “order-based cost optimization in assemble-to-order systems”. University of Tokyo (February, Techical report, 2015.
- [5] Paul Bonsma. Most balanced minimum cuts. Discrete Applied Mathematics, 158(4):261–276, 2010. doi:10.1016/J.DAM.2009.09.010.
- [6] Brian A Davey and Hilary A Priestley. Introduction to lattices and order. Cambridge university press, 2002.
- [7] Mark de Berg, Andrés López Martínez, and Frits Spieksma. Finding diverse minimum st cuts. In 34th International Symposium on Algorithms and Computation, 2023.
- [8] Mark de Berg, Andrés López Martínez, and Frits Spieksma. Finding diverse solutions in combinatorial problems with a distributive lattice structure, 2025. doi:10.48550/arXiv.2504.02369.
- [9] Karolina Drabik and Tomáš Masařík. Finding diverse solutions parameterized by cliquewidth. arXiv preprint, 2024. arXiv:2405.20931.
- [10] David Easley, Jon Kleinberg, et al. Networks, crowds, and markets: Reasoning about a highly connected world, volume 1. Cambridge university press Cambridge, 2010.
- [11] Fernando Escalante. Schnittverbände in graphen. In Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, volume 38, pages 199–220. Springer, 1972.
- [12] Fedor V Fomin, Petr A Golovach, Lars Jaffke, Geevarghese Philip, and Danil Sagunov. Diverse pairs of matchings. Algorithmica, 86(6):2026–2040, 2024. doi:10.1007/S00453-024-01214-7.
- [13] Aadityan Ganesh, HV Vishwa Prakash, Prajakta Nimbhorkar, and Geevarghese Philip. Disjoint stable matchings in linear time. In Graph-Theoretic Concepts in Computer Science: 47th International Workshop, WG 2021, Warsaw, Poland, June 23–25, 2021, Revised Selected Papers 47, pages 94–105. Springer, 2021. doi:10.1007/978-3-030-86838-3_7.
- [14] Rohith Reddy Gangam, Tung Mai, Nitya Raju, and Vijay V Vazirani. A structural and algorithmic study of stable matching lattices of “nearby” instances, with applications. In 42nd IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science (FSTTCS 2022). Schloss-Dagstuhl-Leibniz Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.FSTTCS.2022.19.
- [15] Vijay K Garg. Introduction to lattice theory with computer science applications. John Wiley & Sons, 2015.
- [16] Vijay K Garg. Applying predicate detection to the constrained optimization problems. arXiv preprint, 2018. arXiv:1812.10431.
- [17] Vijay K Garg. Predicate detection to solve combinatorial optimization problems. In Proceedings of the 32nd ACM Symposium on Parallelism in Algorithms and Architectures, pages 235–245, 2020. doi:10.1145/3350755.3400235.
- [18] Vijay K Garg and Neeraj Mittal. On slicing a distributed computation. In Proceedings 21st International Conference on Distributed Computing Systems, pages 322–329. IEEE, 2001. doi:10.1109/ICDSC.2001.918962.
- [19] George Gratzer. Lattice theory: First concepts and distributive lattices. Courier Corporation, 2009.
- [20] Martin Grötschel, László Lovász, and Alexander Schrijver. Geometric algorithms and combinatorial optimization, volume 2. Springer Science & Business Media, 2012.
- [21] D. Gusfield and R.W. Irving. The Stable Marriage Problem: Structure and Algorithms. Foundations of computing. MIT Press, 1989. URL: https://books.google.nl/books?id=2TzhSQAACAAJ.
- [22] R Halin. Lattices related to separation in graphs. In Finite and Infinite Combinatorics in Sets and Logic, pages 153–167. Springer, 1993.
- [23] Tesshu Hanaka, Masashi Kiyomi, Yasuaki Kobayashi, Yusuke Kobayashi, Kazuhiro Kurita, and Yota Otachi. A framework to design approximation algorithms for finding diverse solutions in combinatorial problems. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pages 3968–3976, 2023. doi:10.1609/AAAI.V37I4.25511.
- [24] Tesshu Hanaka, Yasuaki Kobayashi, Kazuhiro Kurita, and Yota Otachi. Finding diverse trees, paths, and more. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 3778–3786, 2021. doi:10.1609/AAAI.V35I5.16495.
- [25] Egbert Harzheim. Ordered sets, volume 7. Springer Science & Business Media, 2005.
- [26] Yuni Iwamasa, Tomoki Matsuda, Shunya Morihira, and Hanna Sumita. A general framework for finding diverse solutions via network flow and its applications. arXiv preprint, 2025. doi:10.48550/arXiv.2504.17633.
- [27] Satoru Iwata, Lisa Fleischer, and Satoru Fujishige. A combinatorial strongly polynomial algorithm for minimizing submodular functions. Journal of the ACM (JACM), 48(4):761–777, 2001. doi:10.1145/502090.502096.
- [28] Donald Ervin Knuth. Stable marriage and its relation to other combinatorial problems: An introduction to the mathematical analysis of algorithms, volume 10. American Mathematical Soc., 1997.
- [29] Soh Kumabe. Max-distance sparsification for diversification and clustering. arXiv preprint, 2024. doi:10.48550/arXiv.2411.02845.
- [30] George Markowsky. An overview of the poset of irreducibles. Combinatorial And Computational Mathematics, pages 162–177, 2001.
- [31] Bernd Meyer. On the lattices of cutsets in finite graphs. European Journal of Combinatorics, 3(2):153–157, 1982. doi:10.1016/S0195-6698(82)80028-0.
- [32] Neeldhara Misra, Harshil Mittal, and Ashutosh Rai. On the parameterized complexity of diverse sat. In 35th International Symposium on Algorithms and Computation (ISAAC 2024), pages 50:1–50:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.ISAAC.2024.50.
- [33] Neeraj Mittal and Vijay K Garg. Computation slicing: Techniques and theory. In Distributed Computing: 15th International Conference, DISC 2001 Lisbon, Portugal, October 3–5, 2001 Proceedings 15, pages 78–92. Springer, 2001. doi:10.1007/3-540-45414-4_6.
- [34] Kazuo Murota. Discrete Convex Analysis. Society for Industrial and Applied Mathematics, 2003. doi:10.1137/1.9780898718508.
- [35] Jean-Claude Picard and Maurice Queyranne. On the structure of all minimum cuts in a network and applications. Math. Program., 22(1):121, December 1982. doi:10.1007/BF01581031.
- [36] Alexander Schrijver. A combinatorial algorithm minimizing submodular functions in strongly polynomial time. Journal of Combinatorial Theory, Series B, 80(2):346–355, 2000. doi:10.1006/JCTB.2000.1989.
- [37] Lloyd S Shapley and Martin Shubik. The assignment game I: The core. International Journal of game theory, 1(1):111–130, 1971.
- [38] Yuto Shida, Giulia Punzi, Yasuaki Kobayashi, Takeaki Uno, and Hiroki Arimura. Finding diverse strings and longest common subsequences in a graph. In 35th Annual Symposium on Combinatorial Pattern Matching (CPM 2024), pages 27:1–27:19. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2024. doi:10.4230/LIPIcs.CPM.2024.27.
- [39] Marilda Sotomayor. The lattice structure of the set of stable outcomes of the multiple partners assignment game. International Journal of Game Theory, 28:567–583, 1999. doi:10.1007/S001820050126.
- [40] Richard P Stanley. Enumerative combinatorics: Volume 1, 2011.
