<<

games

Article Stability and for Aggregate Matchings

Federico Echenique 1, SangMok Lee 2, Matthew Shum 1 and M. Bumin Yenmez 3,*

1 Division of the Humanities and Social Sciences, California Institute of Technology, Pasadena, CA 91125, USA; [email protected] (F.E.); [email protected] (M.S.) 2 Department of , Washington University in St. Louis, St. Louis, MO 63130, USA; [email protected] 3 Department of Economics, Boston College, Chestnut Hill, MA 02467, USA * Correspondence: [email protected]

Abstract: We develop the theory of stability for aggregate matchings used in empirical studies and establish fundamental properties of stable matchings including the result that the set of stable matchings is a non-empty, complete, and distributive lattice. Aggregate matchings are relevant as matching data in revealed theory. We present a result on rationalizing a matching data as the median stable matching.

Keywords: aggregate matching; median stable matching; rationalizability; lattice

1. Introduction Following the seminal work of [1], an extensive literature has developed regarding   matching markets with non-. This literature assumes that there are agent-specific preferences, and studies the existence of stable matchings in which each Citation: Echenique, F.; Lee, S.; agent prefers her assigned partner to the outside option of being unmatched, and there Shum, M.; Yenmez, M.B. Stability and are no pairs of agents that would like to match with each other rather than keeping their Median Rationalizability for assigned partners. Aggregate Matchings. Games 2021, 12, In this paper, we develop the theory of stability for aggregate matchings, which we 33. https://doi.org/10.3390/ interpret as a dataset of matchings, and consider its testable implications. In an aggregate g12020033 matching, agents are classified into types according to their observable characteristics: for example age, employment status, gender, or race. The aggregate matching is then a Academic Editor: Antonio Nicolò table, a matrix, that records how many women of each type are matched with men of each type. Our notion of matching data is more general than just deterministic matchings and Received: 3 March 2021 includes randomized matchings of agents to objects (a probabilistic assignment of children Accepted: 25 March 2021 Published: 9 April 2021 to schools, for example, as in [2,3]) as well. Therefore, our results are also applicable to randomized matching environments.

