1 Introduction

Consider a commodity whose market exhibits three types of agents: buyers, sellers, and middlemen. Each seller owns one indivisible unit; and each buyer seeks to purchase one unit (from any of the sellers) in exchange for money. Units need not be homogeneous, i.e., a buyer may have different valuations for the respective units owned by two distinct sellers. We assume that utility is transferable between all agents; and this allows the use of cooperative games with transferable utility (or TU games, for short). A given buyer and a given seller may trade directly, or they may use the services of a middleman. For example, in the real estate market, a seller may or may not use a realtor facilitating the sale of her house. In financial markets, brokers provide their service to investors (in exchange for a fee); and each investor may or may not hire a broker. As is common in these applications, we assume that a middleman may serve multiple buyer–seller pairs.

Markets with middlemen have been studied in different contexts (search and matching models, general equilibrium model, etc.). The work by Rubinstein and Wolinsky (1987) is the first one to study the activity of middlemen in search markets. In Yavaş (1994) agents can search for matches on their own, or they can resort to a middleman who mediates between agents of opposite sides to facilitate their pairing. Fingleton (1997) investigates competition between middlemen when direct trade between buyers and sellers is available. He shows that direct trade has a negative effect on the market power of middlemen. Allowing for search frictions and a monopolistic middleman, Bloch and Ryder (2000) study a market where buyers and sellers bargain over the surplus. Johri and Leach (2002) study a model in which sellers and buyers have heterogeneous tastes; and they show that middlemen are better off if they have a multi-unit inventory of differentiated products.

In their seminal paper, Shapley and Shubik (1971) consider a two-sided housing market with m buyers and n sellers. In their setting, each buyer is interested in buying at most one house; and each seller has one house for sale. Each buyer has n valuations (one for each house) each seller has a reservation value for her house. The valuation matrix represents the joint surplus generated by each pair formed by a buyer and a seller. Shapley and Shubik coined the term “assignment game” to describe the TU game associated with their two-sided market. They studied a solution concept, the core, which is the set of allocations that cannot be improved upon by any coalition. They showed that the core of an assignment game is always non-empty and has a lattice structure. Moreover, Demange (1982) and Leonard (1983) prove that there exists a core allocation at which each buyer attains his/her marginal contribution to the grand coalition (the buyer-optimal core allocation) and there exists a core allocation at which each seller attains his/her marginal contribution to the grand coalition (the seller-optimal core allocation).

Multi-sided matching markets may in general have an empty core under transferable utility (Kaneko & Wooders, 1982). Thus, the remarkable results obtained for two-sided markets cannot be generalized to all multi-sided markets. Several authors have examined conditions (on the structure of the market) allowing to show the non-emptiness of the core. Sherstyuk (1999) introduces a subclass of multi-sided matching markets where valuations are obtained from a supermodular function. She proved that any game in this subclass has a non-empty core. Some other authors have shown that matching markets exhibiting some additivity property have a non-empty core (see for instance Quint, 1991; Tejada, 2013; Atay et al., 2016).

Among different multi-sided matching market models, there is a growing literature on matching markets with middlemen. Stuart (1997) introduces a three-sided matching game with middlemen, the so-called supplier-firm-buyer game. In this model, a buyer and a seller (supplier) can trade only through a middleman (firm). Hence, unlike our model, a mixed-pair of buyer–seller cannot generate any surplus without a middleman. The author showed that the class of supplier-firm-buyer games is balanced.

Oishi and Sakaue (2014) consider a model of three-sided matching markets in which middlemen can mediate at most one trade between a buyer and seller. Buyers and sellers are allowed to trade directly as well as trade through a middleman. Unlike our model, middlemen incur a matching cost and moreover, the associated TU game only considers the matching situations with exclusive triplets of buyer-middleman-seller (whereas our model allows each middleman to serve multiple buyer–seller pairs).

In a recent paper, El Obadi and Miquel (2019) study a hybrid model of two-sided and multi-sided matching markets. They consider a two-sided model with buyers and sellers that are not disjoint. There exists a so-called central player who can act both as a buyer and as a seller. In their model, the central player has to be present for a trade between a buyer–seller pair. Otherwise, a trade cannot be realized. Hence, the central player has veto power and, as explained by the authors, their model thus induces a veto game (Bahel, 2016).

The present work takes a game-theoretical approach to matching markets with middlemen. We consider a class of three-sided matching market in which buyers and sellers can trade either directly or indirectly (through middlemen). Each seller owns an object to sell and each buyer wants to acquire at most one object. A trade between a mixed-pair of a buyer and a seller can be mediated by at most one middleman, meanwhile any given middleman can mediate trades between multiple buyer–seller pairs. Utility is transferable and quasi-linear in money. Given a buyer–seller pair, the surplus generated by their exchange varies depending on the middleman serving them.

In order to study the core and its structure, we propose a simple procedure allowing to compute the worth of the grand coalition in any matching market with middlemen. Precisely, we construct an associated two-sided assignment market where the valuation of every buyer–seller pair is obtained by taking the maximum surplus that they can achieve either by a direct trade between themselves or by an indirect trade brokered by any of the middlemen in the market.Footnote 1

Our main results are described as follows. First, we show that an optimal matching for a matching market with middlemen can always be constructed from an optimal matching of the associated two-sided market, and vice versa. Moreover, the maximum total surplus in the two markets are equal (Proposition 1). Second, we prove that the core of a market with middlemen is always non-empty by showing that the set of payoff vectors composed of a core allocation for the two-sided assignment market and zero payoffs to all middlemen is precisely the subset of the core of the market with middlemen where all middlemen payoffs are zero (Theorem 2). Furthermore, we prove that there exists a buyer-optimal allocation, that is, a core allocation that each and every buyer (weakly) prefers to all other core allocations. Likewise, there exists a seller-optimal core allocation (Theorem 3). Moreover, as in the standard two-sided model, our results guarantee that, at the buyer-optimal (seller-optimal) core allocation, each buyer (seller) achieves her marginal contribution to the grand coalition. We show that when there is a single middleman, she can achieve her marginal contribution when there are two buyers and two sellers (Proposition 4). Interestingly, we provide an example for the smallest possible generalization (i.e., a market with two buyers, two sellers, and two middlemen) showing that, in general, there exists no middleman-optimal core allocation (Example 3): all middlemen do not necessarily achieve their maximum core payoffs simultaneously. Finally, we characterize the core in terms of competitive equilibrium payoffs (Theorem 5).

The paper is organized as follows. Section 2 gives some preliminaries about TU games. Section 3 introduces the model and explores the structure of its outcomes, the matchings. In Section 4 we prove the non-emptiness of the core and prove that there exists a side-optimal core allocation respectively for buyers and sellers. In contrast, we demonstrate by means of an example that a middleman-optimal core allocation need not exist. Section 5 studies the core when there are only two buyers and two sellers and show that in this case middlemen also achieve their marginal contribution at a core allocation. In Section 6 we establish the coincidence between the core and the set of competitive equilibrium payoff vectors. Section 7 concludes. We describe in Appendix A an example showing that the non-emptiness of the core is not guaranteed when some middlemen are capacity-constrained.

2 Preliminaries

A cooperative game with transferable utility (or TU game) is a pair (Nv) where N is a non-empty, finite set of players (or agents) and \(v:2^{N}\rightarrow \mathbb {R}\) is a coalitional function satisfying \(v(\emptyset )=0\). The number v(S) is the worth of the coalition \(S\subseteq N\). Whenever no confusion may arise as to the set of players, we will identify a TU game (Nv) with its coalitional function v.

Given a game v, a payoff allocation (or allocation) is a tuple \(x\in \mathbb {R}^{N}\) representing the players’ respective allotments. The total payoff of a coalition \(S\subseteq N\) is denoted by \(x(S)=\sum _{t\in S} x_{t}\) if \(S\ne \emptyset \) and \(x(\emptyset )=0\).

In a game v, an allocation x is called efficient if \(x(N)=v(N)\), individually rational if \(x_{t}=x(\{t\})\ge v(\{t\})\) for all \(t\in N\), and coalitionally rational if \(x(S)\ge v(S)\) for all \(S\subseteq N\). The core of v, denoted by Core(v), is the set of coalitionally rational and efficient payoff allocations. A game is called balanced if it has a non-empty core, and totally balanced if all the subgames, i.e. the game restricted to the non-empty coalitions, are balanced. A totally balanced game v is balanced and also superadditive, i.e. \(v(S\cup T)\ge v(S)+v(T)\) for all coalitions \(S,T\subseteq N\) such that \(S\cap T=\emptyset \).

Coalition \(S\ne \emptyset \) is called inessential in game v if \(v(S)\le v(S_1)+\cdots +v(S_k)\) for some of its nontrivial partition \(S=S_1\cup \ldots \cup S_k\) consisting of \(k\ge 2\) disjoint nonempty coalitions \(S_1,\cdots ,S_k\). Coalitions which are not inessential in v are called essential in v, their set is denoted by \(\mathcal {E}(v)\). Notice that all singleton coalitions \(\{i\}\), \(i\in N\), are essential in any game (Nv). The core is always the same as the essential-core where coalitional rationality is required only for the essential coalitions in the game, i.e., \(Core(N,v)=Core(N,v,\mathcal {E} (v)):=\{x\in \mathbb {R}^N : x(N)=v(N),\; x(S)\ge v(S) \;\forall S \in \mathcal {E}(v)\}\).

We call marginal contribution of a player \(t\in N\) in the game v the quantity \(mc_t(v)=v(N)-v(N\setminus \{t\})\). It is well known that the marginal contribution is an upper bound of the payoffs attainable in the core for a player, i.e., \(x_t\le mc_t(v)\) for all \(x\in Core(v)\) and \(t\in N\), but this bound is not necessarily sharp.

3 Matching markets with middlemen

We consider a three-sided market where there are three disjoint sets of agents: the set of buyers \(B=\{i_1,i_2,\cdots , i_{|B|}\}\), the set of middlemen \(M=\{j_1, j_2, \cdots , j_{|M|}\}\), and the set of sellers \(S=\{k_1,k_2,\cdots , k_{|S|}\}\). Note that the cardinalities |B|, |M|, |S| of these respective sets may differ. Let i be a generic buyer, j be a generic middleman and k be a generic seller. We call B (or S) the short side of the market if it holds that \(|B|\le |S|\) (or \(|S|\le |B|\)). Let \(N=B\cup M\cup S\) be the set containing all agents. In this market, each buyer–seller pair \((i,k)\in B\times S\) can trade directly with each other, or indirectly through some middleman \(j\in M\) which results in a trade involving the triple \((i,j,k)\in B\times M\times S\).

Each seller owns one unit of an indivisible good and each buyer seeks to buy at most one unit of good. Although a trade between each buyer–seller pair can be mediated by at most one middleman, any given middleman can mediate trades between multiple buyer–seller pairs. That is to say, each \(j\in M\) can potentially serve the entire market by brokering as many trades as the cardinality of the short side of the market.

A market with middlemen can thus be described by specifying two non-negative matrices: (a) a two-dimensional matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\) giving the joint monetary surplus generated by every buyer–seller pair \((i,k)\in B\times S\) if they trade directly, and (b) a three-dimensional non-negative matrix \(\varvec{\hat{A}}=(\hat{a}_{ijk})_{\begin{array}{c} i\in B; j\in M; k\in S \end{array}}\) representing the joint surplus generated by a trade between buyer i and seller k that is mediated by middleman j. We do not exclude the possibility that for a buyer–seller pair \((i,k)\in B\times S\) direct trade is more effective than if middleman \(j\in M\) is also involved, that is \(a_{ik}\ge \hat{a}_{ijk}\) can hold. On the other hand, it is also possible that direct trade entails higher search costs for the pair (ik) than the costs of a mediated trade via the service of middleman j, that is when \(a_{ik}\le \hat{a}_{ijk}\) holds.

A market with middlemen is fully described by a five-tuple \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\). Since the sets BMS are given and fixed, we will often describe such a market with middlemen by simply specifying the pair of surplus matrices \((\varvec{A},\varvec{\hat{A}})\).

Call basic coalition any subset of N that is either a singleton \(\{i\}\), or a pair \(\{i,k\}\) such that \(i\in B\) and \(k\in S\), or a triple \(\{i,j, k\}\) such that \(i\in B\), \(j\in M\) and \(k\in S\). Moreover, let \(\mathcal {B}^{N}=\{\{i,j,k\}\mid i\in B, j\in M, k\in S\}\cup \{\{i,k\}\mid i\in B, k\in S\}\cup \{\{h\}\mid h\in N\}\) be the collection of all basic coalitions. Furthermore, for all \(T\subseteq N\), denote by \(\mathcal {B}^{T}\) the set of basic coalitions that have all their agents in T, that is, \(\mathcal {B}^{T}=\{E\in \mathcal {B}^{N} \mid E\subseteq T\}\). Denote by \(B_T\), \(M_T\), and \(S_T\) the set of buyers, middlemen, and sellers in coalition T, respectively.

Definition 1

