Companies assign their employees to different departments, large decision-making bodies split their members into expert committees, and university faculty form research groups: division of labor, and thus group formation, is everywhere. For a given assignment of agents to activities (such as management, product development, or marketing) to be successful, two considerations are particularly important: the agents need to be capable to work on their activity, and they should be willing to cooperate with other members of their group.
Many relevant aspects of this setting are captured by the group activity selection problem (GASP), introduced by Darmann2012. In GASP, players have preferences over pairs of the form (activity, group size). The intuition behind this formulation is that certain tasks are best performed in small or large groups, and agents may differ in their preferences over group sizes; however, they are indifferent about other group members’ identities. In the analysis of GASP, desirable outcomes correspond to stable and/or optimal assignments of players to activities, i.e., assignments that are resistant to player deviations and/or that maximize the total welfare.
The basic model of GASP ignores the relationships among the agents: Do they know each other? Are their working styles and personalities compatible? Typically, we cannot afford to ask each agent about her preferences over all pairs of the form (coalition, activity), as the number of possible coalitions grows quickly with the number of agents. A more practical alternative is to adopt the ideas of Myerson1977 and assume that the relationships among the agents are encoded by a social network, i.e., an undirected graph where nodes correspond to players and edges represent communication links between them; one can then require that each group is connected with respect to this graph.
In this paper we extend the basic model of GASP to take into account the agents’ social network (gGASP). We formulate several notions of stability for this setting, including Nash stability and core stability, and study the complexity of computing stable outcomes in our model. These notions of stability are inspired by the hedonic games literature Banerjee2001,Bogomolnaia2002, and were applied in the GASP setting by Darmann2012 and Darmann2015.
Hedonic games on social networks were recently considered by Igarashi2016a, who showed that if the underlying network is acyclic, stable outcomes are guaranteed to exist and some of the problems known to be computationally hard for the unrestricted setting become polynomial-time solvable. We obtain a similar result for GASP, but only if several groups of agents can simultaneously engage in the same activity, i.e., if the activities are copyable. In contrast, we show that if each activity can be assigned to at most one coalition, a stable outcome may fail to exist, and moreover finding them is computationally hard even if the underlying network is very simple. Specifically, checking the existence of Nash stable, individually stable, or core stable outcomes turns out to be NP-hard even for very restricted classes of graphs, including paths, stars, and graphs with constant-size connected components. This result stands in sharp contrast to the known computational results in the literature; indeed, in the context of of cooperative games, such restricted networks usually enable one to design efficient algorithms for computing stable solutions (see, e.g., Chalkiadakis2016; Elkind2014; Igarashi2016a).
Given these hardness results, we switch to the fixed parameter tractability paradigm. A problem is said to be fixed parameter tractable (FPT) with respect to a parameter if each instance of this problem can be solved in time , and to be slice-wise polynomial (XP) with respect to a parameter if each instance of this problem can be solved in time , respectively; here is a computable function that depends only on . In the context of GASP, a particularly relevant parameter is the number of activities: generally speaking, we expect the number of available activities to be small in many practical applications. For instance, companies can only assign a limited number of projects to their employers; a workshop can usually organise a couple of social events; and schools can offer few facilities to their students. We show that the problem of deciding the existence of Nash stable outcomes for gGASPs on acyclic graphs is in FPT with respect to the number of activities. For general graphs, we obtain a W-hardness result, implying that this problem is unlikely to admit an FPT algorithm. This hardness result holds even for gGASPs on cliques; thus, it is also W-hard to decide the existence of a Nash stable outcome in a standard GASP.
While we find that from an algorithmic point of view, individual stability is very similar to Nash stability, unfortunately, our FPT results do not extend to core stability: we prove that checking the existence of core stable assignments is NP-complete even for gGASPs on stars with two activities; for standard GASP, we can prove that this problem is hard if there are at least four activities. On the other hand, if there is only one activity, a core stable assignment always exists and can be constructed efficiently, for any network structure.
Another parameter we consider is the number of players. This restriction applies to many practical scenarios. For example, in research teams with limited human resources, there are a limited number of researchers who are able to conduct the projects. Somewhat surprisingly, we show that the parameterization by the number of players does not give rise to an FPT algorithm for gGASPs on general networks. Specifically, for all stability notions we consider, it is W-hard to decide the existence of a stable outcome even when the underlying graph is a clique. Again, our hardness result particularly implies the W-hardness of computing stable outcomes in a standard GASP. We summarize our complexity results in Table 1.
|general case||few activities ()||few players ()||copyable activities|
|Nash stability and individual stability|
|cliques||NP-c.||W-h. (Th. 23, 25)||W-h. (Th. 31)||NP-c.|
|acyclic||NP-c. (Th. 10, 13)||FPT (Th. 16,18)||XP (Obs. 29)||P (Th. 9, 8)|
|paths||NP-c. (Th. 10, 13)||FPT (Th. 16,18)||XP (Obs. 29)||P (Th. 9, 8)|
|stars||NP-c. (Th. 11, 13)||FPT (Th. 16,18)||XP (Obs. 29)||P (Th. 9, 8)|
|small comp.||NP-c. (Th. 12, 13)||FPT (Th. 14)||XP||P (Th. 9, 8)|
|cliques||NP-c.||NP-c. for (Th. 28)||W-h. (Th. 30)||NP-c.|
|acyclic||NP-c. (Th. 13)||NP-c. for (Th. 19)||XP (Obs. 29)||P|
|paths||NP-c. (Th. 13)||XP (Prop. 21)||XP (Obs. 29)||P|
|stars||NP-c. (Th. 13)||NP-c. for (Th. 19)||XP (Obs. 29)||P|
|small comp.||NP-c. (Th. 13)||FPT (Th. 15)||XP (Obs. 29)||P|
1.1 Related work
Darmann2012 initiate the study of GASP. In the work of Darmann2012, players are assumed to have approval preferences, and a particular focus is placed on individually rational assignments with the maximum number of participants and Nash stable assignments. They obtained a number of complexity results of computing these outcomes while concerning special cases where players have increasing/degreasing preferences on the size of a group. Subsequently, Darmann2015 investigated a model where players submit ranked ballots. In this work, stability concepts such as core stability and individual stability have been adapted from the hedonic games literature. Further, Lee2015 studied stable invitation problems, which is a subclass of GASP where only one activity is assigned to players. This problem was inspired by settings in which an organizer of an event chooses a stable set of guests who have preferences over the number of participants of the event. We refer the reader to the recent survey by Darmann2017 for the relation between these models.
Recently, the parameterized aspects of GASP have been considered by several authors. Lee2017b studied the complexity of standard GASP, with parameter being the number of groups. They showed that computing a maximum individually rational assignment is in FPT with respect to that parameter; however, they proved that this does not extend to other solution concepts, such as Nash stability and envy-freeness, by obtaining a number of W-hardness results. More recently, Gupta2017 investigated the parameterized complexity of finding Nash stable outcomes in the context of gGASP. In their work, computation of a Nash stable outcome was shown to be in FPT with respect to the combined parameters: the maximum size of a group and the maximum degree in the underlying social network. They also presented an FPT algorithm with respect to the number of activities when the underlying network has a bounded tree-width. This generalizes our FPT result for trees and improves the bound on the running time.
GASP are closely related to hedonic games [Banerjee, Konishi, SönmezBanerjee et al.2001, Bogomolnaia JacksonBogomolnaia Jackson2002]. Much work has been devoted to the complexity study of hedonic games when there is no restriction on coalition formation (see e.g. Woeginger2013 and Aziz2016). In particular, the copyable setting of GASP includes a class of anonymous hedonic games where players’ preferences are only determined by the size of the coalition to which they belong. Ballester2004 showed that computing Nash, core, and individually stable outcomes of the game is NP-hard for anonymous games; this translates into the NP-hardness of these solutions for copyable instances of gGASP when the social network is a clique. Nevertheless, our positive results for copyable activities imply that in anonymous hedonic games, one can compute a stable outcome in polynomial time if the underlying social network is acyclic.
It is worth mentioning that models with graph connectivity constraints have been studied in different settings from ours Talmon2017,Bouveret2017,Warut2017. Talmon2017 considered the multiwinner problem when each winner has to represent a connected voting district. In the work of Talmon2017, a similar hardness result concerning optimal committees for paths was obtained; further, computing an optimal committee on graphs with bounded tree-width was shown to be polynomial-time solvable for non-unique variants of the problem where several connected districts can be represented by the same winner. This restriction corresponds to our copyalbe cases of gGASP. In the fair division literature, Bouveret2017 investigated a fair allocation of indivisible goods under graph connectivity constraints: the graph represents the dependency among the items, and each player’s bundle must be connected in this graph. Similarly, computing envy-free and proportional allocations was proven to be NP-hard even when the graph among the items is a path; however, they showed that computing maximin fair allocations can be done in polynomial time when the graph is acyclic.
2.1 Group Activity Selection Problems
For , let . For where , let . An instance of the Group Activity Selection Problem (GASP) is given by a finite set of players , a finite set of activities , where and is the void activity, and a profile of complete and transitive preference relations over the set of alternatives . Intuitively, corresponds to staying alone and doing nothing; multiple agents can make that choice independently from each other.
Throughout the paper, we assume that we can determine in unit time whether each player prefers to , prefers to , or is indifferent between them. We will write or to indicate that player strictly prefers alternative to alternative ; similarly, we will write or if is indifferent between and . Also, given two sets of alternatives and a player , we write to indicate that is indifferent among all alternatives in as well as among all alternatives in , and prefers each alternative in to each alternative in .
We refer to subsets of players as coalitions. We say that two non-void activities and are equivalent if for every player and every it holds that . A non-void activity is called copyable if contains at least activities that are equivalent to (including itself). We say that player approves an alternative if .
An outcome of a GASP is an assignment of activities to players , i.e., a mapping . Given an assignment and a non-void activity , we denote by the set of players assigned to . Also, if , we denote by the set of players assigned to the same activity as player ; we set if . An assignment for a GASP is individually rational (IR) if for every player with we have . A coalition and an activity strongly block an assignment if and for all . An assignment for a GASP is called core stable (CR) if it is individually rational, and there is no coalition and activity such that and strongly block . Given an assignment of a gGASP, a player is said to have
an NS-deviation to activity if strictly prefers to join the group , i.e., .
an IS-deviation if it is an NS-deviation, and all players in accept it, i.e., for all .
2.2 Graphs and digraphs
An undirected graph, or simply a graph, is a pair , where is a finite set of nodes and is a collection of edges between nodes. Given a set of nodes , the subgraph of induced by is the graph , where . For a graph , a sequence of distinct nodes , , is called a path in if for . A path , , is said to be a cycle in if . A graph is said to be a forest if it contains no cycles. An edge is incident to a node if . A pair of distinct nodes are adjacent if . A subset is said to be connected in if for every pair of distinct nodes there is a path between and in . A forest is said to be a tree if is connected in . A tree is called a star if there exists a central node that is adjacent to every other node. A subset of a graph is said to be a clique if for every pair of distinct nodes , and are adjacent.
A directed graph, or a digraph, is a pair where is a finite set of nodes and is a collection of arcs between nodes. A sequence of distinct nodes , , is called a directed path in if for . Given a digraph , let : the graph is the undirected version of . A digraph is said to be a rooted tree if is a tree and each node has at most one arc entering it. A rooted tree has exactly one node that no arc enters, called the root, and there exists a unique directed path from the root to every node of . Let be a rooted tree. A node is said to be a child of in if , and to be the parent of in if . A node is called a descendant of in if there exists a directed path from to in ; here, is called a predecessor of .
3 Our Model
We now define a group activity selection problem where communication links between the players are represented by an undirected graph.
An instance of the Group Activity Selection Problem with graph structure (gGASP) is given by an instance of a GASP and a set of communication links between players .
A coalition is said to be feasible if is connected in the graph . An outcome of a gGASP is a feasible assignment such that is a feasible coalition for every . We adapt the definitions of stability concepts to our setting as follows. We say that a deviation by a group of players is feasible if the deviating coalition itself is feasible; a deviation by an individual player where player joins activity is feasible if is feasible. We modify the definitions in the previous section by only requiring stability against feasible deviations. Note that an ordinary GASP (without graph structure) is equivalent to a gGASP where the underlying graph is complete.
A key feature of gGASP as well as GASP is that players’ preferences are anonymous, i.e., players do not care about the identities of the group members. We can thus show that checking whether a given feasible assignment is core stable is easy, irrespective of the structure of the social network. The proposition below generalizes Theorem 11 of Darmann2015. Note that in many other contexts, deciding whether a given assignment is core stable is coNP-hard, for example in additively separable hedonic games Sung2007.
Given an instance of gGASP and a feasible assignment for that instance, we can decide in time whether is core stable.
Let and let . By scanning the assignment and the players’ preferences, we can check whether is individually rational. Now, suppose that this is the case. Then, for each and each we can check if there is a deviation by a connected coalition of size that engages in . To this end, we consider the set of all players who strictly prefer to their assignment under and verify whether has a connected component of size at least that contains ; if this is the case, (which is itself connected or empty) could be extended to a connected coalition of size exactly that strongly blocks . If no such deviation exists, is core stable. The existence of a connected component of a given size can be checked in time by using depth first search algorithm. ∎
In this paper, we will be especially interested in gGASPs where is acyclic. This restriction guarantees the existence of stable outcomes in many other cooperative game settings Demange2004. However, this is not the case for gGASP: here, all stable outcomes under consideration may fail to exist, even if is a path or a star.
Example 3 (Stalker game).
Consider a gGASP with , , , where preferences are given as follows:
Thus, player 1 wishes to participate in activity alone, while player 2 (the “stalker”) wants to participate in activity together with player 1.
This instance admits no Nash stable outcomes: If all players engage in the void activity, player 1 wants to start doing activity . If player 1 does activity , then player 2 wants to join her coalition, causing player 1 to deviate to the void activity. ∎
Similarly, a core stable outcome is not guaranteed to exist even for gGASPs on paths and stars, as the following example shows.
Consider a gGASP with , , , where preferences are given as follows:
We will argue that each individually rational feasible assignment admits a strongly blocking feasible coalition and activity. If all players do nothing, then player and activity strongly block . Now, there are only four individually rational feasible assignments where some player is engaged in a non-void activity; each of them is strongly blocked by some coalition and activity as follows (we write to indicate that coalition strongly blocks together with activity ):
, , : ;
, , : ;
, , : ;
, , : ; ∎
Igarashi2016a showed that in the context of hedonic games, acyclicity is sufficient for individually stable outcomes to exist: an individually stable partition of players always exists and can be computed in polynomial time. In contrast, it turns out that for gGASPs this is not the case: an individually stable outcome may fail to exist even if the underlying social network is a path; moreover, this may happen even if there are only three players and their preferences are strict.
Consider a gGASP with , , , where players’ preferences are as follows:
We will argue that each individually rational feasible assignment admits an IS-deviation. Indeed, if then no player is engaged in and hence player can deviate to . Similarly, if then no player is engaged in and hence player can deviate to . There are individually rational feasible assignments where , ; for each of them we can find an IS deviation as follows (we write to indicate that player has an IS-deviation to activity ):
, , : ;
, , : ;
, , : ;
, , : ;
, , : ;
, , : ;
, , : ;
, , : ;
, , : .
Notice that the instance does not admit a core stable outcome either: if such an outcome existed, the assignment would satisfy individual stability due to the fact that all the preferences are strict, a contradiction to what we have seen above. ∎
3.1 Copyable cases
If all activities are copyable, we can effectively treat gGASP as a non-transferable utility game on a graph. In particular, we can invoke a famous result of Demange2004 concerning the stability of non-transferable utility games on trees. Thus, requiring all activities to be copyable allows us to circumvent the non-existence result for the core (Example 4). The argument is constructive.
Theorem 6 (implicit in the work of Demange2004).
For every gGASP where each activity is copyable and is acyclic, a core stable feasible assignment exists and can be found in time polynomial in and .
If the input graph is a forest, we can process each of its connected components separately, so we assume that is a tree. Prior to giving a formal description of the algorithm (Algorithm 1), we outline the basic idea. We choose an arbitrary node as the root and construct a rooted tree by orienting the edges in towards the leaves. We denote by the set of children of and by the set of descendants of (including ) in the rooted tree. For each , we define if , and otherwise. We denote by the subdigraph induced by , i.e., . We define to be the set of connected subsets of for each .
The algorithm has two different phases: the bottom-up and the top-down phase.
Bottom-up phase: In the bottom-up phase, we will determine a guaranteed activity and coalition for every subroot . To this end, we choose a connected subset of that maximizes ’s utility under the constraint that every descendant of in the coalition can agree, i.e., for any descendant of , is at least as preferred as . The utility level of determined for each player can be interpreted as ’s guaranteed utility in the final outcome.
Top-down phase: In the top-down phase, the algorithm builds a feasible assignment , by iteratively choosing a root of the remaining rooted trees and reassigning the activity to its coalition . Since each activity is copyable, we can always find an activity that is equivalent to and has not been used by their predecessors.
This procedure is formalized in Algorithm 1.
For all , the following statements hold:
has no incentive to deviate to an alternative of size , i.e., for all ,
all players in weakly prefer to their guaranteed alternative .
Now, by ii in Lemma 7, it can be easily verified that
Combining this with i, we know that at the assignment , all players weakly prefer their alternatives to engaging alone in unused activities or the void activity. It thus remains to show that no connected coalition together with a non-void activity strongly blocks .
Take any connected subset and activity . Let be the subroot of the coalition so that . First, consider the case when . By (1), it is clear that the coalition and the activity do not strongly block . Second, consider the case when . By line 1 of the algorithm, this means that there is a player such that . Thus, and do not strongly block . We conclude that is core stable.
It remains to analyze the running time of Algorithm 1. Consider the execution of the algorithm for a fixed player . Let . Line 1 checks whether there is a connected coalition of size that can engage in . Similarly to the proof of Proposition 2, we do this by computing the set of all descendants in who weakly prefer to their guaranteed coalition and verify whether the set has a connected component of size at least . This procedure requires at most queries: no descendant of is queried more than once. Summing over all players, we conclude that the number of queries for the bottom-up phase is bounded by . It is immediate that the top-down phase can be done in polynomial time. This completes the proof of the theorem. ∎
Similarly, an individually stable outcome is guaranteed to exist in copyable cases if the underlying graph is acyclic. Moreover, we can adapt the result of Igarashi2016a for hedonic games and obtain an efficient algorithm for computing an individually stable outcome. The proof can be found in the appendix.
Each instance of gGASP where each activity is copyable and is acyclic admits an individually stable feasible assignment; moreover, such an assignment can be found in time polynomial in and .
The stalker game in Example 3 does not admit a Nash stable outcome even if we make all activities copyable. Thus, in contrast to core and individual stability, there is no existence guarantee for Nash stability even if activities are copyable. However, with copyable activities, we can still check for the existence of a Nash stable outcome in polynomial time if the social network is acyclic.
Given an instance of gGASP where each activity is copyable and the graph is acyclic, one can decide whether it admits a Nash stable outcome in time polynomial in and .
Again, we assume that is a tree. We choose an arbitrary node as the root and construct a rooted tree by orienting the edges in towards the leaves. We denote by the set of children of ; and we denote by the set of the descendants of the first -th children of (including ) in the rooted tree. Then, for each player , each , each alternative , and we set to true if there exists a feasible assignment such that , , each player in likes at least as much as any alternative she can deviate to (including the void activity), and no player in has an NS feasible deviation. Otherwise, we set to false. By construction, there exists a Nash stable feasible assignment if and only if is true for some alternative , where is the root of the rooted tree.
For each player , each , each alternative , and each , we initialize to true if and weakly prefers to any alternative of size , and we set to false otherwise. Then, for from the bottom to the root, we iterate through all the children of and update step-by-step; more precisely, for each child of and for , we set to true if
and there exists an such that both and are true, or
is true, and players and can be separated from each other, i.e., there exists such that (i) is true, (ii) or , and (iii) or .
In cases where is true for some alternative , a Nash stable feasible assignment can be found using dynamic programming.
This can be done in polynomial time since the size of the dynamic programming table is at most and each entry can be filled in time . This completes the proof of the theorem. ∎
We note that these tractability results for copyable cases do not extend to arbitrary graphs: Ballester2004 showed that it is NP-complete to determine the existence of core or individually or Nash stable outcomes for anonymous hedonic games, which can be considered as a subclass of gGASPs whose graph is a clique.
4 NP-completeness results
We now move on to the case where each activity can be used at most once. For other types of cooperative games, many desirable outcomes can be computed in polynomial time if the underlying network structure is simple Chalkiadakis2016,Elkind2014,Igarashi2016a. In particular, Igarashi2016a showed it is easy to compute stable partitions for hedonic games on trees with polynomially bounded number of connected coalitions. However, computing stable solutions of gGASP turns out to be NP-complete even if the underlying network is a path, a star, or a graph with constant-size connected components. For each family of graphs, we will reduce from a different combinatorial problem that is structurally similar to our problem.
Our proof for paths is by reduction from a restricted version of the NP-complete problem Rainbow Matching. Given a graph and a set of colors , a proper edge coloring is a mapping where for all edges such that and . Without loss of generality, we assume that is surjective. A properly edge-colored graph is a graph together with a set of colors and a proper edge coloring. A matching in an edge-colored graph is called a rainbow matching if all edges of have different colors. Given a properly edge-colored graph together with an integer , Rainbow Matching asks whether admits a rainbow matching with at least edges. Le2014 show that Rainbow Matching remains NP-complete even for properly edge-colored paths.
Given an instance of gGASP whose underlying graph is a path, it is NP-complete to determine whether it has a Nash stable feasible assignment.
Clearly, our problems are contained in NP since we can easily check whether a given assignment is Nash stable. The hardness proof proceeds by a reduction from Path Rainbow Matching.
Construction. Given an instance of Path Rainbow Matching where , we create a vertex player for each and an edge player for each . To create the social network, we start with and place each edge player in the middle of the respective edge, i.e., we let and . To the right of the graph , we attach a path consisting of “garbage collectors” and copies of the stalker game where and for each . See Figure 1.
We introduce a color activity for each color . Each vertex player approves color activities of its adjacent edges with size ; each edge player approves the color activity of its color with size ; each garbage collector approves any color activity with size ; finally, for players in , , player approves its color activity with size , whereas player approves with size .
Correctness. We show that has a rainbow matching of size at least if and only if there exists a Nash stable feasible assignment.
Suppose that there exists a rainbow matching of size . We construct a feasible assignment where for each we set , each garbage collector , , is arbitrarily assigned to one of the remaining color activities, and the remaining players are assigned to the void activity. The assignment is Nash stable, since every garbage collector as well as every edge or vertex player assigned to a color activity are allocated their top alternative, and no remaining player has an NS feasible deviation.
Conversely, suppose that there is a Nash stable feasible assignment . Let . We will show that is a rainbow matching of size at least . To see this, notice that cannot allocate a color activity to a member of , since otherwise no feasible assignment would be Nash stable. Further, at most color activities are allocated to the garbage collectors, which means that at least color activities should be assigned to vertex and edge players. The only individually rational way to do this is to select triples of the form where and assign to them their color activity . Thus, is a rainbow matching of size at least . ∎
For gGASPs on stars we provide a reduction from the NP-complete problem Minimum Maximal Matching (MMM). Given a graph and a positive integer , MMM asks whether admits a maximal matching with at most edges. The problem remains NP-complete for bipartite graphs Demange2008.
Given an instance of gGASP whose underlying graph is a star, it is NP-complete to determine whether it has a Nash stable feasible assignment.
Clearly, our problem is in NP. To prove NP-hardness, we reduce from MMM on bipartite graphs.
Construction. Given a bipartite graph with vertex bipartition and an integer , we create a star with center and leaves: one leaf for each vertex player plus one stalker . See Figure 2.
We introduce an activity for each , and two additional activities and . A player approves for each activity such that as well as and prefers the former to the latter. That is, for every with ; is indifferent among the activities associated with its neighbors in the graph, that is, for all such that and . The center player approves both and , and prefers the former to the latter, i.e., . Finally, the stalker only approves .
Correctness. We now show that admits a maximal matching with at most edges if and only if our instance of gGASP admits a Nash stable assignment.
Suppose that admits a maximal matching with at most edges. We construct a feasible assignment by setting for each , assigning vertex players and the center to , and assigning the remaining players to the void activity. Clearly, the center has no incentive to deviate and no vertex player in a singleton coalition wants to deviate to the coalition of the center. Further, no vertex has an NS-deviation to an unused activity , since if admits such a deviation, this would mean that forms a matching, contradicting maximality of . Finally, the stalker player does not deviate since the center does not engage in . Hence, is Nash stable.
Conversely, suppose that there exists a Nash stable feasible assignment and let . We will show that is a maximal matching of size at most . By Nash stability, the stalker player should not have an incentive to deviate, and hence the center player and vertex players are assigned to activity . It follows that vertex players are not assigned to , and therefore . Moreover, is a matching since each vertex player is assigned to at most one activity, and by individual rationality each activity can be assigned to at most one player. Now suppose towards a contradiction that is not maximal, i.e., there exists an edge such that is a matching. This would mean that in no player is assigned to , and is assigned to the void activity; hence, has an NS-deviation to , contradicting the Nash stability of . ∎
In the analysis of cooperative games on social networks one can usually assume that the social network is connected: if this is not the case, each connected component can be processed separately. This is also the case for gGASP as long as all activities are copyable. However, if each activity can only be used by a single group, different connected components are no longer independent, as they have to choose from the same pool of activities. Indeed, we will now show that the problem of finding stable outcomes remains NP-hard even if the size of each connected component is at most four. Our hardness proof for this problem proceeds by reduction from a restricted version of 3Sat. Specifically, we consider (3,B2)-Sat: in this version of 3Sat each clause contains exactly literals, and each variable occurs exactly twice positively and twice negatively. This problem is known to be NP-complete Berman2003.
Given an instance of gGASP whose underlying graph has connected components whose size is bounded by , it is NP-complete to determine whether it has a Nash stable feasible assignment.
Our problem is in NP. We reduce from (3,B2)-Sat.
Construction. Consider a formula with variable set and clause set , where for each variable we write and for the two positive occurrences of , and and for the two negative occurrences of . For each , we introduce four players , and . For each clause , we introduce one stalker and three other players , and . The network consists of one component for each clause—a star with center and leaves , , and —and of two components for each variable consisting of a single edge each: and . See Figure 3. Thus, the size of each component of this graph is at most .
For each we introduce one variable activity , two positive literal activities and , and two negative literal activities and , which correspond to the four occurrences of ; also, we introduce two further activities and . Finally, we introduce an activity for each clause . Thus,
For each the preferences of the positive literal players and are given as follows:
If one of the positive literal players and is engaged in the void activity and the other is engaged alone in a non-void activity, this would cause the former player to deviate to another activity; thus, in a Nash stable assignment, none of the activities and can be assigned to positive literal players. Similarly, for each the preferences of the negative literal players and are given as follows:
As argued above, Nash stable assignments cannot allocate activities and to negative literal players. Hence, if there exists a Nash stable assignment, there are only two possible cases:
both players and are assigned to , and players and are assigned to and , respectively;
both players and are assigned to , and players and are assigned to and , respectively.
For players in where , , and are the literals in a clause , the preferences are given by
That is, players , , and prefer to engage alone in their approved literal activity, whereas wants to join one of the adjacent leaves whenever and that leaf is assigned a literal activity; however, the leaf would then prefer to switch to the void activity. This means that if there exists a Nash stable outcome, at least one of the literal activities must be used outside of , and some leaf and the stalker must be assigned to activity .
Correctness. We will show that is satisfiable if and only if there exists a Nash stable outcome.
Suppose that there exists a truth assignment that satisfies . First, for each variable that is set to true, we assign positive literal activities and to the positive literal players and , respectively, and assign to the negative literal players and . For each variable that is set to false, we assign negative literal activities and to the negative literal players and , respectively, and assign to the positive literal players and . Note that this procedure uses at least one of the literal activities , and of each clause , since the given truth assignment satisfies . Then, for each clause , we select a player whose approved activity has been assigned to some literal player, and assign and the stalker to , and the rest of the clause players to their approved literal activity if it is not used yet, and to the void activity otherwise. It is easy to see that the resulting assignment is Nash stable.
Conversely, suppose that there exists a Nash stable feasible assignment . By Nash stability, for each variable , either a pair of positive literal players and or a pair of negative literal players and should be assigned to the corresponding pair of literal activities; in addition, for each clause , the stalker and one of the players , , and should engage in the activity , thereby implying that the approved literal activity of the respective leaf should be assigned to some literal players. Then, take the truth assignment that sets the variable to true if its positive literal players and are assigned to positive literal activities and ; otherwise, is set to false. This assignment can be easily seen to satisfy . ∎
The hardness reductions for the core and individual stability are similar to the respective reductions for Nash stability; essentially, we have to replace copies of the stalker game from Example 3 with copies of games with an empty core (Example 4) or with no individually stable outcome (Example 5).
Given an instance of gGASP whose underlying graph is a path, a star, or has connected components whose size is bounded by , it is NP-complete to determine whether it has a core stable feasible assignment, and it is NP-complete to determine whether it has an individually stable feasible assignment.
Clearly, our problems are contained in NP for any social network due to Proposition 2 and the fact that we can easily check whether a given assignment is individually stable. The hardness proofs can be found in the appendix. ∎
5 Few Activities
In the instances of gGASP that are created in our hardness proofs, the number of activities is unbounded. In reality, however, there are many settings where this parameter can be very small. For instance, when organizing social events for a workshop, the number of activities one could organize is often restricted, due to a limited number of facilities for sports competition or a limited number of buses for a bus trip. It is thus natural to wonder what can be said when there are few activities to be assigned. It turns out that for each of the restricted families of graphs considered in the previous section, finding some stable assignments in gGASP is fixed parameter tractable with respect to the number of activities. The basic idea behind each of the algorithms we present is that we fix a set of activities that will be assigned to the players, and for each possible subset of activities we check whether there exists a stable assignment using the activities from that subset only.
5.1 Small components
We first present an algorithm for small components based on dynamic programming, allowing us to build up the set