Multi-sided assignment games on m-partite graphs

We consider a multi-sided assignment game with the following characteristics: (a) the agents are organized in m sectors that are connected by a graph that induces a weighted m-partite graph on the set of agents, (b) a basic coalition is formed by agents from different connected sectors, and (c) the worth of a basic coalition is the addition of the weights of all its pairs that belong to connected sectors. We provide a sufficient condition on the weights to guarantee balancedness of the related multi-sided assignment game. Moreover, when the graph on the sectors is cycle-free, we prove the game is strongly balanced and the core is fully described by means of the cores of the underlying two-sided assignment games associated with the edges of this graph. As a consequence, the complexity of the computation of an optimal matching is reduced and existence of optimal core allocations for each sector of the market is guaranteed.


Introduction
Two-sided assignment games (Shapley and Shubik 1972) have been generalized to the multisided case. In this case, agents are distributed in m disjoint sectors. Usually it is assumed that these agents are linked by a hypergraph defined by the (basic) coalitions formed by exactly one agent from each sector (see for instance Kaneko and Wooders 1982;Quint 1991). A matching for a coalition S is a partition of the set of agents of S in basic coalitions and, since each basic coalition has a value attached, the worth of an arbitrary coalition of agents is obtained by maximizing, over all possible matchings, the addition of values of basic coalitions in a matching. When there are at least three sectors, the problem of finding an optimal matching in this multi-sided assignment market is known to be NP-hard. See for instance Burkhard et al. (2009) for a survey on some special cases, together with its applications, algorithms, and asymptotic behavior.
If we do not require that each basic coalition has exactly one agent of each side but allow for coalitions of smaller size, as long as they do not contain two agents from the same sector, we obtain a larger class of games, see Atay et al. (2016) for the three-sided case. But in both cases, the classical multi-sided assignment market and this enlarged model, the core of the corresponding coalitional game may be empty, and this is the main difference with the two-sided assignment game of Shapley and Shubik (1972), where the core is always non-empty.
A two-sided assignment game can also be looked at in another way. There is an underlying bi-partite (weighted) graph, where the set of nodes corresponds to the set of agents and the weight of an edge is the value of the basic coalition formed by its adjacent nodes. From this point of view, the generalization to a market with m > 2 sectors can be defined by a weighted m-partite graph G. In an m-partite graph the set of nodes N is partitioned in m sets N 1 , N 2 , . . . , N m in such a way that two nodes in a same set of the partition are never connected by an edge. Each node in G corresponds to an agent of our market and each set N i , for i ∈ {1, 2, . . . , m}, to a different sector. We do not assume that the graph is complete but we do assume that the subgraph determined by any two sectors N i and N j , with i = j, is either empty or complete. Because of that, the graph G determines a quotient graph G, the nodes of which are the sectors and two sectors are connected in G whenever their corresponding subgraph in G is non-empty.
For each pair of sectors N r and N s , r = s, that are connected in G, we have a bilateral assignment market with valuation matrix A {r ,s} . For each i ∈ N r and j ∈ N s , entry a {r ,s} i j is the weight in G of the edge {i, j}, and represents the value created by the cooperation of i and j.
Given the m-partite graph G, a coalition of agents in N is basic if it does not contain two agents from the same sector and its members are connected in G. Then, the worth of a basic coalition is the addition of the weights of the edges in G that are determined by nodes in the coalition. An optimal matching in this market is a partition of N in basic coalitions such that the sum of values is maximum among all possible such partitions.
We show that if there exists an optimal matching for the multi-sided m-partite market that induces an optimal matching in each bilateral market determined by the connected sectors, then the core of the multi-sided market is non-empty. Moreover, some core elements can be obtained by merging of one core element from each of the underlying bilateral markets associated with the connected sectors.
Secondly, if the quotient graph G is cycle-free, then the above sufficient condition for a non-empty core always holds and, moreover, the core of the multi-sided assignment game is fully described by "merging" or "composition" of the cores of the underlying bilateral games. A first consequence is that when G is cycle-free, an optimal matching can be found in polynomial time. Secondly, for each sector there exists a core allocation where all agents in the sector simultaneously get their maximum core payoff. This means that, although agents in a same sector compete for the best partners in the other sectors, there is still some coincidence of interests among them.
This model of multi-sided assignment market on an m-partite graph G where the quotient graph G is cycle-free can be related to the locally-additive multi-sided assignment games of Stuart (1997), where the sectors are organized on a chain and the worth of a basic coalition is also the addition of the worths of pairs of consecutive sectors. However, in Stuart's model all coalitions of size smaller than m have null worth. It can also be related with a model in Quint (1991) in which a value is attached to each pair of agents of different sectors and then the worth of an m-tuple is the addition of the values of its pairs. Again, the difference with our model is that in Quint (1991) the worth of smaller coalitions is zero. In particular, the worth of a two-player coalition is taken to be zero instead of the value of this pair. Notice that in these models the cooperation of one agent from each side is needed to generate some profit. Compared to that, in our model, any set of connected agents from different sectors yields some worth that can be shared.
The assumption that one agent from each sector is needed to make any profit makes sense for instance in a supply chain network where some agents supply basic inputs for the industry, other agents purchase the final outputs and the rest are intermediaries who get their inputs from some agents in the industry, convert them into outputs at a cost and sell the outputs to some other agents (Ostrovsky 2008). In this setting, agents in excess in the large sectors of the market may not be able to find partners to complete a connected coalition between the suppliers of basic inputs and the final consumers, and hence get no reward in this market (see an example in Sect. 6). But there are other network situations in which the activity an agent carries out with one neighbour is independent of the activity this agent implements with other neighbours. Take as an example the network of European countries for road merchandise transport. A transport company can make a profit by its own by carrying goods to a neighbour country, but if it makes an agreement with a similar company in this second country, they both can reduce costs and hence make a larger profit, even if they are not part of a larger coalition that covers all the continent.
For arbitrary coalitional games, cooperation restricted by communication graphs was introduced by Myerson (1977) and some examples of more recent studies are Granot and Granot (1992), van Velzen et al. (2008), Grabisch and Skoda (2012), Grabisch (2013), and Khmelnitskaya and Talman (2014). The difference with our work is that in the multi-sided assignment game on an m-partite graph there exist well-structured subgames, the two-sided markets between connected sectors, that provide valuable information about the multi-sided market. This fact allows to find simple conditions for non-emptiness of the core, compared to other games defined on graphs (see for instance Deng et al. 1999).
Section 2 introduces the model. In Sect. 3, for an arbitrary m-partite graph, we provide a sufficient condition for the non-emptiness of the core. Section 4 focuses on the case in which the quotient graph is cycle-free. In that case, we completely characterize the non-empty core in terms of the cores of the two-sided markets between connected sectors. From that fact, additional consequences on some particular core elements are derived in Sect. 5. Finally, Sect. 6 concludes with some remarks.