Publisher’s Note: MDPI stays neutral We assume that preferences are at the type-specific level, rather than the individual- with regard to jurisdictional claims in level. In our setting, accommodating individual-level preferences would entail losing all published maps and institutional affil- empirical bite. Thus we adopt instead the assumption that the definition of types already iations. carries all the information needed to determine agents’ preferences. This differs from the approach in empirical applications of matching theory, which assume transferable utilities (see, e.g., [4] or [5]), but allow for heterogeneous preferences at the individual-level. When our results are taken to data, one needs to introduce an appropriate error structure that allows for individual-level randomness but without individual-level preference heterogene- Copyright: © 2021 by the authors. Licensee MDPI, Basel, Switzerland. ity. One way of doing this is via measurement error, as in the classical revealed preference This article is an open access article theory for consumption [6,7]. One illustration can be found in [8]. distributed under the terms and We establish fundamental results on the set of stable matchings in Theorem1. First of conditions of the Creative Commons all, there exists a stable matching. Then we introduce two partial orders on matchings using Attribution (CC BY) license (https:// preferences of the two sides of the market and show that for every set of stable matchings creativecommons.org/licenses/by/ there exists the greatest lower bound and the least upper bound with respect to the two 4.0/). partial orders in the set of stable matchings, i.e., the set of stable matchings endowed with

Games 2021, 12, 33. https://doi.org/10.3390/g12020033 https://www.mdpi.com/journal/games Games 2021, 12, 33 2 of 15

either partial order is a complete lattice. Furthermore, we show an additional structural result that this lattice is distributive. (The definition of distributive lattices is given in Section2). Using the lattice structure on the set of stable matchings, we show that there exists a median stable matching, which assigns each agent the median among all stable matching outcomes (Corollary1). Theorem1 also provides other structural results including “polarity of interests”, saying that a stable matching is more preferred for men if and only if it is less preferred for women. Furthermore, the outcomes in two stable matchings are always comparable using the partial orders for an agent. The “rural hospitals theorem”, which states that for each type of agent the number of partners in any two stable matchings are the same, also holds. Once the stability of matchings is understood, we turn to the main question in the paper: when we interpret an aggregate matching as a table of matching data, and when we do not have access to the agents’ preferences, when can we say that the data is consistent with the theory? This is a revealed preference question that has been addressed by [9] (see also [10,11]). Here we focus on a particular selection of stable matchings—the median stable matching, which is defined for markets with deterministic outcomes. We provide a sufficient condition under which matching is rationalizable as the median stable matching (Theorem3). We show that the condition is not necessary in AppendixA. Theorem1 on the structure of stable matchings generalizes well-known results in the literature to allow for randomization, aggregate matchings, and continuum of agents (see [12] for a review). Proposition1 establishes the existence of generalized median stable matchings in our environment. For earlier existence results of median stable matchings see [13–18]. Revealed preference studies include [9,11,19,20]. The works of [9,20] take aggregate matchings as the source of data, but none of these papers considers the question of median-rationalizability.

2. Preliminary Definitions 2.1. Lattice Theory If S is a set and is a partial order on S, we say that the pair (S, ) is a partially ≤ ≤ ordered set . We say that x, y S are comparable if x y or y x. A partially ordered set ∈ ≤ ≤ (S, ) is a lattice if, for every x, y S, the least upper bound and the greatest lower bound ≤ ∈ of x, y with respect to the partial order exist in S. We denote the least upper bound of ≤ x, y by x y; and the greatest lower bound of x, y by x y. Similarly, if for every S S, ∨ ∧ 0 ⊂ the least upper bound and the greatest lower bound of S exist in S, the lattice (S, ) is 0 ≤ called complete. We say that a lattice (S, ) is distributive if the following holds for all x, y, z S: ≤ ∈ • x (y z) = (x y) (x z), and ∨ ∧ ∨ ∧ ∨ • x (y z) = (x y) (x z). ∧ ∨ ∧ ∨ ∧ 2.2. Graph Theory An (undirected) graph is a pair G = (V, L), where V is a set and L is a subset of V V. × A path in G is a sequence p = v ,..., v such that for n 0, ... , N 1 , (v , v ) L. h 0 Ni ∈ { − } n n+1 ∈ We write v p to denote that v is a vertex in p. A path v ,..., v connects the vertices ∈ h 0 Ni v and v . A path v ,..., v is minimal if there is no proper subsequence of v ,..., v 0 N h 0 Ni h 0 Ni which is also a path connecting the vertices v and v . The length of path v ,..., v 0 N h 0 Ni is N. A cycle in G is a path c = v ,..., v with v = v . A cycle is minimal if for any h 0 Ni 0 N two vertices v and v in c, the paths in c from v to v and from v to v are distinct n n0 n n0 n0 n and minimal. We call v and w adjacent in c if there is n such that vn = v and vn+1 = w or vn = w and vn+1 = v. If c and c0 are two cycles, and there is a path from a vertex of c to a vertex of c0, then we say that c and c0 are connected.

3. Model The primitives of the model are represented by a four-tuple M, W, P, K , where h i Games 2021, 12, 33 3 of 15

• M and W are finite and disjoints sets of, respectively types of men, and types of women. • P is a preference profile: a list of preferences Pm for every type-m man and Pw for every type-w woman. Each P is a linear order over W w , and each P is a linear m ∪ 0 w order over M m . Here, w and m represent the outside option of being unmatched. ∪ 0 0 0 The weak order associated with Pm is denoted by Rm and the weak order associated with Pw is denoted by Rm. • K is a list of non-negative real numbers K for each m M and K for each w W. m ∈ w ∈ There are Km type-m men and Kw type-w women.

We enumerate M as m1,..., m M and W as w1,..., w W .A matching is a M W | | | | | | × | | matrix X = (xm w ) such that xm w +, ∑ xm w Km for all i, and ∑ xm w Kw for i, j i, j ∈ < j i, j ≤ i i i, j ≤ j all j.( + denotes the set of non-negative real numbers.) We denote the mass of single < m-agents in X by xm,w0 , and denote the mass of single w-agents in X by xm0,w. th th The i row of a matching X is denoted by Xm , , and the j column by X ,w . When it i · · j is not ambiguous, we write Xm , or Xi, for Xm , , and Xw , or Xj, for X ,w . Similarly, we use i i · j · j xi,j for xmi,wj . Our is stability:

Definition 1. A matching X is individually rational if xm,w > 0 implies that wPmw0 and mPwm0. A pair (m, w) is a pair for X if there exist m M m and w W w 0 ∈ ∪ { 0} 0 ∈ ∪ { 0} such that mP m , wP w , x > 0, and x > 0. w 0 m 0 m,w0 m0,w A matching X is stable if it is individually rational and there are no blocking pairs for X. We denote by S(M, W, P, K) the set of all stable matchings in M, W, P, K . h i

Individual rationality states that if xm,w > 0, then for type-m men type-w women are more preferred than being unmatched and for type-w women type-m men are more preferred than being unmatched. A pair (m, w) is a blocking pair if type-m men have a positive measure of partners who are less preferred than type-w women and type-w women have a positive measure of partners who are less preferred than type-m men. Two special cases of our model are worth emphasizing: The model of random match- ing is obtained when Km = 1 for all m, and each Kw is a natural number. The interpretation of random matching is that men are “students” and women are “schools”. Students are assigned to schools at random, and each school w has Kw seats available for students. In real-life school choice, the randomization often results from indifferences in schools’ preferences over students [3]: Matching theory often requires strict preferences, so a ran- dom “priority order” is produced for the schools in order to break indifferences. Random matchings arise in many other situations as well, because is often a basic consequence of fairness considerations (if two children want the same toy, fairness demands that they flip a coin to determine who gets it). The second model is that of integral complete matching, where all Km and Kw are natural numbers, and all entries of a matching X are natural numbers. The interpretation is that there are Km type-m men and Kw type-w women, and that a matching X exhibits in xm,w how many type m men matched to type-w women. This special case captures actual observations in marriage models (see, for example, [8]). We observe that men and women are partitioned into types according to their observable characteristics (age, income, education, etc.); and we are given a table showing how many type-m men married type-w women. These observations are essentially “flow” observations (marriages in a given year), so the integral complete matchings do not have any single agents. Games 2021, 12, 33 4 of 15

4. Structure of Stable Matchings In this section, we study the structure of stable matchings. For each m M, define ∈ W χm = x +| | : ∑ xj Km, ∈ < 1 j W ≤ ≤ ≤| | and a partial order on χ by ≤m m y m x iff w W w0 , ∑ yj ∑ xj, ≤ ∀ ∈ ∪ { } 0 j W w R w ≤ 0 j W w R w ≤ ≤| | j m ≤ ≤| | j m

where x = Km ∑ x , and y = Kw ∑ y . 0 − 1 j W j 0 − 1 j W j Note that is≤ defined≤| | by analogy with the≤ first-order≤| | stochastic dominance order ≤m on probability distributions. In the case where Km = 1, vectors x and y in χm represent probability distributions over the types of women that m may match to. In that case y x ≤m if and only if the lottery induced by y over W w is worse than the lottery induced by ∪ { 0} x, for any von Neumann-Morgenstern utility function that is compatible with Rm. M Letting χw = x | | : ∑ x Kw, we define w in an analogous way. ∈ <+ 1 i M i ≤ ≤ We introduce two partial orders≤ ≤| on| matchings. Suppose X and Y are matchings, then: • X Y if, for all m M, X Y ≤M ∈ m ≤m m • X Y if, for all w W, X Y . ≤W ∈ w ≤w w Theorem 1. (S(M, W, P, K), ) and (S(M, W, P, K), ) are nonempty, complete, and dis- ≤M ≤W tributive lattices; in addition, for X, Y S(M, W, P, K) ∈ 1.X Y if and only if Y X; ≤M ≤W 2. for all a M W, either X Y or Y X ; ∈ ∪ a ≤a a a ≤a a 3. for all m, ∑w W xm,w = ∑w W ym,w and for all w, ∑m Mxm,w = ∑m Mym,w. ∈ ∈ ∈ ∈ Theorem1 presents a version, adapted to our model, of the standard results on matching theory. The proof is in AppendixB. Statement (1) is a “polarity of interests” result, saying that a stable matching X is better for men if and only if it is worse for women. Statement (2) says that the outcomes in two stable matchings are always comparable for an agent: note that is an incomplete preference relation. Statement (3) is the “rural ≤a hospitals theorem,” which says that the same number of agents of a given type are matched in any two stable matchings. Theorem1 also implies that there are two stable matchings, XM and XW, such that for all stable matchings X, XW X XM, and ≤M ≤M XM X XW. ≤W ≤W We refer to XM as the man-optimal (M-optimal) stable matching, and to XW as the woman-optimal (W-optimal) stable matching. We also call XM and XW extremal stable matchings. A matching X is the unique stable matching if S(M, W, P, K) = X; in this case X coincides with the man-optimal and the woman-optimal stable matchings. Perhaps extremal stable matchings are unlikely to arise because they favor one side of the market over the other. One may instead be interested in matchings that present a compromise. The median stable matching provides such a compromise by assigning each agent a partner who is median ranked amongst all of his/her stable matching partners. Indeed in an experimental study on decentralized market, ref. [21] find that the median stable matching tends to emerge among stable matchings. As such, we may want to test whether an observed matching in field data is rationalizable as a median stable matching. It is not obvious that median stable matchings exist. We shall first show that median stable matchings exist by only considering integral matchings that have integer entries, and then present a sufficient condition for rationalizability as a median stable matching. Games 2021, 12, 33 5 of 15

We consider a market M, W, P, K , where all numbers K , K , and entries of match- h i m w ings X are non-negative integers. Consequently, the number of stable matchings is finite, say n. Let S(M, W, P, K) = X1, ... , Xn be the set of stable matchings. For each agent { } a we consider all stable outcomes and rank them according to a. All the outcomes are (1) ≥(n) 1 n comparable by (2) of Theorem1. More formally, let Xa , ... , Xa = Xa , ... , Xa and (1) (n) { } { } Xa a ... a Xa . Using these ranked outcomes and (1) of Theorem1, we construct ≥ ≥ (l) (l) (l) (l) (n+1 l) the matrices Y for all l = 1, ... , n such that Ym = Xm and Yw = Xw − . Matrix Y(l) assigns each type of men the lth best outcome, and each type of women the lth worst outcome among stable matching partners.

Proposition 1. Y(l) is a stable matching.

The proof of Proposition1 follows from the lattice structure of the set of stable match- ings. It is essentially the same as the proofs of Theorem 3.2 in [22] and Theorem 1 of [17]. ( n+1 ) ( n ) If n is odd we term Y 2 the median stable matching. If n is even we refer to Y 2 ( n +1) (or Y 2 ) as the median stable matching (of course the choice is arbitrary).

Corollary 1. The median stable matching exists.

5. Testable Implications Suppose that we are given a data of a matching X, and the corresponding M, W and K. Similar to [9], we assume that there are no “singles,” or unmatched agents, and so ∑m Km = ∑w Kw, and ∑w xm,w = Km for all m, and ∑m xm,w = Kw for all w. We call such a matching in which there are no singles complete. We ask when there are preferences for the different types of men and women such that X is a stable matching or an extremal stable matching (which is shown to exist in Section4).

Definition 2. A matching X is rationalizable if there exists a preference profile P = ((Pm)m M, (Pw)w W ) such that X is a stable matching in M, W, P, K . A matching ∈ ∈ h i X is M-optimal (W-optimal) rationalizable if there is a preference profile P such that X is the M-optimal (W-optimal) stable matching in M, W, P, K . h i We also want to know when a matching can be rationalized as the median stable matching.

Definition 3. An integral matching X is median-rationalizable if there is a preference profile P such that X is the median stable matching in M, W, P, K . h i To answer the questions, we define a graph (V, L), where V consists of all the positive entries in X, and there is an edge (v, v ) L if and only if v and v are either in the same row 0 ∈ 0 or in the same column in X. More formally, for each matching X we associate a graph (V, L) defined as follows. The set of vertices V is (m, w) : m M, w W such that x > 0 , { ∈ ∈ m,w } and an edge ((m, w), (m , w )) L is formed for every pair of vertices (m, w) and (m , w ) 0 0 ∈ 0 0 with m = m0 or w = w0. A previous study finds that the rationalizability of a matching depends on minimal cycles (defined in Section 2.2) of its associated graph: (The result in [9] is more general than what is stated here.)

Theorem 2 ([9]). 1. A complete matching X is rationalizable if and only if its associated graph does not contain two connected, distinct, minimal cycles. 2. A complete matching X is M-optimal (W-optimal) rationalizable if and only if its associated graph has no minimal cycle. AGGREGATE MATCHINGS 7

5. Testable Implications

Suppose that we are given a data of a matching X, and the corresponding M, W and K. Similar to Echenique et al. (2013b), we assume that there are no “singles,” or unmatched

agents, and so m Km = w Kw, and w xm,w = Km for all m, and m xm,w = Kw for all w. We call such a matching in which there are no singles complete. We ask when there are P P P P preferences for the different types of men and women such that X is a stable matching or an extremal stable matching (which is shown to exist in Section 4).

Definition 2. A matching X is rationalizable if there exists a preference profile P =

((Pm)m M , (Pw)w W ) such that X is a stable matching in M, W, P, K . A matching X is ∈ ∈ h i M-optimal (W-optimal) rationalizable if there is a preference profile P such that X is the M-optimal (W-optimal) stable matching in M, W, P, K . h i We also want to know when a matching can be rationalized as the median stable matching.

Definition 3. An integral matching X is median-rationalizable if there is a preference profile P such that X is the median stable matching in M, W, P, K . h i To answer the questions, we define a graph (V,L), where V consists of all the positive

entries in X, and there is an edge (v, v0) L if and only if v and v0 are either in the same row ∈ or in the same column in X. More formally, for each matching X we associate a graph (V,L) defined as follows. The set of vertices V is (m, w): m M, w W such that x > 0 , { ∈ ∈ m,w } and an edge ((m, w), (m0, w0)) L is formed for every pair of vertices (m, w) and (m0, w0) ∈ with m = m0 or w = w0. A previous study finds that the rationalizability of a matching depends on minimal cycles (defined in Section 2.2) of its associated graph:3 Games 2021, 12, 33 6 of 15 Theorem 2 (Echenique, Lee, Shum, and Yenmez (2013b)). (1) A complete matching X is rationalizable if and only if its associated graph does not contain two connected, distinct, minimal cycles. (2) A complete matching X is M-optimal (W-optimal) rationalizable if and only if its For example, letassociated matching graph hasX nobe minimal the cycle. matrix on the left, with three types of men and women. Its associatedFor example, graph let matching is depictedX be the on matrix the on right: the left, with three types of men and women. Its associated graph is depicted on the right:

11 9 10 11 9 10

0 22 41 0 22 41

13 91 0 13 91 0

3The result in Echenique et al. (2013b) is more general than what is stated here. The following8 two minimal cycles AGGREGATE in this MATCHINGS graph The following two minimal cycles in this graph

11 9 10 11 9 10

0 22 41 0 22 41

13 91 0 13 91 0 are connected; thus the matching is not rationalizable. are connected; thusThe rationalizability the matching by stable is not matchings rationalizable. and extremal stable matchings only depends on The rationalizabilitywhether each number by stablexm,w is positive matchings or 0. However, and extremal we find that stable median rationalizabilitymatchings only depends 8depends onAGGREGATE the value of xm,w as MATCHINGS well as whether xm,w is positive or zero. on whether each number xm,w is positive or 0. However, we find that median rationaliz- If v , . . . , v is a minimal cycle, then N is an even number. We say that a minimal cycle h 0 N i ability dependsc is onbalanced the valueif of xm,w as well as whether xm,w is positive or zero. The following two minimal cycles in this graph 4 If v0,..., vN is a minimalmin v cycle,0, v2, . . . , thenvN 2 =N minisv an1, v3 even, . . . , vN number.1 . We say that a minimal h i { − } { − } cycle c is balancedTheoremif 3. An integral complete matching X is median rationalizable if it is rationalizable 11 and9 if all minimal10 cycles of (V,L) are balanced.11 9 10 min v0, v2,..., vN 2 = min v1, v3,..., vN 1 . The proof is in{ Appendix B. It is− worth} observing{ that, in our proof,− } we construct 0preferences 22 such 41 that the resulting number of0 stable matchings 22 is odd.41 Therefore, our results ( n ) ( n +1) (See the exampledo not depend below on the for choice an of illustrationY 2 or Y 2 as of the this median condition.) stable matching when n is even. Theorem13 3. An 91 integral0 complete matching X 13is median-rationalizable 91 0 if it is rationalizable and if Figure 1. Five Stable Matchings (Matching C is Median-Stable) all minimal cycles of (V, L) are4 balanced./ 2 3 / 3 2 / 4 1 / 5 0 / 6 are connected; thus the matching is notO rationalizable.O O O O

     The rationalizabilityThe by proof stable is in matchings Appendix0 o 5C and.1 Ito is extremal worth4 2 o observing3 stable3 o 2 that,matchings4 o in1 our proof, only wedepends construct on preferences such that the resultingABCDE number of stable matchings is odd. Therefore, our whether each number xm,w is positive or 0. However,( n ) we( n find+1) that median rationalizability results do not dependTo provide on some the intuition choice for thisof Y result,2 or considerY 2 the followingas the example: median stable matching when depends on the valuen is even. of xm,w as wellM = m as, m whether, xm,w is positive or zero. • { 1 2} W = w , w , If v0, . . . , vN is a minimalTo provide cycle, some• thenintuition{ 1 2} N foris an this even result, number. consider theWe following say that example: a minimal cycle k = 6, k = 5, k = 4, k = 7, h i • m1 m2 w1 w2 • M = m1, m2 w, P w , w P w , m P m , and m P m , c is balanced if { } 2 m1 1 1 m2 2 1 w1 2 2 w2 1 • W = w , w• , { 1where2} each man prefers all women to being unmatched and each woman4 prefers all men to • kmin= 6,v0beingk, v2 unmatched.,= . .5, . ,k vN In= this24, market,k= min= there7, arev1 five, v stable3, . . matchings . , vN as1 shown. in Figure 1. Note m1 m2 w1 − w2 − { that the preferences of each} type of agent{ is shown by an arrow, for example} the arrow in the • w2Pm1w1, w1Pm2w2, m1Pw1m2, and m2Pw2m1, Theorem 3. An integral completefirst row represents matching the preferenceX is median of m1 that rationalizable type-w2 woman is more if itpreferred is rationalizable to where each mantype-w prefers1 woman. all Therefore, women the preferences to being are unmatched “clockwise” cyclical. and These each matchings woman differ prefers all men and if all minimalto cycles being unmatched. of (4V,LSee the example) are In below this balanced. for market, an illustration there of this condition. are five stable matchings as shown in Figure1 . Note that the preferences of each type of agent is shown by an arrow, for example the The proof is inarrow Appendix in the first B. row It represents is worth the observing preference ranking that, of inm our1 that proof, type-w2 wewoman construct is more preferences such thatpreferred the resulting to type-w1 numberwoman. ofTherefore, stable matchings the preferences is odd. are “clockwise” Therefore, cyclical. our results These matchings differ from each other in that, starting with matching A, matchings B-E are ( n ) ( n +1) do not depend onformed the choice by clockwise of Y “rotations”—that2 or Y 2 as is, the by dissolving median twostable couples matching(m , w when), (m ,nw is) { 1 1 2 2 } and repairing them as (m , w ), (m , w ) . Given the clockwise preferences, moving from even. { 1 2 2 1 } matching A to E, the matchings become increasingly preferred by the men, and at the same time, less preferred by the women. Figure 1. Five Stable Matchings (Matching C is Median-Stable) 4 / 2 3 / 3 2 / 4 1 / 5 0 / 6 O O O O O

     0 o 5 1 o 4 2 o 3 3 o 2 4 o 1 ABCDE Figure 1. Five stable matchings (matching C is median-stable). To provide some intuition for this result, consider the following example: M = m , m , • { 1 2} W = w , w , • { 1 2} k = 6, k = 5, k = 4, k = 7, • m1 m2 w1 w2 w P w , w P w , m P m , and m P m , • 2 m1 1 1 m2 2 1 w1 2 2 w2 1 where each man prefers all women to being unmatched and each woman prefers all men to being unmatched. In this market, there are five stable matchings as shown in Figure 1. Note that the preferences of each type of agent is shown by an arrow, for example the arrow in the

first row represents the preference ranking of m1 that type-w2 woman is more preferred to

type-w1 woman. Therefore, the preferences are “clockwise” cyclical. These matchings differ 4See the example below for an illustration of this condition. Games 2021, 12, 33 7 of 15

Hence, matching C is the median stable matching, as the two stable matchings ob- tained by rotating this matching counterclockwise (i.e., A and B) are more preferred by the women, while the two obtainedAGGREGATE by rotating MATCHINGS clockwise (i.e., D and E) are more pre- 17 ferred by the men. (In addition, one cannot rotate further clockwise beyond E, nor further To prove thecounterclockwise fact, we reason beyond by A, as induction. one “runs out” We of have pairs in already both cases.) established Note also that that onlyw P w . in the third matching is the cycle balanced: In the minimal cycle there are four vertices j2 mi1 j1 with entries 2, 4, 3, 2 and when we take the minimum of the entries of theN odd-numbered Suppose that wjn Pmin wjn 1 . By Property 1 of the sequence (in, jn) n=1, either xin 1,jn 1 > 0 vertices and the minimum− of the entries of the even-numberedh vertices fori any numbering − − and xin+1,jn+1 > 0; or yin 1,jn 1 > 0 and yin+1,jn+1 > 0 (or both hold). Then the stability of X of vertices preserving− − the order in which they appear in the cycle we get: and Y implies that m P m . The proof for the case when w P m is similar. in+1 wjn in min 2, 3 = 2 = min 4, 2 . in win in 1  { } { } − Therefore, the minimal cycle for matching C is balanced. The balancedness condition The claim implies that the sequence vn = xi ,j is a cycle in (V,L). Thus a stable ensures that one can rotate an equal numberh i of timesh n bothn i in the clockwise direction and in matching Y thecan counterclockwise only differ from direction.X Furthermore,in vertexes note that that are the balancedness part of a cycle condition of (failsV,L for). the other matchings. For example, in matching B, min 3, 4 = 3 = 1 = min 3, 1 , there { } 6 { } the minimal cycle in matching B is not balanced. Note that the stability and rationalizability of a matching only depend on which Second, we prove that E Y X . We established above that ei,j = 0 only if xi,j is entries are zero or positive.≡ − Thus∈ if E an observed matching X is canonicalized into6 XC a vertex in a cycle.c We now provec that e > Θ. Clearly, e x Θ. We show that (xm,w = 0 if xm,w = 0, and xm,w = 1 if| xi,jm,w| ≤0), then obviouslyi,jX≥is rationalizable − i,j ≥ − if and only if XC is rationalizable. Given the role of canonical matchings in rationalizability, the if ei,j > 0 then there is h such that ei,j + ei,h = 0. following corollary is of some interest. If ei,j > ei,h for all h = i then there is h1 and h2 such that some type-mi men of type mi −Corollary 2. A canonicalized6 matching XC is either not rationalizable or it is median-rationalizable. who are married to women of type h1 and h2 in X are married to women of type wj in Y .

Then we can defineUnfortunately,Theorem two cycles, and3 providesxi,j would only a be sufficient a vertex condition in both for median-rationalizability. of them. The first cycle has Corollary2 gives a characterization of necessary conditions, but only for the case of canon- (xi,j, xi,h1 ) asical the matchings. first edge, To sketch and the boundaries remaining of this edges result, defined we present inductively, two examples by thein definition AppendixA. Example A.1 shows that there are indeed matchings that are not rationalizable of (in, jn) above. The second cycle has (xi,j, xi,h2 ) as the first edge, and the remaining h i as median stable matchings, so Corollary2 on canonical matchings does not extend to all edges definedaggregate inductively. matchings. The Example resulting A.2 shows two that cycles the sufficient would be condition connected, in Theorem which3 is contradicts the hypothesisnot necessary. that X is rationalizable. So there must exist some h with e e . An i,j ≤ − i,h analogous argumentAuthor Contributions: appliedAll to authorsei,h implies have equally that contributedei,j toe alli,h parts; so ofe thei,j paper.= e Alli,h authors. Then, ei,j Θ, have read and agreed to the published version of the manuscript.≥ − − ≤ as ei,h Θ. ≥ − Funding: This research received no external funding. Conflicts of Interest: The authors declare no conflict of interest. Appendix C. Examples Appendix A. Examples C.1. ThereAppendix are matchings A.1. Matchings rationalizable, Rationalizable, but Not Median-Rationalizablebut not median-rationalizable. A ratio- nalizable aggregateA rationalizable matching aggregate that cannot matching be that rationalized cannot be rationalized as a median as a median stable stable matching: matching: 1 3

3 1

The only way toThe rationalize only way to rationalizethis aggregate this aggregate matching matching is to is to have have a cycled cycled preference preference profile, i.e., if w P profile,w then i.e., ifmw1PmP 1wm2 then, wm2PPw1mw1, w,2 andPm2wm1, andP m1mPw.2m Similarly,2. Similarly, if if ww2PmP1w1 w then the 1 mthen1 2 the preferences2 w of1 agents1 are2 cycledm2 1 in the opposite1 w direction.2 2 Regardless of the2 choice,m1 1 preferences ofall the agents feasible are aggregate cycled matchings in the opposite are stable, so direction. there are 5 stable Regardless aggregate of matchings the choice, all the feasible aggregate matchings are stable, so there are 5 stable aggregate matchings in total. Therefore, the median aggregate stable matching is the one where each agent is matched to both possible partners twice, which is

2 2

2 2 AGGREGATE MATCHINGS 17

To prove the fact, we reason by induction. We have already established that w P w . j2 mi1 j1 N Suppose that wjn Pmin wjn 1 . By Property 1 of the sequence (in, jn) n=1, either xin 1,jn 1 > 0 − h i − − and xin+1,jn+1 > 0; or yin 1,jn 1 > 0 and yin+1,jn+1 > 0 (or both hold). Then the stability of X − −

and Y implies that min+1 Pwjn min . The proof for the case when win Pwin min 1 is similar.  − The claim implies that the sequence v = x is a cycle in (V,L). Thus a stable h ni h in,jn i matching Y can only differ from X in vertexes that are part of a cycle of (V,L).

Second, we prove that E Y X . We established above that e = 0 only if x is ≡ − ∈ E i,j 6 i,j a vertex in a cycle. We now prove that e Θ. Clearly, e x Θ. We show that | i,j| ≤ i,j ≥ − i,j ≥ − if ei,j > 0 then there is h such that ei,j + ei,h = 0. If e > e for all h = i then there is h and h such that some type-m men of type m i,j − i,h 6 1 2 i i who are married to women of type h1 and h2 in X are married to women of type wj in Y .

Then we can define two cycles, and xi,j would be a vertex in both of them. The first cycle has

(xi,j, xi,h1 ) as the first edge, and the remaining edges defined inductively, by the definition of (i , j ) above. The second cycle has (x , x ) as the first edge, and the remaining h n n i i,j i,h2 edges defined inductively. The resulting two cycles would be connected, which contradicts the hypothesis that X is rationalizable. So there must exist some h with e e . An i,j ≤ − i,h analogous argument applied to e implies that e e ; so e = e . Then, e Θ, i,h i,j ≥ − i,h i,j − i,h i,j ≤ as e Θ. i,h ≥ −

Appendix C. Examples

C.1. There are matchings rationalizable, but not median-rationalizable. A ratio- nalizable aggregate matching that cannot be rationalized as a median stable matching:

1 3

3 1 The only way to rationalize this aggregate matching is to have a cycled preference profile,

i.e., if w1 Pm1 w2 then m2 Pw1 m1, w2 Pm2 w1, and m1 Pw2 m2. Similarly, if w2 Pm1 w1 then the Games 2021, 12, 33 preferences of agents are cycled in the opposite direction. Regardless of the choice,8 of 15 all the feasible aggregate matchings are stable, so there are 5 stable aggregate matchings in total.

Therefore,in the total. median Therefore, aggregate the median stable aggregate matching stable matching is the one is the where one where each each agent agent is matched is to both possiblematched partners to both twice, possible which partners is twice, which is

2 2

2 2

Appendix A.2. Median-Rationalizability Condition Is Not Necessary The18 following example shows AGGREGATE that the sufficient MATCHINGS condition in Theorem3 is not nec- essary.C.2. SupposeMedian-rationalizability that there are four condition types of is men, not necessary. three typesThe of following women, example and considershows an aggregatethat matching the sufficient condition in Theorem 3 is not necessary. Suppose that there are four types of men, three types of women, and consider an aggregate matching 0 0 2 00 0 2 2 1 X =  0 2 1 . X =  1 3 0 . 1 3 0  3 1 0   3 1 0      We chooseWe choose the the preferences preferences such such that that the the graph graph corresponding corresponding to X is as to follows.X is as Note follows. that Note that wewe indicate indicate preference preference with with an arrow, an arrow, so that for so example that forx examplex meansxi,j that wxi,Ph meansw . that i,j → i,h → h mi j whPmiwj. 0 o 2 O  2 / 1 O  1 / 3 O  3 o 1.

Note that there is a cycle (m3, w1), (m3, w2), (m4, w2), (m4, w1) and that this cycle is not Note that there is a cycle {(m , w ), (m , w ), (m , w ), (m} , w ) and that this cycle is balanced. { 3 1 3 2 4 2 4 1 } not balanced.By “rotating” the cycle (m , w ), (m , w ), (m , w ), (m , w ) in a clockwise direction we { 3 1 3 2 4 2 4 1 } Byobtain “rotating” the aggregate the cycle matching(m , w ), (m , w ), (m , w ), (m , w ) in a clockwise direction { 3 1 3 2 4 2 4 1 } we obtain the aggregate matching 0 0 2 00 20 1 2   , 00 42 0 1   ,  4 0 0  0 4 0 which is better for the men. However, by4 counterclockwise 0 0 rotations we obtain the matchings     which is better for the men. However,0 0 2 by0 counterclockwise 0 2 0 0 2 rotations we obtain the match- 0 2 1 0 2 1 0 2 1 ings   ,   ,   , 2 2 0 3 1 0 4 0 0 0 0 2  0 0 2  0 0 2  2 2 0   1 3 0   0 4 0  0 2 1  0 2 1  0 2 1   ,  ,   , which are all better for2 women 2 0 than X. 3 1 0 4 0 0  2 2 0   1 3 0   0 4 0              which are all better for women than X. Now, with the rationalization in the arrows above, the following “joint” rotation of the cycle and the upper entries of the matchings is stable as well:

0 1 1 0 2 0 0 1 2 0 0 3  ,  . 0 4 0 0 4 0  4 0 0   4 0 0          Games 2021, 12, 33 9 of 15

These two matchings are better for the men. In all, then, under the rationalizing pref- erences as in the arrows, there are 7 stable matchings, and X is the median stable matching. There is a crucial aspect of the example that makes this possible. Note that, if we are to rotate the upper part of the graph, we need preferences to be as indicated by the arrows. In particular, we must have x x for the graph to be rationalizable; 2,3 → 1,3 then, to accommodate a > 0 entry in x after the rotation, we must have x x , 1,2 1,3 → 1,2 or otherwise we would get a blocking pair (m1, w3). However, positive entries in x1,3 and in x imply that we need x x (the long dotted arrow in the graph in order to satisfy 3,2 1,2 → 3,2 that x x . Now, a modification of X that has a positive entry in x is only possible 1,3 → 1,2 1,2 if we simultaneously set x = 0, as x x and x x . Hence the rotation of the 3,1 3,1 → 3,2 1,2 → 3,2 upper side of the graph is not feasible under any of the modification of X that improve the matches of the women. There is, therefore, an asymmetry in the graph that allows us to offset the unbalanced- ness of the number of men and women in the cycle.

Appendix B. Proof of Theorem1 We split up the proof in short propositions.

Lemma A1. (χ , ) is a complete lattice, with a largest and smallest element. m ≤m Proof. That (χ , ) is a partially ordered set follows from the definition of . Take m ≤m ≤m a subset Sm of χm. We need to show that Sm has the least upper bound and the greatest lower bound in (χ , ) to complete the proof. m ≤m For every x χm, define x0 = Km ∑1 j W xj. By definition, for every x χm, ∈ − ≤ ≤| | ∈ ∑0 j W xj = Km. Assign a new index (j) : j = 0, 1, 2, . . . , W over W w0 such that ≤ ≤| | { | |} ∪ { }

w(0)Pmw(1)Pm ... Pmw( W ) | | Let z = sup x : x S . Define z inductively as follows: z = sup x + (0) { (0) ∈ m} (i) (i) { (0) ... + x(i) : x Sm (z(0) + ... + z(i 1)). ∈ } − − Note that z(j) 0 and ∑ z(j) = Km. We define z as a W -vector, (z1, ... , z W ), ≥ 0 j W | | | | ≤ ≤| | with respect to the original index. Clearly, zj 0 and ∑ zj Km, so z χm. ≥ 1 j W ≤ ∈ ≤ ≤| |

Claim 1. z is the least upper bound of Sm.

i Proof. By definition, ∑ z(j) = sup x(0) + ... + x(i) : x Sm which is greater than j=0 { ∈ } x + ... + x for all x S and 0 i W . Therefore, z x for all x S , which (0) (i) ∈ m ≤ ≤ | | ≥m ∈ m that z is an upper bound. Suppose that z is another upper bound of S . Therefore, z + ... + z x + 0 m (0 0) (0 i) ≥ (0) ... + x for all x S and 0 i W . If we take the supremum of the right hand side, (i) ∈ m ≤ ≤ | | then we get z + ... + z sup x + ... + x : x S for all 0 i W . On the (0 0) (0 i) ≥ { (0) (i) ∈ m} ≤ ≤ | | other hand, z + ... + z = sup x + ... + x : x S . The last two impressions (0) (i) { (0) (i) ∈ m} imply z + ... + z z + ... + z for all i, so z z. Thus, z is the least upper (0 0) (0 i) ≥ (0) (i) 0 ≥m bound of Sm. Similarly, we can construct the greatest lower bound of S as follows: u = inf x : m (0) { (0) x S . Define u inductively: u = inf x + ... + x : x S (u + ... + ∈ m} (i) (i) { (0) (i) ∈ m} − (0) u(i 1)). The proof that u is the greatest lower bound of of Sm is similar to the proof that z is − the least upper bound of Sm, so it is omitted.

W For each m, let the choice C be defined as follows. For a vector x | |, let C (x) m ∈ <+ m be the vector in y χ : y x , j = 1, . . . , W ∈ m j ≤ j | | Games 2021, 12, 33 10 of 15

that is maximal for . In other words, if x represents the quantities of type of women ≤m available for m, Cm chooses according to Pm from the best choice downwards until filling quota Km. Note that if w Pmw then y = 0, and if ∑ y Km then y = Km 0 j j j:wj Pmw0 j ≤ 0 − ∑j:wj Pmw0 yj. Define Cw analogously.

Proposition A1. (S(M, W, P, K), ) is a nonempty and complete lattice. ≤M

Proof. A man pre-matching is a matrix A = (am,w)M W such that am,w + and × ∈ < ∑w am,w Km. A woman pre-matching is a matrix B = (bm,w)M W such that bm,w + ≤ × ∈ < and ∑ bm w Kw. m , ≤ We consider pairs (A, B), where A is a man prematching, and B is a woman prematch- ing, ordered by a partial order . The order is defined as (A, B) (A , B ) if ≤ ≤ ≤ 0 0

m M, w W, (A A0 and B0 B ). ∀ ∈ ∀ ∈ m ≤m m w ≤w w The order is a product order of complete lattices by Lemma A1, so that the set of all ≤ pairs (A, B) ordered by is a complete lattice. ≤ We define a function C, mapping pairs (A, B) of prematchings into pairs of prematch- ings. Fix (A, B): For a type-m man, the number of type-w women who are willing to match with m at B is θm w = Kw ∑ b . Let Θ = (θm w), i.e., the M W -matrix , − i:mi Pwm i,w , | | × | | such that entry θm,w is the number of type-w women who are willing to match with type m men at B. Similarly, let Ψ = (ψ ) be the M W -matrix for which entry ψ is m,w | | × | | m,w the number of type-m men who are willing to match with type-w women at A. Now let C(A, B) = (A˜, B˜) where A˜ m = Cm(Θm) and B˜w = Cw(Ψw). Note that A˜ is a man prematching and B˜ is a woman prematching. We now prove that C is isotone. Assuming that (A, B) (A , B ), we prove that ≤ 0 0 C(A, B) C(A , B ). ≤ 0 0 Fix m. For any w, we have

b b0 , ∑ i,w ≥ ∑ i,w i:mi Pwm i:mPwmi

because B B . As a consequence, a type-m man has weakly more women of each w0 ≤w w type willing to match with him in B than in B: i.e., Θ Θ . Thus C (Θ ) C (Θ ). 0 m ≤ m0 m m ≤m m m0 Similarly, for a type w woman, C (Ψ ) C (Ψ ). It follows that C(A, B) C(A , B ). w w0 ≤w w w ≤ 0 0 By Tarski’s fixed point theorem, there is a fixed point of C, and the set of fixed points of C is a complete lattice when ordered by . ≤ Let (A, B) be a fixed point of C, i.e., (A, B) = C(A, B). Assume that am,w > bm,w for some m and w. Cw(Ψw) = Bw and am,w > bm,w implies that although am,w number of type-m men were available, only bm,w of them are chosen by Cw. Therefore, all nonnegative entries in Bw are at least as good as m with respect to Rw. This implies that θm,w = bm,w. Since bm,w < am,w, we get θm,w < am,w which contradicts Am = Cm(Θm). Therefore, am,w = bm,w for all m and w. Hence the fixed point has the property that A = B, and they are not only a prematching but a matching as well since a man prematching that is also woman prematching is a matching. Finally, we prove that the set of fixed points of C is the set of stable matchings. More precisely, (A, A) is a fixed point of C if and only if A is a stable matching. Suppose that a fixed point (A, A) of C is not stable. By construction of Cm and Cw, A is individually rational. Then there is a blocking pair (m, w). By definition of blocking pairs, there exist m M m and w W wo such that mPwm , wPmw , a > 0, 0 ∈ ∪ { 0} 0 ∈ ∪ { } 0 0 m,w0 and a > 0. Now, the number of type-w women who are willing to match with m at A is m0,w

θm w = Kw a am w + a > am w, , − ∑ i,w ≥ , m0,w , i:mi Pwm Games 2021, 12, 33 11 of 15

as a > 0. However, θ > a and a = C (Θ ) contradicts that there is w with m0,w m,w m,w m m m 0 wP w and a > 0. m 0 m,w0 Suppose that A is a stable matching. We fix m and show that am = Cm(Θm) where θm w = Kw ∑ a . Suppose, for contradiction, that am = Cm(Θm). Denote w as , − i:mi Pwm i,w 6 j the most preferred type of women (with respect to R ) such that a = (C (Θ )) . For all m m,j 6 m m j w preferred to w , a = (C (Θ )) . Thus, a > (C (Θ )) implies either a > θ j0 j m,j0 m m j0 m,j m m j m,j m,j or a > K , neither of which is possible. On the other hand, a < (C (Θ )) ∑j :w Rmwj m,j0 m m,j m m j 0 j0 contradicts that A is stable. Although there are type wj women available more than am,j, some type m men are matched to less preferred women. Then, there is j such that w P w 0 j m j0 and a > 0, so (m, w ) is a blocking pair. Similarly, we can show that a = C (Θ ), m,j0 j w w w and therefore (A, A) = C(A, A).

Proposition A2. Suppose that X and Y are stable matchings, then X Y if and only if ≤M Y X. ≤W Proof. Suppose that X and Y are stable matchings such that X Y, we show that ≤M Y X. The other direction of the claim can be proved analogously. ≤W Consider the construction of C in the proof of Proposition A1: Let Ψ and Ψ0 correspond to the matrices for X and Y as in the proof. Since X and Y are stable matchings we have C(X, X) = (X, X) and C(Y, Y) = (Y, Y). Since X Y for all m, Ψ Ψ for all m and ≤m m0 ,w ≤ m,w w. Therefore, Y = C (Ψ ) C (Ψ ) = X for all w, which implies that Y X. w w w0 ≤w w w w ≤W Proposition A3. Suppose that X and Y are two stable matchings. Then for any men or women type a, either Xa a Ya or Ya a Xa. Consequently, Xa a Ya = max a Xa, Ya and Xa a Ya = ≤ ≤ ∨ ≤ { } ∧ min a Xa, Ya . ≤ { } Proof. We only prove the first part that either X Y or Y X , in three steps a ≤a a a ≤a a depending on whether X and Y have integer, rational, and real entries. The second part follows immediately from the first part. Case 1 (Integer Entries): We first start with the case when X and Y have integer entries as well as K and K . From M, W, P, K , we create a many-to-one matching market (of w m h i colleges and students) as follows. The set of types of men remains the same; interpreted as the set of colleges. A college m has a capacity of Km. Whereas, each type-w woman is split into Kw copies, all of which have the same preferences Pw over colleges; women types are interpreted as students. On the other hand, m’s preferences Pm0 replace w in Pm with her copies enumerated from 1 th l l k to Kw, in increasing order. Denote wj’s l copy by wj. So wj Pm0 wj if and only if k > l. In addition, each college has responsive preferences over groups of students. The new matching market with M colleges and ∑ Kw students is a many-to-one matching markets | | w where an outcome for a college is a group of students, and an outcome for a student is either a college or being single. Now, we construct a new matching, X0, in the new market from X. (The new matching is a many-to-one matching, which is not an aggregate matching. Nevertheless, we use the aggregate matching notation to stress the relations between X0 and X, and Y0 and Y.) It is enough to describe the matches of students in X0. Rank woman w’s outcomes in X in th l th decreasing order according to her preference Pw. Let the l copy of wj, wj, match to the l highest outcome of wj in X. Similarly, construct Y0 from Y. We claim that X0 and Y0 are stable matchings in the new market. Suppose for contra- diction that X0 is not a stable matching. Since X0 is individually rational by construction, l l there exists a blocking pair (m, wj). This means that wj’s match is worse than m. Similarly, l k m’s match includes a student worse than wj: this agent cannot be wj where k < l by k k definition of Pm0 , and it cannot be wj where k > l because by construction wj ’s match is l l worse than wj’s match with respect to ¶wj. Hence, one of m’s matches is worse than wj, Games 2021, 12, 33 12 of 15

and not a copy of wj. This means that (m, wj) forms a blocking pair in X: A contradiction to the stability of X. Therefore, X0 must be stable. Similarly, Y0 is also stable. Now, by Theorem 5.26 of [12], for any college m the outcomes in X0 and Y0 are comparable. This means that the responsive preferences over groups of students inherited from Pm0 , which is equivalent to the first-order stochastic dominance, can compare the outcomes of m in these two stable matchings. Therefore, can compare the outcomes in ≤m X and Y since Pm is a coarser order than Pm0 . An analogous argument shows that can compare the matching outcomes in X ≤w and Y. Case 2 (Rational Entries): Suppose for now that all entries of X and Y are rational numbers as well as K and K . Define a new matching market from M, W, P, K as follows. w m h i M, W, and P are the same. We change the capacities as follows. Find a common factor of denominators in all entries in X and Y, say r, and multiply all capacities by r. Therefore, the new market is M, W, P, rK . Define X = rX and Y = rY with non-negative h i 0 0 integer entries. By the argument above, for any agent a, the matchings in rX and rY can be compared with respect to which implies that the outcomes in X and Y can also ≤a be compared. Case 3 (Real Entries): Suppose now that entries of X and Y are real numbers. We construct two sequences of matrices, X(n) and Y(n), as follows: 1. X(n) and Y(n) have rational entries, (n) (n) 2. x = 0 x = 0 and y = 0 y = 0 for all i, j, ij ⇐⇒ ij ij ⇐⇒ ij 3. the sum of entries in row i and column j is the same for X(n) and Y(n), and (n) (n) 4. x x and y y as n ∞ for all i, j. ij → ij ij → ij → By construction, stability of X and Y imply stability of X(n) and Y(n) for the same (n) (n) market with adjusted capacities. By the argument above, for each type a, xa and ya can be compared with respect to a. Take a subsequence nl such that the ordering is the ≤(n ) (n ) {(n )} (n ) same for all entries. Therefore, x l y l for all l or y l x l for all l. By taking l to a ≤a a a ≤a a ∞ we get that either xa a ya in the former case, or ya a xa in the latter since (4) implies (n) (n) ≤ ≤ x ,j x ,j and yi, yi, as n ∞ for all i, j. · → · · → · → We have shown that (S(M, W, P, K), ) is a lattice in Proposition A1. Using the ≤M proposition above, we show that the lattice, (S(M, W, P, K), ), is distributive. ≤M Proposition A4. (S(M, W, P, K), ) is a distributive lattice. ≤M Proof. Suppose that X, Y, and Z are stable matchings. We are going to prove that type a has the same matching in X (Y Z) and (X Y) (X Z) for all agent types a: ∧ ∨ ∧ ∨ ∧ (X (Y Z)) = min X , max Y , Z ∧ ∨ a { a { a a}} = max min X , Y , min X , Z { { a a} { a a}} = max (X Y) , (X Z) { ∧ a ∧ a} = ((X Y) (X Z)) , ∧ ∨ ∧ a where min and max operators are defined with respect to and where we repeatedly use ≤a Proposition A3. The proof that X (Y Z) = (X Y) (X Z) is analogous. ∨ ∧ ∨ ∧ ∨

Proposition A5. Suppose that X and Y are stable matchings. Then ∑ xij = ∑ yij for 1 j W 1 j W ≤ ≤| | ≤ ≤| | all i and similarly ∑ xij = ∑ yij for all j. 1 i M 1 i M ≤ ≤| | ≤ ≤| | Games 2021, 12, 33 13 of 15

Proof. The proof has the same structure as in the proof of Proposition A3: it has three steps depending on whether X and Y have integer, rational, and real entries. Case 1 (Integer Entries): We first start with the case when X and Y have integer entries as well as K for all m and K for all w. From M, W, P, K , we create a many-to-one m w h i matching market and also stable matchings X0 and Y0 in this new market as in the proof of Proposition A3. Now, by Theorem 5.12 of [12], the set of positions filled for any m in X0 and Y0 are the same. Therefore, ∑ xij = ∑ yij for all i. Similarly, ∑ xij = ∑ yij for all j. 1 j W 1 j W 1 i M 1 i M ≤ ≤| | ≤ ≤| | ≤ ≤| | ≤ ≤| | Case 2 (Rational Entries): Suppose for now that all entries of X and Y are rational numbers as well as K for all a. Define a new matching market from M, W, P, K as follows. a h i M, W, and P are the same. We change the capacities as follows. Find a common factor of denominators in all entries in X and Y, say r, and multiply all capacities by r. Therefore, the new market is M, W, P, rK . Define X = rX and Y = rY with non-negative h i 0 0 integer entries. By the argument above, ∑ rxij = ∑ ryij for all i and ∑ rxij = ∑ ryij 1 j W 1 j W 1 i M 1 i M ≤ ≤| | ≤ ≤| | ≤ ≤| | ≤ ≤| | for all j. The conclusion follows. Case 3 (Real Entries): Suppose now that entries of X and Y are real numbers. We construct two sequences of matrices, X(n) and Y(n), as follows: 1. X(n) and Y(n) have rational entries, (n) (n) 2. x = 0 x = 0 and y = 0 y = 0 for all i, j, ij ⇐⇒ ij ij ⇐⇒ ij 3. the sum of entries in row i and column j is the same for X(n) and Y(n), and (n) (n) 4. x x and y y as n ∞ for all i, j. ij → ij ij → ij → By construction, stability of X and Y imply stability of X(n) and Y(n)for the same (n) (n) market with adjusted capacities. By the argument above, ∑ xij = ∑ yij for all i 1 j W 1 j W ≤ ≤| | ≤ ≤| | (n) (n) and ∑ xij = ∑ yij . If we take the limit of these equalities as n ∞, we get the 1 i M 1 i M → ≤ ≤| | ≤ ≤| | desired equalities.

Appendix C. Proof of Theorem3 Let X be a rationalizable integral complete matching. Suppose that all cycles of the associated graph (V, L) are balanced. Direct the edges of (V, L) such that each cycle is oriented as follows: if v ,..., v is a cycle, then the edge (v , v ) L is oriented such h 0 Ni n n+1 ∈ that d(v , v ) = 1, which we denote by v v . For each path v ,..., v , direct n+1 n n → n+1 h 0 Ni the edges in a similar way. If the matching X is rationalizable, then such an orientation of the edges exists and defines a rationalizing preference profile P (Theorem2, Part 1). The rationalizing preferences have the property that if x = 0 and x > 0 then w ¶m w i,j i0,j0 j0 i j if i = i , and m ¶w m if j = j . 0 i0 j i 0 First, if X has no cycles, then it is rationalizable as the unique stable matching (Theorem2 , Part 2), so there is nothing to prove, as a unique stable matching is also the median stable matching. Suppose then that X has at least one cycle c = v ,..., v . h 0 Ni Enumerate the vertexes of the cycle such that v v in the orientation (directed graph) n → n+1 of (V, L) above, and v0 lies in the same row as v1. Let

Θ = min v0, v2,..., vN 2 = min v1, v3,..., vN 1. − − Let ε be the set of all M W matrices E of integer numbers such that | | × | | • ei,j = 0 if (i, j) is not in the cycle c; • for all i and j, ∑h ei,h = 0 and ∑l el,j = 0; and • e Θ. | i,j| ≤ Games 2021, 12, 33 14 of 15

We want to make two observations about the matrices in ε. First, (X + E) > 0 i,j ⇒ x > 0, so X + E is a stable matching for all E ε. Second, E ε if and only if E ε; and i,j ∈ ∈ − ∈ E ε is such that X (X + E) if and only if (X E) X . Similarly, E ε is such ∈ i ≤mi i − i ≤mi i ∈ that X (X + E) if and only if (X E) X . j ≤wj j − j ≤wj j We need to prove that any stable matching Y = X in the resulting market M, W, P, K 6 h i must be obtained from X through matrices in ε: Then X is a median stable matching. First, we prove that y = x only if x is a vertex in a minimal cycle of X. The i,j 6 i,j i,j number of single agents of each type is the same in X as in Y (Proposition A5; in this case it is zero, as X has no single agents). So, if x < y then there is h = j and l = i such i,j i,j 6 6 that y < x and y < x . Similarly, if x > y then there is h = j and l = i such that i,h i,h l,j l,j i,j i,j 6 6 yi,h < xi,h and yl,j < xl,j. Hence, we can apply this observation repeatedly, starting from any (i, j) with x = y and obtain a sequence (i , j ), ... , (i , j ) with (i , j ) = (i , j ) i,j 6 i,j 1 1 N N 1 1 N N such that for each n ( mod N): 1. (x y )(x y ) < 0 in,jn − in,jn in+1,jn+1 − in+1,jn+1 2. i = i j = j . n 6 n+1 ⇐⇒ n n+1

Claim 2. For n = 1, . . . , N, xin,jn > 0.

< Proof. Suppose for contradiction that 0 = xi1,j1 yi1,j1 . Without loss of generality, assume

that i1 = i2. By definition of the rationalization P, we have that wj2 Pmi1 wj1 , as xi1,j1 = 0 and x > y 0. We can now show that if (i , j ) and (i , j ) differ in i, then j prefers i1,j2 i1,j2 ≥ n n n+1 n+1 n min+1 to min ; and that if they differ in j, then in prefers wjn+1 to wjn . This fact, which we

prove in the next paragraph, establishes the contradiction: iN = iN 1, but miN 1 PwiN miN 6 − − by definition of P and because 0 = xiN,jN = xi1,j1 .

To prove the fact, we reason by induction. We have already established that wj2 Pmi1 wj1 . N > Suppose that wjn Pmin wjn 1 . By Property1 of the sequence (in, jn)n=1 , either xin 1,jn 1 0 > − > > h i − − and xin+1,jn+1 0; or yin 1,jn 1 0 and yin+1,jn+1 0 (or both hold). Then the stability of X − − and Y implies that min+1 Pwjn min . The proof for the case when win Pwin min 1 is similar. − The claim implies that the sequence v = x is a cycle in (V, L). Thus a stable h n h in,jn i matching Y can only differ from X in vertexes that are part of a cycle of (V, L).

Second, we prove that E Y X ε. We established above that e = 0 only if x is ≡ − ∈ i,j 6 i,j a vertex in a cycle. We now prove that e Θ. Clearly, e x Θ. We show that | i,j| ≤ i,j ≥ − i,j ≥ − if ei,j > 0 then there is h such that ei,j + ei,h = 0. If e > e for all h = i then there is h and h such that some type-m men of i,j − i,h 6 1 2 i type mi who are married to women of type h1 and h2 in X are married to women of type wj in Y. Then we can define two cycles, and xi,j would be a vertex in both of them.

The first cycle has (xi,j, xi,h1 ) as the first edge, and the remaining edges defined inductively, by the definition of (i , j ) above. The second cycle has (x , x ) as the first edge, h n n i i,j i,h2 and the remaining edges defined inductively. The resulting two cycles would be connected, which contradicts the hypothesis that X is rationalizable. So there must exist some h with e e . An analogous argument applied to e implies that e e ; so e = e . i,j ≤ − i,h i,h i,j ≥ − i,h i,j − i,h Then, e Θ, as e Θ. i,j ≤ i,h ≥ − References 1. Gale, D.; Shapley, L.S. College Admissions and the Stability of Marriage. Am. Math. Mon. 1962, 69, 9–15. [CrossRef] 2. Abdulkadiro˘glu,A.; Pathak, P.; Roth, A.; Sönmez, T. The Boston Public School Match. Am. Econ. Rev. 2005, 95, 368–371. [CrossRef] 3. Abdulkadiro˘glu,A.; Pathak, P.A.; Roth, A.E. The New York City High School Match. Am. Econ. Rev. 2005, 95, 364–367. [CrossRef] 4. Choo, E.; Siow, A. Who Marries Whom and Why. J. Political Econ. 2006, 114, 175–201. [CrossRef] 5. Galichon, A.; Salanie, B. Matching with Trade-Offs: Revealed Preferences over Competing Characteristics; Mimeo, Ecole Polytechnique: Paris, France, 2009. 6. Echenique, F.; Lee, S.; Shum, M. The money pump as a measure of revealed preference violations. J. Political Econ. 2011, 119, 1201–1223. [CrossRef] Games 2021, 12, 33 15 of 15

7. Varian, H.R. Non-Parametric Analysis of Optimizing Behavior with Measurement Error. J. Econom. 1985, 30, 445–458. [CrossRef] 8. Echenique, F.; Lee, S.; Shum, M. Partial identification in two-sided matching models. In Structural Econometric Models; Emerald Group Publishing Limited: Bingley, UK, 2011; pp. 117–139. 9. Echenique, F.; Lee, S.; Shum, M.; Yenmez, M.B. The Revealed Preference Theory of Stable and Extremal Stable Matchings. Econometrica 2013, 81, 153–171. [CrossRef] 10. Chambers, C.; Echenique, F. Revealed Preference Theory; Cambridge University Press: Cambridge, UK, 2016; Volume 56. 11. Echenique, F. What Matchings Can Be Stable? The Testable Implications of Matching Theory. Math. Oper. Res. 2008, 33, 757–768. [CrossRef] 12. Roth, A.; Sotomayor, M. Two-sided Matching: A Study in Game-Theoretic Modelling and Analysis. In Econometric Society Monographs; Cambridge University Press: Cambridge, UK, 1990; Volume 18. 13. Chen, P.; Egesdal, M.; Pycia, M.; Yenmez, M.B. Median stable matchings in two-sided markets. Games Econ. Behav. 2016, 97, 64–69. [CrossRef] 14. Fleiner, T. A Fixed-Point Approach to Stable Matchings and Some Applications. Math. Oper. Res. 2003, 28, 103–126. [CrossRef] 15. Klaus, B.; Klijn, F. Procedurally fair and stable matching. Econ. Theory 2006, 27, 431–447. [CrossRef] 16. Klaus, B.; Klijn, F. Smith and Rawls share a room: Stability and . Soc. Choice Welf. 2010, 35, 647–667. [CrossRef] 17. Schwarz, M.; Yenmez, M.B. Median Stable Matching for Markets with Wages. J. Econ. Theory 2011, 146, 619–637. [CrossRef] 18. Teo, C.-P.; Sethuraman, J. The geometry of fractional stable matchings and its applications. Math. Oper. Res. 1998, 23, 874–891. [CrossRef] 19. Chambers, C.P.; Echenique, F. The Core Matchings of Markets with Transfers. Am. Econ. J. Microeconomics 2015, 7, 144–64. [CrossRef] 20. Demuynck, T.; Salman, U. On the Revealed Preference Analysis of Stable Aggregate Matchings; Working Paper; ECARES: Brussels, Belgium, 2020. 21. Echenique, F.; Yariv, L. An Experimental Study of Decentralized Matching; Mimeo, California Institute of Technology: Pasadena, CA, USA, 2012. 22. Klaus, B.; Klijn, F. Median stable matching for college admissions. Int. J. 2006, 34, 1–11. [CrossRef]