In this paper we consider the Group Activity Selection Problem (Gasp) together with its two most prominent variants, the Simple Group Activity Selection Problem (sGasp), and the Group Activity Selection Problem with Graph Structure (gGasp) [6, 18]. Since their introduction, these problems have become the focal point of extensive research [3, 4, 5, 19, 15, 16]. In Gasp one is given a set of agents, a set of activities, and a set of preferences for each agent in the form of a complete transitive relation (also called the preference list) over the set of pairs consisting of an activity and a number , expressing the willingness of the agent to participate in the activity if it has participants. The aim is to find a “good” assignment from agents to activities subject to certain rationality and stability conditions. Specifically, an assignment is individually rational if agents that are assigned to an activity prefer this outcome over not being assigned to any activity, and an assignment is (Nash) stable if every agent prefers its current assignment over moving to any other activity. In this way GASP captures a wide range of real-life situations such as event organization and work delegation.
sGasp is a simplified variant of Gasp where the preferences of agents are expressed in terms of approval sets containing (activity,size) pairs instead of preference lists. In essence sGasp is Gasp where each preference list has only two equivalence classes: the class of the approved (activity,size) pairs (which contains all pairs that are preferred over not being assigned to any activity), and the class of disapproved (activity,size) pairs (all possible remaining pairs). On the other hand, gGasp is a generalization of Gasp where one is additionally given an undirected graph (network) on the set of all agents that can be employed to model for instance acquaintanceship or physical distance between agents. Crucially, in gGasp one only considers assignments for which the subnetwork induced by all agents assigned to some activity is connected. Note that if the network forms a complete graph, then gGasp is equivalent to the underlying Gasp instance.
sGasp, Gasp, and gGasp, are known to be NP-complete even in very restricted settings [6, 18, 15, 16]. It is therefore natural to study these problems through the lens of parameterized complexity [8, 2]. Apart from parameterizing by the solution size (i.e., the number of agents assigned to any activity in a solution) , the perhaps most prominent parameterizations thus far have been the number of activities, the number of agents, and in the case of gGasp structural parameterizations tied to the structure of the network such as treewidth [6, 18, 15, 9]. Consequently, the parameterized complexity of all three variants of Gasp w.r.t. the number of activities and/or the number of agents is now almost completely understood.
Computing a stable assignment for a given instance of Gasp is known to be W-hard and contained in XP parameterized by either the number of activities [6, 18] or the number of agents  and known to be fixed-parameter tractable parameterized by both parameters . Even though it has never been explicitly stated, the same results also hold for gGasp when parameterizing by the number of agents as well as when using both parameters. This is because both the XP algorithm for the number of agents as well as the fixed-parameter algorithm for both parameters essentially brute-force over every possible assignment and are hence also able to find a solution for gGasp. Moreover, the fact that gGasp generalizes Gasp implies that the W-hardness result for the number of agents also carries over to gGasp. On the other hand, if we consider the number of activities as a parameter then gGasp turns out to be harder than Gasp: Gupta et al. () showed that gGasp is NP-complete even when restricted to instances with a single activity. The hardness of gGasp has inspired a series of tractability results [15, 18] obtained by employing additional restrictions on the structure of the network. One prominent result in this direction has been recently obtained by Gupta et al. (), showing that gGasp is fixed-parameter tractable parameterized by the number of activities if the network has constant treewidth. For sGasp, it was recently shown that the problem is also W-hard when parameterized by the number of activities , and hence the only small gap left was the complexity of this problem parameterized by the number of agents. For completeness, we resolve this question in our concluding remarks by giving a fixed-parameter algorithm.
Already with the introduction of Gasp  the authors argued that instead of putting restrictions on the total number of agents, which can be very large in general, it might be much more useful to consider the number of distinct types of agents. It is easy to imagine a setting with large groups of agents that share the same preferences (for instance due to inherent limitations of how preferences are collected). In contrast to the related parameter number of activity types, where it is known that sGasp remains NP-complete even for a constant number of activity types , the complexity of the problems parameterized by the number of agent types (with or without restricting the number of activities) has remained wide open thus far.
In this paper we obtain a complete classification of the complexity of Gasp and its variants sGasp and gGasp when parameterized by the number of agent types () alone, and also when parameterized by plus the number of activities (). In particular, for each of the considered problems and parameterizations, we determine whether the problem is in FPT, or W-hard and in XP, or paraNP-hard. One distinguishing feature of our lower- and upper-bound results is that they make heavy use of novel Subset-Sum machinery. Below, we provide a high-level summary of the individual results presented in the paper.
sGasp is fixed-parameter tractable when parameterized by .
This is the only fixed-parameter tractability result presented in the paper, and is essentially tight: it was recently shown that sGasp is W-hard when parameterized by alone , and the W-hardness of the problem when parameterized by is obtained in this paper. Our first step towards obtaining the desired fixed-parameter algorithm for sGasp is to show that every YES-instance has a solution which is acyclic—in particular, a solution with no cycles formed by interactions between activities and agent types (captured in terms of the incidence graph of an assignment). This is proved via the identification of certain compression steps which can be applied on a solution in order to remove cycles.
Once we show that it suffices to focus on acyclic solutions, we branch over all acyclic incidence graphs (i.e., all acyclic edge sets of ); for each such edge set, we can reduce the problem of determining whether there exists an assignment realizing this edge set to a variant of Subset Sum embedded in a tree structure. The last missing piece is then to show that this problem, which we call Tree Subset Sum, is polynomial-time tractable; this is done via dynamic programming, whereas each step boils down to solving a simplified variant of Subset Sum.
sGasp is W-hard when parameterized by .
Our second result complements Result 1. As a crucial intermediate step towards Result 2, we obtain the W-hardness of a variant of Subset Sum with three distinct “ingredients”:
Partitioning: items are partitioned into sets, and precisely one item must be selected from each set,
Multidimensionality: each item is a
-dimensional vector (being the parameter) where the aim is to hit the target value for each component, and
Simplicity: each vector contains precisely one non-zero component.
We call this problem Simple Multidimensional Partitioned Subset Sum (SMPSS). Note that SMPSS is closely related to Multidimensional Subset Sum (MSS), which (as one would expect) merely enhances Subset Sum via Ingredient 2. MSS has recently been used to establish W-hardness for parameterizations of Edge Disjoint Paths  and Bounded Degree Vertex Deletion . However, Ingredient 1 and especially Ingredient 3 are critical requirements for our reduction to work, and establishing the W-hardness of SMPSS was the main challenge on the way towards the desired lower-bound result for sGasp. Since MSS has already been successfully used to obtain lower-bound results and SMPSS is a much more powerful tool in this regard, we believe that SMPSS will find applications in establishing lower bounds for other problems in the future.
Gasp is in XP when parameterized by .
This is the only XP result required for our complexity map, as it implies XP algorithms for sGasp parameterized by and for Gasp parameterized by . We note that the techniques used to obtain Result 3 are disjoint from those used for Result 1; in particular, our first step is to reduce Gasp parameterized by to solving “XP-many” instances of sGasp parameterized by . This is achieved by showing that once we know a “least preferred alternative” for every agent type that is active in an assignment, then the Gasp instance becomes significantly easier—and, in particular, can be reduced to a (slightly modified version of) sGasp. It is interesting to note that the result provides a significant conceptual improvement over the known brute force algorithm for Gasp parameterized by the number of agents which enumerates all possible assignments of agents to activities [17, Theorem 3] (see also ): instead of guessing an assignment for all agents, one merely needs to guess a least preferred alternative for every agent type.
The second part of our journey towards Result 3 focuses on obtaining an XP algorithm for sGasp parameterized by . This algorithm has two components. Initially, we show that in this setting one can reduce sGasp to the problem of finding an assignment which is individually rational (i.e., without the stability condition) and satisfies some additional minor properties. To find such an assignment, we once again make use of Subset Sum: in particular, we develop an XP algorithm for the MPSS problem (i.e., Subset Sum enhanced by ingredients 1 and 2) and apply a final reduction from finding an individually rational assignment to MPSS.
Gasp is W-hard when parameterized by .
gGasp is W-hard when parameterized by and the vertex cover number  of the network.
The final two results are hardness reductions which represent the last pieces of the presented complexity map. Both are obtained via reductions from Partitioned Clique (also called Multicolored Clique in the literature ), and both reductions essentially use activities whose sizes encode the vertices and edges forming a -clique. The main challenge lies in the design of (a bounded number of) agent types whose preference lists ensure that the chosen vertices are indeed endpoints of the chosen edges. The reduction for gGasp then becomes even more involved, as it can only employ a limited number of connections between the agents in order to ensure that vertex cover of the network is bounded.
We note that Result 5 answers an open question raised by Gupta, Roy, Saurabh and Zehavi , who showed that gGasp is fixed-parameter tractable parameterized by the number of activities if the network has constant treewidth and wondered whether their result can be improved to a more efficient fixed-parameter algorithm parameterized by the number of activities and treewidth. In this sense, our hardness result represents a substantial shift of the boundaries of (in)tractability: in addition to the setting of Gupta et al., it also rules out the use of agent types as a parameter and replaces treewidth by the more restrictive vertex cover number.
An overview of our results in the context of related work is provided in Table 1.
|Parameterization||Lower Bound||Upper Bound|
References: is , is , is , is folklore.
Organization of the Paper.
For an integer , we let and . We denote by the set of natural numbers, by the set . For a set and an integer , we denote by and the set of all dimensional vectors over and the set of all subsets of , respectively. For a vector of integers, we use to denote the sum of its elements.
We refer to the handbook by Diestel () for standard graph terminology. The vertex cover number of a graph is the size of a minimum vertex cover of .
2.1 Parameterized Complexity
In parameterized algorithmics [8, 2, 20] the run-time of an algorithm is studied with respect to a parameter and input size . The basic idea is to find a parameter that describes the structure of the instance such that the combinatorial explosion can be confined to this parameter. In this respect, the most favourable complexity class is FPT (fixed-parameter tractable) which contains all problems that can be decided by an algorithm running in time , where is a computable function. Algorithms with this running time are called fixed-parameter algorithms. A less favourable outcome is an XP algorithm, which is an algorithm running in time ; problems admitting such algorithms belong to the class XP.
To obtain our lower bounds, we will need the notion of a parameterized reduction. Formally, a parameterized problem is a subset of , where is the input alphabet. Let and be parameterized problems. A parameterized reduction (or FPT-reduction) from to is a mapping such that (i) iff , (ii) the mapping can be computed by an FPT-algorithm w.r.t. parameter , and (iii) there is a computable function such that , where .
Finally, we introduce the complexity class used to describe our lower bounds. The class captures parameterized intractability and contains all problems that are FPT-reducible to Independent Set (parameterized by solution size).
2.2 Group Activity Selection.
The task in the Group Activity Selection Problem (Gasp) is to compute a stable assignment from a given set of agents to a set of activities, where each agent participates in at most one activity in . The assignment is (Nash) stable if and only if it is individually rational and no agent has an NS-deviation to any other activity (both of these stability rules are defined in the next paragraph). We use a dummy activity to capture all those agents that do not participate in any activity in and denote by the set . Thus, an assignment is a mapping from to , and for an activity we use to denote the set of agents assigned to by ; we set if there is at least one agent assigned to and otherwise.
The set of alternatives is defined as . Each agent is associated with its own preferences defined on the set . In the case of the standard Gasp problem, an instance is of the form where each agent is associated with a complete transitive preference relation (list) over the set . An assignment is individually rational if for every agent it holds that if and , then (i.e., weakly prefers staying in over moving to ). An agent where is defined to have an NS-deviation to a different activity in if (i.e., prefers moving to an activity over staying in ). The task in Gasp is to compute a stable assignment.
gGasp is defined analogously to Gasp, however where one is additionally given a set of links between the agents on the input; specifically, can be viewed as a set of undirected edges and as a simple undirected graph. In gGasp, the task is to find an assignment which is not only stable but also connected; formally, for every the set of agents induces a connected subgraph of . Moreover, an agent only has an NS-deviation to some activity if (in addition to the conditions for NS-deviations defined above) has an edge to at least one agent in .
In sGasp, an instance is of the form , where each agent has an approval set of preferences (instead of an ordered preference list). We denote by the set for an activity . An assignment is said to be individually rational if every agent satisfied the following: if and , then . Further, an agent where , is said to have an NS-deviation to an activity in if .
We now introduce the notions and definitions required for our main parameter of interest, the “number of agent types”. We say that two agents and in have the same agent type if they have the same preferences. To be specific, for sGasp and for Gasp and gGasp. In the case of sGasp and Gasp and are indistinguishable, while in gGasp and can still have different links to other agents. For a subset , we denote by the set of agent types occurring in . Note that this notation requires that the instance is clear from the context. If this is not the case then we denote by the set if is the set of agents for the instance of sGasp, Gasp, or gGasp.
For every agent type , we denote by the subset of containing all agents of type ; observe that forms a partition of . For an agent type we denote by (sGasp) or (Gasp) the preference list assigned to all agents of type and we use (for an activity ) to denote restricted to activity , i.e., is equal to for any agent of type . For an assignment , , and we denote by the set and by the set . Further, is the set of all activities that have at least one agent of type participating in it. We say that is a perfect assignment for some agent type if for every . We denote by the subset of consisting of all agent types that are perfectly assigned by , and say that is a perfect assignment if .
One notion that will appear throughout the paper is that of compatibility: for a subset , we say that is compatible with if . We conclude this section with a technical lemma which provides a preprocessing procedure that will be used as a basic tool for obtaining our algorithmic results. In particular, Lemma 1 allows us to reduce the problem of computing a stable assignment for a sGasp instance compatible with to the problem of finding an individually rational assignment.
Let be an instance of sGasp and . Then in time one can compute an instance and with the following property: for every assignment that is compatible with , it holds that is stable for if and only if is individually rational for and for every .
Let be an assignment that is compatible with . Then there is an agent of type assigned to if and only if . Hence is stable for if and only if is individually rational and additionally it holds that for every agent type and every activity , . This naturally leads us to a certain set of “forbidden” sizes for activities, and we will obtain the desired instance by simply removing all tuples from all preference lists that would allow activities to reach a forbidden size. Formally, we obtain the desired instance from removing all tuples from every preference list , where such that there is an agent type with . This construction prevents the occurrence of all forbidden sizes of activities except for forbidding activities of size ; that is where we use the set . Formally, the set consists of all activities such that there is an agent type with . It is now straightforward to verify that and satisfy the claim of the lemma.
Finally the running time of for the algorithm can be achieved as follows. In a preprocessing step we first compute for every activity the set of all forbidden numbers, i.e., the set of all numbers such that there is an agent type with . For every activity , we store the resulting set of numbers in such a way that determining whether a number is contained in the set for activity can be achieved in constant time; this can for instance be achieved by storing the set for each activity as a Boolean array with entries, whose -th entry is True if and only if is contained in the set of numbers for . This preprocessing step takes time at most and after it is completed we can use the computed sets to test for every agent type , every activity , and every , whether there is an agent type such that in constant time. If so we remove from , otherwise we continue. This shows that can be computed in time. The computation of only requires to check for every activity whether is contained in the set of forbidden numbers for ; if so is contained in and otherwise it is not. After preprocessing, this can be achieved in time . ∎
3 Subset Sum Machinery
In this section we introduce the subset sum machinery required for our algorithms and lower bound results. In particular, we introduce three variants of Subset Sum, obtain algorithms for two of them, and provide a W-hardness result for the third. We note that it may be helpful to read the following three subsections in the context of the individual sections where they are used: in particular, Subsection 3.1 is used to obtain Result 1 (Section 4), Subsection 3.2 is used as a preprocedure for Result 3 (Section 6) and Subsection 3.3 (which is by far the most difficult of the three) is a crucial step in the reduction used for Result 2 (Section 5).
3.1 Tree Subset Sum
Here we introduce a useful generalization of Subset Sum, for which we obtain polynomial-time tractability under the assumption that the input is encoded in unary. Intuitively, our problem asks us to assign values to edges while meeting a simple criterion on the values of edges incident to each vertex.
0.98 Tree Subset Sum (TSS)
[5pt] Input: A vertex-labeled undirected tree with labeling function . Question: Is there an assignment such that for every it holds that .
Let us briefly comment on the relationship of TSS with Subset Sum. Recall that given a set of natural numbers and a natural number , the Subset Sum problem asks whether there is a subset of such that . One can easily construct a simple instance of TSS that is equivalent to a given instance of Subset Sum as follows. consists of a star having one leaf for every with and for the center vertex of the star. Given this simple reduction from Subset Sum to TSS it becomes clear that TSS is much more general than Subset Sum. In particular, instead of a star TSS allows for the use of an arbitrary tree structure and moreover one can use arbitrary subsets of natural numbers to specify the constrains on the vertices. The above reduction in combination with the fact that Subset Sum is weakly NP-hard implies that TSS is also weakly NP-hard.
In the remainder of this section we will show that TSS (like Subset Sum) can be solved in polynomial-time if the input is given in unary.
Let be an instance of TSS. We denote by the value of the maximum number occurring in any vertex label. The main idea behind our algorithm for TSS is to apply leaf-to-root dynamic programming. In order to execute our dynamic programming procedure, we will need to solve a special case of TSS which we call Partitioned Subset Sum; this is the problem that will later arise when computing the dynamic programming tables for TSS.
0.98 Partitioned Subset Sum
[5pt] Input: A target set of natural numbers and source sets of natural numbers. Question: Compute the set of all natural numbers such that there are , where for every with , satisfying .
For an instance of Partitioned Subset Sum, we denote by the value of the maximum number occurring in .
An instance of Partitioned Subset Sum can be solved in time .
Here we also use a dynamic programming approach similar to the approach used for the well-known Subset Sum problem . Let be an instance of Partitioned Subset Sum.
We first apply a minor modification to the instance which will allow us to provide a cleaner presentation of the algorithm. Namely, let be sets of integers defined as follows: , and for every , we set . Then the solution for is exactly the set of all natural numbers for which there are with for every with such that .
In order to compute the solution for (employing the above characterization for ), we compute a table having one binary entry for every and with and such that if and only if there are with . Note that the solution for can be obtained from the table as the set of all numbers such that . It hence remains to show how can be computed.
We compute via dynamic programming using the following recurrence relation. We start by setting for every with if and only if . Moreover, for every with and every with , we set if and only if there is an with and a such that and .
The running time of the algorithm is since we require to initialize the table and each of the recursive steps requires time . ∎
With Lemma 2 in hand, we can proceed to a polynomial-time algorithm for TSS.
An instance of TSS can be solved in time .
As mentioned earlier, the main idea behind our algorithm for TSS is to use a dynamic programming algorithm working from the leaves to an arbitrarily chosen root of the tree . Informally, the algorithm computes a set of numbers for each non-root vertex of representing the set of all assignments of the edge from to its parent that can be extended to a valid assignment of all edges in the subtree of rooted at . Once this set has been computed for all children of the root we can construct a simple Partitioned Subset Sum instance (given below) to decide whether has a solution.
More formally, for a vertex of we denote by the subtree of rooted at and by the subtree of consisting of plus the edge between and its parent in ; for the root of it holds that . For every non-root vertex with parent we will compute a set of numbers. Informally, contains all numbers such that the assignment setting to can be extended to an assignment for all the edges in satisfying all constrains given by the vertices in . More formally, if and only if there is an assignment with such that for every it holds that .
As stated above we will compute the sets via a bottom-up dynamic programming algorithm starting at the leaves of and computing for every inner node of using solely the computed sets of each child of in . Note that having computed for every child of the root of we can decide whether has a solution as follows. Let be the children of in ; then has a solution if and only if the solution set for the instance of Partitioned Subset Sum contains .
It remains to show how to compute for the leaves and inner nodes of . If is a leaf then is simply equal to . Moreover, if is an inner node with children , then is equal to the solution set for the instance of Partitioned Subset Sum. This completes the description of the algorithm.
The running time of the algorithm is at most since the time required at a leaf of is at most and the time required at any none-leaf node of with children is at most the time required to solve the instance of Partitioned Subset Sum, which is at most due to Lemma 2. ∎
3.2 Multidimensional Partitioned Subset Sum
Our second generalization of Subset Sum is a multi-dimensional variant of the problem that allows to separate the input set of numbers into several groups, and restricts the solution to take at most vector from each group. For technical reasons, we will only search for solutions of size at most .
0.98 Multidimensional Partitioned Subset Sum (MPSS)
[5pt] Input: , , and a family of sets of vectors over . Question: Compute the set of all vectors such that there are with for every with such that .
It is easy to see that Subset Sum is a special case of MPSS: given an instance of Subset Sum, we can create an equivalent instance of MPSS by setting to a sufficiently large number and simply making each group contain two vectors: the all-zero vector and the vector that is equal to the -th number of the Subset Sum instance in all entries.
An instance of MPSS can be solved in time .
We use a dynamic programming procedure similar to the approach used for the well-known Subset Sum problem . Let with be an instance of MPSS.
We solve by computing a table having one binary entry for every and with and such that if and only if there are with for every with such that . Note that the solution for can be obtained from the table as the set of all vectors such that . It hence remains to show how to compute the table .
We compute via dynamic programming using the following recurrence relation. We start by setting for every if and only if . Moreover, for every with and every , we set if and only if there is a with such that .
The running time of the algorithm is since we require to initialize the table and each of the recursive steps requires time . ∎
3.3 Simple Multidimensional Partitioned Subset Sum
In this section, we are interested in a much more restrictive version of MPSS, where all vectors (apart from the target vector) are only allowed to have at most one non-zero component. Surprisingly, we show that the W-hardness of the previously studied Multidimensional Subset Sum problem [13, 12] carries over to this more restrictive variant using an intricate and involved reduction.
To formalize, we say that a set of vectors in is simple if each vector in has exactly one non-zero component and the values of the non-zero components for any two distinct vectors in are distinct.
0.98 Simple Multidimensional Partitioned Subset Sum (SMPSS)
[5pt] Input: , , and a family of simple sets of vectors in . Parameter: . Question: Are there vectors with for every with such that .
SMPSS is strongly W-hard.
We will employ a parameterized reduction from the Partitioned Clique problem, which is well-known to be W-complete .
0.98 Partitioned Clique
[5pt] Input: An integer , a -partite graph with partition of into sets of equal size. Parameter: Question: Does have a -clique, i.e., a set of vertices such that , with there is an edge ?
We denote by the set of edges of that have one endpoint in and one endpoint in and we assume w.l.o.g. that and for every and with (see the standard parameterized complexity textbook for a justification of these assumptions ).
Given an instance of Partitioned Clique with partition , we construct an equivalent instance of SMPSS in polynomial time, where and . We will also make use of the following notation. For and with and , we denote by the -th smallest number in and we denote by and the numbers and , respectively.
We assign to every vertex of a unique number from a Sidon sequence of length . A Sidon sequence is a sequence of natural numbers such that the sum of each pair of numbers is unique; it can be shown that it is possible to construct such sequences whose maximum value is bounded by a polynomial in its length [1, 10].
To simplify the description of , we will introduce names and notions to identify both components of vectors and sets in . Every vector in has the following components:
For every and with and , the vertex component . We set to:
if and , and
For every and with , the edge component with .
Note that the total number of components is equal to and that for every with , there are vertex components, i.e., the components , which intuitively have the following tasks. The first component, i.e., the component identifies a vertex that should be part of a -clique in . Moreover, every component (including the first component), is also responsible for: (1) Signalling the choice of the chosen vertex to the next component, i.e., the component and (2) Signalling the choice of the vertex to the component that will then verify that there is an edge between the vertex chosen for and the vertex chosen for . This interplay between the components will be achieved through the sets of vectors in that will be defined and explained next.
For every , , and with , , and , the vertex set , where , containing two vectors and defined as follows:
if , then and or
if , then and or
if , then and .
We denote by , , and the sets , , and , respectively.
For every , , and with , , and , the vertex incidence set , which contains the two vectors and such that and .
We denote by , , and the sets , , and , respectively.
For every , with , the edge set , which for every contains the vector such that ; note that is indeed a simple set, because is a Sidon sequence.
Note that altogether there are sets in .
Informally, the two vectors and in represent the choice of whether or not the vertex should be included in a -clique for , i.e., if a solution for chooses then should be part of a -clique and otherwise not. The component , more specifically the value for , now ensures that a solution can choose at most one such vector in . Moreover, the fact that all but one of the vectors need to be chosen by a solution for signals the choice of the vertex for to the next component, i.e., either the component if or the component if . Note that we only need sets for every , because we need to copy the vertex choice for to only components. A similar idea underlies the two vectors and in , i.e., again the component ensures that can be chosen for only one of the sets