The multi-sided assignment problem on an m-partite graph and its related coalitional game
Let N be the finite set of agents in a market situation. The set N is partitioned in m sets N 1 , N 2 , . . . , N m , each sector maybe representing a set of agents with a specific role in the market. There is a graph G with set of nodes {N 1 , N 2 , . . . , N m }, that we simply denote {1, 2, . . . , m} when no confusion arises, and we will identify the graph with its set of edges. 1 The graph G induces another graph G on the set of agents N such that {i, j} ∈ G if and only if there exist r , s ∈ {1, 2, . . . , m} such that r = s, i ∈ N r , j ∈ N s and {r , s} ∈ G. Notice that the graph G is an m-partite graph, that meaning that two agents on the same sector are not connected in G. We say that graph G is the quotient graph of G. 2 For any pair of connected sectors {r , s} ∈ G, there is a non-negative valuation matrix A {r ,s} and for all i ∈ N r and j ∈ N s , v({i, j}) = a {r ,s} i j represents the value obtained by the cooperation of agents i and j. Notice that these valuation matrices, A = {A {r ,s} } {r ,s}∈G , determine a system of weights on the graph G, and for each pair of connected sectors {r , s} ∈ G, (N r , N s , A {r ,s} ) defines a bilateral assignment market. Sometimes, to simplify notation, we will write A rs , with r < s, instead of A {r ,s} .
Then, γ = (N 1 , N 2 , . . . , N m ; G; {A {r ,s} } {r ,s}∈G ) is a multi-sided assignment market on an m-partite graph. When necessary, we will write G A to denote the weighted graph with the nodes and edges of G and the weights defined by the matrices {A {r ,s} } {r ,s}∈G . Given any such market γ , a coalition S ⊆ N defines a submarket γ |S = (S ∩ N 1 , . . . , S ∩ N m ; G |S ; A |S ) where G |S is the subgraph of G defined by the nodes in S and A |S consists of the values of A that correspond to edges {i, j} in the subgraph G |S .
We now introduce a coalitional game related to the above market situation. To this end, we first define the worth of some coalitions that we name basic coalitions and then the worth of arbitrary coalitions will be obtained by just imposing superadditivity. A basic coalition E is a subset of agents belonging to sectors that are connected in the quotient graph G and with no two agents of the same sector. That is, E = {i 1 , i 2 , . . . , i k } ⊆ N is a basic coalition if (i 1 , i 2 , . . . , i k ) ∈ N l 1 × N l 2 × · · · × N l k and the sectors {l 1 , l 2 , . . . , l k } are all different and connected in G. Sometimes we will identify the basic coalition E = {i 1 , i 2 , . . . , i k } with the k-tuple (i 1 , i 2 , . . . , i k ). To simplify notation, we denote by B N the set of basic coalitions of market γ , though we should write B N 1 ,...,N m , since which coalitions are basic depends heavily on the partition in sectors of the set of agents. Notice that all edges of G belong to B N . Moreover, if S ⊆ N , we denote by B S the set of basic coalitions that have all their agents in S: The valuation function, until now defined on the edges of G, is extended to all basic coalitions by additivity: the value of a basic coalition E ∈ B N is the addition of the weights of all edges in G with adjacent nodes in E.
A matching μ for the market γ is a partition of N = N 1 ∪ N 2 ∪· · ·∪ N m in basic coalitions in B N . We denote by M(N 1 , N 2 , . . . , N m ) the set of all matchings. Similarly, a matching for a submarket γ |S with S ⊆ N is a partition of S in basic coalitions in B S .
Then, the multi-sided assignment game associated with the market γ is the pair (N , w γ ), where the worth of an arbitrary coalition S ⊆ N is the addition of the values of the basic coalitions in an optimal matching for this coalition S: , since no partition of S in smaller basic coalitions can yield a higher value, because of its definition (1) and the non-negativity of weights. 3 Trivially, the game (N , w γ ) is superadditive since it is a special type of partitioning game as introduced by Kaneko and Wooders (1982).
Multi-sided assignment games on m-partite graphs combine the idea of cooperation structures based on graphs (Myerson 1977) and also the notion of (multi-sided) matching that only allows for at most one agent of each sector in a basic coalition. It is clear that for m = 2, multi-sided assignment games on bi-partite graphs coincide with the classical Shapley and Shubik (1972) assignment games. Notice also that for m = 3, multi-sided assignment games on 3-partite graphs are a particular case of the generalized three-sided assignment games in Atay et al. (2016), with the constraint that the value of a three-person coalition is the addition of the values of all its pairs.
As for the related quotient graphs, for m = 2 the quotient graph G consists of only one edge while, for m = 3, G can be either a complete graph 4 or a chain. Figure 1 illustrates both the graph G and its quotient graph G for the cases m = 2 and m = 3.
As in any coalitional game, the aim is to allocate the worth of the grand coalition in such a way that it preserves the cooperation among the agents. Given a multi-sided assignment market on an m-partite Then, the core C(w γ ) is the set of imputations that no coalition can object to, that is Because of the definition of the characteristic function w γ in (2), given any optimal matching μ ∈ M γ (N 1 , . . . , N m ), the core is described by 3 If we allow for negative weights, then the valuation fuction might not be superadditive. Consider for instance , 2 } and assume the weights are a 12 = 6 and a 2 2 = −2. Then, according to our definition, S is a basic coalition and v(S) In this case, we should keep T and {2 } as basic coalitions, and obtain w γ (S) by superadditivity. But then, which are the basic coalitions would depend on the weights, not only on the network.
A multi-sided assignment game on an m-partite graph is balanced if it has a nonempty core. Moreover, and following Le Breton et al. (1992), we will say an m-partite graph (N 1 , N 2 , . . . , N m ; G) is strongly balanced if for any set of non-negative weights {A {r ,s} } {r ,s}∈G the resulting multi-sided assignment game is balanced. Recall from Shapley and Shubik (1972) that bi-partite graphs are strongly balanced. Our aim is to study whether this property extends to m-partite graphs or whether balancedness depends on properties of the weights or the structure of the graph.