Given any \(T\in 2^N\setminus \{\emptyset \}\), a collection of basic coalitions \(\mu \) will be called a T-matching if it satisfies (i) \(\mu \subseteq \mathcal {B}^{T}\); (ii) \(B_T\cup S_T\subseteq \bigcup \limits _{E\in \mu } E\); (iii) for any \(t\in {B_T\cup S_T}\) and any distinct \(E,F\in \mu \), \(t\notin E\cap F\); (iv) for all \(j\in M_T\), \(\left[ \{j\}\in \mu \right] \Rightarrow [j\notin E, \forall E\in \mu \setminus \{j\}]\).

Remark that conditions (i)-(iii) in Definition 1 say that a buyer (seller) must belong to exactly one basic coalition in the collection \(\mu \). It is possible for a middleman to belong to multiple basic triples of \(\mu \) (since she may mediate multiple trades). However, as stated in (iv), a middleman appearing in a singleton of \(\mu \) should not belong to any other element of \(\mu \). With a slight abuse of notation, we write \(k= \mu (i)\) and \(i= \mu (k)\) for all \((i,k)\in B\times S\) such that \(\left[ \{i,k\}\in \mu \text{ or } \{i,j,k\}\in \mu \text{ for } \text{ some } j\in M\right] \). We also write \(\mu (t)=t\) for all \(t\in N\) such that \(\{t\}\in \mu \). Let \(\mathcal {A}(T)\) denote the set of T-matchings.

Observe that a T-matching \(\mu \) induces disjoint groups of buyer–seller pairs that trade via the same middleman. With a slight abuse of notation, we shorthand the subsets containing only one agent from each side of the market as an array in which the order specifies the type of the agents: (ik) means \(\{i,k\}\) with \(i\in B\) and \(k\in S\); similarly, (ijk) means \(\{i,j,k\}\) with \(i\in B\), \(j\in M\), and \(k\in S\). We call the buyers in the set \(B^{\mu }_{j}=\{i\in B_T : (i,j,k)\in \mu \text { for some } k\in S_T\}\) and the sellers in the set \(S^{\mu }_{j}=\{k\in S_T : (i,j,k)\in \mu \text { for some } i\in B_T\}\) the partners of middleman \(j\in M_T\) in T-matching \(\mu \). Let \(M^{\mu }_{+}\) denote the set of those middlemen in T who are involved in some trading triplet under \(\mu \). Denote by \(B^{\mu }_{0}\) (\(S^{\mu }_{0}\)) the set of those buyers (sellers) in coalition T, who are not partners of any middleman but are involved in some direct trade under \(\mu \), as if they were partners of a fictitious middleman denoted by 0. Finally, denote the set of buyers, middlemen, and sellers in T who are singletons in \(\mu \) by \(B^{\mu }_{s}\), \(M^{\mu }_{s}\), and \(S^{\mu }_{s}\) respectively.

Obviously, \(M^{\mu }_{s}\) together with the singletons \(\{j\}\) \((j\in M^{\mu }_{+}=M_T\setminus M^{\mu }_{s})\) form a partition of \(M_T\), \(B^{\mu }_{s}\) together with the partner sets \(B^{\mu }_{j}\) \((j\in M^{\mu }_{+}\cup \{0\})\) form a partition of \(B_T\), and \(S^{\mu }_{s}\) together with the partner sets \(S^{\mu }_{j}\) \((j\in M^{\mu }_{+}\cup \{0\})\) form a partition of \(S_T\). Moreover, the union of these three partitions form a partition of coalition T, called the \(\mu \)-induced partition of T. Notice that \(\mu \) induces a (complete) matching, denoted by \(\mu ^{(j)}\), between the partner sets \(B^{\mu }_{j}\) and \(S^{\mu }_{j}\) of each (real or fictitious) middleman \(j\in M^{\mu }_{+}\cup \{0\}\). Consequently, \(|B^{\mu }_{j}|=|S^{\mu }_{j}|\) for all \(j\in M^{\mu }_{+}\cup \{0\}\).

Note that a market with middlemen \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) induces a TU game \((B\cup M\cup S,v_\gamma )\) where the worth of every coalition T is given by

$$\begin{aligned} v_\gamma (T)=\max _{\mu \in \mathcal {A}(T)} \left[ \sum _{(i,k)\in \mu }a_{ik}+\sum _{(i,j,k)\in \mu } \hat{a}_{ijk} \right] . \end{aligned}$$
(1)

Note from (1) that all coalitions T consisting of players of the same side (including singleton coalitions) are worthless, that is, \(v_\gamma (T)=0\) whenever \(T\subseteq B\) or \(T\subseteq M\) or \(T\subseteq S\). Observe that \(v_\gamma (\{i,k\})=a_{ik}\) for any buyer–seller pair \((i,k)\in B\times S\), and \(v_\gamma (\{i,j,k\})=a_{ik}\vee \hat{a}_{ijk}\) for any buyer-middleman-seller triplet \((i,j,k)\in B\times M\times S\), where \(p\vee q\) denote \(\max \{p,q\}\) for any two numbers pq. Notice that \(v_{\gamma }\) is also induced by the market \(\gamma ^{\prime }=(B,M,S,\varvec{A},\varvec{\hat{A}'})\) where \(\hat{a}'_{ijk}=a_{ik}\vee \hat{a}_{ijk}\) for any \((i,j,k)\in B\times M\times S\).

A matching \(\mu \in \mathcal {A}(T)\) will be called T-optimal in the market \(\gamma \) if \(v_\gamma (T)=\sum _{(i,k)\in \mu }a_{ik}+\sum _{(i,j,k)\in \mu } \hat{a}_{ijk}\), that is, if \(\mu \) solves the problem stated in (1). Since \(\mathcal {A}(T)\) is non-empty and finite, remark that there always exists (at least) one T-optimal matching in \(\gamma \). Given any \(T\in 2^N\setminus \{\emptyset \}\), we denote by \(\mathcal {A}^*_\gamma (T)\) the set of T-optimal matchings in the market \(\gamma \). We call optimal matching any N-optimal matching in \(\gamma \).

The following example illustrates the notions developed in this section.

Example 1

Consider a market with middlemen \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) where \(B=\{i_{1}, i_{2}\}\), \(M=\{j_{1}, j_{2}\}\), and \(S=\{k_{1},k_{2}\}\) are the set of buyers, the set of middlemen, and the set of sellers, respectively. The total surplus of those basic coalitions formed by a pair of buyer and seller is given by the following two-dimensional matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\):

and joint surplus generated by triplets formed by a buyer, a middleman, and a seller is given by the following three-dimensional matrix \(\varvec{\hat{A}}=(\hat{a}_{ijk})_{\begin{array}{c} i\in B; j\in M; k\in S \end{array}}\):

$$\begin{aligned} \varvec{\hat{A}}=\begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2}\end{array} \\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 4\; &{}\; 3 \\ 3\; &{}\; 5 \end{array}\right) \\ &{} j_{1} \end{array}\qquad \begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2} \end{array}\\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 6 \; &{}\; 2 \\ 2\; &{} \; 6 \end{array}\right) \\ &{} j_{2} \end{array}. \end{aligned}$$

Notice first that, in this example, for a buyer–seller pair \((i,k)\in B\times S\), the total surplus of a trade with a middleman is at least as good as a direct trade. For instance, consider the buyer–seller pair \((i_{1},k_{2})\in B\times S\). They generate a total surplus of \(2=a_{12}\) whereas they generate a strictly greater total surplus if the trade is mediated by middleman \(j_{1}\): \(\hat{a}_{112}=3>2=a_{12}\), and the same amount of total surplus is generated if middleman \(j_{2}\) mediates the trade between them: \(\hat{a}_{122}=2=a_{12}\).

Next, consider the set of all agents \(N=B\cup M\cup S\) and two collections of basic coalitions \(\mu =\{\{i_{1},j_{2},k_{1}\},\{i_{2},j_{2},k_{2}\},\{j_{1}\}\}\) and \(\mu '=\{\{i_{1},j_{1},k_{1}\},\{i_{2},j_{2},k_{2}\}\}\). In the collection \(\mu \), each buyer and seller belong to exactly one basic coalition whereas middleman \(j_{2}\) appears in two distinctive basic coalitions and middleman \(j_{1}\) appears as a singleton, and hence \(\mu \) is an N-matching. Under \(\mu \), \(B^{\mu }_{j_2}=\{i_1,i_2\}\) are the buyer partners of \(j_2\) and \(S^{\mu }_{j_2}=\{k_1,k_2\}\) are the seller partners of \(j_2\), whereas \(j_1\) has no partners in \(\mu \). Since all buyers and sellers are partners of middlemen, the induced partitions are \(B^{\mu }_{s} \cup B^{\mu }_{0} \cup B^{\mu }_{j_1} \cup B^{\mu }_{j_2}=\emptyset \cup \emptyset \cup \emptyset \cup B_N =B_N=B\) for the buyers, \(S^{\mu }_{s} \cup S^{\mu }_{0} \cup S^{\mu }_{j_1} \cup S^{\mu }_{j_2}=\emptyset \cup \emptyset \cup \emptyset \cup S_N=S_N=S\) for the sellers, and \(M^{\mu }_{s} \cup M^{\mu }_{+}= \{j_1\} \cup \{j_2\}=M_N=M\) for the middlemen. In the collection \(\mu '\) all agents, even the middlemen, belong to exactly one basic coalition, hence \(\mu '\) is also an N-matching. It induces the partitions \(B^{\mu }_{s} \cup B^{\mu '}_{0} \cup B^{\mu '}_{j_1} \cup B^{\mu '}_{j_2}=\emptyset \cup \emptyset \cup \{i_1\} \cup \{i_2\} =B_N=B\) of the buyers, \(S^{\mu '}_{s} \cup S^{\mu '}_{0} \cup S^{\mu '}_{j_1} \cup S^{\mu '}_{j_2}=\emptyset \cup \emptyset \cup \{k_1\} \cup \{k_2\} =S_N=S\) of the sellers, and \(M^{\mu }_{s} \cup M^{\mu }_{+}= \emptyset \cup \{j_1,j_2\}=M_N=M\) of the middlemen.

Finally, let us consider the TU game \(v_{\gamma }\) associated with the market \(\gamma \). Consider the coalition \(T=\{i_{1},j_{1},k_{1},k_{2}\}\). Then, the worth of T is obtained by maximizing, over all possible T-matchings, the total surpluses of basic coalitions in a matching. By ignoring the 0 surplus of the non-basic coalitions, \(v_{\gamma }(T)= \max \{a_{11},a_{12},\hat{a}_{111},\hat{a}_{112}\}= \max \{3,2,4,3\}=4\). The optimal T-matching is \(\mu ^T=\left\{ \{i_{1},j_{1},k_{1}\},\{k_{2}\}\right\} \). It induces the partition \(B^{\mu ^T}_{s} \cup B^{\mu ^T}_{j_1} =\emptyset \cup \{i_1\} =B_T\) of the set of buyers and the partition \(S^{\mu ^T}_{s} \cup S^{\mu ^T}_{j_1} =\{k_2\} \cup \{k_1\} =S_T\) of the set of sellers in coalition T.

