Computational Complexity of Hedonic Games on Sparse Graphs
CComputational Complexity of Hedonic Gameson Sparse Graphs ∗ Tesshu Hanaka , Hironori Kiya , Yasuhide Maei , and Hirotaka Ono Chuo University, Tokyo, Japan Nagoya University, Nagoya, Japan
Abstract
The additively separable hedonic game (ASHG) is a model of coalition formation games ongraphs. In this paper, we intensively and extensively investigate the computational complexityof finding several desirable solutions, such as a Nash stable solution, a maximum utilitariansolution, and a maximum egalitarian solution in ASHGs on sparse graphs including bounded-degree graphs, bounded-treewidth graphs, and near-planar graphs. For example, we showthat finding a maximum egalitarian solution is weakly NP-hard even on graphs of treewidth2, whereas it can be solvable in polynomial time on trees. Moreover, we give a pseudo fixedparameter algorithm when parameterized by treewidth.
In this paper, we investigate the computational complexity of additively separable hedonic gameson sparse graphs from the viewpoint of several solution concepts.Given the set of agents, the coalition formation game is a model of finding a partition of theset of agents into subsets under a certain criterion, where each of the subsets is called a coalition .Such a partition is called a coalition structure . The hedonic game is a variant of coalition formationgames, where each agent has the utility associated with his/her joining coalition. In the typicalsetting, if an agent belongs to a coalition where his/her favorite agents also belong to, his/herutility is high and he/she feels comfortable. Contrarily, if he/she does not like many members inthe coalition, his/her utility must be low; since he/she feels uncomfortable, he/she would like tomove to another coalition. Although the model of hedonic games is very simple, it is useful torepresent many practical situations, such as formation of research team [2], formation of coalitiongovernment [19], clustering in social networks [3,20,21], multi-agent distributed task assignment [23],and so on.The additively separable hedonic game (ASHG) is a class of hedonic games, where the utilityforms an additively separable function. In ASHG, an agent has a certain valuation for each of theagents, which represents his/her preference. The valuation could be positive, negative or 0. If thevaluation of agent u for agent v is positive, agent u prefers agent v , and if it is negative, agent u does not prefer agent v . If it is 0, agent u has no interest for agent v . The utility of agent u for u ’s joining coalition C is defined by the sum of valuations of agent u for other agents in C . Thissetting is considered not very but reasonably general. Due to this definition, it can be also definedby an edge-weighted directed graph, where the weight of edge ( u, v ) represents the valuation of u to v . If a valuation is 0, we can remove the corresponding edge. Note that the undirected setting ∗ This work was partially supported by JSPS KAKENHI Grant Numbers JP17K19960, 17H01698, 19K21537. a r X i v : . [ c s . CC ] O c t s possible, and in the case the valuations are symmetric; the valuation of agent u for agent v isalways equal to the one of agent v for agent u .In the study of hedonic games, several solution concepts are considered important and wellinvestigated. One of the most natural solution concepts is maximum utilitarian , which is so-calleda global optimal solution; it is a coalition structure that maximizes the total sum of the utilitiesof all the agents. The total sum of the utilities is also called social welfare . Another concept ofa global optimal solution is maximum egalitarian . It maximizes the minimum utility of an agentamong all the agents. That is, it makes the unhappiest agent as happy as possible. Nash-stability,envy-free and max envy-free are more personalized concepts of the solutions. A coalition structureis called Nash-stable if no agent has an incentive to move to another coalition from the currentjoining coalition. Such an incentive to move to another coalition is also called a deviation . Agent u feels envious of v if u can increase his/her utility by exchanging the coalitions of u and v . Acoalition structure is envy-free if any agent does not envy any other agent. Furthermore, the bestone among the envy-free coalition structures is also meaningful; it is an envy-free coalition structurewith maximum social welfare. Some other concepts are also considered, though we focus on theseconcepts in this paper.Of course, it is not trivial to find a coalition structure satisfying above mentioned solutionconcepts. Ballester studies the computational complexity for finding coalition structures of severalconcepts including the above mentioned ones [5]. More precisely, he shows that determining whetherthere is a Nash stable, an individually stable, and a core stable coalition structure is NP-complete.In [24], Sung and Dimitrov show that the same results hold for ASHG. Aziz et al. investigate thecomputational complexity for many concepts including the above five solution concepts [4]. Insummary, ASHG is unfortunately NP-hard for the above five solution concepts. These hardnessresults are however proven without any assumption about graph structures. For example, some ofthe proofs suppose that graphs are weighted complete graphs. This might be a problem, becausegraphs appearing in ASHGs for practical applications are so-called social networks; they are farfrom weighted complete graphs and known to be rather sparse or tree-like [1, 11]. What if werestrict the input graphs of ASHG to sparse graphs? This is the motivation of this research.In this paper, we investigate the computational complexity of ASHG on sparse graphs fromthe above five solution concepts. The sparsity that we consider in this paper is as follows: graphswith bounded degree, graphs with bounded treewidth and near-planar graphs. The degree is avery natural parameter that characterizes the sparsity of graphs. In social networks, the degreerepresents the number of friends, which is usually much smaller than the size of network. The treewidth is a parameter that represents how tree-like a graph is. As Adcock, Sullivan and Mahoneypointed out in [1], many large social and information networks have tree-like structures, whichimplies the significance to investigate the computational complexity of ASHG on graphs withbounded treewidth. Near-planar graphs here are p -apex graphs. A graph G is said to be p -apex if G becomes planar after deleting p vertices or fewer vertices. Near-planarity is less important than theformer two in the context of social networks, though it also has many practical applications such astransportation networks. Note that all of these sparsity concepts are represented by parameters, i.e.,treewidth, maximum degree and p -apex. In that sense, we consider the parameterized complexityof ASHG of several solution concepts in this paper.This is not the first work that focuses on the parameterized complexity of ASHG. Peters presentsthat Nash-stable, Maximum Utilitarian, Maximum Egalitarian and Envy-free coalition structurescan be computed in 2 tw∆ n O (1) time, where tw is the treewidth and ∆ is the maximum degree ofan input graph [22]. In other word, it is fixed parameter tractable (FPT) with respect to treewidthand maximum degree. This implies that if both of the treewidth and the maximum degree aresmall, we can efficiently find desirable coalition structures. This result raises the following naturalquestion: is finding these desirable coalition structures still FPT when parameterized by either thetreewidth or the maximum degree?This paper answers the question from various viewpoints. Different from the case parameterizedby treewidth and maximum degree, the time complexity varies depending on the solution concepts.2able 1: Complexity of ASHGsConcept Time complexity to compute ReferenceNash stable NP-hard [24]PLS-complete (symm) [14] PLS-complete (symm, ∆ = 7 ) [Th.1]tw O (tw) n (symm, FPT by treewidth) [Cor.1]Max Utilitarian strongly NP-hard (symm) [4] strongly NP-hard (symm, 3-apex) [Th.2]tw O (tw) n (FPT by treewidth) [Th.3]Max Egalitarian strongly NP-hard [4] weakly NP-hard (symm, 2-apex, vc = 4 ) [Th.6] weakly NP-hard (symm, planar, pw = 4 , tw = 2 ) [Th.5] strongly NP-hard (symm) [Th.7] linear (symm, tree) [Th.8] P (tree) [Th.9](tw W ) O (tw) n (pseudo FPT by treewidth) [Th.10]Envy-free trivial [4]Max Envy-free weakly NP-hard (symm, planar, vc = 2 , tw = 2 ) [Th.4] strongly NP-hard (symm) [Th.7] linear (symm, tree) [Th.8]For example, we can compute a maximum utilitarian coalition structure in tw O (tw) n time, whereascomputing a maximum egalitarian coalition structure is weakly NP-hard even for graphs withtreewidth at most 2. Some other results of ours are summarized in Table 1.1. For more details, seeSection 1.1. Also some related results are summarized in Section 1.2. We first study (symmetric)
Nash stable on bounded degree graphs. We show that the problem isPLS-complete even on graphs with maximum degree 7. PLS is a complexity class of a pair of anoptimization problem and a local search for it. It is originally introduced to capture the difficultyof finding a locally optimal solution of an optimization problem. In the context of hedonic games, adeviation corresponds to an improvement in local search, and thus PLS or PLS-completeness isalso used to model the difficulty of finding a stable solution.We next show that
Max Utilitarian is strongly NP-hard on 3-apex graphs, whereas it canbe solved in time tw O (tw) n , and hence it is FPT when parameterized by treewidth tw. For MaxEnvy-free , we show that the problem is weakly NP-hard on series-parallel graphs with vertexcover number at most 2 whereas finding an envy-free partition is trivial [4].Finally, we investigate the computational complexity of
Max Egalitarian . We show that
Max Egalitarian is weakly NP-hard on 2-apex graphs with vertex cover number at most 4 andplaner graphs with pathwidth at most 4 and treewidth at most 2. Moreover, we show that
MaxEgalitarian and
Max Envy-free are strongly NP-hard even if the preferences are symmetric. Incontrast, an egalitarian and envy-free partition with maximum social welfare can be found in lineartime on trees if the preferences are symmetric. Moreover,
Max Egalitarian can be computed inpolynomial time even if the preferences are asymmetric. In the end of this paper, we give a pseudoFPT algorithm when parameterized by treewidth.3 .2 Related work
The coalition formation game is first introduced by Dreze and Greenber [10] in the field ofEconomics. Based on the concept of coalition formation games, Banerjee, Konishi and S¨onmez [6]and Bogomolnaia and Jackson [7] study some stability and core concepts on hedonic games. For thecomputational complexity on hedonic games, Ballester shows that finding several coalition structuresincluding Nash stable, core stable, and individually stable coalition structures is NP-complete [5].For ASHGs, Aziz et al. investigate the computational complexity of finding several desirablecoalition structures [4]. Gairing and Savani [14] show that computing a Nash stable coalitionstructure is PLS-complete in symmetric AGHGs whereas Bogomolnaia and Jackson [7] prove thata Nash stable coalition structure always exists. In [22], Peters designs parameterized algorithms forcomputing some coalition structures on hedonic games with respect to treewidth and maximumdegree.
In this paper, we use the standard graph notations. For G = ( V, E ), we define n = | V | and m = | E | . For V (cid:48) ⊆ V , we denote by G [ V (cid:48) ] the subgraph of G induced by V (cid:48) . We denote the closedneighbourhood and the open neighbourhood of a vertex v by N [ v ] and N ( v ), respectively. Thedegree of v is denoted by d ( v ). Moreover, the maximum degree of G is denoted by ∆( G ). Forsimplicity, we sometimes omit the subscript G . An additively separable hedonic game (ASHG) is defined on a directed edge-weighted graph G =( V, E, w ). Each vertex v ∈ V is called an agent . The weight of an edge e = ( u, v ), denoted by w e or w uv , represents the valuation of u to v . An ASHG is said to be symmetric if w uv = w vu holds forany pair of u and v . Any symmetric ASHG can be defined on an undirected edge-weighted graph.We denote an undirected edge by { u, v } . Note that any edge of weight 0 is removed from a graph.Let P be a partition of V . Then C ∈ P is called a coalition . We denote by C u ∈ P the coalition towhich an agent u ∈ V belongs under P , and by E ( C u ) the set of edges { ( u, v ) ∪ ( v, u ) ∈ E | v ∈ C u } .In ASHGs, the utility of an agent u under P is defined as u P ( u ) = (cid:80) v ∈ N ( u ) ∩ C u w uv , which is thesum of weights of edges from u to other agents in the same coalition. Also, the social welfare of P is defined as the sum of utilities of all agents under P . Note that the social welfare equals toexactly twice the sum of weights of edges in coalitions.Next, we define several concepts of desirable solution in ASHGs. Definition 1 (Nash-stable) . A partition P is Nash-stable if there exists no agent u and coalition C (cid:48) (cid:54) = C u containing u , possibly empty, such that (cid:88) v ∈ N ( u ) ∩ C u w uv < (cid:88) v ∈ N ( u ) ∩ C (cid:48) w uv . As an important fact, in any symmetric ASHG, a partition with maximum social welfare isNash-stable by using the potential function argument [7].
Proposition 1.
In any symmetric ASHG, a partition with maximum social welfare is Nash-stable.
Thus, if we can compute a partition with maximum social welfare in a symmetric ASHG, thenwe also obtain a Nash-stable partition.
Definition 2 (Envy-free) . We say an agent u ∈ C u envies u ∈ C u if the following inequalityholds: (cid:88) v ∈ N ( u ) ∩ C u w u v < (cid:88) v ∈ N ( u ) ∩ ( C u \{ u }∪{ u } ) w u v . hat is, u envies u if the utility of u increases by replacing u by u . A partition P is envy-free if any agent does not envy an agent. Nash-stable , Envy-free , Max Envy-free , Max Utilitarian , and
Max Egalitarian are the following problems: Given a weighted graph G = ( V, E, w ), find a Nash-stable partition, anenvy-free partition, an envy-free partition with maximum social welfare, a maximum utilitarianpartition, and a maximum egalitarian partition, respectively. A planar graph is a graph that can be drawn on the plane in such a way that its edges intersect onlyat their endpoints. For p ≥
1, a p -apex graph is a graph that can be planar by removing p verticesor fewer vertices from it. Note that a planar graph is a p -apex graph for any p ≥
1. A graph G iscalled series-parallel if every 2-connected component of G can be constructed by applying seriesoperation and parallel operation compositions recursively: The series operation entails subdividingan edge by a new vertex (replacing an edge by two edges in series). The parallel operation entailsreplacing an edge by two edges in parallel. It is well-known that a series-parallel graph is planar,and the class of series-parallel graph is equivalent to graphs with treewidth 2. For the basic definitions of parameterized complexity, such as the classes FPT and XP, refer to [8].
Definition 3 (Tree decomposition) . A tree decomposition of an undirected graph G = ( V, E ) isdefined as a pair (cid:104)X , T (cid:105) , where X = { X , X , . . . , X N ⊆ V } , and T is a tree whose nodes are labeledby I ∈ { , , . . . , N } , such that (cid:83) i ∈ I X i = V , For all { u, v } ∈ E , there exists an X i such that { u, v } ⊆ X i , For all i, j, k ∈ I , if j lies on the path from i to k in T , then X i ∩ X k ⊆ X j .Here, X i is called a bag . The width of a tree decomposition is defined as min i ∈ I | X i | − , thatis, minimum size of a bag minus one. Furthermore, the treewidth of G , denoted by tw( G ) , isminimum possible width of a tree decomposition of G . A tree decomposition (cid:104)X , T (cid:105) is called a pathdecomposition if T is a path. The pathwidth of G , denoted by pw( G ) , is minimum possible widthof a path decomposition of G . We introduce a special type of tree decomposition, a nice tree decomposition , introduced byKloks [18]. It is a special binary tree decomposition which has four types of nodes, named leaf , introduce vertex , forget and join . In [8, 9], Cygan et al. added a fifth type, the introduce edge node. Definition 4 (Nice tree decomposition) . A tree decomposition (cid:104)X , T (cid:105) is called a nice tree decom-position if it satisfies the following: T is rooted at a designated node r ∈ I satisfying | X r | = 0 , called the root node , Each node of the tree T has at most two children, Each node in T has one of the following five types: • A leaf node i which has no children and its bag X i satisfies | X i | = 0 , • An introduce vertex node i has one child j with X i = X j ∪ { v } for a vertex v ∈ V , • An introduce edge node i has one child j and labeled with an edge ( u, v ) ∈ E where u, v ∈ X i = X j , A forget node i has one child j and satisfies X i = X j \ { v } for a vertex v ∈ V , • A join node i has two children nodes j , j and satisfies X i = X j = X j . Any tree decomposition of width ω can be transformed into a nice tree decomposition of ω with O ( n ) nodes in linear time [8].A vertex cover S is the set of vertices such that every edge has at least one vertex in S . Thesize of minimum vertex cover in G is called vertex cover number , denoted by vc( G ). The followingproposition is a well-known relationship between treewidth, pathwidth, and vertex cover number. Proposition 2.
For any graph G , it holds that tw( G ) ≤ pw( G ) ≤ vc( G ) . In [13], Fomin and Thilikos proved that for any planar graph G , tw( G ) ≤ . √ n − p -apex graphs. Proposition 3.
Let p be some constant. For any p -apex graph G , tw( G ) ≤ . √ n + p − .Moreover, a tree decomposition of such width can be computed in polynomial time.Proof. In [13], Fomin and Thilikos proved that for any planar graph G , tw( G ) ≤ . √ n − p vertices such that G becomes planar by deleting them. Since we can check whether a graph isplanar in time O ( n ) [17], this can be done in polynomial time by using the brute forth. Now,we have a planar graph G (cid:48) obtained from G by deleting such p vertices. Then we compute a treedecomposition of width tw( G (cid:48) ) ≤ . √ n − p vertices in V ( G ) \ V ( G (cid:48) ) to each bag of a tree decomposition. The width of such a tree decomposition of G isclearly at most 3 . √ n + p − O ( √ n log n ) -time algorithm for any p -apex graph if thereis a tw O (tw) -time or even an n O (tw) -time algorithm. Therefore, Max Utilitarian and
MaxEgalitarian with restricted weights can be solved in time 2 O ( √ n log n ) on p -apex graphs fromTheorems 3 and 10. In this subsection, we list problems used for the proofs in this paper. • Max k -Cut : Given an undirected and edge-weighted graph G = ( V, E, w ), find a partition( V , V , . . . , V k ) that maximizes (cid:80) u ∈ V i ,u ∈ V j ,V i (cid:54) = V j w u u . Max 2-Cut is known as
Max-Cut . • k -Coloring : Given an undirected graph G = ( V, E ), determine whether there is a coloring c : V → { , . . . , k } such that c ( u ) (cid:54) = c ( v ) for every ( u, v ) ∈ E . • Partition : Given a finite set of integers A = { a , a , . . . , a n } and W = (cid:80) ni =1 a i , determinewhether there is partition ( A , A ) of A where A ∪ A = A and (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/ • -Partition : Given a finite set of integers A = { a , . . . , a n } , determine whether there ispartition ( A , . . . , A n ) such that | A i | = 3 and (cid:80) a ∈ A i a = B for each i where B = (cid:80) a ∈ A a/n . Any symmetric ASHG always has a Nash-stable partition by Proposition 1. However, findinga Nash-stable solution is PLS-complete [14]. In this section, we prove that
Nash-Stable isPLS-complete even on bounded degree graphs. 6 ⋯ G
Symmetric
Nash-stable is PLS-complete even on graphs with maximum degree ∆ = 7 .Proof.
We give a reduction from
Local Max-Cut with flip.
Local Max-Cut is a local searchproblem of
Max-Cut . In the flip neighborhood, two solutions are neighbors if one can be obtainedfrom the other by moving one element to the other set.
Local Max-Cut with flip is PLS-completeon graphs with maximum degree ∆ = 5 [12].Given an edge weighted graph G = ( V, E, w ), we construct G (cid:48) = ( V (cid:48) , E (cid:48) , w (cid:48) ) as follows. Let W = (cid:80) e ∈ E | w e | + 1 and M = nW + 1. First we set w (cid:48) e = − w e for every e ∈ E . Then we add P A = { p A , . . . , p An +1 } and P B = { p B , . . . , p Bn +1 } that form paths of length n , respectively. For1 ≤ i ≤ n , we define w (cid:48) p Ai p Ai +1 = w (cid:48) p Bi p Bi +1 = i ( W + 1) as the weight of { p Ai , p Ai +1 } and { p Bi , p Bi +1 } . Weconnect each p Ai and p Bi to v i ∈ V by an edge of weight W , respectively. Finally, we connect p An +1 and p Bn +1 by an edge of weight − M . Note that P A ∪ P B forms a path of length 2 n + 1. We canobserve that the degree of a vertex in V is at most 7 and in P A ∪ P B is at most 3.In any Nash-stable partition in G (cid:48) , p An +1 and p Bn +1 must be in different coalitions. If not so, theutility of p An +1 is at most − M + n ( W + 1) W <
0, and it has an incentive to deviate to a singletonbecause the utility in a singleton is 0. Moreover, in any Nash-stable partition of G (cid:48) , every vertexin P A always belong to the same coalition. Otherwise, there is an agent p Ai with utility at most( i − W + 1) + W = i ( W + 1) −
1. Then the utility of p Ai can be increased to at least i ( W + 1) bydeviating to the coalition to which p Ai +1 belongs. Similarly, every vertex in P B always belong to thesame coalition in any Nash-stable partition of G (cid:48) . Therefore, in any Nash-stable partition, thereexist a coalition C A containing all vertices included in P A and a coalition C B containing all verticesincluded in P B . Furthermore, if a vertex in V does not belong to neither C A nor C B , the utility isat most 0. Since the utility of the vertex in C A or C B is more than 0, it must belong to either C A or C B . Thus, any Nash-stable partition P ∗ in G (cid:48) has exactly two coalitions C A containing P A and C B containing P B .Here, we can observe that any Nash-stable partition in G (cid:48) is a local optimal solution of LocalMax-Cut in G . If not so, there is a vertex v ∈ V that can increase the weight of a cut in G byflipping v from the current set to the other. In G (cid:48) , such a vertex deviates to the other coalitionbecause the utility increases. Conversely, we are given a local optimal cut ( C , C ) of LocalMax-Cut . Then a partition ( C ∪ P A , C ∪ P B ) in G (cid:48) is a Nash-stable partition. This is becauseany vertex in P A and P B does not deviate from the current coalition. Moreover, suppose that thereis a vertex v in C ∪ C = V deviates to the other coalition to increase the utility. This implies thatthere is a vertex v in G that increases the weight by flipping v . This contradicts the optimality of( C , C ). 7 Max Utilitarian
Theorem 2.
Max Utilitarian is strongly NP-hard on 3-apex graphs even if the preferences aresymmetric.Proof.
Let G = ( V, E ) be an unweighted graph where | V | = n and | E | = m . We first confirm that Max -Cut is NP-hard for planar graphs. This can be done by a reduction from 3 -coloring onplanar graphs which is NP-complete [16]. If an unweighted graph G is 3-colorable, it is clear that G has a 3-cut of size m because for every edge, its endpoints have different colors. On the otherhand, if an unweighted graph G has a 3-cut of size m , it is obviously 3-colorable.Then we give a reduction from Max -Cut to Max Utilitarian . Given an unweighted planargraph G = ( V, E ) of an instance of
Max -Cut , we add three super vertices S = { s , s , s } suchthat and each s i is connected to all vertices in G by three edges of weight m . Moreover, we connect s , s , s to each other by edges of weight − mn , and hence S forms a clique. Finally, for each edge e ∈ E , we define the weight w e = −
1. Let G (cid:48) be the constructed graph.In the following, we show that there is a 3-cut of size k in G if and only if there is a partition P with social welfare 2(3 mn − m + k ). Given a 3-cut ( V , V , V ) of size k in G , we construct apartition P = { V ∪ { s } , V ∪ { s } , V ∪ { s }} . Since the number of edges in E in coalitions is m − k , any edge in G [ S ] is not contained in coalitions, and every edge between s ∈ S and v ∈ V iscontained in coalitions, the social welfare of P is 2(3 mn − m + k ).Conversely, we are given a partition P of social welfare 2(3 mn − m + k ). If a coalition containsat least two vertices in S , the social welfare is at most 6 m − mn <
0. Thus, each s i does notbelong to the same coalition. If there is v ∈ V that does not belong to a coalition containing s ∈ S , then the social welfare is at most 2 · m ( n −
1) = 6 mn − m < mn − m + k ). Hence, V must be partitioned into three sets adjacent to either s , s or s . Since the social welfare of P is2(3 mn − m + k ), every edge between s ∈ S and v ∈ V is contained in a coalition, and the weight ofan edge in E is −
1, the number of edges in E in coalitions is m − k . This implies that there is a3-cut of size k . Theorem 3.
Given a tree decomposition of width tw , Max Utilitarian can be solved in time tw O (tw) n .Proof. Our algorithm is based on dynamic programming on a tree decomposition for connectivityproblems such as
Steiner tree [8]. In our dynamic programming, we keep track of all thepartitions in each bag.We define the recursive formulas for computing the social welfare of each partition P in thesubgraph based on a subtree of a tree decomposition. Let P i be a partition of X i . We denote by A i [ P i ] the maximum social welfare in the subgraph G i such that X i is partitioned into P i . Noticethat A r [ ∅ ] in root node r is the maximum social welfare of G . We denote a parent node by i andits child node by j . For a join node, we write j and j to denote its two children. Leaf node:
In leaf nodes, we set A i [ ∅ ] = 0. Introduce vertex v node: In an introduce vertex v node i , let C v ∈ P i be the coalition including v . We notice that the social welfare is increased by edges between v and vertices in the coalitionincluding v . Thus, the recursive formula is defined as: A i [ P i ] = A j [ P j ] + (cid:80) u ∈ N ( v ) ∩ C v w uv + (cid:80) u ∈ N ( v ) ∩ C v w vu where P j = P i \ { C v } ∪ { C v \ { v }} . Forget v node: In a forget v node, we only take a partition with maximum social welfare whenwe forget v because v does not affect the social welfare hereafter. Thus, the recursive formula isdefined as: A i [ P i ] = max P j ∈D j A j [ P j ] where D j = {P j | P j \ { C v } ∪ { C v \ { v }} = P i } .8 ..... u u v a v a v a n v a n a a a a a n a n a n a n W Figure 2: The constructed graph H . Join node:
A join node i has two child nodes j , j where X i = X j = X j . The social welfare ofeach partition X i is the sum of the corresponding partition of X j = X j . Therefore, the recursiveformula for a join node is defined as: A i [ P i ] = A j [ P i ] + A j [ P i ] − (cid:80) C ∈P i (cid:80) u,v ∈ C ( w uv + w vu ). Thelast term means subtracting the double counting of edges.Because the size of each DP table is tw O (tw) , we can compute the recursive formulas in timetw O (tw) . As the result, the total running time is tw O (tw) n .By Proposition 1, symmetric Nash-stable is also solvable in time tw O (tw) n . Corollary 1.
Given a tree decomposition of width tw , symmetric Nash-stable can be solved intime tw O (tw) n . In [4], Aziz et al. show that finding an envy-free partition is trivial because a partition of singletonsis envy-free. However, finding a maximum envy-free partition is much more difficult than findingan envy-free partition.
Theorem 4.
Max Envy-free is weakly NP-hard on series-parallel graphs of vertex cover number even if the preferences are symmetric.Proof. We give a reduction from
Partition , which is weakly NP-complete [15]. Without loss ofgenerality, we suppose a ≤ a ≤ . . . ≤ a n and a n < W/ A = { a , a , . . . , a n } , we build the corresponding vertex set V A = { v a , v a , . . . , v a n } . Then we construct an edge-weighted complete bipartite graph K ,n =( V A ∪ U, E ) where U = { u , u } . For each edge { v a i , u j } ∈ E , we set the weight w v ai u j = a i . Finally,we add e u = { u , u } of weight − W −
1. Let H = ( V A ∪ U, E ∪ { e u } ) be the constructed graph.Note that H is a series parallel graph and vc( H ) = 2 (see Fig. 2).We show that an instance of Partition is a yes-instance if and only if there is an envy-freepartition with social welfare at least 2 W in H .Given a partition ( A , A ) of A such that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/
2, let V A and V A be thecorresponding vertex set to A and A , respectively. In short, V A i = { v a | a ∈ A i } for i ∈ { , } .Let P = { V A ∪ { u } , V A ∪ { u }} be a partition in H . By the definition of H , we have u P ( v a ) = a for every v a ∈ V A and u P ( u ) = W/ u ∈ U . Let C i = V A i ∪ { u i } for i ∈ { , } . For anagent v a ∈ C i , consider C (cid:48) i = C j \ { w } ∪ { v a } for any w ∈ C j (cid:54) = C i . In this case, the utility of v a isat most a . Moreover, consider C (cid:48) = C \ { w } ∪ { u } for any w ∈ C . Then the utility of u is atmost W/
2. Therefore, P is envy-free. Also, the social welfare of P is W/ W/ (cid:80) a ∈ A a = 2 W .Conversely, we are given an envy-free partition P with social welfare at least 2 W in H . If P has a coalition that contains both u and u , the social welfare of P is strictly less than 2 W .9 u v a v a n a a a n a n W W a W a W a v a v a v a ... Figure 3: The constructed graph H (cid:48) . ...... u u v a v a n a a n a n a u
2. Let A i = { a ∈ A | v a ∈ N ( u i ) ⊆ V A } for i ∈ { , } . Then apartition { A , A } satisfies that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/ Max Egalitarian is weakly NP-hard on series-parallel graphs of pathwidth4. Note that the class of series-parallel graph is equivalent to graphs with treewidth 2.
Theorem 5.
In the symmetric hedonic games,
Max Egalitarian is weakly NP-hard on series-parallel graphs of pathwidth even if the preferences are symmetric.Proof. We give a reduction from
Parition as in the proof of Theorem 4, though we adopt abit different graph from H . For each v a i in V A , we create two copies of v a i , denoted by v (cid:48) a i and v (cid:48)(cid:48) a i respectively, such that they form a clique. For each a i ∈ A , we define the weights w v ai v (cid:48) ai = w v ai v (cid:48)(cid:48) ai = W/ − a i / w v (cid:48) ai v (cid:48)(cid:48) ai = W/ a i /
2. Without loss of generality,we can assume that each a i is even. Let V (cid:48) A = { v (cid:48) a | a ∈ A } and V (cid:48)(cid:48) A = { v (cid:48)(cid:48) a | a ∈ A } and let H (cid:48) bethe constructed graph (see Fig. 3). For the graph H (cid:48) , if we set X i = { u , u , v a i , v (cid:48) a i , v (cid:48)(cid:48) a i } for each a i and connect X i and X i +1 by an edge, we can construct a path decomposition of width at most4. Also, it is easy to show that H (cid:48) is a series-parallel graph, and hence the treewidth of H (cid:48) is 2.In the following, we show that there exists a partition ( A , A ) such that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/ P (cid:48) in H (cid:48) such that min v ∈ V ( H (cid:48) ) u P (cid:48) ( v ) = W/ A , A ) of A such that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/
2, we set V A i = { v a ∈ V A | a ∈ A i } , V (cid:48) A i = { v (cid:48) a ∈ V (cid:48) A | a ∈ A i } , and V (cid:48)(cid:48) A i = { v (cid:48)(cid:48) a ∈ V (cid:48)(cid:48) A | a ∈ A i } for i ∈ { , } . Let P = { V A ∪ V (cid:48) A ∪ V (cid:48)(cid:48) A ∪ { u } , V A ∪ V (cid:48) A ∪ V (cid:48)(cid:48) A ∪ { u }} be a partition in H (cid:48) . By the definition of H (cid:48) , we have u P ( v ) = W/ v ∈ V ( H (cid:48) ).Conversely, we are given a partition P such that min v ∈ V ( H (cid:48) ) u P (cid:48) ( v ) = W/
2. If P has a coalitionthat contains both u and u , the utilities of u and u are less than 0. Thus, we suppose thatthere are two coalitions C , C in P such that u ∈ C and u ∈ C . For each a ∈ A , if v a , v (cid:48) a , and v (cid:48)(cid:48) a belong to a different coalition from the other two, the utility of each is strictly less than W/ v a ∈ V A belongs to neither C nor C , u P ( v a ) < W/
2. Thus, v a , v (cid:48) a , and v (cid:48)(cid:48) a belong tothe same coalition of either C or C .Since the utilities of u and u are W/
2, it holds that (cid:80) v ∈ N ( u ) w u v = (cid:80) v ∈ N ( u ) w u v = W/ A i = { a ∈ A | v a ∈ N ( u i ) } , ( A , A ) is a partition satisfying (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/
2. 10ote that the pathwidth and the treewidth of H (cid:48) are bounded, but the vertex cover number isnot bounded. We can similarly show that Max Egalitarian is also weakly NP-hard on boundedvertex cover number graphs by using the reduced graph H (cid:48)(cid:48) in Fig. 4. Theorem 6.
Max Egalitarian is weakly NP-hard on 2-apex graphs of vertex cover number even if the preferences are symmetric.Proof. We give a reduction from
Parition as in the proof of Theorem 4. Without loss of generality,we suppose a n < W/
2. To show this, we modify the graph H (cid:48) in Theorem 4. We add two supervertices u and u connecting to all vertices in V A , respectively. For each edge { a i , u j } where i ∈ { , . . . , n } and j ∈ { , } , we set the weight w a i u j = W/ − a i . Let H (cid:48)(cid:48) be the constructedgraph (see Fig. 4). We can observe that H (cid:48)(cid:48) is a 2-apex graph because a graph obtained from H (cid:48)(cid:48) by deleting u , u is planar. Moreover, { u , u , u , u } is a vertex cover of size four in H (cid:48)(cid:48) .Then, we show that there exists a partition ( A , A ) such that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/ P in H (cid:48)(cid:48) such that min v ∈ V ( H (cid:48) ) u P ( v ) = W/ A , A ) of A such that (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/
2, we set V A i = { v a ∈ V A | a ∈ A i } for i ∈ { , } . Let P = { V A ∪ { u , u } , V A ∪ { u , u }} be a partition in H (cid:48)(cid:48) .By the definition of H (cid:48) , we have u P ( v ) = W/ v ∈ V ( H (cid:48) ). For j ∈ { , } , it holdsthat u P ( u j ) = (cid:80) a ∈ A j a = W/
2. Since a n < W/
2, it holds that | A | , | A | ≥ P ( u j ) ≥ W/
2. Moreover, since any v a has either u and u or u and u as neighbors,u P ( v a ) = W/ P such that min v ∈ V ( H (cid:48)(cid:48) ) u P ( v ) = W/
2. If P has a coalitionthat contains both u and u , the utilities of u and u are less than 0. We suppose that there aretwo coalitions C , C in P such that u ∈ C and u ∈ C .Since the utilities of u and u are W/
2, it holds that (cid:80) v ∈ N ( u ) w u v = (cid:80) v ∈ N ( u ) w u v = W/ A i = { a ∈ A | v a ∈ N ( u i ) } , ( A , A ) is a partition satisfying (cid:80) a ∈ A a = (cid:80) a ∈ A a = W/
2. Note that N ( u ) = N ( u ) ⊆ V A .Aziz et al. show that asymmetric Max Egalitarian is strongly NP-hard [4]. We show that symmetric
Max Envy-free and symmetric
Max Egalitarian remain to be strongly NP-hard.To show this, we give a reduction from , which is strongly NP-complete [15].
Theorem 7.
Max Envy-free and
Max Egalitarian are strongly NP-hard even if the preferencesare symmetric.Proof.
We first explain a reduction for
Max Envy-free . For H in Theorem 4, we set n = 3 m .Then we add m − { u , . . . , u m } connecting to every vertex v a i in V A by an edge ofweight a i . Moreover, we connect u p and u q with an edge of weight − mB for p, q ∈ { , . . . , m } and p (cid:54) = q where B = (cid:80) a ∈ A a/n . Note that { u , . . . , u m } forms a clique. The number of vertices in theconstructed graph is m + 3 m = 4 m . It is easily seen that there is a partition ( A , . . . , A m ) suchthat | A i | = B for each i if and only if there is an envy-free partition with social welfare at least2 mB in H as in the proof of Theorem 4 .Next, we explain a reduction for Max Egalitarian . For H (cid:48) in Theorem 5, we set n = 3 m . Wecreate m super vertices { u , . . . , u m } connecting to every vertex v a i in V A by an edge of weight a i in H (cid:48) . Moreover, we connect u p and u q with an edge of weight − mB for p, q ∈ { , . . . , m } and p (cid:54) = q .Finally, we change the weights of { v a i , v (cid:48) a i } and { v a i , v (cid:48) a i } to B/ − a i / { v (cid:48) a i , v (cid:48)(cid:48) a i } to B/ a i /
2. Then we can observe that there is a partition ( A , . . . , A m ) such that | A i | = B foreach i if and only if there is a partition partition in H (cid:48) such that min v ∈ V ( H (cid:48) ) u P (cid:48) ( v ) = B as in theproof of Theorem 5.Since tw( G ) ≤ vc( G ), Max Envy-free is weakly NP-hard on graphs of tw( G ) = 2 by Theorem4. Also, Max Egalitarian is weakly NP-hard on graphs of tw( G ) = 2 by Theorem 5. However, weshow that symmetric Max Envy-free and symmetric
Max Egalitarian on trees, which are oftreewidth 1, are solvable in linear time. Indeed, we can find an envy-free and maximum egalitarian11artition with maximum social welfare. Such a partition consists of connected components of aforest obtained by removing all negative edges from an input tree.
Theorem 8.
Symmetric
Max Envy-free and symmetric
Max Egalitarian are solvable inlinear time on trees.
Note that linear-time solvability does not hold for asymmetric cases, though asymmetric MaxEgalitarian on trees can be solved in near-linear time.
Theorem 9.
Max Egalitarian can be solved in time O ( n log W ) on trees.Proof. In this proof, we design an algorithm for
Max Egalitarian on trees with self-loops, whichis a slightly wider class of graphs. Given a tree T with self-loops and a non-negative value W , ouralgorithm determines whether there exists a partition of T such that the utility of every agent is atleast W in linear time. The idea is that we can immediately answer “No” by focusing on a leaf, orwe can reduce the given T to a smaller tree T (cid:48) with self-loops whose answer is equivalent to theone for T .Given a tree T , we consider a leaf u and its adjacent vertex v . Let w ( v ), w ( u, v ) and w ( v, u ) bethe weights of self-loop of v , edges ( u, v ) and ( v, u ), respectively. We consider the following fourcases: (i) w ( u ) < W and w ( u ) + w ( u, v ) < W hold, (ii) w ( u ) < W and w ( u ) + w ( u, v ) ≥ W hold,(iii) w ( u ) ≥ W and w ( u ) + w ( u, v ) < W hold, and (iv) w ( u ) ≥ W and w ( u ) + w ( u, v ) ≥ W hold.In case (i), u can be isolated or can be with v , but in any cases, u ’s utility is smaller than W ; theanswer is obviously “No”. In case (ii), in order to give u utility at least W , u and v should belongto a same coalition, which implies that v receives utility w ( v, u ). This can be interpreted that u iscontracted into v and the weight of self-loop ( v, v ) is updated to w ( v ) + w ( v, u ). In case (iii), inorder to guarantee at least W utility for u , u should be isolated. Then, we simply consider theproblem for T (cid:48) obtained from T by deleting u . In case (iv), u can have utility at least W whichever u belongs to a same coalition with v . We then consider two subcases: (iv-1) w ( v, u ) > w ( v, u ) < w ( v, u ) = 0, u does not affect the partition. We can ignore v ). If (iv-1), v can reserveutility w ( v, u ) by belonging to a same coalition with u ; we can apply the same argument with (ii).If (iv-2), it is better that v does not belong to a same coalition with u ; we can apply the sameargument with (iii).By the above observation, we can immediately say “No”, or obtain T (cid:48) with one smaller vertices.Since the above check can be done in O (1), the decision problem can be done in O ( n ) time, where n is the number of vertices. By applying the binary search, we can obtain a maximum egalitarianpartition.Theorems 5 and 6 mean that Max Egalitarian is weakly NP-hard even on bounded treewidthgraphs. On the other hand, we show that there is a pseudo FPT algorithm for
Max Egalitarian when parameterized by treewidth.
Theorem 10.
Given a tree decomposition of width tw , Max Egalitarian can be solvable in time (tw W ) O (tw) n where W = max u ∈ V (cid:80) v ∈ N ( u ) | w uv | .Proof. Let V i be the set of vertices in X i or the descent of X i on a tree decomposition. Then wedefine DP tables of our dynamic programming.Let P i be a partition of X i and u i be a | X i | -dimensional vector whose elements take from − W to W , called a utility vector of X i . For v ∈ X i , the element u i ( v ) represents the utility of v in G [ V i ].Finally, we define A i [ P i , u i ] for each bag X i by using P i and u i as the maximum minimum utilityof an agent in V i \ X i in G [ V i ]. The value of A r [ ∅ , ∅ ] is an optimal value for Max Egalitarian in G . In the following, we define the recursive formulas for computing A i [ P i , u i ] on a nice treedecomposition. Leaf node:
We initialize DP tables for each leaf node i as A i [ ∅ , ∅ ] = W + 1. Note that themaximum minimum utility is at most W and once we execute the recursive formula in a forgetnode, A i [ P i , u i ] becomes at most W . 12 ntroduce vertex v node: Let C v ∈ P i be a coalition that contains v in an introduce v node i .Note that C v may contain only v , that is, C v = { v } . In an introduce v node, an agent v is added to acoalition. This changes the utilities of agents in C v . Also, the utility of v in G [ V i ] is the sum of weightof edges between v and agents in C v . Since every agent in X j also appears in X i , the maximumminimum utility of an agent in V i \ X i in G [ V i ] does not change. Therefore, we define the recursiveformula as follows: A i [ P i , u i ] = A j [ P j , u j ], where P j = P i \ { C v } ∪ { C v \ { v }} , u j ( u ) = u i ( u ) − w uv for u ∈ C v \ { v } , u j ( u ) = u i ( u ) for other u ’s in X i \ { v } , and (cid:80) u ∈ N ( v ) ∩ C v w vu = u i ( v ). Otherwise,we define A i [ P i , u i ] = −∞ as an invalid case. Forget v node: In a forget v node, if a vertex v is forgotten, it never appears in X i and itsancestors on the decomposition tree. This implies that the utility of v does not change hereafter.Namely, the maximum minimum utility among forgotten agent is stored in A i [ P i , u i ] in some sense.Thus what we need to do here is to update the minimum by comparing the previous maximumminimum utility with the utility of the newly forgotten agent, which can be the new minimum.Taking the maximum among P j and u j , this can be interpreted as the following recursive formula: A i [ P i , u i ] = max P j , u j min { A j [ P j , u j ] , u j ( v ) } , where u j ( u ) = u i ( u ) for u ∈ X i and P j \ { C v } ∪ { C v \ { v }} = P i . The condition P j \ { C v } ∪ { C v \{ v }} = P i means that the coalition to which an agent belongs in node j is the same as the coalitionto which an agent belongs in node i . Join node:
For two children j , j of a join node i , it holds that X i = X j = X j . To update A i [ P i , u i ] in a join node, we first take the minimum of A j [ P i , u j ] and A j [ P i , u j ]. Note thatthe maximum minimum utility among forgotten agent until X i is the minimum of ones until thechildren nodes. Here, for every agent v ∈ X i , u i ( v ) = u j ( v ) + u j ( v ) − (cid:80) u ∈ N ( v ) ∩ C v w vu must hold.The subtraction avoids the double counting of edges. Then taking the maximum among u j and u j satisfying the above condition, the recursive formula can be defined as follows: A i [ P i , u i ] = max u j + u j = u (cid:48) i min { A j [ P i , u j ] , A j [ P i , u j ] } , where each element u (cid:48) i ( v ) of u (cid:48) i is defined as u (cid:48) i ( v ) = u i ( v ) − (cid:80) u ∈ N ( v ) ∩ C v w vu .Since the size of a DP table of each bag is (tw W ) O (tw) and each recursive formula can becomputed in time (tw W ) O (tw) , the total running time is (tw W ) O (tw) n .Theorem 10 implies that if W is bounded by a polynomial in n , Max Egalitarian can becomputed in time n O (tw) . References [1] A. B. Adcock, B. D. Sullivan, and M. W. Mahoney. Tree-like structure in large social andinformation networks. In
ICDM 2013 , pages 1–10, 2013.[2] J. Alcalde and P. Revilla. Researching with whom? stability and manipulation.
Journal ofMathematical Economics , 40(8):869–887, 2004.[3] H. Aziz, F. Brandt, and P. Harrenstein. Fractional hedonic games. In
AAMAS 2014 , pages5–12, 2014.[4] H. Aziz, F. Brandt, and H. G. Seedig. Computing desirable partitions in additively separablehedonic games.
Artificial Intelligence , 195:316 – 334, 2013.135] C. Ballester. NP-completeness in hedonic games.
Games and Economic Behavior , 49(1):1–30,2004.[6] S. Banerjee, H. Konishi, and T. S¨onmez. Core in a simple coalition formation game.
SocialChoice and Welfare , 18(1):135–153, 2001.[7] A. Bogomolnaia and M. O. Jackson. The stability of hedonic coalition structures.
Games andEconomic Behavior , 38(2):201–230, 2002.[8] M. Cygan, F. V. Fomin, (cid:32)L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk,and S. Saurabh.
Parameterized Algorithms . Springer International Publishing, 2015.[9] M. Cygan, J. Nederlof, M. Pilipczuk, M. Pilipczuk, J. M. M. van Rooij, and J. O. Wojtaszczyk.Solving connectivity problems parameterized by treewidth in single exponential time. In
FOCS2011 , pages 150–159, 2011.[10] J. H. Dreze and J. Greenberg. Hedonic coalitions: Optimality and stability.
Econometrica ,48(4):987, 1980.[11] R. I. M. Dunbar. Neocortex size as a constraint on group size in primates.
Journal of HumanEvolution , 22(6):469 – 493, 1992.[12] R. Els¨asser and T. Tscheuschner. Settling the complexity of local max-cut (almost) completely.In
ICALP 2011 , pages 171–182, 2011.[13] F. V. Fomin and D. M. Thilikos. A simple and fast approach for solving problems on planargraphs. In
STACS 2004 , pages 56–67, 2004.[14] M. Gairing and R. Savani. Computing stable outcomes in hedonic games. In
SAGT 2010 ,pages 174–185, 2010.[15] M. R. Garey and D. S. Johnson.
Computers and Intractability: A Guide to the Theory ofNP-Completeness . W. H. Freeman & Co., New York, NY, USA, 1979.[16] M. R. Garey, D. S. Johnson, and L. J. Stockmeyer. Some simplified np-complete graphproblems.
Theoretical Computer Science , 1(3):237–267, 1976.[17] K. Kawarabayashi, Y. Kobayashi, and B. Reed. The disjoint paths problem in quadratic time.
Journal of Combinatorial Theory, Series B , 102(2):424 – 435, 2012.[18] T. Kloks.
Treewidth, Computations and Approximations , volume 842 of
Lecture Notes inComputer Science . Springer-Verlag Berlin Heidelberg, 1994.[19] M. Le Breton, I. Ortu˜no-Ortin, and S. Weber. Gamsons law and hedonic games.
Social Choiceand Welfare , 30(1):57–67, 2008.[20] P. J. McSweeney, K. Mehrotra, and J. C. Oh. A game theoretic framework for communitydetection. In
ASONAM 2012 , pages 227–234, 2012.[21] M. Olsen. Nash stability in additively separable hedonic games and community structures.
Theory of Computing Systems , 45(4):917–925, 2009.[22] D. Peters. Graphical hedonic games of bounded treewidth. In
AAAI 2016 , pages 586–593,2016.[23] W. Saad, Z. Han, T. Basar, M. Debbah, and A. Hjorungnes. Hedonic coalition formation fordistributed task allocation among wireless agents.
IEEE Transactions on Mobile Computing ,10(9):1327–1344, 2010.[24] S. C. Sung and D. Dimitrov. Computational complexity in additive hedonic games.