Balancedness conditions
The first question above is easily answered. For m ≥ 3, m-partite graphs are not strongly balanced. Take for instance a market with three agents on each sector. Sectors are connected by a complete graph: Breton et al. (1992) we know that a graph is strongly balanced if any balanced collection 5 formed by basic coalitions contains a partition. In our example, the collection is balanced (notice each agent belongs to exactly two coalitions in C) but we cannot extract any partition. To better understand what causes the core to be empty we complete the above 3-partite graph with a system of weights and analyse some core constraints.
Example 1 Let us consider the following valuations on the complete 3-partite graph with three agents in each sector: In boldface we show the optimal matching for each two-sided assignment market. Now, applying (1), the reader can obtain the worth of all three-player basic coalitions and check that the optimal matching of the three-sided market is , from core constraints u 2 + v 1 + w 1 = 9 and u 2 + v 1 ≥ 9 we obtain w 1 = 0. Then, from v 3 + w 1 ≥ 2 we deduce v 3 ≥ 2. Hence, u 1 + v 3 + w 2 = 5 implies u 1 + w 2 ≤ 3, which contradicts the core constraint u 1 + w 2 ≥ 5. Therefore, C(w γ ) = ∅.
We observe that the optimal matching μ in the above example induces a matching μ 23 = {(1 , 1 ), (3 , 2 ), (2 , 3 )} for the market (N 2 , N 3 , A {2,3} ) which is not optimal. Let us relate more formally the matchings in a multi-sided assignment market on an m-partite graph with the matchings of the two-sided markets associated with the edges of the quotient graph.
We then say that μ is the composition of μ {r ,s} for {r , s} ∈ G and write Conversely, given a set of matchings, one for each underlying two-sided market, there may not exist a matching μ of the multi-sided assignment market that is the composition of that given set of matchings. Take for instance matchings since both 1 and 2 should be in the same coalition of partition μ.
Next proposition states that whenever the composition of optimal matchings of the underlying two-sided markets results in a matching of the multi-sided market on an m-partite graph, then that matching is optimal and the core of the multi-sided assignment market is non-empty. To show this second part we need to combine payoff vectors of each underlying two-sided market (N r , N s , A {r ,s} ), with {r , s} ∈ G, to produce a payoff vector x ∈ R N for the multi-sided market γ . We write C(w A {r,s} ) to denote the core of these two-sided assignment games.