Now, consider again the grand coalition, N. The sum of the value of basic coalitions under the matching \(\mu '\) is \(\hat{a}_{111}+\hat{a}_{222}=4+6=10\), whereas under the matching \(\mu \) it is equal to \(12=6+6=\hat{a}_{121}+\hat{a}_{222}\). It is easily checked that the worth of N, \(v_{\gamma }(N)\), is obtained under the matching \(\mu \) which maximizes (1), thus, the matching \(\mu \) is an optimal matching. It induces matchings in the partner sets of the middlemen: \(\mu ^{(0)}=\emptyset \) on the direct trade matrix \({\varvec{A}}\) (associated with the unpartnered fictitious middleman 0), \(\mu ^{(j_1)}=\emptyset \) on the two-dimensional submatrix \([\hat{a}_{i1k}:i\in B,k\in S]\) related to the unpartnered middleman \(j_1\in M^{\mu }_{s}\), and \(\mu ^{(j_2)}=\left\{ \{i_{1},k_{1}\},\{i_{2},k_{2}\}\right\} \) on the two-dimensional submatrix \([\hat{a}_{i2k}:i\in B,k\in S]\) related to the partnered middleman \(j_2\in M^{\mu }_{+}\). The value of \(\mu \) equals the sum of the values of these induced matchings in the corresponding two-dimensional (sub)matrices, \(12=0+0+(6+6)\).

In the next section we examine the core of the TU game \(v_\gamma \) associated with the matching market with middlemen \(\gamma \). We will show in particular that this game, called middlemen market game, \(v_\gamma \) is always totally balanced.

4 The core of a market with middlemen

Given any market with middlemen \(\gamma =(B,M,S, \varvec{A}, \varvec{\hat{A}})\), one can define the matrix \(\varvec{A^{*}}=(a^*_{ik})_{\begin{array}{c} i\in B, k\in S \end{array}}\) by

$$\begin{aligned} a^*_{ik}=\max _{j\in M_0} \hat{a}_{ijk}, ~\forall (i,k)\in B\times S, \end{aligned}$$
(2)

where \(M_0=M\cup \{0\}\) denotes the set of middlemen augmented by a fictitious middleman 0. We use this fictitious middleman 0 for notational convenience: this write the direct trade surpluses \(a_{ik}\) as triplet surpluses of the type \(a_{i0k}\). This means that we will sometimes identify a buyer–seller pair (ik) with the triplet (i, 0, k) and write \(\hat{a}_{i0k}=a_{ik}\). Note from (2) that \(a^*_{ik}\) gives the highest surplus possible in a trade involving buyer i and seller k. Moreover, for all \((i,k)\in B\times S\), we will use the notation m(ik) to refer to the (arbitrarily chosen middleman among) agent(s) \(j\in M_0\) such that \(a^*_{ik}=\hat{a}_{ijk}\). That is to say, \(m(i,k)\in \mathop {{{\,\textrm{argmax}\,}}}\nolimits _{j\in M_0} \hat{a}_{ijk}\). If there exists multiple middlemen j in the set \(\mathop {{{\,\textrm{argmax}\,}}}\nolimits _{j\in M_0} \hat{a}_{ijk}\) then note that our definition above selects an arbitrary middleman in that set \( \mathop {{{\,\textrm{argmax}\,}}}\nolimits _{j\in M_0} \hat{a}_{ijk}\); and our upcoming results are not affected by which one these middlemen is chosen as m(ik).

Thus, for any market \(\gamma =(\varvec{A}, \varvec{\hat{A}})\), one can define the standard (two-sided) assignment market \(\gamma ^*=(B,S,\varvec{A^{*}})\), where \(\varvec{A^{*}}\) is given by (2). Note that a matching \(\nu \) in \(\gamma ^*\) is a partition of \(B\cup S\) into singletons and mixed pairs \(\{i,k\}\) such that \(i\in B, k\in S\). We write \(\nu (t)=t\) for all \(t\in B\cup S\) such that \(\{t\}\in \nu \). In addition, we write \(\nu (i)=k\) and \(\nu (k)=i\) for all \((i,k)\in B\times S\) such that \(\{i,k\}\in \nu \). A matching \(\nu \) in \(\gamma ^*\) is optimal if \(\sum \nolimits _{\{i,k\}\in \nu }a^*_{ik}\ge \sum \nolimits _{\{i,k\}\in \nu '}a^*_{ik}\), for all matchings \(\nu '\) in \(\gamma ^*\).

We connect the matchings, in particular the optimal matchings, of the respective markets \(\gamma \) and \(\gamma ^*\). For expositional simplicity, we only consider the grand coalition, the concepts are analogously defined and the statements are straightforwardly derived for any subcoalition.

Let \(\mu \) be a matching in a market with middlemen \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\). As it induces partitions of the set of buyers B and sellers S, and matchings \(\mu ^{(j)}\) (\(j\in M_0\)) between the partner sets for each middleman (including the fictitious middleman 0) which are pairwise disjoint for different middlemen, the union \(\bigcup _{j\in M_0} \mu ^{(j)}\) augmented with the singletons in \(B^{\mu }_{s}\) and \(S^{\mu }_{s}\) defines a matching between B and S. We denote it by \(\mu ^*\). The value of \(\mu \) in the market \(\gamma \) is clearly less than or equal to the value of \(\mu ^*\) in the two-sided market \(\gamma ^*\), that is,

$$\begin{aligned} \mu _\gamma (B\cup M\cup S)=\sum \limits _{(i,k)\in \mu } a_{ik} + \sum \limits _{(i,j,k)\in \mu } \hat{a}_{ijk} \le \sum \limits _{(i,k)\in \mu ^*} a^*_{ik} = \mu ^*_{\gamma ^*}(B\cup S). \end{aligned}$$
(3)

Conversely, if \(\sigma \) is a matching for the two-sided market \(\gamma ^*\), then \(\sigma ^{\triangle }=\{(i,m(i,k), k): (i,k)\in \sigma \} \cup \left\{ \{t\} \in \sigma \right\} \cup \left\{ \{j\}:j\in M \text{ s.t. } j\ne m(i,k), \forall (i,k) \in \sigma \right\} \) is a matching for the market with middlemen \(\gamma \). The value of \(\sigma ^{\triangle }\) in the market \(\gamma \) is clearly the same as the value of \(\sigma \) in the two-sided market \(\gamma ^*\), that is

$$\begin{aligned} \sigma _{\gamma ^*}(B\cup S) = \sum \limits _{(i,k)\in \sigma } a^*_{ik} = \sum \limits _{(i,m(i,k),k)\in \sigma ^{\triangle }} \hat{a}_{im(i,k)k} = \sigma ^{\triangle }_\gamma (B\cup M\cup S). \end{aligned}$$
(4)

Based on (3) and (4), we derive the following relations between the optimal matchings and the optimum total surpluses in the two markets.

Proposition 1

Let \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) be a market with middlemen and \(\gamma ^*=(B,S,\varvec{A^{*}})\) be the associated two-sided assignment market. Then

  1. (1)

    if \(\sigma \) is an optimal matching for \(\gamma ^*\) then \(\sigma ^{\triangle }\) is an optimal matching for \(\gamma \);

  2. (2)

    if \(\mu \) is an optimal matching for \(\gamma \) then \(\mu ^*\) is an optimal matching for \(\gamma ^*\).

Moreover, the optimum values of the two markets are the same.

Proof

First, it follows from (3) that the optimum value of the three-sided market \(\gamma \) is less than or equal to the optimum value of the associated two-sided market \(\gamma ^*\).

To see that the two market optimums coincide, let \(\sigma \) be an optimal matching for the two-sided market \(\gamma ^*\). Then, by (4), (3), and the optimality of \(\sigma \), we get respectively, \(\sigma _{\gamma ^*}(B\cup S) = \sigma ^{\triangle }_\gamma (B\cup M\cup S) \le (\sigma ^{\triangle })^*_{\gamma ^*}(B\cup S) \le \sigma _{\gamma ^*}(B\cup S)\). Thus, both inequalities must hold as equalities, implying that in the three-sided market \(\gamma \), the matching \(\sigma ^{\triangle }\) attains the optimum value of the two-sided market \(\gamma ^*\) that, as observed above, is an upper bound for the optimum value of the three-sided market \(\gamma \). Therefore, \(\sigma ^{\triangle }\) is an optimal matching for \(\gamma \), proving claim (1) and the coincidence of the two market optimum values.

To show claim (2), let \(\mu \) be an optimal matching for \(\gamma \). Then, by (3), (4), and the optimality of \(\mu \) in the three-sided market, \(\mu _\gamma (B\cup M\cup S) \le \mu ^*_{\gamma ^*}(B\cup S) = (\mu ^*)^{\triangle }_{\gamma }(B\cup M\cup S) \le \mu _\gamma (B\cup M\cup S)\). Thus, both inequalities must hold as equalities, implying that in the two-sided market \(\gamma ^*\), the matching \(\mu ^*\) attains the optimum value of the three-sided market \(\gamma \), that, as proved above, equals the optimum value of the two-sided market \(\gamma ^*\). Therefore, \(\mu ^*\) is an optimal matching for \(\gamma ^*\), proving claim (2). \(\square \)

Proposition 1 shows that one can always construct an optimal matching in the market with middleman \(\gamma \) by first finding an optimal matching of the associated two-sided market \(\gamma ^*\). Next, we reconsider Example 1 to illustrate Proposition 1.

Example 2

(Example 1 Revisited) Recall that, for the market \(\gamma \), the total surplus of those basic coalitions formed by a pair of buyer and seller is given by the following two-dimensional matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\):

and joint surplus generated by triplets formed by a buyer, a middleman, and a seller is given by the following three-dimensional matrix \(\varvec{\hat{A}}=(\hat{a}_{ijk})_{\begin{array}{c} i\in B; j\in M; k\in S \end{array}}\):

$$\begin{aligned} \varvec{\hat{A}}=\begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2}\end{array} \\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 4\; &{}\; 3 \\ 3\; &{}\; 5 \end{array}\right) \\ &{} j_{1} \end{array}\qquad \begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2} \end{array}\\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 6 \; &{}\; 2 \\ 2\; &{} \; 6 \end{array}\right) \\ &{} j_{2} \end{array}. \end{aligned}$$

First, we construct the associated two-sided market \((B,S,\varvec{A^{*}})\) where the set of buyers and the set of sellers are the same, and \(\varvec{A^{*}}=(a_{ik}^{*})_{\begin{array}{c} i\in B; k\in S \end{array}}\) is the valuation matrix defined by \(a^{*}_{ik}=\max _{j\in M_0} \hat{a}_{ijk}, ~\forall (i,k)\in B\times S\). For instance, \(a^{*}_{11}=\max \{a_{11},\hat{a}_{111},\hat{a}_{121}\}=\max \{3,4,6\}=6=\hat{a}_{121}\). Then, \(\varvec{A^{*}}=(a^{*}_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\) is

where \(a^{*}_{11}=\hat{a}_{121}\), \(a^{*}_{12}=\hat{a}_{112}\), \(a^{*}_{21}=\hat{a}_{211}\), and \(a^{*}_{22}=\hat{a}_{222}\). Thus, \(m(1,1)=m(2,2)=j_2\) and \(m(1,2)=m(2,1)=j_1\).

Notice that \(\sigma =\left\{ \{i_1,k_1\},\{i_2,k_2\}\right\} \) is the unique optimal matching in \(\gamma ^{*}\). Following Proposition 1, we construct the matching \(\sigma ^{\triangle }\) for the market \(\gamma \): \(\{i_{1},j_{2},k_{1}\}\in \sigma ^{\triangle }\), \(\{i_{2},j_{2},k_{2}\}\in \sigma ^{\triangle }\), and \(\{j_{1}\}\in \sigma ^{\triangle }\) since there does not exists a pair \(\{i,k\}\in \sigma \) such that \(j_{1}=m(i,k)\). By Proposition 1, the matching \(\sigma ^{\triangle }=\left\{ \{i_{1},j_{2},k_{1}\},\{i_{2},j_{2},k_{2}\},\{j_{1}\}\right\} \) thus obtained is optimal in \(\gamma \) – which was already known from our calculations in Example 1. Finally, the optimum values in the two markets are equal: \(\sigma ^{\triangle }_{\gamma }(B\cup M\cup S)=12=\sigma _{\gamma ^*}(B\cup S)\).

The following result proves that the TU-game associated with a market with middlemen is always totally balanced.

Theorem 2

Let \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) be a market with middlemen. Then the associated middlemen matching market game \(v_\gamma \) is totally balanced. Moreover,

$$\begin{aligned} \left\{ (x;y;z)\in Core(v_\gamma ) : y=0 \right\} = \left\{ (x;0;z)\in \mathbb {R}^B\times \mathbb {R}^M\times \mathbb {R}^S : (x;z)\in Core(w_{\gamma ^*}) \right\} \end{aligned}$$
(5)

that is, the facet of \(Core(v_\gamma )\) where all middlemen receive zero payoff is “essentially the same” as the core of the two-sided assignment game \(w_{\gamma ^*}\) induced by the two-sided assignment market \(\gamma ^*=(B,S,\varvec{A^{*}})\).

Proof

First we show that the middlemen matching market game \(v_\gamma \) is balanced for any matching market with middlemen \(\gamma \), by showing the relation \(\supseteq \) between the two payoff sets in (5) and observing that the set on the right is non-empty due to the balancedness of assignment games (Shapley & Shubik, 1971).

To this end, let \((x;z)\in Core(w_{\gamma ^*})\) be arbitrary, but fixed. Then \(\sum _{i\in B} x_i + \sum _{k\in S} z_k = w_{\gamma ^*}(B\cup S) = v_{\gamma }(B\cup M\cup S)\), because by Proposition 1, the optimum values in the two markets, hence, the grand coalition values in the two associated games are the same. Thus, the augmented payoff vector (x; 0; z) is efficient in \(v_{\gamma }\). To see its coalitional rationality, let \(T\subseteq B\cup M\cup S\) be arbitrary, but fixed. Let \(\mu \) be an optimal T-matching in \(\gamma \). By Proposition 1, the value of the related two-sided matching \(\mu ^*\) between \(B_T\) and \(S_T\) in \(\gamma ^*\) is at least \(v_{\gamma }(T)\). We get \(v_{\gamma }(T) \le \sum _{(i,k)\in \mu ^*} a^*_{ik} \le \sum _{(i,k)\in \mu ^*} (x_i+z_k) \le \sum _{i\in B_T} x_i + \sum _{k\in S_T} z_k =(x;0;z)(T)\), where the last two inequalities come from the coalitional rationality of core payoff \((x;z)\in Core(w_{\gamma ^*})\). Therefore, the augmented payoff vector (x; 0; z) is in the core of \(v_{\gamma }\).

