A General Framework for Finding Diverse Solutions via Network Flow and Its Applications
Abstract
In this paper, we present a general framework for efficiently computing diverse solutions to combinatorial optimization problems. Given a problem instance, the goal is to find solutions that maximize a specified diversity measure – the sum of pairwise Hamming distances or the size of the union of the solutions. Our framework applies to problems satisfying two structural properties: (i) All solutions are of equal size and (ii) the family of all solutions can be represented by a surjection from the family of ideals of some finite poset. Under these conditions, we show that the problem of computing diverse solutions can be reduced to the minimum cost flow problem and the maximum - flow problem. As applications, we demonstrate that both the unweighted minimum - cut problem and the stable matching problem satisfy the requirements of our framework. By utilizing the recent advances in network flows algorithms, we improve the previously known time complexities of the diverse problems, which were based on submodular function minimization.
Keywords and phrases:
Diverse Solutions, Network Flow Algorithm, Lattice TheoryFunding:
Yuni Iwamasa: Partially supported by JSPS KAKENHI Grant Numbers JP22K17854, JP24K02901, JP24K21315, Japan.Copyright and License:
2012 ACM Subject Classification:
Theory of computation Design and analysis of algorithmsAcknowledgements:
We are grateful to Yasunori Kinoshita for his insightful suggestion on the start of this work. We also thank Yasuaki Kobayashi and Yutaro Yamaguchi for bibliographic information.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 modeling real-world problems as optimization problems, many factors are inevitably omitted from the model due to the limited information and the need for tractability. Consequently, finding a single optimal solution to the optimization problem may not be enough. Motivated by this issue, developing algorithms to find diverse multiple solutions has recently gained attention in the field of combinatorial optimization [3, 4, 7, 8, 9, 10, 11, 15, 17].
We formally define the -diverse problem for a positive integer . Let be a function that measures the “diversity” for a -tuple of subsets of some arbitrary fixed ground set . For a combinatorial problem Prob, the -diverse problem of Prob asks, given an instance of Prob, to find a -tuple of solutions of that maximizes the fixed measure . Typical examples of the measure of diversity include the following:
| (2) |
If we use (resp. ) as the measure, then we refer to the corresponding -diverse problem as Sum--Diverse (resp. Cov--Diverse).
In this paper, we present a general framework for efficiently finding diverse solutions to combinatorial optimization problems. Namely, we focus on Sum--Diverse/Cov--Diverse of a combinatorial problem Prob having two properties (S) and (R) introduced below. The first property (S) states that all solutions of each instance of Prob have the same size:
(S) For any instance of Prob, there exist a finite ground set and a positive integer such that the family of solutions of consists of subsets of of size .
The second property (R) indicates that admits a lattice structure and has a compact representation using the lattice. To state this property precisely, we first introduce some notation. Let be a finite poset with minimum element and maximum element . For such a poset , let denote the poset obtained from by removing and . For a map that assigns each element to an ordered pair
| (3) |
of elements in with , we define a set by
| (4) |
for each ideal . Here, an ideal of a poset is a subset that is closed downward under , that is, implies for all , and denotes the family of ideals of the poset . With this notation, the property (R) can be stated as follows:
(R) For any instance of Prob, there exist a finite poset with distinct minimum element and maximum element and a map given by with such that
| (5) |
We refer to a map appearing in the property (R) as a reduction map. In other words, the property (R) requires that every instance of Prob admits a reduction map such that forms a surjection from the family of ideals of to the family of solutions of . A toy example of a reduction map is found in Example 1.
Example 1.
Let be the ground set. Suppose that the set of solutions is . We consider a poset , where is the minimum element, is the maximum element, and . We define a map by , , , . Since , we can see that is a reduction map. Indeed, we have , , and .
We show that if the problem Prob has the properties (S) and (R), then with a partial order defined from a reduction map forms a distributive lattice (see Theorem 11).
Our framework exploits network flow techniques to efficiently compute diverse solutions. To utilize them, we will construct a directed acyclic graph (DAG) to represent a poset. Here, we say that a DAG represents a poset with distinct minimum element and maximum element if the vertex set of is , is a source and is a sink in , and for any , there is a - path in if and only if .
Our main result is stated as follows. We focus on deterministic algorithms in this paper.
Theorem 2.
Suppose that a combinatorial problem Prob has the properties (S) and (R). Then, for any instance of Prob, the problems Sum--Diverse and Cov--Diverse of Prob can be solved in time and in time, respectively. Here, is the ground set of , is the size of each solution of , is the time required to construct a DAG representing the poset in (R), is the time required to construct a reduction map in (R), and is the set of arcs of a DAG that represents .
We obtain Theorem 2 via the reduction of Sum--Diverse/Cov--Diverse of Prob to a classical network flow problem, called the minimum cost flow problem. This enables us to utilize the state-of-the-art (deterministic) algorithm [25] for the minimum cost flow problem in solving Sum--Diverse/Cov--Diverse of Prob. To this end, we introduce an intermediate problem called the minimum -potential problem, and reduce the -diverse problems to the minimum -potential problem. Then we further reduce the minimum -potential problem to the minimum cost flow problem by utilizing the idea of Ahuja, Hochbaum, and Orlin [1], who dealt with a more general problem. Our novelty is to identify the properties (S) and (R) as a sufficient condition to reduce the -diverse problem to the minimum -potential problem.
We also develop a reduction of Sum--Diverse/Cov--Diverse of Prob to the maximum - flow problem via the minimum -potential problem. We describe this in the full version. While the running-time of this reduction is slightly worse than that of the reduction to the minimum cost flow problem, its practical performance may be superior thanks to the simplicity of the reduction and the maximum - flow problem.
As applications of our framework, we demonstrate that two classical combinatorial problems, Unweighted Minimum - Cut and Stable Matching, have properties (S) and (R). Here, Unweighted Minimum - Cut is to find an - cut of a given digraph with the minimum size, and Stable Matching is to find a matching of two parties such that no unmatched pair both prefer each other to their current partners (see Sections 5.2 and 5.3 for the definitions). In fact, both problems are known to possess a distributive lattice structure. By applying Theorem 2 to Sum--Diverse/Cov--Diverse of these problems, we obtain the following results.
Theorem 3.
-
1.
The problems Sum--Diverse and Cov--Diverse of Unweighted Minimum - Cut can be solved in time and in time, respectively, where denotes the number of vertices of the input digraph , the number of arcs of , and the size of a minimum - cut of .
-
2.
The problems Sum--Diverse and Cov--Diverse of Stable Matching can be solved in time and in time, respectively, where denotes the size of the ground set (or ) of the input instance .
The polynomial-time solvability of Sum--Diverse/Cov--Diverse of Unweighted Minimum - Cut has already been shown by De Berg, Martínez, and Spieksma [7]. Very recently, independently of our work, the same authors [8] developed a framework for solving Sum--Diverse/Cov--Diverse of a combinatorial problem having a certain property, and they show that Sum--Diverse/Cov--Diverse of Stable Matching can be solved in polynomial time. Both of their tractability results in [7, 8] are based on the polynomial-time solvability of the submodular function minimization (SFM) [2, 12]. Even if we use the state-of-the-art algorithm for SFM, given in [18], the running-time of their algorithms is (polynomial but) not very fast; it takes time for Sum--Diverse/Cov--Diverse of Unweighted Minimum - Cut, and time for that of Stable Matching. As in Theorem 3, our proposed algorithms for Sum--Diverse/Cov--Diverse of Unweighted Minimum - Cut/Stable Matching are much faster, thanks to recent advance in network flow algorithms. Moreover, we show that the framework of [8] for Sum--Diverse and Cov--Diverse can be captured by our framework (see Section 5.4). This allows us to improve the time complexity.
Due to the space limitation, all the proofs (marked with ) are omitted, and they can be found in the full version.
Related work.
There exists a vast body of literature on the problem of finding diverse solutions; here, we mention only a few representative papers. Finding diverse solutions is generally harder than finding a single one. The -diverse problems with respect to of some polynomial-time solvable problems – such as the maximum matching problem [10] and the (global) minimum cut problem [15] – are known to be NP-hard. Thus, in recent years, there has been a growing body of work on fixed-parameter tractable (FPT) algorithms for NP-hard diverse problems [3, 4, 9, 10, 11, 17]. Meanwhile, polynomial-time algorithms are known for several other -diverse problems with respect to the diversity measures or , including the -diverse variants of the spanning-tree problem [17], the shortest - path problem [16], as well as Unweighted Minimum - Cut [7] and Stable Matching [8], which have already been mentioned.
2 Preliminaries
Let , , , and denote the set of integers, nonnegative integers, real numbers, and nonnegative real numbers, respectively. For a nonnegative integer , let and . The symmetric difference of sets and is denoted by . For a finite set and a nonnegative integer , let denote the family of all subsets of of size , i.e., . For any finite set , element , and -tuple of subsets of , the multiplicity of with respect to , denoted by , is defined as the number of subsets that contain , i.e., .
Posets.
A partially ordered set (or poset) is a pair of a set and a binary relation over satisfying, for , that (reflexivity), and imply (antisymmetry), and and imply (transitivity). By we mean and . Such a binary relation is called a partial order. If no confusion arises, we denote by a poset and its underlying set interchangeably. In this paper, we consider only a finite poset, i.e., posets whose underlying sets are finite. Hence, by a poset we mean a finite poset. A partial order on is called a total order if or holds for any . For a poset , a subset is called an ideal if is closed under , i.e., for any and , we have . Let denote the set of all ideals of . If has the minimum element and the maximum element , then we denote by the poset obtained from by removing and .
Network flows.
Let be a digraph. For a vertex subset , let (resp. ) denote the set of outgoing arcs from (resp. incoming arcs to) . If no confusion arises, we omit the subscript from and . If consists of a single vertex , i.e., , we simply write and instead of and , respectively. A function from the arc set to the nonnegative integers is called a flow of . In the case where the digraph has an arc capacity , a flow is said to be feasible (with respect to ) if for all . For a feasible flow with respect to an arc capacity , its residual graph, denoted by , is the digraph whose vertex set is and arc set is , where denotes the reverse arc of . This plays an important role in algorithms for network flow problems (and our algorithms). For a flow , its boundary is defined by for each .
In the following (except for Section 5.4), we assume that Prob is a combinatorial problem having the properties (S) and (R). For an instance of Prob, we denote by the family of solutions of , the time required to construct a DAG representing the poset in (R), and the time required to construct a reduction map in (R).
3 Reduction to the minimum -potential problem
In this section, we provide a reduction from the -diverse problem of Prob to the minimum -potential problem, which we introduce later.
In Sum--Diverse and Cov--Diverse of Prob, we can regard the diversity measures and as the functions over for each instance of Prob. Since holds by the property (S), we have for any , which is a constant. Hence, the functions and are representable as
| (8) |
for each . Thus, the problems Sum--Diverse and Cov--Diverse of Prob, namely, the problems of maximizing the functions and over , are equivalent to those of minimizing
| (9) |
respectively.
By using the concept of discrete convex functions, we can uniformly handle these functions and as follows. A function is said to be discrete convex [20, Chapter 3.4] if for all , and said to be non-decreasing on if for all . For a discrete convex function with that is non-decreasing on , we define
| (10) |
for . Since the functions and are discrete convex functions that are non-decreasing on and satisfy , both of and admit such representations.
Our framework can be applied to the -diverse problem with respect to the diversity measure of the form
| (11) |
for , where is a discrete convex function with that is non-decreasing on . In the following, we consider the -diverse problem with respect to of Prob, or equivalently, the problem of minimizing over for a discrete convex function .
We then introduce the minimum -potential problem, to which we reduce the problem of minimizing later. Let be a DAG having unique source vertex and sink vertex with . We refer to an assignment of integers to vertices as a -potential if satisfies the following conditions:
(P1) and .
(P2) for each .
(P3) is monotone non-increasing with respect to , i.e., for each .
In the minimum -potential problem,
we are given a DAG with unique source and sink , an arc weight , and a discrete convex function with that is non-decreasing on , and
asked to find a -potential of that minimizes
| (12) |
We note that the function does not change even if we remove vertices with , called isolated vertices, from .
Finally, we reduce, for an instance of Prob, the problem of minimizing over to the minimum -potential problem by utilizing the property (R). Let be a poset having minimum element and maximum element , and let be a reduction map as in the property (R). Then, we construct a DAG whose vertex set is and whose arc set is , where is an arc set such that a DAG represents the poset , and . The resulting is still a DAG that represents and has unique source and sink ; each arc is compatible with the partial order of , since . An arc weight is defined by for . Note that for each . We set , which satisfies the non-decreasing property on and , as the input discrete convex function of the minimum -potential problem. Then, the triple is an instance of the minimum -potential problem; its construction time is .
Example 4.
Recall the toy example in Example 1. A graph with is a DAG representing . By construction, . Then, the DAG is illustrated in Figure 1.
The arc weights are , and for all other arcs .
Intuitively, any -potential represents the direct sum of ideals as a multiset. Conversely, for any ideals in , there exists a -potential that represents their direct sum as a multiset. Furthermore, by the property (R), each ideal of corresponds to a solution of via . The following lemma verifies this intuition.
Lemma 5 ().
For each -tuple , there is a -potential of such that . Conversely, for each -potential of , there is a -tuple of solutions of such that , and we can construct from in time.
Lemma 5 immediately implies that we can construct in time a minimizer of over from a minimum -potential for the instance of the minimum -potential problem. Therefore, we obtain the following.
Theorem 6 ().
We can solve the -diverse problem with respect to of Prob in time, where is a given instance of Prob and is the time of solving the instance of the minimum -potential problem reduced from .
4 Solving the minimum -potential problem via minimum cost flow
Here, we reduce the minimum -potential problem to the minimum cost flow problem.
Let us first recall the minimum cost flow problem (see e.g., [19, Chapter 9] and [23, Chapter 12] for details). In this problem, we are given a digraph , arc cost , arc capacity , and vertex demand , and asked to find a feasible flow (i.e., for ) that minimizes subject to for all . An optimal solution of the minimum cost flow problem is called a minimum cost flow. We denote by the time required to solve the minimum cost flow problem for a network of vertices and arcs with cost at most in absolute values, capacity at most , and a demand vector with values at most in absolute values. Using the state-of-the-art algorithm for the minimum cost flow problem given in [25], we have .
Our reduction follows the work by Ahuja, Hochbaum, and Orlin [1], who dealt with a more general problem called the convex cost integer dual network flow problem. They showed that the Lagrangian dual of their problem is reduced to the minimum cost flow problem. For the complexity analysis, we explicitly provide the reduction in our case and the construction of a minimum -potential from a minimum cost flow.
For a discrete convex function , an integer is called a breakpoint of if , i.e., the left slope and right slope of at are different. We can observe that, for each , the left slope of at is at most the right slope of at . Let denote the set of breakpoints of .
Let be an instance of the minimum -potential problem. We define and suppose that with . Let (resp. ) denote the left (resp. right) slope of at ; note that . We set as a sufficiently large integer satisfying for any -potential of , e.g., .
We construct an instance of the minimum cost flow problem. The vertex set of the input digraph is . We set the arc set of , arc cost , and capacity by creating
-
copies of each satisfying with costs and capacities , respectively,
-
two copies of each satisfying or each for with costs and capacities , respectively,
-
arcs and with cost and , respectively, and capacity .
The vertex demand is set as for each , where and .
Let be a minimum cost flow of the resulting instance . Then we construct the residual graph of with respect to , and set the arc length of as if , and if . Let us define as a feasible potential with in with respect to arc length , i.e., an assignment satisfying and for each arc . The following lemma justifies our reduction.
Lemma 7 ().
The restriction of to forms a minimum -potential of .
The validity of Lemma 7 follows from exactly the same argument given in [1]. For the sake of completeness, we provide a direct proof in the full version.
We then show the time complexity of solving the minimum -potential problem via our reduction. The digraph has vertices, and at most arcs. Here, and denote the set of arcs with and , respectively. Thus, we can construct the minimum cost flow instance in time. The costs and capacities are nonnegative integers at most and , respectively. The demands are at most in absolute values. Hence, we can find a minimum cost flow of in time. The residual graph of with respect to is constructed in time. A feasible potential in with respect to is found in time by computing shortest distances from a supernode to vertices in . Therefore, by Lemma 7, we can obtain a minimum -potential , which is a restriction of to , in time.
Theorem 8 ().
We can solve the -diverse problem with respect to of Prob for an instance in time. In particular, the problems Sum--Diverse of Prob and Cov--Diverse of Prob can be solved in time and in time, respectively.
5 Applications
In this section, we introduce two applications of our framework; one is the -diverse problems of Unweighted Minimum - Cut and the other is that of Stable Matching.
In order to apply our framework to the -diverse problem of a concrete combinatorial problem, we need to construct a poset and a reduction map appearing in the property (R) for each instance. In Section 5.1, we develop a common strategy of building these components. In fact, it is known that both families of minimum - cuts and stable matchings are naturally identified with set families called ring families. A ring family with inclusion order forms a poset, particularly a distributive lattice. We will utilize these facts to construct a reduction map for Unweighted Minimum - Cut and Stable Matching in Sections 5.2 and 5.3, respectively. In Section 5.4, we briefly describe a framework for the -diverse problem recently developed by De Berg, Martínez, and Spieksma in [8], and show that our framework can capture theirs in the case of Sum--Diverse/Cov--Diverse.
5.1 How to construct a poset and a reduction map
We start this subsection with introducing terminology on lattices (see e.g., [6] for details). A poset is called a lattice if, for any two elements , their least upper bound (join) and greatest lower bound (meet) exist in . A lattice is said to be distributive if the distributive law holds for any .
A typical example of a distributive lattice is the family of ideals of a poset over with inclusion order . In this case, the join of two ideals and is their union , and the meet is their intersection ; we can easily see that they are also ideals. More generally, a ring family, which is a nonempty family of subsets of a nonempty finite set such that it is closed under the union and intersection, endowed with inclusion order forms a distributive lattice , where and for .
The celebrated Birkhoff’s representation theorem [5] states that every distributive lattice is isomorphic to the distributive lattice for some poset . Here, two lattices and are said to be isomorphic if there is a bijection such that if and only if for any . For a distributive lattice , we refer to a poset such that and are isomorphic as a Birkhoff representation of .
A Birkhoff representation of the distributive lattice over a ring family can be obtained as follows. The ring family has the unique minimal set and unique maximal set . Take any maximal chain from to in ; namely, there are no and with . Then, forms a partition of . We define a partial order on by setting if and only if every with also includes . The resulting is actually a poset and is independent of the choice of a maximal chain from to . It is known (see e.g., [21, Chapter 2.2.2]) that is a Birkhoff representation of ; more precisely, the map is an isomorphism from to . In this paper, we refer to as the Birkhoff representation of .
We are ready to develop a strategy to construct a reduction map by using a ring family. Let be a ring family over a nonempty finite set . We may assume that the minimal set is nonempty and the maximal set is a proper subset of ; otherwise we add two elements and to and update each subset as , which makes satisfy and . Let denote the partition of . We extend the partial order on to that on by setting for any . For a map given by , we define
| (13) |
for . We say that is a pre-reduction map if implies for all and , and . We show that we can construct a reduction map as long as we have a pre-reduction map.
Lemma 9 ().
Suppose that given by is a pre-reduction map. Then, the map defined by
| (14) |
is a reduction map, where () denotes the unique member of that contains .
Thus, we obtain the following:
Proposition 10.
Let be a nonempty finite set, and let be a ring family over . Suppose we are given a pre-reduction map and the partition of . Then, we can construct a reduction map in constant time.
The property (R) requires that, for each instance of Prob, the family of its solutions is closely related to the family of ideals of the poset . Hence, it is natural to expect that admits the distributive lattice structure. We conclude this subsection by showing that this indeed holds, which might be viewed as a necessary condition on Prob for our framework to be applicable.
Recall the notation in the property (R). We may assume that for each , since if , then no member in contains , i.e., , and hence we can remove from . Let denote a partial order on such that if and only if or . This can be extended for by setting if and only if there exists a bijection such that for all . Then, the following holds.
5.2 The -diverse unweighted minimum - cut problem
In this subsection, we consider the -diverse problem of Unweighted Minimum - Cut. Here, this is the minimum - cut problem for a digraph with unit arc capacity , i.e., for all . Clearly, Unweighted Minimum - Cut has the property (S) by setting the ground set as the arc set and the integer as the size of minimum - cuts. Our aim is to construct, for some ring family , a DAG representing the Birkhoff representation , the partition , and a pre-reduction map based on , which implies that Unweighted Minimum - Cut has the property (R) by Lemma 9.
Let with be a digraph that is an instance of Unweighted Minimum - Cut. Then, the family of solutions of the instance is the set of all minimum - cuts, which is a subset of the family . Let denote the family of vertex subsets with such that its outgoing arcs form a minimum - cut of , i.e.,
| (15) |
It is well-known that forms a ring family, which directly follows from Lemma 12 below. Moreover, since the unique minimal set in contains and the unique maximal set in excludes , we have . We will construct a pre-reduction map based on .
We utilize the representation introduced by Picard and Queyranne [22], which is used for enumerating all minimum - cuts of a digraph (with arbitrary positive capacities). In our case, we consider the unit capacity case, and use this representation to construct a DAG representing the Birkhoff representation of the distributive lattice , as well as the partition of .
To begin, we briefly describe the representation proposed by Picard and Queyranne. Let be an arbitrary maximum - flow of , where each arc has unit capacity. Let denote the residual graph of . Then, the following characterization is known.
Lemma 12 ([22]).
An - cut is a minimum - cut in if and only if is a closed set under reachability in , containing but not .
Using this, Picard and Queyranne constructed a DAG from through the following steps: (1) Contract each strongly connected component in into a single vertex, (2) remove the component containing along with all vertices reachable from , and (3) remove the component containing along with all vertices reachable to . For each vertex , let denote the set of vertices in contracted into . Similarly, let and denote the sets of vertices in removed in steps (2) and (3), respectively. By Lemma 12, the DAG represents all minimum - cuts in . Specifically, for any that is closed under reachability in , the set of outgoing arcs from in forms a minimum - cut in . Conversely, for any minimum - cut in , the set of components corresponding to is closed under reachability in .
In fact, is the desired DAG that represents the Birkhoff representation of . Let be a poset where reachability in defines the partial order i.e., for any , if and only if is reachable from in . From the above discussion, the map is an isomorphism between and , because for all , we have if and only if . Moreover, choose an arbitrary maximal chain in . Since forms a maximal chain from to in , and for all , we obtain an isomorphism that maps each to , implying the equivalence between and .
Thus, as all strongly connected components in can be found in linear time by [24], the partition and a DAG representing can be constructed from in time. Furthermore, the number of vertices and arcs representing are at most and , respectively.
We then define a map by
| (16) |
We confirm that is a pre-reduction map.
Lemma 13 ().
The map defined as (16) is a pre-reduction map.
This together with Proposition 10 and the above argument implies that . Thus, by Theorem 8, we obtain the following, which implies Theorem 3 (1).
Theorem 14 ().
The -diverse problem with respect to of Unweighted Minimum - Cut can be solved in time, where denotes the number of vertices in the input digraph , the number of arcs, and the size of any minimum - cut in . In particular, Sum--Diverse and Cov--Diverse of Unweighted Minimum - Cut can be solved in time and in time, respectively.
5.3 The -diverse stable matching problem
In this subsection, we consider the -diverse problem of Stable Matching. Let us first introduce the problem Stable Matching (see e.g., [14] for details). Let and be disjoint finite sets with the same size endowed with total orders on () and on (). Intuitively, the total order (resp. ) represents the preference of on (resp. on ); means that “ prefer to .” A subset is called a matching if provides the one-to-one correspondence between and , i.e., all are different, , and . For a matching , we denote by (resp. ) the partner of (resp. ) in , i.e., (resp. ). A matching is said to be stable if there is no pair such that and . In Stable Matching, we are given a tuple of finite sets with the same size and the total orders on and on , and asked to find a stable matching . A stable matching always exists and can be found in time by the Gale–Shapley algorithm [13].
Clearly, Stable Matching has the property (S), in which . Similarly to Section 5.2, our aim is to construct, for some ring family , a DAG representing the Birkhoff representation , the partition , and a pre-reduction map based on .
Let be an instance of Stable Matching, and let . Then, the family of solutions of the instance is the set of all stable matchings of . It is known [14, Theorem 1.3.2] that forms a distributive lattice with the partial order defined by setting if and only if for all . For each stable matching , the P-set of , denoted by , is the set of pairs such that is at least as preferred as by , i.e., . Let denote the family of all P-sets for , i.e.,
| (17) |
The map that sends a stable matching to its P-set is an isomorphism between and . Hence, forms a ring family, which serves the base of our pre-reduction map. We note that the unique minimal set of is nonempty. To ensure that is a proper subset of the ground set, we add a new element to , and we regard as the ground set in the following.
We can construct the Birkhoff representation of the distributive lattice following the work of Gusfield and Irving [14, Chapter 3]. For each stable matching and each , let denote the most preferable element for such that , if such a exists. A rotation is an ordered list of pairs in some stable matching , satisfying for all (where is taken modulo ). Let be the set of all rotations of . It is shown that the map defined by
| (18) |
is a bijection between and . A partial order on is induced by through . Gusfield and Irving present an -time algorithm that constructs along with a DAG representing the poset over having arcs [14, Lemma 3.3.2 and Corollary 3.3.1]. In particular, their algorithm computes the unique minimal and maximal stable matchings.
We can construct , which is a partition of , from in time using . Clearly, is the P-set of the unique minimal stable matching. Thus, we can construct the partition and a DAG with arcs representing in time.
We then construct a pre-reduction map. For each and , we denote by the element in that is the cover of with respect to , i.e., and there is no element in with . If is the maximum element with respect to , then we define . We define a map by
| (19) |
We show that this is a pre-reduction map.
Lemma 15 ().
The map defined as (19) is a pre-reduction map.
This together with Proposition 10 and the above argument implies that we have . Thus, by Theorem 8, we obtain the following, which implies Theorem 3 (2).
Theorem 16 ().
The -diverse problem with respect to of Stable Matching can be solved in time. In particular, Sum--Diverse of Stable Matching and Cov--Diverse of Stable Matching can be solved in time and in time, respectively.
5.4 The -diverse problem on the product of total orders
Very recently, De Berg, Martínez, and Spieksma [8] introduce a framework for the -diverse problem on the product of total orders, which leads to the polynomial-time solvability of Sum--Diverse/Cov--Diverse of Unweighted Minimum - Cut/Stable Matching. In this subsection, we briefly introduce their framework and show that our framework can capture theirs for Sum--Diverse and Cov--Diverse. Here, we do not assume that Prob has the properties (S) and (R).
We first introduce some terminology. For a distributive lattice , an element is said to be join-irreducible if for any . Let denote the set of join-irreducible elements in . Then, it is known [5] that the subposet of induced by forms a Birkhoff representation of ; the map is an isomorphism from to . We refer to this Birkhoff representation as the join-irreducible representation of . For total orders , their product is the poset such that its ground set is the product of and the partial order is defined by setting if and only if for all . Actually, this forms a lattice; the meet is given by and the join is given by , where
| (20) |
for each . We say that a subset is a sublattice if is closed under the meet and join , i.e., implies . We can observe that a sublattice of the product of total orders is distributive (see the paragraph after Theorem 17).
De Berg, Martínez, and Spieksma [8] impose the following property on Prob:
(T) For any instance of Prob, there are total orders such that the family of solutions of is a sublattice of the product of those total orders.
Then they show that, if Prob has the property (T) and we can construct (a DAG representing) the join-irreducible representation of in polynomial time, then we can solve Sum--Diverse/Cov--Diverse of Prob in polynomial time by using an algorithm for the SFM problem over the distributive lattice . The problem Stable Matching has the property (T). Indeed, for an instance of Stable Matching, we define for each and extend the total order on to that on by setting if and only if . Then, forms a sublattice of the product of for all . Similarly, Unweighted Minimum - Cut also has the property (T) by introducing the left-right order to arc disjoint paths, where denotes the size of a minimum - cut (or the maximum number of arc disjoint - paths); see [7, 8] for details.
We can show the following, whose proof is almost the same as that in Section 5.3.
Theorem 17 ().
Here, for a solution , we define its P-set by and denote by the family of all P-sets of , as in Section 5.3. Then we can easily see that and are isomorphic, both of which are distributive.
Let us see the result of De Berg, Martínez, and Spieksma [8] in detail to compare the time complexity of their algorithm with ours. Let be the disjoint union (or direct sum) of . We denote by the time required to construct a DAG representing the join-irreducible representation , and by the time required to minimize a submodular function with variables such that one value evaluation of takes EO time. Then, it is shown in [8] that we can solve Sum--Diverse/Cov--Diverse of Prob having the property (T) in time. Using the state-of-the-art algorithm for SFM given in [18] with we have . Hence, the running-time of the algorithms of De Berg, Martínez, and Spieksma is .
Our framework provides much faster algorithms for Sum--Diverse and Cov--Diverse of Prob as follows.
Theorem 18 ().
Suppose that a combinatorial problem Prob has the property (T). Then we can solve Sum--Diverse and Cov--Diverse of Prob in time and in time for an instance of Prob, respectively, where denotes the arc set of a constructed DAG representing .
Since is upper-bounded by the length of a maximal chain in the product of total orders , we have . Thus, is upper-bounded by . Even in the worst case of , the running-time of our algorithms for Sum--Diverse and Cov--Diverse of Prob are time and time, respectively, which are much faster than the previous ones that take time.
We also mention that the framework of [8] works for a diversity measure based on lengths of the maximal chains. It may be interesting to generalize our result to treat such a measure.
References
- [1] R. K. Ahuja, D. S. Hochbaum, and J. B. Orlin. Solving the convex cost integer dual network flow problem. Management Science, 49(7):950–964, 2003. doi:10.1287/MNSC.49.7.950.16384.
- [2] F. Bach. Learning with submodular functions: A convex optimization perspective. Foundations and Trends® in Machine Learning, 6(2-3):145–373, 2013. doi:10.1561/2200000039.
- [3] J. Baste, M. R. Fellows, L. Jaffke, T. Masařík, M. de Oliveira Oliveira, G. Philip, and F. A. Rosamond. Diversity of solutions: An exploration through the lens of fixed-parameter tractability theory. Artificial Intelligence, 303(103644):1–15, 2022.
- [4] J. Baste, L. Jaffke, T. Masařík, G. Philip, and G. Rote. FPT algorithms for diverse collections of hitting sets. Algorithms, 12(12):254, 2019. doi:10.3390/A12120254.
- [5] G. Birkhoff. Rings of sets. Duke Mathematical Journal, 3(3):443–454, 1937.
- [6] B. A. Davey and H. A. Priestley. Introduction to Lattices and Order. Cambridge University Press, 2nd edition, 2002.
- [7] M. de Berg, A. L. Martínez, and F. Spieksma. Finding diverse minimum s-t cuts. In Proceedings of the 34th International Symposium on Algorithms and Computation (ISAAC 2023), volume 283, pages 24:1–24:17, 2023. doi:10.4230/LIPICS.ISAAC.2023.24.
- [8] M. de Berg, A. L. Martínez, and F. Spieksma. Finding diverse solutions in combinatorial problems with a distributive lattice structure. arXiv:2504.02369, 2025. doi:10.48550/arXiv.2504.02369.
- [9] E. Eiben, T. Koana, and M. Wahlström. Determinantal sieving. In Proceedings of the 2024 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2024), pages 377–423, 2024.
- [10] F. V. Fomin, P. A. Golovach, L. Jaffke, G. Philip, and D. Sagunov. Diverse pairs of matchings. Algorithmica, 86(6):2026–2040, 2024. doi:10.1007/S00453-024-01214-7.
- [11] F. V. Fomin, P. A. Golovach, F. Panolan, G. Philip, and S. Saurabh. Diverse collections in matroids and graphs. Mathematical Programming, 204(1):415–447, 2024. doi:10.1007/S10107-023-01959-Z.
- [12] S. Fujishige. Submodular Functions and Optimization. Annals of Discrete Mathematics. Elsevier Science, London, England, 2nd edition, 2005.
- [13] D. Gale and L. S. Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962.
- [14] D. Gusfield and R. W. Irving. The Stable Marriage Problem: Structure and Algorithms. Foundations of Computing Series. The MIT Press, 1989.
- [15] T. Hanaka, M. Kiyomi, Y. Kobayashi, Y. Kobayashi, K. Kurita, and Y. Otachi. A framework to design approximation algorithms for finding diverse solutions in combinatorial problems. In Proceedings of the 37th AAAI Conference on Artificial Intelligence (AAAI 2023), volume 37, pages 3968–3976, 2023. doi:10.1609/AAAI.V37I4.25511.
- [16] T. Hanaka, Y. Kobayashi, K. Kurita, S. W. Lee, and Y. Otachi. Computing diverse shortest paths efficiently: A theoretical and experimental study. In Proceedings of the 36th AAAI Conference on Artificial Intelligence (AAAI 2022), volume 36, pages 3758–3766, 2022. doi:10.1609/AAAI.V36I4.20290.
- [17] T. Hanaka, Y. Kobayashi, K. Kurita, and Y. Otachi. Finding diverse trees, paths, and more. In Proceedings of the 35th AAAI Conference on Artificial Intelligence (AAAI 2021), volume 35, pages 3778–3786, 2021. doi:10.1609/AAAI.V35I5.16495.
- [18] H. Jiang. Minimizing convex functions with rational minimizers. Journal of the ACM, 70(1):5:1–5:27, 2022. doi:10.1145/3566050.
- [19] B. Korte and J. Vygen. Combinatorial Optimization: Theory and Algorithms. Springer, Berlin, Heidelberg, 6th edition, 2018.
- [20] K. Murota. Discrete Convex Analysis. Society for Industrial and Applied Mathematics, 2003.
- [21] K. Murota. Matrices and Matroids for Systems Analysis. Springer, Berlin, Heidelberg, 2010.
- [22] J.-C. Picard and M. Queyranne. On the structure of all minimum cuts in a network and applications, volume 13 of Mathematical Programming Studies, pages 8–16. Springer, 1980.
- [23] A. Schrijver. Combinatorial Optimization: Polyhedra and Efficiency. Algorithms and Combinatorics. Springer, 2003.
- [24] M. Sharir. A strong-connectivity algorithm and its applications in data flow analysis. Computers & Mathematics with Applications, 7(1):67–72, 1981.
- [25] J. van den Brand, L. Chen, R. Kyng, Y. P. Liu, R. Peng, M. P. Gutenberg, S. Sachdeva, and A. Sidford. A deterministic almost-linear time algorithm for minimum-cost flow. In Proceedings of the IEEE 64th Annual Symposium on Foundations of Computer Science (FOCS 2023), pages 503–514, 2023. doi:10.1109/FOCS57990.2023.00037.