Definition 2 Given
We then say that the payoff vector x = {r ,s}∈G x {r ,s} ∈ R N is the composition of the payoff vectors x {r ,s} ∈ R N r × R N s . Similarly, we denote the set of payoff vectors in R N that result from the composition of core elements of the underlying two-sided assignment markets by be a multi-sided assignment market on an m-partite graph. If there exists μ ∈ M(N 1 , . . . , N m ) such that μ {r ,s} is an optimal matching of (N r , N s , A {r ,s} ) for all {r , s} ∈ G, then 1. μ is optimal for γ and 2. γ is balanced and moreover {r ,s}∈G C(w A {r,s} ) ⊆ C(w γ ).
Proof To see that μ = {r ,s}∈G μ {r ,s} is optimal for γ , take any other matchingμ ∈ M (N 1 , . . . , N m )  , for all i ∈ N r , r ∈ {1, 2, . . . , m}. We will see that where both inequalities follow from x {r ,s} ∈ C(w A {r,s} ) for all {r , s} ∈ G. Notice also that if E ∈ μ the above inequalities cannot be strict and hence i∈E The above proposition gives a sufficient condition for optimality of a matching and for balancedness of a multi-sided assignment game on an m-partite graph. However, this condition is not necessary. The matching μ in Example 1 is optimal while μ {2,3} is not. The core of the market in Example 1 is empty, but one can find similar examples with non-empty core (see Example 5). Finally, even under the assumption of the proposition, that is, when the composition of optimal matchings of the two-sided markets leads to a matching of the multi-sided market, the core may contain more elements than those produced by the composition of the cores of (N r , N s , A {r ,s} ), for {r , s} ∈ G (see Atay et al. 2016 for an example in the three-sided case).
In the following section we see that the inclusion {r ,s}∈G C(w A {r,s} ) ⊆ C(w γ ) becomes an equality for some particular graphs.