To show the reverse inclusion \(\subseteq \) in (5), take any payoff vector of the form (x; 0; z) from \(Core(v_\gamma )\). As we proved above, such payoff vectors exist. By Proposition 1, \((x;z)(B\cup S) = (x;0;z)(B\cup M\cup S) = v_{\gamma }(B\cup M\cup S) = w_{\gamma ^*}(B\cup S)\), thus, the restricted payoff vector (xz) is efficient in \(w_{\gamma ^*}\). To see its coalitional rationality, let \(R\subseteq B\cup S\) be arbitrary, but fixed. Let \(\sigma \) be an optimal R-matching in \(\gamma ^*\). By Proposition 1, the value of the related three-sided matching \(\sigma ^{\triangle }\) equals \(w_{\gamma ^*}(R)\). We get \(w_{\gamma ^*}(R) = \sum _{(i,m(i,k),k)\in \sigma ^{\triangle }} \hat{a}_{im(i,k)k} \le \sum _{(i,m(i,k),k)\in \sigma ^{\triangle }} (x_i+0+z_k) \le \sum _{i\in B_R} x_i + \sum _{k\in S_R} z_k = (x;z)(R)\), where the last two inequalities come from the coalitional rationality of core payoff \((x;0;z)\in Core(v_{\gamma })\). Therefore, the restricted payoff vector (xz) is in the core of \(w_{\gamma ^*}\).

Finally, the total balancedness of a middlemen matching market game straightforwardly follows from the observation that the submarket obtained by restricting the surplus matrices to agents in a subcoalition induces precisely the subgame related to that subcoalition. \(\square \)

Shapley and Shubik (1971) show that any two-sided assignment market exhibits two distinguished core allocations, namely the buyer-optimal allocation and the seller-optimal allocation. Under the buyer-optimal (seller-optimal) allocation all buyers (sellers) simultaneously achieve their maximum core payoff. Moreover, Demange (1982) and Leonard (1983) show that for each agent the maximum core payoff is the marginal contribution of the agent to the grand coalition. It is known that this property does not extend to the arbitrary multi-sided markets. Nevertheless, Atay and Núñez (2019) study a special case of multi-sided markets where each of the m sides has an optimal core allocation under which all agents of that side achieve their marginal contribution. Based on these results, it follows from Theorem 2 that any matching market with middlemen has two special core vertices, where all buyers (sellers) simultaneously achieve their maximum core payoff in those core allocation at which all middlemen receive 0 payoff.Footnote 2 We investigate whether analogous statements can be made for the whole core.

Our next result states that, in a matching market with middlemen (and no capacity constraints), there exists an optimal core allocation for buyers (sellers): under their optimal allocation, all buyers (sellers) simultaneously achieve their marginal contribution to the grand coalition that is the theoretical maximum of core payoffs.

Theorem 3

Let \(\gamma =(\varvec{A},\varvec{\hat{A}})\) be a market with middlemen. Then the following statements hold.

  1. (i)

    There exists (a buyer-optimal core allocation) \((x^B;y^B;z^B)\in Core (v_\gamma )\) such that \(x^B_i=mc_i(v_\gamma )\), for all \(i\in B\).

  2. (ii)

    There exists (a seller-optimal core allocation) \((x^S;y^S;z^S)\in Core (v_\gamma )\) such that \(z^S_k=mc_k(v_\gamma )\), for all \(k\in S\).

Proof

It is shown in the proof of Theorem 2 that, if an allocation \((x^*;z^*)\in \mathbb {R}_+^{B\cup S}\) is in the core of \(v_{\gamma ^*}\), then the augmented allocation \((x^*;0_{M};z^*)\in \mathbb {R}^N_+\) is in the core of the original market \(v_{\gamma }\). We will use this fact twice in the proof of Theorem 3.

(i) It is known from Shapley and Shubik (1971) that there exists a buyer-optimal core allocation \((x^B;z^B)\) in the two-sided market \(\gamma ^*\) at which each buyer attains his/her maximum core payoff. Moreover, Demange (1982) and Leonard (1983) prove that the maximum core payoff of any player equals his/her marginal contribution to the grand coalition, that is to say, \(x^B_i=mc_i(v_{\gamma ^*})\) for all \(i\in B\). As noted above, we have \((x^B;0_{M};z^B)\in Core(v_{\gamma })\). Proposition 1 gives \(v_{\gamma }(N)=v_{\gamma ^*}(B\cup S)\). Clearly the same holds for the subgames in \(v_{\gamma }\) and \(v_{\gamma ^*}\) corresponding to coalitions \(N\setminus i\) and \(B\cup S\setminus i\), respectively, for any \(i\in B\). Thus, \(mc_i(v_{\gamma })= v_{\gamma }(N)-v_{\gamma }(N\setminus i)=v_{\gamma ^*}(B\cup S)- v_{\gamma ^*}(B\cup S\setminus i)=mc_i(v_{\gamma ^*})\). It follows that \(x^B_i=mc_i(v_{\gamma })\) for all \(i\in B\) at \((x^B;0_{M};z^B)\in Core(v_{\gamma })\).

(ii) Letting \((x^S;z^S)\) be the seller-optimal core allocation in the two-sided market \(\gamma ^*\) and taking \((x^S;0_M;z^S)\), the same argument allows to write \(z^S_k=mc_k(v_{\gamma ^*})=mc_k(v_{\gamma })\) for all \(k\in S\) at \((x^S;0_{M};z^S)\in Core(v_{\gamma })\). \(\square \)

Remark that Theorem 3 claims the existence of a buyer-optimal (seller-optimal) allocation, but not that of a middleman-optimal allocation. Indeed, it is not true in general that there exists an allocation where all middlemen achieve their highest payoff in the core (this is shown in the next section, where we present results and examples with two buyers and two sellers).

5 Core payoffs in markets with two buyers and two sellers

Let us consider a matching market with middlemen \(\gamma =(B,M,S,\varvec{A},\hat{\varvec{A}})\) where there are two buyers \(B=\{i_{1},i_{2}\}\), two sellers \(S=\{k_{1},k_{2}\}\). Let \(N=B\cup M\cup S\) be the set of all agents.

First, we assume that there is only one middleman \(M=\{j\}\). The total surplus of direct trade between a buyer and a seller is given by the two-dimensional non-negative matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\) and the joint surplus generated by triplets formed by a buyer, a seller, and the middleman is given by the following non-negative matrix \(\hat{\varvec{A}}=(\hat{a}_{ijk})_{\begin{array}{c} i\in B; k\in S \end{array}}\) with j being the only middleman. Notice that we do not assume any domination relation between the elements of the two market surplus matrices.

In the corresponding TU-game, the value of any singleton coalition is zero, the value of a buyer–seller pair (ik) is their surplus \(a_{ik}\ge 0\). The value of a buyer-middleman-seller triplet (ijk), however, is not necessarily their surplus \(\hat{a}_{ijk}\ge 0\), but the maximum added value these three players can generate, namely, \(b_{ik}:=a_{ik}\vee \hat{a}_{ijk}\), where \(p\vee q:=\max \{p,q\}\) for any two real numbers pq. It is easily seen that in our special \(2\times 1\times 2\) case the value of any other coalition is the maximum value of the partitions of the coalition in these three types of basic coalitions: singletons, buyer–seller pairs, and buyer-middleman-seller triplets. Therefore, only these basic coalitions are essential in the game. Hence the core is the solution set of the following system, where the x’s, z’s, and y’s denote the respective payoffs to the buyers, sellers and middlemen, and \(\alpha \), \(\beta \) denote the respective maximum values of the matchings in matrix \(\varvec{A}\), \(\varvec{A}^{*}\).

$$\begin{aligned} \begin{array}{c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}l} x_1 &{} , &{} x_2 &{} , &{} z_1 &{} , &{} z_2 &{} , &{} y &{} \ge &{} 0 \\ \hline x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} + &{} y &{} = &{} \beta \\ \hline x_1 &{} &{} . &{} + &{} z_1 &{} &{} . &{} &{} . &{} \ge &{} a_{11} \\ x_1 &{} &{} . &{} &{} . &{} + &{} z_2 &{} &{} . &{} \ge &{} a_{12} \\ . &{} &{} x_2 &{} + &{} z_1 &{} &{} . &{} &{} . &{} \ge &{} a_{21} \\ . &{} &{} x_2 &{} &{} . &{} + &{} z_2 &{} &{} . &{} \ge &{} a_{22} \\ \hline x_1 &{} &{} . &{} + &{} z_1 &{} &{} . &{} + &{} y &{} \ge &{} b_{11} \\ x_1 &{} &{} . &{} &{} . &{} + &{} z_2 &{} + &{} y &{} \ge &{} b_{12} \\ . &{} &{} x_2 &{} + &{} z_1 &{} &{} . &{} + &{} y &{} \ge &{} b_{21} \\ . &{} &{} x_2 &{} &{} . &{} + &{} z_2 &{} + &{} y &{} \ge &{} b_{22} \\ \hline \end{array} \end{aligned}$$
(6)

Since \(b_{ik}\ge a_{ik}\) for all \(i\in B, k\in S\), note that we trivially have \(\beta \ge \alpha \).

We proved in Theorem 2 that the core is not empty; and Theorem 3 guarantees that both buyers (both sellers) can simultaneously achieve their marginal contributions in the core. Next, we show that the maximum core payoff to the single middleman j is also her marginal contribution \(mc_{j}=v_{\gamma }(N)-v_{\gamma }(N\setminus \{j\})=\beta -\alpha \).

Proposition 4

In a matching market with two buyers, two sellers, and one middleman, the maximum core payoff to the middleman is her marginal contribution to the grand coalition.

Proof

We show that system (6) has a solution with \(y=\beta -\alpha \). This substitution and the combination of the two inequalities corresponding to the same buyer–seller pairs give the following system:

$$\begin{aligned} \begin{array}{c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}l} x_1 &{} , &{} x_2 &{} , &{} z_1 &{} , &{} z_2 &{} \ge &{} 0 \\ \hline x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} = &{} \alpha \\ \hline x_1 &{} &{} . &{} + &{} z_1 &{} &{} . &{} \ge &{} c_{11}:= a_{11} \vee (b_{11}-\beta + \alpha ) \\ x_1 &{} &{} . &{} &{} . &{} + &{} z_2 &{} \ge &{} c_{12}:= a_{12} \vee (b_{12}-\beta + \alpha ) \\ . &{} &{} x_2 &{} + &{} z_1 &{} &{} . &{} \ge &{} c_{21}:= a_{21} \vee (b_{21}-\beta + \alpha ) \\ . &{} &{} x_2 &{} &{} . &{} + &{} z_2 &{} \ge &{} c_{22}:= a_{22} \vee (b_{22}-\beta + \alpha ) \\ \hline \end{array} \end{aligned}$$
(7)

We claim that (7) is the core system of the two-sided assignment game induced by the \(2\times 2\) matrix \(\varvec{C}\), hence it has a solution. Since matrix \(\varvec{C}\) entry-wise weakly majorates the direct trade matrix \(\varvec{A}\), only the efficiency condition must be checked. The minimum total payoff needed to cover all entries in \(\varvec{C}\) is clearly at least \(\alpha \), that is the minimum total payoff needed to cover \(\varvec{A}\). Consequently, system (7) has a solution if and only if the maximum value of the matchings in the modified \(2\times 2\) matrix \(\varvec{C}\) also equals to \(\alpha \). We show precisely this.

We assume without loss of generality that the main diagonal is optimal in matrix \(\varvec{A}\), i.e., \(\alpha =a_{11}+a_{22}\). There are two cases depending on which matching is optimal in matrix \(\varvec{A}^{*}\).

Case 1: \(\beta =b_{11}+b_{22}\ge b_{12}+b_{21}\).

Then \(a_{11} \ge b_{11}-\beta + \alpha = -b_{22}+a_{22}+a_{11}\), because of \(-b_{22}+a_{22}\le 0\). Thus, \(c_{11} = a_{11}\). Similarly, \(c_{22}=a_{22} \ge b_{22}-\beta + \alpha \). Therefore, the value \(c_{11}+c_{22}\) of the matching in the main diagonal equals \(\alpha \). We show that the value \(c_{12}+c_{21}\) of the matching in the minor diagonal is at most \(\alpha \). There are four subcases depending on whether the first or the second term majorates the other in the definition of \(c_{12}\) and \(c_{21}\).

– The case \(c_{12}=a_{12}\) and \(c_{21}=a_{21}\) comes trivially from \(a_{12}+a_{21}\le \alpha \).

– If \(c_{12}=a_{12}\) and \(c_{21}=b_{21}-\beta +\alpha \) then \(a_{12}+b_{21}-\beta +\alpha \le b_{12}+b_{21}-\beta +\alpha \le +\alpha \), becasue of \(a_{12}\le b_{12}\) and \(b_{12}+b_{21}\le \beta \).

– The case \(c_{12}=b_{12}-\beta + \alpha \) and \(c_{21}=a_{21}\) is seen similarly by interchanging the indices.

