Diversity of Solutions: An Exploration Through the Lens of Fixed-Parameter Tractability Theory
Julien Baste, Michael R. Fellows, Lars Jaffke, Tom\'a\v{s} Masa\v{r}\'ik, Mateus de Oliveira Oliveira, Geevarghese Philip, Frances A. Rosamond

TL;DR
This paper introduces a fixed-parameter tractability approach to generating diverse collections of solutions for combinatorial problems, providing a systematic framework that automatically adapts existing algorithms with polynomial dependence on diversity.
Contribution
It develops a novel algorithmic framework that transforms standard dynamic programming algorithms into ones capable of producing diverse solutions efficiently.
Findings
Framework automatically converts algorithms for diverse solutions
Polynomial dependence on the diversity parameter
Applicable to a wide range of combinatorial problems
Abstract
When modeling an application of practical relevance as an instance of a combinatorial problem X, we are often interested not merely in finding one optimal solution for that instance, but in finding a sufficiently diverse collection of good solutions. In this work we initiate a systematic study of diversity from the point of view of fixed-parameter tractability theory. First, we consider an intuitive notion of diversity of a collection of solutions which suits a large variety of combinatorial problems of practical interest. We then present an algorithmic framework which --automatically-- converts a tree-decomposition-based dynamic programming algorithm for a given combinatorial problem X into a dynamic programming algorithm for the diverse version of X. Surprisingly, our algorithm has a polynomial dependence on the diversity parameter.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Diversity of Solutions: An Exploration Through the Lens of
Fixed-Parameter Tractability Theory111An extended abstract of this manuscript has appeared in the Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI 2020 [4].
Julien Baste
Ulm University, Germany
Michael R. Fellows
University of Bergen, Norway
Lars Jaffke
University of Bergen, Norway
Tomáš Masařík
University of Warsaw, Poland
Charles University, Prague, Czech Republic
Mateus de Oliveira Oliveira
University of Bergen, Norway
Geevarghese Philip
Chennai Mathematical Institute and UMI ReLaX, India
Frances A. Rosamond
University of Bergen, Norway
Abstract
When modeling an application of practical relevance as an instance of a combinatorial problem X, we are often interested not merely in finding one optimal solution for that instance, but in finding a sufficiently diverse collection of good solutions. In this work we initiate a systematic study of diversity from the point of view of fixed-parameter tractability theory. First, we consider an intuitive notion of diversity of a collection of solutions which suits a large variety of combinatorial problems of practical interest. We then present an algorithmic framework which –automatically– converts a tree-decomposition-based dynamic programming algorithm for a given combinatorial problem X into a dynamic programming algorithm for the diverse version of X. Surprisingly, our algorithm has a polynomial dependence on the diversity parameter.
Keywords: Diversity, Combinatorial Optimization, Dynamic Programming.
1 Introduction
In a typical combinatorial optimization problem, we are given a large space of potential solutions and an objective function. The task is to find a solution that maximizes or minimizes the objective function. In many situations of practical relevance, however, it does not really help to get just one optimal solution; it would be much better to have a small, but sufficiently diverse collection of sufficiently good solutions. Given such a small list of good solutions, we can select one which is best for our purpose, perhaps by taking into account external factors—such as aesthetical, political, or environmental—which are difficult or even impossible to formalize. An early, illustrative example is the problem of generating floor plans for evaluation by an architect [19].
Solution diversity is already a fundamental concept in many computational tasks. Take, for instance, a web search. Here, we do not want to find the one website that ‘optimally fits’ the search term, neither a ranking of a small number of ‘best fits’, but what is desirable is a diverse set of websites that fit the search term reasonably well.
Another advantage of considering a set of diverse solutions is that some of these solutions may find some use in contexts which are not specified à priori. For instance, in cutting problems [24], which are widely studied in the field of operations research, we are given a piece of material of standard size and a prescribed set of shapes. The goal is to cut the material into pieces of the specified shapes in such a way that the amount of leftover material is minimized. In this setting, a minimum-size leftover may be viewed as a solution. A set of sufficiently diverse solutions would give the user the opportunity to choose a suitable leftover that could be used later in the fabrication of pieces whose shapes have not been specified in the input of the program.
The notion of diversity has also been applied to solution sets of various types of combinatorial problems. For instance, the works [20] and [25, 26] seek to find solution sets to mixed-integer programming problems and constraint satisfaction problems, respectively, that are diverse. In other words, the solutions are far apart from each other in some mathematical notion of distance. We refer to [32] for a timely overview of the subject.
From a complexity-theoretic perspective, there are two immediate barriers to this approach. The first is that most combinatorial problems are already NP-hard when asking only for a single solution. The second is that the very basic Maximum Diversity problem, which given a set of elements in a metric space and an integer , asks for a size- subset of the elements such that the sum of the pairwise distances is maximized, is NP-hard as well [28]. The theory of fixed-parameter tractability [14] provides a powerful framework to overcome these barriers. The key goal is to identify a secondary numerical measure of the inputs to an (NP-hard) computational problem, called the parameter, and to provide algorithms in whose runtime the combinatorial explosion is restricted to the parameter . More formally, a problem is fixed-parameter tractable (FPT), if it can be solved in time , where is a computable function, the input size, and a fixed constant. On instances where the parameter value is relatively small, FPT-algorithms are efficient. In an application context, we are naturally concerned with finding small diverse sets of solutions since the aim is to provide the user with a few alternatives that can then be compared manually. Therefore, the number of requested solutions is an ideal candidate for parameterization.
In this work, we propose to study the notion of solution diversity from the perspective of fixed-parameter tractability theory. We demonstrate the theoretical feasibility of this paradigm by showing that diverse variants of a large class of parameterized problems admits FPT-algorithms. Specifically, we consider vertex-problems on graphs, which are sets of pairs of a graph and a subset of its vertices that satisfies some property. For instance, in the Vertex Cover problem, we require the set to be a vertex cover of (i.e., has to contain at least one endpoint of each edge of ). One consequence of our main result which we discuss below in more detail is that the diverse variant of Vertex Cover, asking for solutions, is FPT when parameterized by solution size plus .
Before we proceed, we would like to point out promising future applications of the Diverse FPT paradigm in AI. The Vertex Cover problem itself naturally models conflict-resolution: the entities are the vertices of the graph, and a conflict is represented by an edge. Now, a vertex cover of the resulting graph is a set of entities whose removal makes the model conflict-free. An example of a potential use of Diverse Vertex Cover in a planning scenario is given in [5]. In general, in planning and scheduling problems, a large amount of side information is lost or intentionally omitted in the modeling process. Some side information could make the model too complex to be solved, and other information may even be impossible to model. Offering the user a small number of good solutions to a more easily computable ‘base model’, among which they can handpick their favorite solution is a feasible alternative.
A Formal Notion of Diversity
We choose a very natural and general measure as our notion of diversity among solutions. Given two subsets and of a set the Hamming distance between and is the number
[TABLE]
We define the diversity of a list of subsets of to be
[TABLE]
We can now define the diverse version of vertex-problems:
Definition 1** (Diverse Problem).**
Let be vertex-problems, and let . We let
[TABLE]
Intuitively, given vertex-problems and a graph , we want to find subsets of vertices of such that for each , is a solution for problem on input , and such that the list has diversity at least . If all vertex-problems are the same problem , then we write as a shortcut to .
Diversity and Dynamic Programming
The treewidth of a graph is a structural parameter that quantifies how close the graph is to being a forest (i.e., a graph without cycles). The popularity of this parameter stems from the fact that many problems that are NP-complete on general graphs can be solved in polynomial time on graphs of constant treewidth. In particular, a celebrated theorem due to Courcelle (see [11]) states that any problem expressible in the monadic second-order logic of graphs can be solved in polynomial time on graphs of constant treewidth. Besides this metatheorem, the notion of treewidth has found applications in several branches of Artificial Intelligence such as Answer Set Programs [6], checking the consistency of certain relational algebras in Qualitative Spacial Reasoning [7], compiling Bayesian networks [10], determining the winners of multi-winner voting systems [36], analyzing the dynamics of stochastic social networks [3], and solving constraint satisfaction problems [27]. A large number of these algorithms are in fact FPT-algorithms when treewidth is the parameter. Typically, such algorithms are dynamic programming algorithms which operate on a tree-decomposition in a bottom-up fashion by computing data from the leaves to the root.
Dynamic Programming Core Model
We introduce a formalism for dynamic programming based on a tree decomposition, which we call the Dynamic Programming Core model. This notion captures a large variety of dynamic programming algorithms on tree decompositions. We use the model to derive our main result (Theorem 10) which is a framework to efficiently—and automatically—transform treewidth-based dynamic programming algorithms for vertex-problems into algorithms for the diverse versions of these problems. More precisely, we show that if are vertex-problems where, for each , can be solved in time , then can be solved in time . In particular, if a vertex-problem can be solved in time , then its diverse version can be solved in time . The surprising aspect of this result is that the running time depends only polynomially on (which is at most ), while a naïve dynamic programming algorithm would have a runtime of .
Discussion of the Diversity Measure
Various measures of diversity have been used, studied, and compared in different areas of computer science. We choose the sum of the Hamming distances over all pairs of elements for this work. This measure is commonly used for population diversity in genetic algorithms [18, 35]. Nonetheless, we would like to point out that it has some weaknesses. For instance, taking many copies of two disjoint solutions yields a relatively high diversity value, and such a solution set is not ‘diverse’ from an intuitive point of view. We refer to [5] for a more detailed discussion. Another natural measure using the Hamming distance is the minimum Hamming distance over all pairs in a set, as it is done e.g. in [25, 26]. We would like to point out that a straightforward adaptation of our algorithmic framework would result in a running time of , where is the diversity, the number of solutions, and the treewidth. This remains FPT only when the diversity is an additional component of the parameter, or when is naturally upper bounded by and . Consider for instance Diverse Vertex Cover, asking for vertex covers of size at most . In any nontrivial instance, is at most , and the Hamming distance between two solutions is at most , therefore we may assume that . This implies that Diverse Vertex Cover can be solved in time using the minimum Hamming distance as a diversity measure.
Related Work
The above-mentioned Maximum Diversity problem has applications in the generation of diverse query results, see e.g. [21, 1]. Besides mixed integer programming [20, 13, 31], binary integer linear programming [22, 34] and constraint programming [25, 26], diverse solution sets have been considered in SAT solving [30], recommender systems [2], routing problems [33], answer set programming [15], and decision support systems [29, 23].
2 Preliminaries
For positive integers and , with , we use to denote the set . We use and , respectively, to denote the vertex and edge sets of a graph . For a tree rooted at we use to denote the subtree of rooted at a vertex . A rooted tree decomposition of a graph is a tuple , where is a tree rooted at and is a collection of subsets of such that:
- •
,
- •
for every edge , there is a such that , and
- •
for each such that lies on the unique path between and in , .
We say that the vertices of are the nodes of and that the sets in are the bags of . Given a node , we denote by the subgraph of induced by the set of vertices The width of a tree decomposition is defined as . The treewidth of a graph , denoted by , is the smallest integer such that there exists a rooted tree decomposition of of width at most . The rooted path decomposition of a graph is a rooted tree decomposition such that is a path and is a vertex of degree . The pathwidth of a graph , denoted by , is the smallest integer such that there exists a rooted path decomposition of of width at most . Note that in a rooted path decomposition, every node has at most one child.
For convenience we will always assume that the bag associated to the root of a rooted tree decomposition is empty. For a node we use , or when is clear from the context, to denote the number of children of in the tree . For nodes and of where is the parent of we use to denote the set of vertices of which are forgotten at . By convention, for the root of , we let . For we denote by the set where are the children of . Given a rooted tree decomposition of a graph one can obtain, in linear time, a tree decomposition of of the same width as such that for each , and [12]. From now on we assume that every rooted tree decomposition is of this kind.
3 A First Example: Diverse Vertex Cover
The main result of this paper is a general framework to automatically translate tree-decomposition-based dynamic programming algorithms for vertex-problems into algorithms for the diverse versions of these problems. We develop this framework in Section 4. In this section we illustrate the main techniques used in this conversion process by showing how to translate a tree-decomposition-based dynamic programming algorithm for the Vertex Cover problem into an algorithm for its diverse version Diverse Vertex Cover. Given a graph and three integers , , and , the Diverse Vertex Cover problem asks whether one can find vertex covers in , each of size at most , such that their diversity is at least . Our algorithm for this problem will run in time.
3.1 Incremental Computation of Diversity
Recall that we defined the diversity of a list of subsets of a set to be
[TABLE]
We will now describe a way to compute the diversity in an incremental fashion, by incorporating the influence of each element of in turn. For each element and each pair of subsets of , we define to be if , and to be [math] otherwise. Intuitively, is if and only if the element contributes to the Hamming distance between and . Given this definition we can rewrite as
[TABLE]
and the diversity of a list of subsets of as
[TABLE]
Now, if we define the influence of on the list as
[TABLE]
then we have that
[TABLE]
3.2 From Vertex Cover to Diverse Vertex Cover
We now solve Diverse Vertex Cover using dynamic programming over a tree decomposition of the input graph. An excellent exposition of tree-width-based dynamic programming algorithms can be found in [12, Chapter 7].
Let be an instance of Diverse Vertex Cover and let be a rooted tree decomposition of . For each node , we define the set
[TABLE]
This set , , is such that the partial solutions we will construct for the node will always be a subset of . Note that for each , . Now, our dynamic programming algorithm for Diverse Vertex Cover consists in constructing for each a subset as follows. Let be a node in with children . We recall that, by convention, this set of children is of size [math], , or . We let be the set of all tuples satisfying the following additional properties:
For each , . 2. 2.
For each there exists a tuple in such that
- (a)
for each and each , 2. (b)
For each , , 3. (c)
and where
Lemma 2**.**
* is a Yes-instance of Diverse Vertex Cover if and only if there is a tuple in such that .*
Proof.
Using induction, one can see that for each , is the set of every element of such that, with , there exists , that satisfies:
- •
for each , is a vertex cover of ,
- •
for each , ,
- •
for each , , and
- •
.
As the root of the tree decomposition is such that , we obtain that the elements in are the elements of such that there exists , that satisfy,
- •
for each , is a vertex cover of ,
- •
for each , , and
- •
.
As such, a tuple of subsets of is a solution of Diverse Vertex Cover if and only if , the lemma follows. ∎
Theorem 3**.**
Given a graph , integers , and a rooted tree decomposition of of width , one can determine whether is a Yes-instance of Diverse Vertex Cover in time
[TABLE]
where and .
Proof.
Let us analyze the time needed to compute . We have that, for each , . Note that given be elements of , there are at most ways to create an element of by selecting, or not the (potential) new element of for each set , . The remaining is indeed fixed by . Thus, can be computed in time , where the factor appears when verifying that the element we construct satisfy . As we need to compute for each and that and we can assume that for each , the theorem follows. ∎
Remark 4**.**
Given a graph and a vertex cover of of size , one can find a rooted path decomposition of of width , in linear time.
This can be done by considering the bags for each in any fixed order. Thus, from Theorem 3, we get the following corollary, which establishes an upper bound for the running time of our dynamic programming algorithm for Diverse Vertex Cover solely in terms of the size of the vertex cover, the number of requested solutions, and the diversity .
Corollary 5**.**
Diverse Vertex Cover* can be solved on an input in time *
4 Computing Diverse Solutions using the Dynamic Programming Core model
In this section, we show that the process illustrated in Section 3, of lifting a dynamic programming algorithm for a combinatorial problem to an algorithm for its diverse version, can be generalized to a much broader context. As a first step, we introduce the notion of dynamic programming core, a suitable formalization of the intuitive notion of tree-width based dynamic programming that satisfies three essential properties. First, this formalization is general enough to be applicable to a large class of combinatorial optimization problems. Second, this formalization is compatible with the notion of diversity, in the sense that the lifting of an algorithm for a problem to an algorithm for the diverse version of this problem can be done automatically, without requiring human ingenuity. Third, the resulting lifted algorithm is fast when compared with the original one. In particular, the running time of the resulting algorithm is polynomial on the diversity parameter. This is a highly desired property since this allows our framework to be applied in the context where the sizes of the considered solution sets are not bounded.
Below, we let be the set of simple, undirected graphs whose vertex set is a finite subset of . We say that a subset is a graph problem. Intuitively, a dynamic programming algorithm working on tree decompositions may be understood as a procedure that takes a graph and a rooted tree decomposition of as input, and constructs a certain amount of data for each node of . The data at node is constructed by induction on the height of , and in general, this data is used to encode the existence of a partial solution on the graph induced by bags in the sub-tree of rooted at . In the below definition, this is captured in the relation . Such an algorithm accepts the input graph if the data associated with the root node contains a string belonging to a set of accepting strings, captured below in the set . We formalize this intuitive notion in the following concept of dynamic programming core.
Definition 6** (Dynamic Programming Core).**
A dynamic programming core is an algorithm that takes a graph and a rooted tree decomposition of as input, and produces the following data.
- •
A finite set .
- •
A finite set for each .
We let be the overall time necessary to construct the data associated with all nodes of . The size of on a pair is defined as
[TABLE]
Next, we define the notion of a witness for a dynamic programming core. Intuitively such witnesses are certificates of the existence of a solution.
Definition 7**.**
Let be a dynamic programming core, be a graph in , and be a rooted tree decomposition of . A -witness is a function such that the following conditions are satisfied.
For each , with children , . 2. 2.
.
Using the notion of witness, we define formally what it means for a dynamic programming core to solve a combinatorial problem.
Definition 8**.**
We say that a dynamic programming core solves a problem if for each graph , and each rooted tree decomposition of , if and only if a -witness exists.
Theorem 9**.**
Let be a graph problem and be a dynamic programming core that solves . Given a graph and a rooted tree decomposition of , one can determine whether in time
[TABLE]
Proof.
Given , , and , we construct the set and the sets for each . By definition, this can be done in time .
Given and , a -witness is a function
[TABLE]
such that for each , with children ,
[TABLE]
and . Note that there exists a -witness if and only if there exists a -witness for some .
For each , we define to be the set of every such that there exists a -witness. Let and assume that we are able to construct for every where are the children of . We can then construct as follows. For each , we add to if for each , . It is easy to see that for each such , there exists a -witness that is an extension of the -witness, . Moreover if there exists a -witness for some , then, for each , the restriction of to is a -witness for some , and so, by induction hypothesis, . This implies that our construction has correctly added to . Thus is correctly constructed.
From Definition 8 we have that if and only if . Note that the time needed to construct is . Therefore, the theorem follows. ∎
4.1 Dynamic Programming Cores for Vertex Problems
Let be a dynamic programming core. A -vertex-membership function is a function such that for each graph , each rooted tree decomposition of and each -witness , it holds that for each edge and each vertex . Intuitively, if is a graph and is a rooted tree decomposition of , then a -vertex-membership together with a -witness, provide an encoding of a subset of vertices of the graph. More precisely, we let
[TABLE]
be this encoded vertex set. Given a -vertex-membership function , we let be the function that sets for each .
Let be a vertex-problem, be a dynamic programming core, and be a -vertex-membership function. We say that solves if for each graph , each subset , and each rooted tree decomposition , if and only if there exists a -witness such that .
The following theorem is the main result of this section. It shows how to transform dynamic programming cores for problems into a dynamic programming core for the problem .
Theorem 10**.**
Let be vertex-problems, let be a dynamic programming core for , and let be an integer. The problem , on graph with rooted tree decomposition , can be solved in time
[TABLE]
where .
Proof.
Let and . We extend the definition of diverse influence to such that
[TABLE]
Before proving Theorem 10, we state and prove the following technical lemma.
Lemma 11**.**
Let be a graph and be a rooted tree decomposition of . belongs to if and only if there exist such that the following conditions are satisfied.
For each , is a -witness and . 2. 2.
.
Proof.
First assume that belongs to . By Definition 1, for each , we have that , and so, there exists a -witness such that . Thus Condition 1 is satisfied. Moreover, we have that for each and each , . Together with the fact that each vertex is in exactly one set , , and imply Condition 2.
Assume now that there exist that satisfy Conditions 1 and 2. Condition 1 implies that for each , . Moreover, as for each , there is exactly one node such that , by definition of a rooted tree decomposition, Condition 2 implies that . Thus, belongs to . ∎
Now we are in a position to prove Theorem 10.
For each , we start by constructing the data corresponding to the dynamic core . The overall construction takes time .
Subsequently, we define a dynamic core for the problem . Let and be a rooted tree decomposition of . The dynamic core produces the following data.
- •
.
- •
For each ,
[TABLE]
Let be a -witness of , let be the projection of to its -th coordinate, and let be the projection of to its last coordinate. Then we have that is a -witness for if and only if is a -witness for , and for being the root of ,
[TABLE]
By Lemma 11, we have that this happens if and only if
[TABLE]
belongs to .
Let now analyze the running time of this procedure. When constructing for some , we need to combine every combination of elements of , and of values of , . This can be done in time . Thus constructing the data associated to , , and takes
[TABLE]
Moreover, as for every , , then by Theorem 9, can be solved in time where . The theorem follows. ∎
4.2 An Illustrative Application of Theorem 10
In this subsection we show how to apply Theorem 10 in the construction of an improved dynamic programming algorithm for Diverse Vertex Cover. The first thing to do is to describe a dynamic programming core for -Vertex Cover. Given a graph and a rooted tree decomposition , this dynamic programming core produces:
[TABLE]
Provided the width of the decomposition is at most , this can be done in time for each , where the factor appears as we need the conditions and to be verified. It is easy to verify that is a dynamic programming core for the Vertex Cover problem. As described in Remark 4, we know that we can construct a rooted path decomposition of of width . We are now considering this rooted path decomposition. Thus, for each , . By Theorem 10, we obtain the following corollary, improving Corollary 5.
Corollary 12**.**
Diverse Vertex Cover* can be solved on an input in time*
[TABLE]
Note that we obtain a slightly better running time than for Corollary 5. This is due to the fact that verifying the properties and is done when constructing and not when constructing . Note also that, formally, we need to construct times but as it is times the same, we do the operation only once.
5 Diversity in Kernelization
Another key concept in the field of parameterized complexity is that of a kernelization algorithm [17]. We have obtained some parallel results about the kernelization complexity of diverse problems as well that we want to briefly sketch in this section. A polynomial kernel of a parameterized problem is a polynomial-time algorithm that given any instance either solves it or constructs in polynomial time an equivalent222 Meaning that the constructed instance is a Yes-instance if and only if the original instance was. instance whose size is polynomial in the parameter. It is known that a parameterized problem is FPT if and only if it has a (not necessarily polynomial) kernel, and a natural step after proving a parameterized problem to be FPT is to decide whether or not it has a polynomial kernel.
We show that the diverse variants of several basic problems parameterized by the number of requested solutions plus solution size admit polynomial kernels as well. This is done via a variant of the recently introduced notion of loss-less kernels [9] which are a special class of kernelizations that - very roughly speaking - for each but polynomially many bits of the input can either decide whether it has to be part of every solution or if it may be added to a solution without ‘destroying’ it.
For instance, consider the famous Buss kernel for Vertex Cover [8]: Given a graph and an integer , we want to decide if has a vertex cover of size . Each vertex of degree at least must be in each solution. Otherwise, we have to include its (at least) neighbors, exceeding the size constraint. On the other hand, each isolated (degree-[math]) vertex can be included in a vertex cover without destroying it, but it does not cover any edge. In the ‘non-diverse’ variant, we may remove these isolated vertices, and in the diverse variant, we have to keep some of them as they may be used to increase the diversity. However, polynomially (in and ) many such vertices suffice.
We now turn to the technical description of this framework. All problems that fall into our framework have to be subset minimization problems. In a subset minimization problem, one part of the input is a set, called the domain of the instance, and the objective is to find a minimum size subset of the domain that satisfies a certain property. For a subset minimization problem , and an instance of , we denote by the domain of . E.g., in the Vertex Cover problem, an instance consists of a graph and an integer and the domain of the instance is . For an instance of a parameterized problem, we denote its domain by .
The following definition is a technical requirement to adapt loss-less kernelization to the setting of diverse problems. Domain recovery algorithms will be used to reintroduce some elements of the domain that have been removed during the kernelization process, in a controlled manner.
Definition 13**.**
Let be a subset minimization problem. A domain recovery algorithm takes as input two instances of , and , with , and a set and outputs in polynomial time an instance on domain , such that for some computable function .
We give the definition of a loss-less kernel [9], tailored to our purposes as follows.333Due to technical reasons and at a potential cost of slightly increased kernel sizes, we do not keep track of the restricted items that are forbidden in any solution of size . We use the following notation: For an instance of a subset minimization problem and an integer , we denote by the solutions of of size at most .
Definition 14**.**
Let be a parameterized subset minimization problem. A loss-less kernelization of is a pair of a domain recovery algorithm and an algorithm that takes as input an instance and either correctly concludes that is a No-instance, or outputs a tuple with the following properties. is an equivalent444I.e. is a Yes-instance if and only if is. instance to and is a partition of , and the following hold.
- (i)
There is a computable function such that . 2. (ii)
For all , for all , the following holds. Let . Then,
[TABLE] 3. (iii)
For all , for all , and for all we have that:
[TABLE]
We call the size and 555Function is given implicitly in the domain recovery algorithm . the recovery cost of the loss-less kernel, the forced items and the allowed items.
We show that as a direct consequence of this definition, all elements in can be added to any solution to such that the resulting set remains a valid solution to .
Theorem 15**.**
Let be a parameterized subset minimization problem that admits a loss-less kernel of size and recovery cost . Then, Diverse admits a kernel of size at most .
Proof.
Let be an instance of Diverse . Our algorithm works as follows. We apply the loss-less kernel to and obtain . Let . Then, we simply return where if and otherwise, is an arbitrary size- subset of . We now show that is indeed an instance of Diverse that is equivalent to .
Suppose is a Yes-instance. Then, there is a tuple such that for all , and .
Case 1 (). In this case, . For all , let , and . By Definition 14(ii), we have that . By Definition 14(iii), this implies that (recall that ). Furthermore, since for all by Definition 14(ii), we have that , and hence is a Yes-instance in this case.
Case 2 (). In this case, is an arbitrary size- subset of . For all , let , . By Definition 14(ii) we have that . Furthermore, since removing an element from some can decrease the diversity of the resulting solution by at most , and since for all by Definition 14(ii), we have that
[TABLE]
We construct a tuple of solutions to as follows. Let a tuple of pairwise disjoint subsets of such that for all , . Such a tuple exists since . For , let and . Let . Since , and , we use Definition 14(iii) to conclude that .
Now, adding to increased the diversity of the resulting solution by , since no element of is added to any other solution. Hence,
[TABLE]
We have shown that is a Yes-instance in this case as well.
For the other direction, suppose is a Yes-instance. Then, (ii) and (iii) of Definition 14 immediately imply that is a Yes-instance as well.
To bound the size of , we have that by the definition of the (loss-less) kernel, and by the definition of a domain recovery algorithm. ∎
We now exemplify the use of Theorem 15 by showing that several well-known kernels hold in the diverse setting as well, giving polynomial kernels in the parameterization solution size plus the number of requested solutions.
We briefly introduce these problems. In the -Hitting Set problem, we are given a hypergraph , each of whose hyperedges contains at most elements, and an integer , and the goal is to find a set of vertices of of size at most such that each hyperedge contains at least one element from . In the Point Line Cover problem, we are given a set of points in the plane and an integer , and we want to find a set of at most lines such that each point lies on at least one of the lines. A directed graph is called a tournament, if for each pair of vertices , either the edge directed from to or the edge directed from to is contained in the set of arcs of . In the Feedback Arc Set in Tournaments problem we are given a tournament and an integer , and the goal is to find a set of at most arcs such that after removing this set, the resulting directed graph does not contain any directed cycles.
Theorem 16**.**
The following diverse subset minimization problems parameterized by admit polynomial kernels.
- (i)
Diverse Vertex Cover*, on vertices.* 2. (ii)
Diverse -Hitting Set* for fixed , on vertices.* 3. (iii)
Diverse Point Line Cover*, on points.* 4. (iv)
Diverse Feedback Arc Set in Tournaments*, on vertices.*
Proof.
(i)666This was also observed in [9]. The classical kernelization for Vertex Cover due to [8] consists of the following two reduction rules. Let be an instance of Vertex Cover. First, we remove isolated vertices from ; since they do not cover any edges of the graph, we do not need them to construct a vertex cover. To obtain the loss-less kernel, we put these vertices into the set . Second, if there is a vertex of degree more than , this vertex has to be included in any solution; otherwise we would have to include its more than neighbors, resulting in a vertex cover that exceeds the size bound. We add this vertex to , remove it from and decrease the parameter value by . This second reduction rule finishes the description of the kernel. It is not difficult to argue that after an exhaustive application of these two rules, the resulting kernelized instance is such that either , in which case we are dealing with a No-instance, or . For the domain recovery algorithm, we can use a trivial algorithm that reintroduces some of the vertices in to the graph .
We now argue that this is indeed a loss-less kernel. Consider Definition 14. Item (ii) follows immediately from the fact that each vertex cover of of size at most has to contain all vertices in and that each vertex in has no neighbors in . The latter also implies (iii). The result now follows from Theorem 15.
(ii) We show that the kernel on vertices presented in [12, Section 2.6.1] is a loss-less kernel. This kernel is essentially a generalization of the one presented in the proof of (i), so we will skip some of the details. It is based on the following reduction rule: If there are hyperedges with such that for each , , then any solution has to contain ; otherwise, to hit the hyperedges , we would have to include at least elements in the hitting set. Moreover, if , we can immediately conclude that we are dealing with a No-instance. If is nonempty, then we add all elements of to and decrease the parameter value by . The set consists of all vertices that are isolated (i.e. not contained in any hyperedge) after exhaustively applying the previous reduction rule. Following the same argumentation above (and using the same domain recovery algorithm), we can conclude that this procedure is a loss-less kernel on vertices, and the result follows from Theorem 15.
(iii) Let be an instance of Point Line Cover. We consider the set of the lines defined by all pairs of points of as the domain of , and we denote this set by . All solutions to can be considered a subset of . We obtain a kernel on points as follows, cf. [12, Exercise 2.4]. The idea is again similar to the kernel presented in (i). If there are points on a line, then we have to include this line in any solution; we add such lines to the set and remove all points on them from , and decrease the parameter value by . We finally add to all lines that have no points on them. We can argue in the same way as above that this gives a kernel with at most points and with Theorem 15, the result follows.
(iv) We observe that the kernel given in [12, Section 2.2.2] is a loss-less kernel. Its first reduction rule states that if there is an arc that is contained in at least triangles, then we reverse this arc and decrease the parameter value by , and the second reduction rule states that any vertex that is not contained in a triangle can be removed. Any arc affected by the former rule will be put in the set and any arc affected by the latter rule will be put in the set . We now describe the domain recovery algorithm. Let be the original instance and the kernelized instance, and let be an arc. Then, we add to and to ensure that the resulting directed graph is a tournament, for any , we add all arcs and to . Since , we know that one of its endpoints was not contained in any triangle, and hence adding the endpoints of and all their incident arcs does not add any triangles to the tournament. ∎
We would like to remark that the crucial part to use loss-less kernels in the diverse setting was that any solution of size at most has to contain all vertices of , and arbitrarily adding vertices from does not destroy a solution. In the ‘classical’ kernelization setting, to argue that a reduction rule is safe it is sufficient to show that the existence of a vertex cover in the original instance implies the existence of some vertex cover in the reduced instance and vice versa, see e.g., [16, 17]. This alone is usually not enough to argue that a reduction preserves diverse solutions.
6 Conclusion
In this work, we considered a formal notion of diversity of a set of solutions to combinatorial problems in the setting of parameterized algorithms. We showed how to emulate treewidth based dynamic programming algorithms in order to solve diverse problems in FPT time, with the number of requested solutions being an additional parameter.
This line of research is now wide open, with many natural questions to address. As all our results are of a positive nature, we ask: when can diversity be a source of hardness? Concretely, a natural target in parameterized complexity would be to identify a parameterized problem that is FPT, however Diverse being W[1]-hard when is an additional parameter. For positive results, an interesting research direction would be to generalize our framework for diverse problems to other well-studied width measures for graphs, as well as to other structures, such as matroids.
In this work, we considered the sum of all pairwise Hamming distances of a set as a measure of diversity. As pointed out, this measure has some weaknesses, and another widely used measure is the minimum Hamming distance. In this setting, we only obtain FPT-results when the diversity is bounded by a function of the treewidth and the number of solutions, but not in general. So, a natural follow-up question is whether or not we can obtain FPT-results under the minimum Hamming distance, even if the diversity is unbounded.
Acknowledgements.
M. Fellows and F. Rosamond acknowledge support from the Norwegian NFR Toppforsk Project, “Parameterized Complexity and Practical Computing” (PCPC) (no. 813299). M. Fellows, F. Rosamond, L. Jaffke, M. de Oliveira Oliveira, and G. Philip acknowledge support from the Bergen Research Foundation grant “Putting Algorithms Into Practice” (BFS, no. 810564). G. Philip acknowledges support from the Research Council of Norway grants “Parameterized Complexity for Practical Computing” (NFR, no. 274526d), “MULTIVAL”, and “CLASSIS”, and European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (ERC, no. 819416). T. Masařík acknowledges support from the European Research Council (ERC grant agreement no. 714704) , and from Charles University’s grants GAUK 1514217 and SVV-2017-260452. He recently started a postdoc at Simon Fraser University, Canada. M. de Oliveira Oliveira acknowledges support from the Research Council of Norway (NFR, no. 288761). J. Baste acknowledges support from the German Research Foundation (DFG, no. 388217545).
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] Zeinab Abbassi, Vahab S. Mirrokni, and Mayur Thakur. Diversity maximization under matroid constraints. In 19th KDD , pages 32–40, 2013.
- 2[2] Gediminas Adomavicius and Young Ok Kwon. Optimization-based approaches for maximizing aggregate recommendation diversity. INFORMS Journal on Computing , 26(2):351–369, 2014.
- 3[3] Chris Barrett, Harry B Hunt, Madhav V Marathe, SS Ravi, Daniel J Rosenkrantz, Richard E Stearns, and Mayur Thakur. Computational aspects of analyzing social network dynamics. In 20th IJCAI , pages 2268–2273, 2007.
- 4[4] Julien Baste, Michael R. Fellows, Lars Jaffke, Tomáš Masařík, Mateus de Oliveira Oliveira, Geevarghese Philip, and Frances A. Rosamond. Diversity of solutions: An exploration through the lens of fixed-parameter tractability theory. In 29th IJCAI , pages 1119–1125, 2020.
- 5[5] Julien Baste, Lars Jaffke, Tomáš Masařík, Geevarghese Philip, and Günter Rote. FPT algorithms for diverse collections of hitting sets. Algorithms , 12:254, 2019.
- 6[6] Bernhard Bliem, Marius Moldovan, Michael Morak, and Stefan Woltran. The impact of treewidth on ASP grounding and solving. In 26th IJCAI , pages 852–858, 2017.
- 7[7] Manuel Bodirsky and Stefan Wölfl. RCC 8 is polynomial on networks of bounded treewidth. In 22nd IJCAI, Vol. 2 , pages 756–761, 2011.
- 8[8] Jonathan F. Buss and Judy Goldsmith. Nondeterminism within P. SIAM J. Comput. , 22(3):560–572, 1993.