When G is cycle-free: strong balancedness
In this section we assume that the quotient graph G of the m-partite graph G does not contain cycles. We will assume without loss of generality that it is connected, since the results in that case are easily extended to the case of a finite union of disjoint cycle-free graphs.
We select a node of G as a source, that is, we select a spanning tree of G. Define the distance d = d(1, r ) of any other node r as the number of edges in the unique path that connects this node to the source. Then, without loss of generality, we rename the nodes of G in such a way that the source has label 1 and, given two other nodes r and s, if d(1, r ) < d(1, s) then r < s. Notice that the labels of nodes at the same distance to the source are assigned arbitrarily.
A partial order is defined on the set of nodes of a tree in the following way: given two nodes r and s, we say that s follows r , and write s r , if given the unique path in the tree that connects s to the source, {s 1 = 1, s 2 , . . . , s q = s}, it holds r = s p for some p ∈ {1, . . . , q − 1}. If r = s q−1 we say that s is an immediate follower of r . We denote by S G r the set of followers of r ∈ {1, 2, . . . , m}, we writeŜ G r = {r } ∪ S G r when we need to include sector r , and we denote by I G r the set of immediate followers of r ∈ {1, 2, . . . , m}. Our main result states that an m-partite graph G where the quotient graph G is a tree is strongly balanced.