– Finally, if \(c_{12}=b_{12}-\beta +\alpha \) and \(c_{21}=b_{21}-\beta +\alpha \) then \(b_{12}-\beta +\alpha +b_{21}-\beta +\alpha \le \alpha \), becasue of \(b_{12}+b_{21}\le \beta \) and \(\alpha \le \beta \).

Case 2: \(\beta =b_{12}+b_{21}\ge b_{11}+b_{22}\).

Then \(a_{12} \ge b_{12}-\beta +\alpha = -b_{21}+\alpha \), because of \(-b_{21}\ge -a_{21}\) and \(-a_{21}+\alpha \le a_{12}\). Thus, \(c_{12} = a_{12}\). Similarly, \(c_{21}=a_{21} \ge b_{21}-\beta + \alpha \). Therefore, the value \(c_{12}+c_{21}\) of the matching in the minor diagonal is at most \(\alpha \). We show that the value \(c_{11}+c_{22}\) of the matching in the main diagonal is also at most \(\alpha \). In fact, it equals to \(\alpha \) since \(c_{11}+c_{22} \ge a_{11}+a_{22} =\alpha \). There are four subcases depending on whether the first or the second term majorates the other in the definition of \(c_{11}\) and \(c_{22}\).

– The case \(c_{11}=a_{11}\) and \(c_{22}=a_{22}\) comes trivially from \(a_{12}+a_{21}=\alpha \).

– If \(c_{11}=a_{11}\) and \(c_{22}=b_{22}-\beta +\alpha \) then \(a_{11}+b_{22}-\beta +\alpha \le b_{11}+b_{22}-\beta +\alpha \le +\alpha \), because of \(a_{11}\le b_{11}\) and \(b_{11}+b_{22}\le \beta \).

– The case \(c_{11}=b_{11}-\beta +\alpha \) and \(c_{22}=a_{22}\) is seen similarly by using \(a_{22}\le b_{22}\).

– Finally, if \(c_{11}=b_{11}-\beta +\alpha \) and \(c_{22}=b_{22}-\beta +\alpha \) then \(b_{11}-\beta +\alpha +b_{22}-\beta +\alpha \le \alpha \), because of \(b_{11}+b_{22}\le \beta \) and \(\alpha \le \beta \). \(\square \)

We remark that, unfortunately, this proof cannot be easily generalized to markets with one middleman, \(|B|\ge 3\) buyers, and \(|S|\ge 3\) sellers. A practical difficulty is that the number of matchings whose value must be checked in the modified matrix \(\varvec{C}\) grows factorially in \(|B|=|S|\) (due to the dummy-player property of the core, this balancing assumption is clearly not restrictive), so case enumeration becomes prohibitive. A more fundamental theoretical difficulty is that in such larger markets, the core system must also contain inequalities corresponding to coalitions composed of h buyers, h sellers, and the middleman, for any size \(1\le h\le |B|-1\). In case of \(|B|=|S|=3\), for example, the inequalities of the type \(x_{i}+x_{i'}+z_{k}+z_{k'}+y\ge v_{\gamma }(\{i,i',j,k,k'\})\) must also be present in the core system, thus after setting \(y=\beta -\alpha \), the inequalities \(x_{i}+x_{i'}+z_{k}+z_{k'}\ge v_{\gamma }(\{i,i',j,k,k'\})-\beta +\alpha \) appear in the modified system. In the core system of a two-sided assignment game, however, such inequalities are redundant. Thus, these inequalities corresponding to larger, \((h+h+1)\)-member coalitions have no counterpart in an assignment core system, hence the idea of the above proof, namely that the modified system is precisely the core system of a two-sided assignment game obtained by possibly increasing some elements in the direct trade matrix, cannot be applied. At least not in a straightforward manner. Nevertheless, we conjecture that Proposition 4 generalizes to markets with more than two buyers and sellers: in any matching market with a single middleman, the maximum core payoff to the middleman is her marginal contribution to the grand coalition.

On the other hand, we can generalize Proposition 4 to markets with two buyers, two sellers, and with more than one middlemen. Our proof is analogous to that of Theorem 2 where we exhibited the existence of core allocations in a market with middlemen by setting all middlemen payoffs to zero and showing that the reduced core system coincides with the (non-empty) core of the two-sided assignment game induced by the entrywise maximum of the surplus matrices. Here we reduce the core system of a two-buyer–two-seller market with any number of middlemen to one with a single middleman and apply Proposition 4.

Corollary 1

If there are two buyers and two sellers in a matching market with middlemen, the maximum core payoff to each middleman is her marginal contribution to the grand coalition.

Proof

Consider a matching market with middlemen \(\gamma =(B,M,S,\varvec{A},\hat{\varvec{A}})\) where there are two buyers \(B=\{i_{1},i_{2}\}\) and two sellers \(S=\{k_{1},k_{2}\}\), and \(N=B\cup M\cup S\) is the set of all agents. To avoid repeating Proposition 4, we assume \(|M|\ge 2\). The core system of the corresponding game \((N,v_{\gamma })\) consists of the efficiency equation (setting the sum of the \((2+2+|M|)\) payoffs equal to \(v_{\gamma }(N)\)), the four direct trade constraints verbatim as in the first block of system (6), and one block of five constraints for each middleman \(h\in M\) containing only her payoff \(y_h\) from the middleman payoffs. Four of these inequalities are related to the triplets with \(h\in M\), the fifth one is the rationality constraint for coalition \(B\cup \{h\}\cup S\).

Schematically, in case of three middlemen \(M=\{j_1,j_2,j_3\}\), the core system is

$$\begin{aligned} \begin{array}{c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}ll} x_1 &{} , &{} x_2 &{} , &{} z_1 &{} , &{} z_2 &{} , &{} y_1 &{} , &{} y_2 &{} , &{} y_3 &{} \ge &{} 0 \\ \hline x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} + &{} y_1 &{} + &{} y_2 &{} + &{} y_3 &{} = &{} v_{\gamma }(N) \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} &{} . &{} &{} . &{} &{} . &{} \ge &{} v_{\gamma }(ik)=a_{ik} &{} \forall i\in B,k\in S \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} + &{} y_1 &{} &{} . &{} &{} . &{} \ge &{} v_{\gamma }(ij_{1}k)=a_{ik}\vee \hat{a}_{ij_{1}k} &{} \forall i\in B,k\in S \\ x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} + &{} y_1 &{} &{} . &{} &{} . &{} \ge &{} v_{\gamma }(B\cup \{j_1\}\cup S) \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} &{} . &{} + &{} y_2 &{} &{} . &{} \ge &{} v_{\gamma }(ij_{2}k)=a_{ik}\vee \hat{a}_{ij_{2}k} &{} \forall i\in B,k\in S\\ x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} &{} . &{} + &{} y_2 &{} &{} . &{} \ge &{} v_{\gamma }(B\cup \{j_2\}\cup S) \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} &{} . &{} &{} . &{} + &{} y_3 &{} \ge &{} v_{\gamma }(ij_{3}k)=a_{ik}\vee \hat{a}_{ij_{3}k} &{} \forall i\in B,k\in S\\ x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} &{} . &{} &{} . &{} + &{} y_3 &{} \ge &{} v_{\gamma }(B\cup \{j_3\}\cup S) \\ \hline \end{array} \end{aligned}$$
(8)

where the payoffs to the buyers, sellers, and middlemen are denoted by x’s, z’s, and y’s, respectively. For sake of transparency, we list the middleman payoffs last.

Although, in general, any of the \(x_1+x_2+z_1+z_2+ y_h \ge v_{\gamma }(B\cup \{h\}\cup S)\) inequalities \((h\in M)\) is not redundant in the core system, but if we set \(y_h=0\) then it is implied by two of the four \(x_i+z_k+ y_h \ge v_{\gamma }(ihk)\) \((i\in B,k\in S)\) inequalities in the same block, for \(v_{\gamma }(B\cup \{h\}\cup S)\) is the maximum of \(v_{\gamma }(1h1)+v_{\gamma }(2h2)\) and \(v_{\gamma }(1h2)+v_{\gamma }(2h1)\).

Let middleman \(j\in M\) be chosen arbitrarily. If we set \(y_h=0\) for all \(h\in M\setminus \{j\}\) then the corresponding \(x_1+x_2+z_1+z_2 \ge v_{\gamma }(B\cup \{h\}\cup S)\) inequalities can be discarded, and the four \(x_i+z_k \ge v_{\gamma }(ihk)\) inequalities can be combined with the corresponding direct trade \(x_i+z_k \ge v_{\gamma }(ik)\) inequalities for every buyer–seller pair \(i\in B, k\in S\). The \(x_1+x_2+z_1+z_2+y_j \ge v_{\gamma }(B\cup \{j\}\cup S)\) inequality with the distinguished middleman j is implied by the reduced efficiency equation \(x_1+x_2+z_1+z_2+y_j = v_{\gamma }(N)\) and the monotonicity of the game \(v_{\gamma }\). The core system of \(v_{\gamma }\) reduces to a system with \(|M|-1\) less variables and \(5\cdot (|M|-1)+1\) less inequalities. For example, if we choose \(j=j_1\) for the specific middleman, set \(y_h=0\) for all \(h\in M\setminus \{j_1\}\), and take into account \(v_{\gamma }(ik)=a_{ik}\) and \(v_{\gamma }(ihk)=a_{ik}\vee \hat{a}_{ihk}\), we get the reduced core system

$$\begin{aligned} \begin{array}{c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}c@{\;}ll} x_1 &{} , &{} x_2 &{} , &{} z_1 &{} , &{} z_2 &{} , &{} y_1 &{} \ge &{} 0 \\ \hline x_1 &{} + &{} x_2 &{} + &{} z_1 &{} + &{} z_2 &{} + &{} y_1 &{} = &{} v_{\gamma }(N) \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} &{} . &{} \ge &{} a_{ik}\vee \bigvee _{h\ne j}\hat{a}_{ihk} &{} \forall i\in B,k\in S \\ \hline &{} x_i &{} &{} + &{} &{} z_k &{} &{} + &{} y_1 &{} \ge &{} a_{ik}\vee \hat{a}_{ij_{1}k} &{} \forall i\in B,k\in S \\ \hline \end{array} \end{aligned}$$
(9)

Notice that for any buyer–seller pair \(i\in B, k\in S\), the inequality \(x_i+z_k \ge a_{ik}\vee \bigvee _{h\ne j_1}\hat{a}_{ihk}\) and the non-negativity of \(y_1\) implies \(x_i+z_k+y_1 \ge a_{ik}\vee \bigvee _{h\ne j_1}\hat{a}_{ihk}\). This combined with the corresponding inequality \(x_i+z_k+y_1 \ge a_{ik}\vee \hat{a}_{ij_1k}\) in the last block of (9) gives us \(x_i+z_k+y_1 \ge a_{ik}\vee \bigvee _{h\in M}\hat{a}_{ihk}\).

We claim that the reduced core system (9) has a solution in which \(y_1=v_{\gamma }(N)-v_{\gamma }(N\setminus \{j_1\})\). To see this, we define a market \(\gamma ^{\prime }=(B,\{j_1\},S,\varvec{A}^{\prime },\hat{\varvec{A}}^{\prime })\) with the same two buyers and two sellers, but with only one middleman, \(j_1\). The direct trade surpluses are given by \(a^{\prime }_{ik}:=a_{ik}\vee \max \{ \hat{a}_{ihk} : h\in M\setminus \{j_1\} \}\), while the buyer-middleman-seller surpluses with \(j_1\) are the same as in the original market, that is \(\hat{a}^{\prime }_{ij_1k}:=\hat{a}_{ij_1k}\) for all pairs \(i\in B, k\in S\). Proposition 4 implies that there is an allocation \((x^{\prime }_1,x^{\prime }_2;z^{\prime }_1,z^{\prime }_2;y^{\prime }_1)\) in the core of game \((B\cup \{j_1\}\cup S,v_{\gamma ^{\prime }})\) where the payoff to the only middleman \(j_1\) is \(y_1=v_{\gamma ^{\prime }}(B\cup \{j_1\}\cup S)-v_{\gamma ^{\prime }}(B\cup S)\). It means that allocation \((x^{\prime }_1,x^{\prime }_2;z^{\prime }_1,z^{\prime }_2;y^{\prime }_1)\) is a solution of system (6) corresponding to market \(\gamma ^{\prime }\), when all right hand sides are replaced with their adjusted \((.)^{\prime }\)-ed version, in particular, with \(\beta ^{\prime }=v_{\gamma ^{\prime }}(B\cup \{j_1\}\cup S)\) in the efficiency equation, and \(b^{\prime }_{ik}=a^{\prime }_{ik}\vee \hat{a}^{\prime }_{ij_1k}=a_{ik}\vee \bigvee _{h\in M\setminus \{j_1\}} \hat{a}_{ihk} \vee \hat{a}_{ij_1k}=a_{ik}\vee \bigvee _{h\in M} \hat{a}_{ihk}\) for pair \(i\in B, k\in S\) in the last block.

Since the direct trade surpluses for any pair \(i\in B, k\in S\) in market \(\gamma ^{\prime }\) incorporate all their possibilities to trade via any middlemen except \(j_1\) in the original market \(\gamma \), we get \(\beta ^{\prime }=v_{\gamma ^{\prime }}(B\cup \{j_1\}\cup S)=v_{\gamma }(N)\) and \(v_{\gamma ^{\prime }}(B\cup S)=v_{\gamma }(N\setminus \{j_1\})\). Thus, the payoff \(y^{\prime }_1\) to middleman \(j_1\) is her marginal contribution to the grand coalition also in the original game \((N,v_{\gamma })\). It is clear that if we augment any solution of the reduced core system (9) with zero payoff to all middlemen except j, we get a core allocation in game \(v_{\gamma }\). In particular, inflating allocation \((x^{\prime }_1,x^{\prime }_2;z^{\prime }_1,z^{\prime }_2;y^{\prime }_1)\) with \(|M|-1\) zero payoffs, we get a core allocation in game \(v_{\gamma }\) where middleman \(j=j_1\) receives her marginal contribution to the grand coalition in game \(v_{\gamma }\). This completes our proof. \(\square \)

Next we demonstrate that, unlike for the buyers and the sellers, if there are at least two middlemen, there may not exist a middleman-optimal core allocation (where all middlemen receive their maximum core payoff at the same time). This can already happen in the smallest possible non-trivial case, i.e., when there are two buyers, two sellers, and two middlemen, although as Corollary 1 tells, individually each middleman can achieve the theoretical maximum of her core payoffs.

Example 3

Let us consider a matching market with middlemen \(\gamma =(B,M,S,\varvec{A},\hat{\varvec{A}})\) where there are two buyers \(B=\{i_{1},i_{2}\}\), two sellers \(S=\{k_{1},k_{2}\}\), and two middlemen \(M=\{j_{1},j_{2}\}\). Let \(N=B\cup M\cup S\) be the set of all agents. The total surplus of direct trade between a buyer and a seller is given by the following two-dimensional non-negative matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B; k\in S \end{array}}\) and the joint surplus generated by triplets formed by a buyer, a seller, and middleman \(j_1\) or \(j_2\) are given, respectively, by the following two non-negative matrices \(\varvec{A}^{(j_{1})}=(a_{ij_1 k})_{\begin{array}{c} i\in B; k\in S \end{array}}\) and \(\varvec{A}^{(j_{2})}=(a_{ij_2 k})_{\begin{array}{c} i\in B; k\in S \end{array}}\)

Notice that in some cases the direct trade provides a higher surplus than a mediated trade, in other cases the opposite holds.

In the corresponding TU-game \((N,v_{\gamma })\), the value of the grand coalition is \(13=5+8\), the value of the optimal matching (the diagonal one) in the entry-wise cover matrix \(\varvec{A}^*\) of matrices \(\varvec{A}\), \(\varvec{A}^{(j_{1})}\), and \(\varvec{A}^{(j_{2})}\) (the leftmost one below):

The value of coalition \(N\setminus \{j_2\}\) is \(12=5+7=6+6\), the value of the optimal matching (either one) in the entry-wise cover matrix \(\varvec{A}^{(-j_{2})}\) of matrices \(\varvec{A}\) and \(\varvec{A}^{(j_{1})}\) (the middle one above). Thus, the marginal contribution of middleman \(j_2\) to the grand coalition is \(1=13-12\).

Similarly, the value of coalition \(N\setminus \{j_1\}\) is obtained from the entry-wise cover matrix \(\varvec{A}^{(-1)}\) of matrices \(\varvec{A}\) and \(\varvec{A}^{(2)}\) (the rightmost one above). It is \(12=4+8=6+6\) (again both matchings are optimal). Thus, the marginal contribution of middleman \(j_1\) to the grand coalition is also \(1=13-12\).

Finally, the value of coalition \(N\setminus \{j_1,j_2\}=B\cup S\) is \(12=6+6\), the maximum value of matchings in the direct trade matrix \(\varvec{A}\) (attained in the minor diagonal). Thus, the total payoff to the two middlemen in the core can also be at most \(1=13-12\), implying that if \(y_1=1\) then \(y_2=0\) must hold, and vice versa.

On the other hand, it is easily checked that the following eight payoff vectors (where the payoffs to the buyers, sellers, and middlemen are denoted by x’s, z’s, and y’s, respectively) are all core allocations in our middleman market game \((N,v_{\gamma })\).

$$\begin{aligned} \begin{array}{|cc|cc|cc|} x_1 &{} x_2 &{} z_1 &{} z_2 &{} y_1 &{} y_2 \\ \hline 5 &{} 7 &{} 0 &{} 1 &{} 0 &{} 0 \\ 5 &{} 6 &{} 0 &{} 2 &{} 0 &{} 0 \\ 0 &{} 1 &{} 5 &{} 7 &{} 0 &{} 0 \\ 0 &{} 2 &{} 5 &{} 6 &{} 0 &{} 0 \\ \hline 4 &{} 6 &{} 0 &{} 2 &{} 1 &{} 0 \\ 0 &{} 2 &{} 4 &{} 6 &{} 1 &{} 0 \\ \hline 5 &{} 6 &{} 0 &{} 1 &{} 0 &{} 1 \\ 0 &{} 1 &{} 5 &{} 6 &{} 0 &{} 1 \\ \hline \end{array} \end{aligned}$$

The two allocations in the second and the third segments show that both middlemen can achieve their marginal contribution in the core, illustrating Corollary 1. Therefore, there is no middleman-optimal core allocation, the maximum core payoffs for both middlemen cannot be simultaneously attained.

We remark that the four allocations in the first segment give a full description of the \(y_1=0\), \(y_2=0\) facet of the core in \((N,v_{\gamma })\), that is precisely the core of the two-sided assignment game \((B\cup S,v_{\gamma ^*})\) induced by matrix \(\varvec{A}^*\), illustrating Theorem 2. The first payoff vector is the buyer-optimal core allocation, in both \((N,v_{\gamma })\) and \((B\cup S,v_{\gamma ^*})\), the third one is the seller-optimal core allocation, again in both games.

Similarly, the two allocations in the second segment give a full description of the \(y_1=1\), \(y_2=0\) facet of the core in \((N,v_{\gamma })\), that is precisely the core of the assignment game \((B\cup S,v_{\gamma ^{(-j_{1})}})\) induced by matrix \(\varvec{A}^{(-j_{1})}\). Likewise, the two allocations in the third segment give a full description of the \(y_1=0\), \(y_2=1\) facet of the core in \((N,v_{\gamma })\), that is precisely the core of the assignment game \((B\cup S,v_{\gamma ^{(-j_{2})}})\) induced by matrix \(\varvec{A}^{(-j_{2})}\).

6 Core and competitive equilibria

The aim of this section is to study the relationship between core and competitive equilibria in matching markets with middlemen. Gale (1960) defines competitive equilibrium prices and proves their existence for any assignment problem (see also (Shapley & Shubik, 1971)). Tejada (2010) extends the coincidence between core and competitive equilibria for the classical three-sided assignment markets where buyers are forced to acquire exactly one item of each type. In a similar fashion, Atay et al. (2016) generalize the equivalence result for the generalized three-sided assignment markets where buyers can buy at most one good of each type. In both extensions, the existence of a competitive equilibrium is guaranteed whenever the core is non-empty.

Consider any market with middlemen where the set of buyers is \(B=\{i_1 , \cdots , i_{|B|}\}\), the set of middlemen is \(M=\{j_1, \cdots , j_{|M|}\}\), and the set of sellers is \(S=\{k_1,\cdots ,k_{|S|}\}\). Assume that buyers and sellers trade through the competitive market with the presence of middlemen and agents in the market are price-takers. Each buyer \(i\in B\) demands at most one unit of the good, each seller \(k\in S\) offers one unit for sale (recall that units owned by different sellers may be heterogeneous). Assume that buyer i values the good of seller k at \(h_{ik}\), and the production cost of the good for seller k is \(c_{k}\). If buyer i and seller k trade directly, the transaction (search) cost \(t_{ik}\), is incurred by buyer i. If buyer i instead hires middleman j and ends up purchasing the object owned by seller k, then the transaction cost \(t_{ijk}\) is incurred by buyer i; and middleman \(j\in M\) incurs the mediation cost \(c_{j}^{ik}\).

Let \(p_{k}\) be the price demanded by seller k for her unit; and assume that middleman \(j\in M\) charges a fee \(p_{j}^{ik}\) to buyer i when the latter uses j’s services to purchase the unit owned by seller k. Note that middlemen need not charge the same fee for each possible buyer–seller trade. That is, it may happen that \(p_{j}^{ik}\ne p_{j}^{i'k'}\) when j is mediating the respective pairs (ik) and \((i',k')\) (with the possibility of having either \(i=i'\) or \(k=k'\)).

If the transaction between buyer i and seller k is realized through middleman j, then the utility of buyer i is given by \(h_{ik}-t_{ijk}-p^{ik}_{j}-p_{k}\), the benefit of seller k is \(p_{k}-c_{k}\), and the benefit of middleman j is \(p^{ik}_{j}-c^{ik}_{j}\). Thus, the total surplus is \(h_{ik}-t_{ijk}-p^{ik}_{j}-p_{k}+p^{ik}_{j}+p_{k}-c^{ik}_{j}-c_{k}=h_{ik}-t_{ijk}-c_{j}^{ik}-c_{k}\). If \(h_{ik}-t_{ijk}-c_{j}^{ik}-c_{k}<0\), no transaction will be realized since a transaction will go through only if it gives a non-negative utility to each of the three agents i, j and k. Thus, for all \((i,j,k)\in B\times M\times S\), let \(\hat{a}_{ijk}=\max \{0,h_{ik}-t_{ijk}-c^{ik}_{j}-c_{k}\}\) denote the surplus generated when a transaction is realized between buyer i and seller k through middleman j. Similarly, when the transaction is realized directly between buyer i and seller k, the utility of buyer i is \(h_{ik}-t_{ik}-p_{k}\), the benefit of seller k is \(p_{k}-c_{k}\), and hence the total surplus is \(h_{ik}-t_{ik}-p_{k}+p_{k}-c_{k}=h_{ik}-t_{ik}-c_{k}=a_{ik}\). If \(h_{ik}-t_{ik}-c_{k}<0\), no transaction will be realized between buyer i and seller k. Thus, for all \((i,k)\in B\times S\), let \(a_{ik}=\max \{0,h_{ik}-t_{ik}-c_{k}\}\) denote the surplus generated when a transaction is realized directly between buyer i and seller k. Hence, this detailed market situation can be summarized by a tuple simply giving the set of buyers, the set of middlemen, the set of sellers, and the two matrices with generic terms \(a_{ik}\) and \(\hat{a}_{ijk}\) defined above. That is to say, the TU game \((N, v_{\gamma })\) associated with this market is defined precisely by the characteristic function \(v_\gamma \) given in (1).

We want to show that each core allocation can be obtained as the result of trading at competitive prices. To do so, we need some definitions allowing to introduce the notion of competitive price vector. A price vector \(p\in \mathbb {R}^{B\times M\times S}_{+}\times \mathbb {R}^{S}_{+}\) contains the specific, possibly differentiated prices, of the mediation services for each buyer-middleman-seller configuration as well as the undifferentiated prices of the goods.

Given a matching market with middlemen \(\gamma \), a feasible price vector is \(p\in \mathbb {R}^{B\times M\times S}_{+}\times \mathbb {R}^{S}_{+}\) such that \(p^{ik}_{j}\ge c^{ik}_{j}\) for all \(j\in M\) and \(p_{k}\ge c_{k}\) for all \(k\in S\). The set of basic coalitions that contain buyer \(i\in B\) is \(\mathcal {B}^{i}=\{E\in \mathcal {B}^{N}\mid i\in E\}\). Let \(w^{i}(E)=h_{ik}-t_{ijk}\) be the valuation of buyer i for \(E=\{i,j,k\}\) and \(w^{i}(E)=h_{ik}-t_{ik}\) be the valuation of buyer i for \(E=\{i,k\}\). Observe the relation

$$\begin{aligned} v_\gamma (E)=\max \left\{ 0,\, w^i(E)-c(E\setminus \{i\}) \right\} \end{aligned}$$
(10)

for any basic coalition \(E\in \mathcal {B}^{i}\) containing buyer i.

Next, for each feasible price vector \(p\in \mathbb {R}^{B\times M\times S}_{+}\times \mathbb {R}^{S}_{+}\) we introduce the demand set of each buyer \(i\in B\).

Definition 2

Let \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) be a matching market with middlemen. The demand set of buyer \(i\in B\) at a feasible price vector \(p\in \mathbb {R}^{B\times M\times S}_{+}\times \mathbb {R}^{S}_{+}\) is