s}∈G ) be a multi-sided assignment market on an m-partite graph. If G is cycle-free, then (N , w γ ) is balanced and
Proof Notice first that when G is a tree, there is a matching μ ∈ M(N 1 , . . . , N m ) that is the composition of optimal matchings μ {r ,s} of each underlying two-sided market (N r , N s , A {r ,s} ), for {r , s} ∈ G. To see that, we define a binary relation on the set of agents N = N 1 ∪ N 2 ∪ · · · ∪ N m . Two agents i ∈ N r and j ∈ N s , with r ≤ s, are related if either i = j or there exist sectors {r = s 1 , s 2 , . . . , s t = s} ⊆ {1, 2, . . . , m} and agents i k ∈ N s k for k ∈ {1, 2, . . . , t} such that {s k , s k+1 } ∈ G and {i k , i k+1 } ∈ μ {s k ,s k+1 } , for all k ∈ {1, 2, . . . , t − 1}. This is an equivalence relation and, because G is a tree, in each equivalence class there are no two agents of the same sector. Hence, the set μ of all equivalence classes is a matching and by its definition it is the composition of the matchings μ {r ,s} of the two-sided markets: μ = {r ,s}∈G μ {r ,s} . Now, by Proposition 1, μ is an optimal matching for the multi-sided market γ and {r ,s}∈G C(w A {r,s} ) ⊆ C(w γ ), which guarantees balancedness. Since all two-sided assignment games have a non-empty core (Shapley and Shubik 1972), the above inclusion guarantees balancedness of the multi-sided assignment market γ .
Let us denote by E = G |E the subtree in G determined by the sectors containing agents in E and take as the source of E its sector s 1 with the lowest label. Take any leaf 6 s r of E and let {s 1 , s 2 . . . , s q , s q+1 , . . . , s r −1 , s r } be the unique path in E connecting s r to the source s 1 . Let s q be the sector in this path with the highest label among those that have more than one immediate follower in E (let us assume for simplicity that s q has two immediate followers, s q+1 and s q +1 ). Figure 2 depicts such a subtree E.
For each sector s t with t ∈ {1, 2, . . . , r } we denote by i t the unique agent in E that belongs to this sector. Then, we define Iteratively, for all t ∈ {q + 1, . . . , r − 2}, we define while for sector s q we define x , and, assuming x {s q ,s q +1 } i q has been defined analogously from the branch {s q +1 , s q +2 , . . . , s r −1 , s r }, we also define More generally, if s q has several immediate followers in E, then We proceed backwards until we reach x {s 1 ,s l } i 1 for all {s 1 , s l } ∈ E with s 1 < s l . In addition, if i ∈ N r and for some {r , s} ∈ G, r < s, i is unmatched by μ {r ,s} , define x {r ,s} i = 0. Similarly, if i ∈ N r and for all {s, r } ∈ G, s < r , i is unmatched by μ {s,r } , define y {s,r } i = 0. We will first check that the payoff vectors (x {r ,s} , y {r ,s} ) we have defined are non-negative for all {r , s} ∈ G. From (4) to (9) above, it follows that, for all maximal path in E starting at s 1 , {s 1 , s 2 , . . . , s r }, and all t ∈ {1, 2, . . . , r − 1}, we can express x {s t ,s t+1 } i t in terms of the payoffs in u to agents in following sectors in E: where the first equality follows from (7) and the second from (9).
Notice that for t = 1, because of efficiency of u ∈ C(w γ ), we obtain Equation (10), together with (9) gives, for all t ∈ {2, . . . , r }, where the inequality follows from the core constraint satisfied by u ∈ C(w γ ) for coalition Now, again making use of (4) to (12), we express x {s t ,s t+1 } i t in terms of the payoffs in u to agents in sectors that do not follow s t in E: where the first equality follows from (9), the second from the definition of x {s t ,s t+1 } i t−1 , the last equality from (11), and T l = {i t } ∪ {i ∈ E | i ∈ N r , r ∈Ŝ E l }. Recursively applying the same argument (in first place to x with T = {i 1 } ∪ {i ∈ E | i ∈ N r , r ∈ S E s 1 }, T as defined above, and where the inequality also follows from u ∈ C(w γ ).
Once  (N r , N s , A {r ,s} ), they belong to different basic coalitions in μ. Let E and E be the basic coalitions containing i and j respectively. Let us consider a maximal path {s 1 , s 2 , . . . , s t , . . . , s p } in E with origin in the node in E with the lowest label (that we will name the source of the subtree E) and such that there exists t ∈ {1, . . . , q} with r = s t . We write i 1 ∈ E ∩ N s 1 . Similarly, let {s 1 , s 2 , . . . , s l , . . . , s p } be the maximal path in E with origin in the node in E with the lowest label (the source) and such that there exists l ∈ {1, . . . , p} with s = s l .
Recall from (13) that y and from (14) and u ∈ C(w γ ). This completes the proof of C(w γ ) = {r ,s}∈G C(w A {r,s} ).
A first remark on the computation of an optimal matching for multi-sided assignment markets is appropriate. Although the solution of the two-sided assignment problem is solvable in polynomial time, the solution of its multi-sided extension is NP-hard (see Garey and Johnson 1979). However, for a multi-sided assignment market on an m-partite graph where the quotient graph that connects the sectors is cycle-free, an optimal matching is computed in polynomial time. Indeed, from Theorem 1 it follows that the composition of optimal matchings of each underlying two-sided market yields an optimal matching of the multisided assignment market. Since in a market with m sectors any tree connecting the sectors has m − 1 edges, we have m − 1 underlying two-sided markets and we only need to solve m − 1 bilateral assignment problems to build an optimal matching for the multi-sided market. Now, we ask whether the class of m-partite graphs with cycle-free quotient graph is a maximal domain for strong balancedness.
A multi-sided market on a 3-partite graph with two agents in each sector is strongly balanced, that is, it has a non-empty core given any possible system of weights, even if the quotient graph contains a cycle. To prove this we only need to check that balancedness conditions in Lucas (1995) for 2 × 2 × 2 assignment games are satisfied.
But if an m-partite graph has a cycle in its quotient graph and all sectors in the cycle contain at least three agents, then we are always able to find a system of weights such that the corresponding multi-sided assignment game has an empty core.

Corollary 1 An m-partite graph, with at least three nodes on each sector, is strongly balanced if and only if the quotient graph has no cycles.
Proof The "if" part follows from Theorem 1. To prove the "only if" part take an m-partite graph G such that the quotient graph G has a cycle: (N 1 , N 2 , N 3 , . . . , N p ). Define the weights a 12 i j , a 13 ik and a 23 jk , for i, j, k ∈ {1, 2, 3} as in Example 1, and a rs pq = 0 elsewhere. It is straightforward to see that if x ∈ C(w γ ), where γ = (N 1 , . . . , N m ; G; {A {r ,s} } (r ,s)∈G ), then the restriction of x to the coalition formed by the three first agents of N 1 , N 2 and N 3 should be in the core of the game in Example 1, which is a contradiction since it has an empty core.
The supply chain networks in Ostrovsky (2008) constitute a more general model that can be inscribed in the theory of matching with contracts, where utility may not be fully transferable among agents. These networks are somehow directed (vertical networks): each agent needs to buy some input from a preceding agent to transform it in some kind of output that serves as an input for the activity of a following agent, until the final consumer is reached. Hence, by definition, the network contains no cycles. In a generalized model in Hatfield and Kominers (2012), the network is determined by the set of feasible bilateral contracts between agents, and cycles are allowed. Nevertheless, acyclicity is needed to guarantee existence of stable allocations. Compared to that, in our model the graph that connects the agents is undirected and may contain cycles. But the main difference is that the set of agents is partitioned in sectors and it is the abscence of cycles in the quotient graph that connects the sectors what characterizes the existence of (core) stable allocations.

When G is cycle-free: optimal core allocations
In markets where agents are organized in sectors, it has been observed that agents may present conflict or coincidence of interests depending on whether they belong to the same sector or to different sectors. The first example is the two-sided assignment market in Shapley and Shubik (1972). Agents are partitioned in a set of buyers and a set of sellers and although one could think that there is a competition between buyers to be matched to the best sellers it turns out that there is a core allocation where all buyers get their maximum core payoff, which shows some coincidence of interests among buyers (and the same can be said for the sellers). Moreover, there is opposition of interests between the two sectors, since in this buyers-optimal core allocation, all sellers get their minimum core payoff. In the two-sided market of Shapley and Shubik (1972), the existence of the two optimal core allocations is a consequence of the lattice structure of the core. Nevertheless, Roth (1985) points out generalized bilateral markets where the same phenomena holds without an underlying lattice structure. 7 The fact that, when G is cycle-free, the core of the multi-sided assignment game on an m-partite graph is completely described by the cores of all underlying two-sided markets allows us to deduce some properties of C(w γ ) from the known properties of C(w A {r,s} ), with {r , s} ∈ G. One of these consequences is that, for each sector r ∈ {1, 2, . . . , m}, there is a core element u ∈ C(w γ ) where all agents in sector r simultaneously receive their maximum core payoff, which is their marginal contribution to the grand coalition. This is one property of two-sided assignment markets that does not extend to arbitrary multi-sided market, but it is preserved when sectors are connected by a tree and the value of basic coalitions is defined additively as in (1).
Proposition 2 Let γ = (N 1 , N 2 , . . . , N m ; G; {A {r ,s} } {r ,s}∈G ) be a multi-sided assignment market on an m-partite graph. If G is cycle-free, then for each sector k ∈ {1, 2, . . . , m} there exists u ∈ C(w γ ) such that 1. u i is the maximum core payoff for all i ∈ N k and moreover 2.
Proof Let us assume without loss of generality that G is a tree. Take any k ∈ {1, 2, . . . , m}. For all s ∈ {1, 2, . . . , m} with {k, s} ∈ G, 8 take (x {k,s} , y {k,s} ) = (x {k,s} , y {k,s} ) the element of C(w A {k,s} ) that is optimal for all agents in N k . Similarly, for all r ∈ {1, 2, . . . , m} such that {r , k} ∈ G, take the element (x {r ,k} , y {r ,k} ) = (x {r ,k} , y {r ,k} ) of C(w A {r,k} ) that is optimal for the agents in N k . These optimal core elements exist in any bilateral assignment market (see Shapley and Shubik 1972). Moreover, by Demange (1982) and Leonard (1983), it is known that for all i ∈ N k , x Finally, for all {r , s} ∈ G with r = k and s = k, take an arbitrary core element (x {r ,s} , y {r ,s} ) ∈ C(w A {r,s} ). Now, if we consider the composition of the core elements defined above, we get, given k ∈ {1, 2, . . . , m}, u k = {r ,s}∈G (x {r ,s} , y {r ,s} for the only r ∈ {1, 2, . . . , m} such that {r , k} ∈ G and for all i ∈ N k . Also, if k is the source of the tree G, then Then, for all k ∈ {1, 2, . . . , m} we have u k i = w γ (N ) − w γ (N \i) for all i ∈ N k .
In multi-sided assignment games on an m-partite graph with G cycle-free, unlike the case of Shapley and Shubik (1972) two-sided markets, optimal core allocations for a sector k may not be unique. Indeed, from the proof of Proposition 2, the reader will realize there is a lot of freedom of choice of core allocations for those bilateral markets in which sector k is not involved.
Notice that, for each sector k ∈ {1, 2, . . . , m} there is also a core allocation where all agents in this sector get their minimum core payoff. The proof is analogous to the one in Proposition 2: we only need to choose, for each two-sided market in which sector k takes part, the k-minimum core allocation, and for each two-sided market not involving sector k, an arbitrary core allocation. Their composition produces a minimum core allocation for sector k in the multi-sided market on an m-partite graph, as long as the quotient graph is cycle-free. When G contains cycles, optimal core allocations for all sectors may not exist (see Example 5 in the "Appendix").
Once proved the existence of sector-optimal core allocations for an assignment market on an m-partite graph with a cycle-free quotient graph G, the question arises whether some other extreme core points or some single-valued solutions of the coalitional game can be obtained in the same way by composition of the corresponding solutions in the underlying two-sided markets. Next proposition shows that indeed all extreme core allocations of the multi-sided assignment game are obtained as the composition of extreme core allocations of the underlying two-sided markets.
Proposition 3 Let γ = (N 1 , N 2 It is then straightforward to check that x = 1 2 x y + 1 2 x z , which contradicts the assumption x ∈ E xt(C(w γ )).
However, the converse implication does not hold, that is, the composition of extreme core allocations of the underlying two-sided markets provides an element in C(w γ ) which may not be an extreme point (see Example 4 in the "Appendix").
We now consider single-valued core selections that are not extreme points but usually interior core points. As a consequence of Theorem 1, the composition η ⊕ (w γ ) = ⊕ {r ,s}∈G η(w A {r,s} ) of the nucleolus 9 of the two-sided markets between connected sectors belongs to C(w γ ). Moreover, well-known algorithms to compute the nucleolus of a twosided assignment game (Solymosi and Raghavan 1994;Martínez de Albéniz et al. 2014) can be used to obtain η ⊕ (w γ ). However, this composition does not coincide with the nucleolus of the initial m-sided market γ = (N 1 , N 2 , . . . , N m ; G; {A {r ,s} } {r ,s}∈G ), as Example 3 in the "Appendix" shows.
If we select the τ -value or fair-division point 10 as the cooperative solution concept to distribute the profits in each bilateral market, we can propose the composition of the τ -values of all connected two-sided markets, τ ⊕ (w γ ) = ⊕ {r ,s}∈G τ (w A {r,s} ) as an allocation of the profit of the multi-sided assignment market with a tree quotient graph. Because of Theorem 1, this composition belongs to C(w γ ) and can be considered as a fair division solution for the m-sided market. However, different to the two-sided case, it may not coincide with the τvalue of the initial m-sided market γ = (N 1 , N 2 , . . . , N m ; G; {A {r ,s} } {r ,s}∈G ). In fact, the τ -value of a multi-sided assignment market on an m-partite graph may lie outside the core (see Example 2 in the "Appendix"), even when the quotient graph G is cycle-free.

Concluding remarks
We have considered multi-sided markets where agents are on an m-partite graph that induces a cycle-free network among the sectors. Basic coalitions do not need to have agents from all sectors, it is enough not to have two agents from the same sector. Moreover, the worth of a basic coalition is the addition of the worths of all its pairs that are an edge of the m-partite graph.
A similar situation is considered in Stuart (1997), although restricted to the case in which the network that connects the sectors is a chain. There, the worth of a basic coalition is also defined additively, but, as in the classical multi-sided assignment games in Kaneko and Wooders (1982) and Quint (1991), the set of basic coalitions is smaller since it is required that a basic coalition contains exactly one agent of each side. Although the core of Stuart's multi-sided game is also non-empty, it does not contain the composition of all core elements of the underlying two sided markets.
Indeed, take N 1 = {1, 2, 3}, N 2 = {1 , 2 , 3 } and N 3 = {1 , 2 }, and consider the chain G = {{N 1 , N 2 }, {N 2 , N 3 }}. Assume also that a {r ,s} i j = 1 for all (i, j) ∈ N r × N s such that {N r , N s } ∈ G, but, unlike the model we present in this paper, only triplets may have a positive value. It is easy to see that (0.5, 0.5, 0.5; 0.5, 0.5, 0.5) ∈ C(w A {1,2} ) and (0, 0, 0; 1, 1) ∈ C(w A {2,3} ). However, z = x ⊕ y = (0.5, 0.5, 0.5; 0.5, 0.5, 0.5; 1, 1) / ∈ C(w γ ), since an optimal matching consists of two triplets and hence the unassigned agents in sectors N 1 and N 2 can only receive zero payoff in the core. 9 The nucleolus of a coalitional game (N , v) is the payoff vector η(v) ∈ R N that lexicographically minimizes the vector of decreasingly ordered excesses of coalitions among all possible imputations (Schmeidler 1969). An imputation for the game (N , v) is a payoff vector x ∈ R N that satisfies i∈N x i = v(N ) and x i ≥ v({i}) for all i ∈ N . The excess of coalition S ⊆ N at x ∈ R N is v(S) − i∈S x i . 10 The fair-division point of a two-sided assignment market is the midpoint of the buyers-optimal and the sellers-optimal core allocations Thompson (1981). The τ -value is a single-valued solution for coalitional games introduced in Tijs (1981). It is known that for two-sided assignment games the τ -value and the fair-division point coincide (Núñez and Rafels 2002).
Our paper answers the question about what conditions suffice so that multi-sided markets inherit the properties of two-sided markets. The answer is a cycle-free network structure with non-negative weights. and the value of triplets is given by the following three-dimensional matrix 1 2 1 2 10 6 10 1 1 1 2 1 2 7 13 13 14 2 .