$$\begin{aligned} D_{i}(p)=\left\{ E\in \mathcal {B}^{i}\mid \, w^{i}(E)-p(E\setminus \{i\})\ge w^{i}(E')-p(E'\setminus \{i\}) \text { for all } E'\in \mathcal {B}^{{i}} \right\} . \end{aligned}$$

Note that \(D_{i}(p)\) describes the set of basic coalitions containing buyer i that maximize the net valuation of buyer i at prices p. Notice also that the demand set of a buyer \(i \in B\) is always non-empty since i can always demand \(E=\{i\}\) with a net profit of 0.

Given an N-matching \(\mu \), we say that a middleman \(j\in M\) is unassigned (by \(\mu \)) if \(\mu (j)=j\) and we say that a seller \(k\in S\) is unassigned (by \(\mu )\) if there is no \(i\in B\) such that \(k= \mu (i)\). Now, we can introduce the notion of competitive equilibrium for our model. The literature has adopted the approach of Roth and Sotomayor (1990) for the definition of a competitive equilibrium in matching markets. We adapt this definition to our context with three-sided matching with buyers, middlemen, and sellers.

Definition 3

Given a matching market with middlemen \(\gamma =(B,M,S, \varvec{A}, \varvec{\hat{A}})\), a pair \((p,\mu )\) composed of a price vector p and an N-matching \(\mu \) forms a competitive equilibrium if

  1. (i)

    p is a feasible price vector, i.e., \(p\in \mathbb {R}^{B\times M\times S}_{+}\times \mathbb {R}^{S}_{+}\) such that \(p^{ik}_{j}\ge c^{ik}_{j}\) for all \(j\in M\) and \(p_{k}\ge c_{k}\) for all \(k\in S\),

  2. (ii)

    for each buyer \(i\in B\) and basic coalition \(E\in \mathcal {B}^{{i}}\), if \(E\in \mu \) then \(E\in D_{i}(p)\),

  3. (iii)

    for each middleman \(j\in M\), if j is unassigned by \(\mu \), then \(p_{j}^{ik}=c_{j}^{ik}\) for all buyer–seller pairs \((i,k)\in B\times S\),

  4. (iv)

    for each seller \(k\in S\), if k is unassigned by \(\mu \), then \(p_{k}=c_{k}\).

Observe that a competitive equilibrium consists of a set of prices and an N-matching where each buyer maximizes her utility under the assignment of N-matching and prices. Moreover, middlemen and sellers are competitive, in the sense that no middleman mediates a trade unless she can charge a fee (service price) at least equal to her cost and no seller agrees to sell her good without receiving at least her cost. If a pair \((p,\mu )\) is a competitive equilibrium, then we say that the price vector p is a competitive equilibrium price vector and the N-matching \(\mu \) is a compatible matching. The corresponding payoff vector for a given pair \((p,\mu )\) is called competitive equilibrium payoff vector. This payoff vector is \((x(p,\mu ),y(p,\mu ),z(p,\mu ))\in \mathbb {R}^{B}\times \mathbb {R}^{M}\times \mathbb {R}^{S}\), defined by

$$\begin{aligned} x_{i}(p,\mu )= & {} w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\}) \text{ where } i\in E^{\mu (i)}\in \mu \quad \text{ for } \text{ all } i\in B,\\ y_{j}(p,\mu )= & {} \sum \limits _{\{i,j,k\}\in {\mu }} p_{j}^{ik} - \sum \limits _{\{i,j,k\}\in {\mu }} c_{j}^{ik} = p_{j}(\mu ) - c_{j}(\mu ) \quad \text{ for } \text{ all } j\in M,\\ z_{k}(p,\mu )= & {} p_{k}-c_{k} \quad \text{ for } \text{ all } k\in S. \end{aligned}$$

Notice the dependence of the aggregated service prices (fees) \(p_{j}(\mu )\) and the aggregated service costs \(c_{j}(\mu )\) on the matching \(\mu \).

We denote the set of competitive equilibrium payoff vectors of market \(\gamma \) by \(\mathcal{C}\mathcal{E}(\gamma )\). We now study the relationship between the core of \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\) and the set of competitive equilibrium payoff vectors. First, we show that an N-matching \(\mu \) is an optimal matching whenever it constitutes a competitive equilibrium with a feasible price vector p.

Lemma 1

Given a matching market with middlemen \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\), if \((p,\mu )\) is a competitive equilibrium, then \(\mu \) is an optimal matching.

Proof

Consider a competitive equilibrium \((p,\mu )\) and another N-matching \(\mu '\in \mathcal {M}(B,M,S)\). For buyer \(i\in B\), let \(E^{\mu (i)}\in \mathcal {B}^{i}\) be the (unique) basic coalition assigned to i under the matching \(\mu \), that is, \(i\in E^{\mu (i)}\in \mu \), and \(E^{\mu '(i)}\in \mathcal {B}^{i}\) be the (unique) basic coalition assigned to i under the matching \(\mu '\), that is, \(i\in E^{\mu '(i)}\in \mu '\). We can assume, without loss of generality, that \(\mu '\) is such that for any \(i\in B\), if \(E^{\mu '(i)}\) is not a singleton then \(w^{i}(E^{\mu '(i)})-c(E^{\mu '(i)}\setminus \{i\})\ge 0\), for otherwise we could replace \(E^{\mu '(i)}\) with the singleton coalitions of its members and get a (finer) N-matching \(\mu ''\) with the same total value for N. Then,

$$\begin{aligned}&\sum \limits _{E\in \mu }v_{\gamma }(E) \overset{\text {(1)}}{\ge } \sum \limits _{i\in B} \left( w^{i}(E^{\mu (i)})-c(E^{\mu (i)}\setminus \{i\}) \right) \\&\quad \overset{\text {(2)}}{\ge } \sum \limits _{i\in B} \left( w^{i}(E^{\mu '(i)})-c(E^{\mu (i)}\setminus \{i\})-p(E^{\mu '(i)}\setminus \{i\})+p(E^{\mu (i)}\setminus \{i\}) \right) \\&\quad \overset{\text {(3)}}{=} \sum \limits _{i\in B} \left( w^{i}(E^{\mu '(i)})-c(E^{\mu (i)}\setminus \{i\})\right) - p\left( \bigcup _{i\in B}E^{\mu '(i)}\setminus B\right) +p\left( \bigcup _{i\in B}E^{\mu (i)}\setminus B\right) \\&\quad \overset{\text {(4)}}{=} \sum \limits _{i\in B}w^{i}(E^{\mu '(i)})-c\left( \bigcup _{i\in B}E^{\mu (i)}\setminus B\right) - p\left( \left( \bigcup _{i\in B}E^{\mu '(i)}\setminus \bigcup _{i\in B}E^{\mu (i)}\right) \setminus B\right) \\&\qquad +p\left( \left( \bigcup _{i\in B}E^{\mu (i)}\setminus \bigcup _{i\in B}E^{\mu '(i)}\right) \setminus B\right) \\&\quad \overset{\text {(5)}}{=} \sum \limits _{i\in B}w^{i}(E^{\mu '(i)})-c\left( \bigcup _{i\in B}E^{\mu (i)}\setminus B\right) - c\left( \left( \bigcup _{i\in B}E^{\mu '(i)}\setminus \bigcup _{i\in B}E^{\mu (i)}\right) \setminus B\right) \\&\qquad +p\left( \left( \bigcup _{i\in B}E^{\mu (i)}\setminus \bigcup _{i\in B}E^{\mu '(i)}\right) \setminus B\right) \\&\quad \overset{\text {(6)}}{=} \sum \limits _{i\in B}w^{i}(E^{\mu '(i)})-c\left( \bigcup _{i\in B}E^{\mu '(i)}\setminus B\right) - c\left( \left( \bigcup _{i\in B}E^{\mu (i)}\setminus \bigcup _{i\in B}E^{\mu '(i)}\right) \setminus B\right) \\&\qquad +p\left( \left( \bigcup _{i\in B}E^{\mu (i)}\setminus \bigcup _{i\in B}E^{\mu '(i)}\right) \setminus B\right) \\&\quad \overset{\text {(7)}}{\ge } \sum \limits _{i\in B} \left( w^{i}(E^{\mu '(i)})-c(E^{\mu '(i)}\setminus \{i\})\right) \overset{\text {(8)}}{=} \sum \limits _{E\in \mu '}v_{\gamma }(E), \end{aligned}$$

where inequality \(\overset{\text {(1)}}{\ge }\) follows from the relation \(\displaystyle v_\gamma (E)=\max \left\{ 0,\, w^i(E)-c(E\setminus \{i\} \right\} \) for any basic coalition \(E\in \mathcal {B}^{i}\), and inequality \(\overset{\text {(2)}}{\ge }\) follows from the definition of the demand set and the fact that \((p,\mu )\) is a competitive equilibrium: \(w^{i}(E^{\mu (i)})\ge w^{i}(E^{\mu '(i)})-p(E^{\mu '(i)}\setminus \{i\})+p(E^{\mu (i)}\setminus \{i\})\). Equality \(\overset{\text {(4)}}{=}\) is the result of canceling out the common service prices, while equality \(\overset{\text {(5)}}{=}\) follows from the fact that for all \(j \in \left( \bigcup _{i\in B}E^{\mu '(i)}\setminus \bigcup _{i\in B}E^{\mu (i)}\right) \cap M\), \(p^{ik}_{j}=c_{j}^{ik}\) and for all \(k\in \left( \bigcup _{i\in B}E^{\mu '(i)}\setminus \bigcup _{i\in B}E^{\mu (i)}\right) \cap S\), \(p_{k}=c_{k}\). Equality \(\overset{\text {(6)}}{=}\) shows the rearrangement of costs incurred in the union of the two matchings, and inequality \(\overset{\text {(7)}}{\ge }\) follows from the feasibility of the price vector p. Finally, equality \(\overset{\text {(8)}}{=}\) comes from relation (10) under our assumption on \(\mu '\). \(\square \)

Now, we can provide the main result of this section. We establish the equivalence between the core and the set of competitive equilibrium payoff vectors.

Theorem 5

Given a matching market with middlemen \(\gamma =(B,M,S,\varvec{A},\varvec{\hat{A}})\), the core of the market, \(Core(\gamma )\), coincides with the set of competitive equilibrium payoff vectors, \(\mathcal{C}\mathcal{E}(\gamma )\).

Proof

First, we show that if \((p,\mu )\) is a competitive equilibrium, then its corresponding competitive equilibrium payoff vector \(X=(x(p,\mu ), y(p,\mu ), z(p,\mu ))\in \mathcal{C}\mathcal{E}(\gamma )\) is a core element. Recall that \(x_{i}(p,\mu )=w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\})\) for all buyers \(i\in B\) where \(i\in E^{\mu (i)}\in \mu \), \(y_{j}(p,\mu )=\sum _{\{i,j,k\}\in {\mu }} p_{j}^{ik} - \sum _{\{i,j,k\}\in {\mu }} c_{j}^{ik} = p_{j}(\mu ) - c_{j}(\mu )\) for all middlemen \(j\in M\), and \(z_{k}(p,\mu )=p_{k}-c_{k}\) for all sellers \(k\in S\). Let us check that for all basic coalitions \(E\in \mathcal {B}\) it holds \(X(E)\ge v_{\gamma }(E)\). Notice that if E does not contain any buyer \(i\in B\), then \(v_{\gamma }(E)=0\) and hence the core inequality trivially holds. Otherwise, take \(E\in \mathcal {B}\) such that \(i\in E\) for some \(i\in B\). Again, if \(v_{\gamma }(E)=0\), the core inequality trivially holds. Thus, assume \(v_{\gamma }(E)>0\). Then,

$$\begin{aligned} X(E)&=w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\})+p(E\setminus \{i\})-c(E\setminus \{i\}) \\&\ge w^{i}(E)-p(E\setminus \{i\})+p(E\setminus \{i\})-c(E\setminus \{i\}) \\&=w^{i}(E)-c(E\setminus \{i\})=v_{\gamma }(E), \end{aligned}$$

where the inequality follows from the fact that \((p,\mu )\) is a competitive equilibrium, and the last equality comes from relation (10) under our assumption on the value of E. It remains to check that X is efficient. Since at the matching \(\mu \) each buyer \(i\in B\) and each seller \(k\in S\) appears in at most one buyer–seller pair or one buyer-middleman-seller triplet and each middleman can serve arbitrary number of buyer–seller pairs, we get

$$\begin{aligned} X(N)&=\sum \limits _{i\in B} \left[ w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\})\right] +p(M\cup S)-c(M\cup S) \\&=\sum \limits _{i\in B}\left[ w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\})+p(E^{\mu (i)}\setminus \{i\})-c(E^{\mu (i)}\setminus \{i\}) \right] \\&\quad +\sum \limits _{j\notin \bigcup \limits _{i\in B}E^{\mu (i)}} \left( p_{j}(\mu )-c_{j}(\mu )\right) +\sum \limits _{k\notin \bigcup \limits _{i\in B}E^{\mu (i)}} (p_{k}-c_{k}) \\&=\sum \limits _{i\in B}\left[ w^{i}(E^{\mu (i)})-c(E^{\mu (i)}\setminus \{i\})\right] \\&=\sum \limits _{i\in B}v_{\gamma }(E^{\mu (i)})=\sum \limits _{E\in \mu }v_{\gamma }(E), \end{aligned}$$

where the third equality holds since \(p_{j}^{ik}=c_{j}^{ik}\) for unassigned middlemen \(j\in M\) and \(p_{k}=c_{k}\) for unassigned seller \(s_{k}\in S\). The fourth equality holds because of the optimality of \(\mu \) by Lemma 1 and the observation that, as in any optimal matching, for any \(i\in B\), we must have \(w^{i}(E^{\mu (i)})-c(E^{\mu (i)}\setminus \{i\}) \ge 0\).

We have shown that if \((p,\mu )\) is a competitive equilibrium, then its competitive equilibrium payoff vector \(X\in \mathcal{C}\mathcal{E}(\gamma )\) is a core allocation. Next, we show that the reverse implication holds. That is, if \(X\in \mathbb {R}^{B}\times \mathbb {R}^{M}\times \mathbb {R}^{S}\) is a core allocation, then it is the payoff vector related to some competitive equilibrium \((p,\mu )\), where \(\mu \) is any optimal matching and p is a competitive equilibrium price vector.

Let us define \(p_{j}^{ik}=X_{j}+c_{j}^{ik}\) for all basic triplet \(\{i,j,k\}\in \mathcal {B}\). Given any optimal matching \(\mu \), take the aggregate service prices \(p_{j}(\mu )=\sum _{\{i,j,k\}\in \mu } p_{j}^{ik}\) for all middleman \(j\in M\). Define \(p_{k}=X_{k}+c_{k}\) for all sellers \(k\in S\). Notice first that, since \(X\in Core(\gamma )\), if seller k is unassigned by the matching \(\mu \), \(p_{k}=X_{k}+c_{k}=c_{k}\) and if a middleman does not mediate a trade between a buyer–seller pair (ik) under the matching \(\mu \), \(p_{j}^{ik}=X_{j}+c_{j}^{ik}=c_{j}^{ik}\). Moreover, \(X(E^{\mu (i)})=v_{\gamma }(E^{\mu (i)})\) for all \(i\in B\) and \(X(E')\ge v_{\gamma }(E')\) for all \(E'\in \mathcal {B}^{i}\). Notice that by the optimality of \(\mu \), \(v_{\gamma }(E^{\mu (i)})=w^{i}(E^{\mu (i)})-c(E^{\mu (i)}\setminus \{i\})\ge 0\) for all \(i\in B\). Then, for all \(i\in B\) and \(E'\in \mathcal {B}^{i}\),

$$\begin{aligned} w^{i}(E^{\mu (i)})-p(E^{\mu (i)}\setminus \{i\})&=v_{\gamma }(E^{\mu (i)})+c(E^{\mu (i)}\setminus \{i\})-p(E^{\mu (i)})\setminus \{i\})\\&=X(E^{\mu (i)})+c(E^{\mu (i)}\setminus \{i\})-p(E^{\mu (i)}\setminus \{i\})\\&=X_{i}\\&\ge v_{\gamma }(E')-X(E'\setminus \{i\})\\&=v_{\gamma }(E')-\big [ p(E'\setminus \{i\})-c(E'\setminus \{i\})\big ]\\&\ge w^{i}(E')-p(E'\setminus \{i\}) \end{aligned}$$

where the first inequality follows from the fact that \(X\in Core(\gamma )\) and the second inequality comes from relation (10). This shows that \(E^{\mu (i)}\in D_{i}(p)\) which concludes the proof. \(\square \)

We have shown that the core and the set of competitive equilibrium payoff vectors coincide under the assumption that middlemen need not charge the same price for two different buyer–seller trade. Next example shows that if we consider the case where middlemen charge a fixed price for each buyer–seller trade that they mediate, then a core allocation need not to be supported by competitive prices.

Example 4

Consider a market with middlemen \(\gamma = (B, M, S, \varvec{A},\varvec{\hat{A}})\) where \(B = \{i_1, i_2\}\), \(M = \{j_1, j_2\}\), and \(S = \{k_1, k_2\}\) are the set of buyers, the set of middlemen, and the set of sellers, respectively. The total surplus of those basic coalitions formed by a pair of buyer and seller is given by the following two-dimensional matrix \(\varvec{A}=(a_{ik})_{\begin{array}{c} i\in B \\ k\in S \end{array}}\):

and joint surplus generated by triplets formed by a buyer, a middleman, and a seller is given by the following three-dimensional matrix \(\varvec{\hat{A}}=(\hat{a}_{ijk})_{\begin{array}{c} i\in B\\ j\in M \\ k\in S \end{array}}\):

$$\begin{aligned} \varvec{\hat{A}}=\begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2}\end{array} \\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 4\; &{}\; 3 \\ 3\; &{}\; 5 \end{array}\right) \\ &{} j_{1} \end{array}\qquad \begin{array}{cc}&\begin{array}{cc} k_{1} &{} k_{2} \end{array}\\ \begin{array}{c} i_{1} \\ i_{2} \end{array} &{} \left( \begin{array}{cc} 6 \; &{}\; 2 \\ 2\; &{} \; 6 \end{array}\right) \\ &{} j_{2} \end{array}. \end{aligned}$$

Notice first that there is a unique optimal matching, \(\mu =\{(i_{1},j_{2},k_{1}),(i_{2},j_{2},k_{2})\}\). If the service price of each possible trade was fixed for any middlemen, then under the optimal matching \(\mu \), middleman \(j_{2}\) would charge the same price for both trades she mediates, i.e., \(p_{j_{2}}^{i_{1}k_{1}}=p_{j_{2}}^{i_{2}k_{2}}\). Suppose now that costs for sellers and middlemen assigned under the matching \(\mu \) are equal to zero, \(c_{k_{1}}=c_{k_{2}}=c_{j_{2}}^{i_{1}k_{1}}=c_{j_{2}}^{i_{2}k_{2}}=0\). Then, following (10), net valuations of buyer \(i_{1}\) and buyer \(i_{2}\) are \(w^{i_{1}}(\{i_{1},j_{2},k_{1}\})=v(\{i_{1},j_{2},k_{1}\})=6\) and \(w^{i_{2}}(\{i_{2},j_{2},k_{2}\})=v(\{i_{2},j_{2},k_{2}\})=6\).

Now, take the core allocation \(X=(3,5;0,3;1,0)\). Since all costs are equal to zero, \(z_{1}(p,\mu )=p_{k_{1}}-c_{k_{1}}=1\) implies that \(p_{k_{1}}=1\) for seller \(k_{1}\), \(z_{2}(p,\mu )=0\) implies that \(p_{k_{2}}=0\) for seller \(k_{2}\). For middleman \(j_{1}\), \(y_{1}(p,\mu )=0\) since she is unassigned under the optimal matching \(\mu \) whereas \(y_{2}(p,\mu )=p^{i_{1}k_{1}}_{j_{2}}-c_{j_{2}}^{i_{1}k_{1}}+p^{i_{2}k_{2}}_{j_{2}}-c_{j_{2}}^{i_{2}k_{2}}=1.5-0+1.5-0=3\). Together with \(p^{i_{1}k_{1}}_{j_{2}}=1.5\), \(p_{k_{1}}=1\) imply that, under the matching \(\mu \), \(w^{i_{1}}(\{i_{1},j_{2},k_{1}\})-p^{i_{1}k_{1}}_{j_{2}}-p_{k_{1}}=6-1.5-1=3.5\ne 3=x_{1}(p,\mu )\) and \(p^{i_{2}k_{2}}_{j_{2}}=1.5\) together with \(p_{k_{2}}=0\) imply that \(w^{i_{2}}(\{i_{2},j_{2},k_{2}\})-p^{i_{2}k_{2}}_{j_{2}}-p_{k_{2}}=6-1.5-0=4.5\ne 5=x_{2}(p,\mu )\). Hence, the core allocation X is not supported by the competitive equilibrium \((p,\mu )\) when middlemen charge a fixed service price for each trade they mediate.

Note that the core allocation \(X=(3,5;0,3;1,0)\) can be supported by the competitive prices when middleman \(j_{2}\) have different service prices for each trade she mediates under the matching \(\mu \). Take \(p_{j_{2}}^{i_{1}k_{1}}=2\) and \(p_{j_{2}}^{i_{2}k_{2}}=1\), \(p_{k_{1}}=1\), and \(p_{k_{2}}=0\). Suppose again that costs for sellers and middlemen assigned under the matching \(\mu \) are equal to zero, \(c_{k_{1}}=c_{k_{2}}=c_{j_{2}}^{i_{1}k_{1}}=c_{j_{2}}^{i_{2}k_{2}}=0\). Then, following (10), \(w^{i_{1}}(\{i_{1},j_{2},k_{1}\})=v(\{i_{1},j_{2},k_{1}\})=6\) and \(w^{i_{2}}(\{i_{2},j_{2},k_{2}\})=v(\{i_{2},j_{2},k_{2}\})=6\). One can easily see that, \(x_{1}(p,\mu )=w^{i_{1}}(\{i_{1},j_{2},k_{1}\})-p^{i_{1}k_{1}}_{j_{2}}-p_{k_{1}}=6-2-1=3\), \(x_{2}(p,\mu )=w^{i_{2}}(\{i_{2},j_{2},k_{2}\})-p^{i_{2}k_{2}}_{j_{2}}-p_{k_{2}}=6-1-0=5\), \(y_{1}(p,\mu )=0\) since she is unassigned under the matching \(\mu \), \(y_{2}(p,\mu )=p_{j_{2}}^{i_{1}k_{1}}-c_{j_{2}}^{i_{1}k_{1}}+p_{j_{2}}^{i_{2}k_{2}}-c_{j_{2}}^{i_{2}k_{2}}=2-0+1-0=3\), \(z_{1}(p,\mu )=p_{k_{1}}-c_{k_{1}}=1-0=1\), \(z_{2}(p,\mu )=p_{k_{2}}-c_{k_{2}}=0\).

Remark 1

There is a one-to-one correspondence between the core and the set of competitive prices when middlemen charge possibly different prices for two different buyer–seller trade, whereas if middlemen charge the same price for each buyer–seller pair trade, then she need not be competitive, i.e., core can be a superset of the set of competitive prices.

7 Concluding remarks

We have considered a class of multi-sided matching markets where a trade between buyer–seller pairs can be realized with or without middlemen. We allow a middleman to serve the entire market by mediating as many trades as the size of the short side of the market while buyer–seller pairs can also trade directly. We have associated a classical two-sided assignment market with a matching market with middlemen by taking for each buyer–seller pair the maximum surplus that this pair can achieve with the free-of-charge help of middlemen. We have shown that the non-empty core of this associated two-sided assignment market can be embedded in the core of the matching market with middlemen by allocating zero payoff to all middlemen.

For these markets we have introduced an associated TU game, thereby extending the classical (two-sided) assignment markets of Shapley and Shubik (1971) to a special multi-sided case. We have shown that every matching market with middlemen has a non-empty core. In addition, we have proved that there exists a buyer-optimal and a seller-optimal core allocation for every matching market with middlemen. Unlike in other extensions previously studied, it is shown that all buyers (sellers) achieve their marginal contribution simultaneously at the buyer-optimal (seller-optimal) core allocation. In addition, we have provided an example to show that it is not the case for middlemen: in general there does not exist an allocation that every middleman weakly prefers to any other allocation in the core. Finally, we have studied the relationship between the core and the set of competitive equilibria. We have established the coincidence between the core and the set of competitive equilibrium payoff vectors.

A possible direction for further research is to study the relationship between the core and another set-wise solution concept, the bargaining set. Solymosi (1999) proves the equivalence between the core and the classical bargaining set of Davis and Maschler (1967), a set-wise solution concept based on bargaining possibilities of players, for two-sided assignment games (see also Solymosi (2008) for related results on other partitioning games). Bahel (2021) generalizes this result among others to a larger class known as (quasi)-hyperadditive games. For multi-sided matching markets, the coincidence result between the classical bargaining set and the core is exhibited only to the class of supplier-firm-buyer games (Atay & Solymosi, 2018). Nevertheless, the methods used in the aforementioned papers do not seem to carry over to our model and we leave exploring the relationship between the bargaining set and the core for future research.

Another interesting direction for the future research is to study the extension of Shapley (1962)’s and Mo (1988)’s results on comparative statistics. Following the results of Shapley (1962) showing that agents of the same side of the market are substitutes, whereas agents of different sides are complements in the two-sided assignment game, Mo (1988) provides a number of comparative statistics results referred as the Law of Diminishing Returns. However, two-sided nature of the assignment game is crucial for their results. Tejada (2013) provides counterexamples to show that the law of diminishing returns does not hold for (standard) multi-sided assignment markets with more than two sectors even when the associated game is balanced. Hence, we leave for the future a fully fledged analysis on comparative statistics for matching markets with middlemen under the transferable utility.