An algorithm to compute the set of many-to-many stable matchings
Abstract
Martínez, Ruth; Massó, Jordi; Neme, Alejandro; Oviedo, Jorge
Full text
AN ALGORITHM TO COMPUTE THE SET OF MANY-TO-MANY STABLE MATCHINGS by R. Martnez y , J. Masso z , A. Neme y ,and J. Oviedo y W.P. UAB-IAE 457.00 February, 2000 Abstract: The pap er prop oses an algorithm to compute the set of many- to-many stable matchings when agents have substitutable preferences. The algorithm starts by calculating the two optimal-stable matchings using the deferred-acceptance algorithm. Then, it computes each remaining stable matching as the rm-optimal stable matching corresp onding to a new preference prole which is obtained after mo difying the preferences of a previously identied sequence of rms. We are grateful to Howard Petith for helpful comments. Financial support through a grant from the Programa de Co op eracion Cient ica Iberoamericana is acknowledged. The work of J. Masso is also partially supp orted by Research Grants PB98-0870 from the Direccion General de Investigacion Cient ica y Tecnica, Spanish Ministry of Education and Culture, and SGR98-62 from the Comissionat per Universitats i Recerca de la Generalitat de Catalunya. The paper was partially written while Alejandro Neme was visiting the UAB under a sabbatical fellowship from the Comissionat p er Universitats i Recerca de la Generalitat de Catalunya. y Instituto de Matematica Aplicada. Universidad Nacional de San Luis and CONICET. Ejercito de los Andes 950. 5700, San Luis, Argentina. E-mails: [email protected], [email protected], and jo[email protected] z Departament d'Economia i d'Historia Economica and CODE. Universitat Autonoma de Barcelona. 08193, Bellaterra (Barcelona), Spain. E-mail: [email protected]
1 Intro duction The pap er prop oses an algorithm to compute the set of many-to-many stable matchings when agents have substitutable preferences. Many-to-many matching mo dels have b een useful for studying assignment problems with the distinctive feature that agents can be divided from the very b eginning into two disjoint subsets: the set of rms and the set of workers. 1 The nature of the assignment problem consists of matching each agent (rms and workers) with a subset of agents from the other side of the market. Thus, each rm will hire a subset of workers while eachworker may work for a number of dierent rms. The problem b ecomes interesting b ecause agents have preferences on the subsets of p otential partners. Stability has b een considered the main prop erty to be satised by any sensible matching. A matching is called stable if all agents have an acceptable subset of partners and there is no unmatched worker-rm pair who both would prefer to add the other to their current subset of partners. To giveall blo cking p ower to only individual agents and worker-rm pairs seems a very weak requirement in terms of the durability of the matching. Unfortunately the set of stable matchings may be empty. Substitutability is the weakest condition imp osed on agents preferences under whichthe existence of stable matchings is guaranteed. An agent has substitutable preferences if he continues to want to partner an agentof the other side of the market even if other agents b ecome unavailable. 2 Surprisingly, the set of stable matchings under substitutable preferences is very-well structured. It contains two distinctive matchings: the rm-optimal stable matching (denoted by F )and the worker-optimal stable matching (denoted by W ). The matching F is unanimously considered by all rms to b e the b est among all stable matchings and byallworkers to b e the worst among all stable matchings. Symmetrically, the matching W is unanimously considered by all workers to be the best among all stable matchings and by all rms to be the worst among all stable matchings. They can be obtained by the so-called deferred-acceptance algorithm (originally dened by Gale and Shapley (1962) for the one-to-one case and later adapted by Roth (1984) to the many-to-many case). Additionally, Blair (1988) shows that the set of 1 We will b e using as a reference (and as a source of terminology) lab or markets with part-time jobs and we will generically refer to these two sets as the two sides of the market. 2 See Denition 3 for a formal statementofthisproperty. Kelso and Crawford (1982) were the rst to use it to show the existence of stable matchings in a many-to-one mo del with money. Roth (1984) shows that if all agents have substitutable preferences the set of many-to-many stable matchings is non-empty. 1
stable matchings has a lattice structure. 3 In particular, Roth (1984) and Blair (1988) show that this unanimity and opp osition of interests of the two sides of the market is even stronger in the sense that all rms, if they had to cho ose the b est subset from the set of workers made up of the union of the rmoptimal stable matching and any other stable matching, would cho ose the rm-optimal stable matching. Also, all rms, if they had to cho ose the best subset from the set of workers made up of the union of the worker-optimal stable matching and anyother stable matching, would cho ose the stable matching. And symmetrically, the two prop erties also hold interchanging the roles of rms and workers. 4 While there are many algorithms designed to compute the full set of one- to-one stable matchings as well as the two-optimal stable matchings (for the many-to-manymodel)we are not aware of any algorithm which can compute the ful l set of matchings for this more general many-to-many case. 5 This pap er provides such an algorithm. Roughly, our algorithm works by applying successively the following procedure. First, and given as input an original prole of substitutable preferences, it computes by the deferred-acceptance algorithm the two optimal stable matchings F and W . Second, it identies all rm-worker pairs ( f; w ) where rm f hires the worker w in F but not in W . Successively,for each of these pairs, it mo dies the preference of rm f by declaring all subsets of workers containing worker w unacceptable but leaving the orderings among all subsets not containing w unchanged. This is called an ( f; w )-truncation of the original preference. By the deferred-acceptance algorithm it computes (for each pair) the rm-optimal stable matching corresp onding to the preference prole where all agents have the original preferences except that rm f has the ( f; w )-truncated preference. Third, although this new rm-optimal stable matching maynot be stable relative to the original preference prole it is stable provided that all workers, if they had to cho ose the best subset from the set of rms made up of the union of the two rm-optimal stable matchings (the original and the new one) they would cho ose the new one. If it passes this test (and hence, if it is stable relative to the original prole of preferences) we keep it and pro ceed again from the very b eginning using this mo died prole as an input. 6 The algorithm stops when there is no 3 Roth (1985), Sotomayor (1999), Alkan (1999), and Mart inez, Masso, Neme, and Oviedo (1999) also study the lattice structure of the set of stable matchings in dierent mo dels. 4 See Remark 1 in Section 2 for a formal statement of these four prop erties. 5 See Guseld and Irving (1989) for an algorithmic approach to the one-to-one and ro ommate mo dels. 6 In the formal denition of the algorithm the reader will nd an additional (but dis- 2
rm-worker pair with the ab ove prop erty. The pap er is organized as follows. In Section 2 we present the preliminary notation, denitions, and results. Section 3 contains the denition of the algorithm, the Theorem stating that the outcome of the algorithm is equal to the set of stable matchings, and an example illustrating how the algorithm works. In Section 4 we prove the Theorem. Finally, an App endix at the end of the pap er illustrates by means of an example the deferred-acceptance algorithm of Gale and Shapley adapted to the many-to-many case. 2 Preliminaries There are two disjoint sets of agents ,the set of n rms F = f f 1 ;:::;f n g and the set of m workers W = f w 1 ;:::;w m g . Generic elements of b oth sets will be denoted, resp ectively, by f , f i , f i k , f ,and ~ f ,and by w , w j , w j k , w , and ~ w . A generic agent will be denoted by a and we will refer to a set of partners of a as a subset of agents of the set not containing a . Eachagent a 2 F [ W has a strict, transitive, and complete preference relation P ( a )over the set of all subsets of partners (over 2 F if a is a worker and over 2 W if a is a rm). Preference proles are ( n + m )-tuples of preference relations and they are represented by P = ( P ( f 1 ) ;:::;P ( f n ); P ( w 1 ) ;:::;P ( w m )). Given a preference relation of an agent P ( a ) the subsets of partners preferred to the empty set by a are called acceptable ; therefore, we are allowing for the p ossibility that rm f may prefer not hiring any worker rather than hiring unacceptable subsets of workers and that worker w may prefer to remain unemployed rather than working for an unacceptable subset of rms. To express preference relations in a concise manner, and since only acceptable partners will matter, we will represent preference relations as lists of acceptable partners. For instance, P ( f i ) = w 1 w 3 ;w 2 ;w 1 ;w 3 P ( w j ) = f 1 f 3 ;f 1 ;f 3 indicate that f w 1 ;w 3 g P ( f i ) f w 2 g P ( f i ) f w 1 g P ( f i ) f w 3 g P ( f i ) ; and f f 1 ;f 3 g P ( w j ) f f 1 g P ( w j ) f f 3 g P ( w j ) ; . The assignment problem consists of matching workers with rms keeping the bilateral nature of their relationship and allowing for the p ossibility that b oth, rms and workers, may remain unmatched. Formally, Denition 1. A matching is a mapping from the set F [ W into the set of al l subsets of F [ W such that for al l w 2 W and f 2 F : p ensable) step only used to sp eed up the algorithm. 3
1. ( w ) F or else ( w )= ; : 2. ( f ) W or else ( f )= ; . 3. f 2 ( w ) if and only if w 2 ( f ) : Condition 1 says that a worker can b e either matched to a subset of rms or remain unmatched. Condition 2 says that a rm can either hire a subset of workers or b e unmatched. Finally, condition 3 states the bilateral nature of a matching in the sense that rm f hires worker w if and only if worker w works form rm f . We say that w and f are single in a matching if ( w ) = ; and ( f ) = ; . Otherwise, they are matched. A matching is said to be one-to-one if rms can hire at most one worker and workers can work for at most one rm. The mo del in which all matchings are one-to- one is also known in the literature as the marriage model . A matching is said to be many-to-one if workers can work for at most one rm but rms may hire many workers. The mo del in which all matchings are many-to- one, and rms have resp onsive preferences, 7 is also known in the literature as the col lege admissions model . To represent matchings concisely we will follow the widespread notation where, for instance, given F = f f 1 ;f 2 ;f 3 g and W = f w 1 ;w 2 ;w 3 ;w 4 g f 1 f 2 f 3 ; 1 w 3 w 4 w 1 w 1 w 3 w 4 w 2 2 ; w 1 w 2 w 3 w 4 represents twomatchings where in matching 1 rm f 1 is matched to workers w 3 and w 4 , rm f 2 is matched to worker w 1 , rm f 3 is matched to workers w 1 , w 3 , and w 4 ; and worker w 2 is single and in matching 2 rm f 1 and worker w 4 are single, rm f 2 is matched to workers w 1 and w 2 , and rm f 3 is matched to worker w 3 . Notice that we could equivalently represent the two matchings as w 1 w 2 w 3 w 4 ; 1 f 2 f 3 ; f 1 f 3 f 1 f 3 ; 2 f 2 f 2 f 3 ; f 1 : Let P b e a preference prole. Given a set of partners S ,let Ch ( S; P ( a )) denote agent a 's most-preferred subset of S according to a 's preference ordering P ( a ). Amatching is blockedby agent a if ( a ) 6 = Ch ( ( a ) ;P ( a )). 7 Namely, for anytwo subsets of workers that dier in only one worker a rm prefers the subset containing the most-preferred worker. See Roth and Sotomayor (1990) for a precise and formal denition of responsive preferences as well as for a masterful and illuminating analysis of these mo dels and an exhaustive bibliography. 4
We say that a matching is individual ly rational if it is not blo cked by any agent. We will denote by IR ( P ) the set of individually rational matchings. A matching is blocked by a worker-rm pair ( w; f )if w = 2 ( f ), w 2 Ch ( ( f ) [f w g ;P ( f )), and f 2 Ch ( ( w ) [f f g ;P ( w )). Denition 2. A matching is stable if it is not blockedby any individual agent or any worker-rm pair. Given a preference prole P , denote the set of stable matchings by S ( P ). It is easy to construct examples of preference proles with the prop erty that the set of stable matchings is empty. Those examples share the feature that at least one agent regards a subset of partners as being complements. This is the reason why the literature has fo cused on the restriction where partners are regarded as substitutes. Denition 3. An agent a 's preferenceordering P ( a ) satises substitutability if for any set S of partners containing agents b and c ( b 6 = c ) ,if b 2 Ch ( S; P ( a )) then b 2 Ch ( S nf c g ;P ( a )) . A preference prole P is substitutable if for each agent a ,the preference ordering P ( a ) satises substitutability. Roth (1984) shows that if all agents have substitutable preferences then: (1) the set of stable matchings is non-empty, (2) rms (workers) unanimously agree that a stable matching F ( W )is the b est stable matching, 8 and (3) the optimal stable matching for one side is the worst stable matching for the other side (that is, for all 2 S ( P ) we have that R ( f ) W for all f 2 F and R ( w ) F for all w 2 W ). The deferred-acceptance algorithm, originally dened by Gale and Shapley (1962) for the one-to-one case, pro duces either F or W dep ending on who makes the oers. Atany step of the algorithm in which rms make oers, a rm prop oses itself to the choice set of the set of workers that have not already rejected it during the previous steps, while a worker accepts the choice set of the set of current oers plus those of the rms provisionally matched in the previous step (if any). The algorithm stops at the step at which all oers are accepted; the (provisional) matching b ecomes then denite and it 8 The matchings F and W are called, resp ectively, the rms-optimal stable matching and the workers-optimal stable matching. We are following the convention of extending preferences from the original sets (2 W and 2 F )tothesetofmatchings. However, wenow have to consider weak orderings since the matchings and 0 may asso ciate the same set of partners to an agent. These orderings will b e denoted by R ( f )and R ( w ). For instance, to say that all rms prefer F to any stable means that for every f 2 F wehavethat F R ( f ) for all stable (that is, either F ( f )= ( f ) or else F ( f ) P ( f ) ( f )). 5
is the stable matching F . Symmetrically, if workers make oers, the outcome of the algorithm is the stable matching W . The App endix at the end of the pap er illustrates by means of an example how the deferred-acceptance algorithm works for the many-to-many case. Our algorithm will consist of applying the deferred-acceptance algorithm where rms make oers to preferences proles that are obtained after mo difying the preference of arm by making all subsets containing a particular worker unacceptable. 9 Formally, Denition 4. Wesaythatapreference P ( f;w ) ( f ) is an ( f; w ) truncation of P ( f ) if: 1. There exists an acceptable subset of workers according to P ( f ) containing worker w ; that is, 9 S 2 2 W such that w 2 S and SP ( f ) ; . 2. The preferences P ( f ) and P ( f;w ) ( f ) coincide on al l subsets that not contain w ; that is, if w = 2 S 1 [ S 2 then S 1 P ( f ) S 2 if and only if S 1 P ( f;w ) ( f ) S 2 . 3. All subsets containing w are unacceptable according to P ( f;w ) ( f ) ; that is, if w 2 S then ; P ( f;w ) ( f ) S . Given a preference prole P and an ( f; w ) truncation of P ( f ) we denote by P ( f;w ) the preference prole obtained by replacing P ( f ) in P by P ( f;w ) ( f ). We denote by ( f;w ) F and ( f;w ) W the rm and worker-optimal stable matchings corresp onding to the preference prole P ( f;w ) . Moreover, given a preference prole P and a sequence of pairs ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) we will represent by P ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) the preference prole obtained from P after successively truncating the corresp onding preference; we will also denote by ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) F and ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) W its corresp onding optimal-stable matchings. The following lemma states that the prop erty of substitutability is preserved by truncations and therefore ( f;w ) F and ( f;w ) W exist provided that P is substitutable. Lemma 1. If P ( f ) is substitutable then P ( f;w ) ( f ) is substitutable. Proof. Let w; w 0 2 S be arbitrary and assume that w 2 Ch ( S; P ( f;w ) ( f )). If w = 2 S; then w 2 Ch ( S nf w 0 g ;P ( f;w ) ( f )) b ecause Ch ( S; P ( f;w ) ( f )) = Ch ( S; P ( f )), 9 Given the symmetric role of rms and workers it will b ecome clear that the construction that follows could be equivalently done by interchanging the roles of workers and rms. 6
Ch ( S nf w 0 g ;P ( f;w ) ( f )) = Ch ( S nf w 0 g ;P ( f )), and b ecause of the substitutabilityof P ( f ). If w 2 S; then wehave that Ch ( S; P ( f;w ) ( f )) = Ch ( S nf w g ;P ( f )); therefore, by assumption w 2 Ch ( S nf w g ;P ( f )). By the substitutability of P ( f ) we have that w 2 Ch ([ S nf w g ] nf w 0 g ;P ( f )) but the two equalities Ch ([ S nf w g ] nf w 0 g ;P ( f )) = Ch ([ S nf w g ] nf w 0 g ;P ( f;w ) ( f )) = Ch ( S nf w 0 g ;P ( f;w ) ( f )) imply that worker w 2 Ch ( S nf w 0 g ;P ( f;w ) ( f )) : Before nishing this section we present, as a Remark b elow, four prop erties of stable matchings. Remark 1 Assume P is substitutable and let 2 S ( P ) : Then, for all f and w : 1. Ch ( F ( f ) [ ( f ) ;P ( f )) = F ( f ). 2. Ch ( W ( w ) [ ( w ) ;P ( w ))= W ( w ). 3. Ch ( W ( f ) [ ( f ) ;P ( f )) = ( f ). 4. Ch ( F ( w ) [ ( w ) ;P ( w ))= ( w ). Prop erties 1 and 2 are due to Roth (1984) while prop erties 3 and 4 follow from 1, 2, and Theorem 4.5 in Blair (1988). They can be interpreted as an strengthening of the optimalityof F and W .Since Prop erty 4 will play a crucial role in the construction of our algorithm we will some times refer to it as the Choice Property .Example 1 b elowshows that, although necessary, they are far from b eing a characterization of stable matchings. Example 1 Let F = f f 1 ;f 2 ;f 3 ;f 4 g and W = f w 1 ;w 2 ;w 3 ;w 4 g be the two sets of agents with the preference prole P , where P ( f 1 )= w 1 ;w 2 ;w 3 ;w 4 P ( f 2 )= w 2 ;w 4 ;w 1 P ( f 3 )= w 3 ;w 1 ;w 2 P ( f 4 )= w 4 ;w 2 ;w 3 P ( w 1 )= f 2 ;f 3 ;f 1 P ( w 2 )= f 3 ;f 1 ;f 4 ;f 2 P ( w 3 )= f 4 ;f 1 ;f 3 P ( w 4 )= f 1 ;f 2 ;f 4 : The two optimal-stable matchings are f 1 f 2 f 3 f 4 F w 1 w 2 w 3 w 4 W w 4 w 1 w 2 w 3 : 7
The matching f 1 f 2 f 3 f 4 w 3 w 4 w 1 w 2 is not stable since ( w 2 ;f 1 )blo cks it. However, it can be veried that satises the four prop erties of Remark 1. 3 An Algorithm to compute the set of stable matchings 3.1 The Algorithm and the Theorem Given a preference prole P , we dene an algorithm to compute the set of stable matchings S ( P ). Stage 1: Input P . By the deferred-acceptance algorithm obtain F and W . Set T 0 ( P )= P and S 0 ( P )= f F g . Step 1 : Dene T ( T 0 ( P ))= P ( f;w ) j w 2 F ( f ) n W ( f ) . Step 2 : (a) If T ( T 0 ( P )) = ; set T 1 ( P )= ; and S 1 ( P )= S 0 ( P ). (b) If not, for each truncation P ( f;w ) 2 T ( T 0 ( P )) obtain ( f;w ) F . Step 3: Dene T T 0 ( P ) = ( P ( f;w ) 2 T ( T 0 ( P )) j8 w 0 2 W; Ch ( f;w ) F ( w 0 ) [ F ( w 0 ) ;P ( w 0 ) = ( f;w ) F ( w 0 ) ) : Order the set T ( T 0 ( P )) in an arbitrary way and let 1 denote this ordering. Step 4: Dene b T T 0 ( P ) = P ( f;w ) 2 T ( T 0 ( P )) j8 P ( f 0 ;w 0 ) 2 T ( T 0 ( P )) such that P ( f;w ) 1 P ( f 0 ;w 0 ) ;w 0 2 ( f;w ) F ( f 0 ) : Set T 1 ( P )= b T T 0 ( P ) and S 1 ( P )= S 0 ( P ) [ n ( f;w ) F j P ( f;w ) 2 T 1 ( P ) o : End of Stage 1. Stage k +1 : Input T k ( P ) and S k ( P ). By the deferred-acceptance algorithm where rms make oers wehave obtained, for each P ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) 2 T k ( P ), its corresp onding ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) F . 8
Assume that 2 S P ( f;w ) , otherwise = 2 S f;w ( P ) and the Lemma is proved. Therefore, e w = 2 Ch ( ( f ) [f e w g ;P ( f;w ) ( f )). (7) The denition of P ( f;w ) ( f )andconditions (5) and (7) imply w 2 ( f ) [f e w g . But, by the denition of P ( f;w ) ( f ) again, w = 2 ( f ) : Then e w = w . Now, we can rewrite conditions (3) and (4) as w 2 Ch ( ( f ) [f w g ;P ( f )) and f 2 Ch ( ( w ) [f f g ;P ( w )) : (8) Notice that by hyp othesis f 2 F ( w ) and by condition (2) f = 2 ( w ). Also, by hyp othesis, 2 S ( f;w ) ( P ) whichmeans that, in particular, Ch ( F ( w ) [ ( w ) ;P ( w )) = ( w ) holds. But this contradicts (8) b ecause Ch ( ( w ) [f f g ;P ( w )) P ( w ) ( w )= Ch ( F ( w ) [ ( w ) ;P ( w )) : Next Lemma establishes two useful prop erties of the choice set. Lemma 3. For al l subsets of partners A; B ; and C of agent a 2 F [ W : (a) Ch ( A [ B; P ( a )) = Ch ( Ch ( A ) [ B; P ( a )) . (b) Ch ( A [ B; P ( a )) = A and Ch ( B [ C; P ( a )) = B imply Ch ( A [ C; P ( a )) = A . Proof. Prop erty (a) follows from Prop osition 2.3 in Blair (1988). To prove (b), consider the following equalities: Ch ( A [ C; P ( a )) = Ch ( Ch ( A [ B; P ( a )) [ C; P ( a )) by hyp othesis = Ch ( A [ B [ C; P ( a )) by (a) = Ch ( A [ Ch ( B [ C; P ( a )) ;P ( a )) by (a) = Ch ( A [ B; P ( a )) by hyp othesis = A by hyp othesis. 15
Lemma 4 belowcan be understo o d as an strengthening of Lemma 2. It says that to check the Choice Prop erty only for the rm-optimal stable matching it is suÆcient to guarantee that al l stable matchings relativetothe truncated prole are indeed stable for the original prole. Lemma 4. Let P ( f;w ) be a truncation such that Ch F ( w 0 ) [ ( f;w ) F ( w 0 ) ;P ( w 0 ) = ( f;w ) F ( w 0 ) holds for al l w 0 . Then, 2 S ( P ( f;w ) ) implies 2 S ( P ) : Proof. Let be a matching such that 2 S ( P ( f;w ) ) : Then by Prop erty 4 in Remark 1, for all w 0 ; Ch ( w 0 ) [ ( f;w ) F ( w 0 ) ;P ( f;w ) ( w 0 ) = ( w 0 ) : However, for all w 0 ; preferences P ( f;w ) ( w 0 )and P ( w 0 ) coincide. Therefore, Ch ( w 0 ) [ ( f;w ) F ( w 0 ) ;P ( w 0 ) = ( w 0 ) (9) also holds. By hyp othesis, for all w 0 Ch F ( w 0 ) [ ( f;w ) F ( w 0 ) ;P ( w 0 ) = ( f;w ) F ( w 0 ) : (10) By Lemma 3 we have that conditions (9) and (10) imply that for all w 0 Ch ( F ( w 0 ) [ ( w 0 ) ;P ( w 0 )) = ( w 0 ) : Then, by Lemma 2, 2 S ( f;w ) ( P ). Hence, 2 S ( P ) : Lemma 5 says that only adding the individual rationality condition of a stable matching relative to a truncation ensures that the matching is stable relative to the truncated prole. This will immediately imply Corollary 1 which will b e crucial to the justication of Step 4inthe algorithm. Lemma 5. Let be a matching such that 2 S ( P ) \ IR P ( f;w ) : Then 2 S ( P ( f;w ) ) : Proof. Assume that = 2 S ( P ( f;w ) ) and 2 IR P ( f;w ) .Then, there exists a blo cking pair ( e w; e f )of ; namely, e w 2 Ch ( ( e f ) [f e w g ;P ( f;w ) ( e f )) and (11) e f 2 Ch ( ( e w ) [f e f g ;P ( f;w ) ( e w )). (12) Consider the following two cases: 16
1. e f 6 = f: Because P ( f;w ) ( e w ) = P ( e w )and P ( f;w ) e f = P e f the pair ( e w; e f ) also blo cks the matching in the preference prole P . Hence, = 2 S ( P ). 2. e f = f: Then by conditions (11) and (12) e w 2 Ch ( ( f ) [f e w g ;P ( f;w ) ( f )) and (13) f 2 Ch ( ( e w ) [f f g ;P ( e w )) : The hyp othesis that 2 IR P ( f;w ) implies that w = 2 ( f ). Therefore, condition (13) can b e rewritten as e w 2 Ch ( ( f ) [f e w g ;P ( f )), implying that the pair ( e w; f ) blo cks in the preference P .Hence = 2 S ( P ). As we have just said, Corollary 1 below justies the insertion of Step 4 at each stage of the algorithm. If wehavetwo truncations P ( f;w ) and P ( f 0 ;w 0 ) with the prop erties that (1) their corresp onding rm-optimal stable matchings ( f;w ) F and ( f 0 ;w 0 ) F satisfy the Choice Prop erty (that is, they are stable relative to the original prole) and (2) the matching ( f 0 ;w 0 ) F is individually rational relative to P ( f;w ) (that is, w = 2 ( f 0 ;w 0 ) F ( f )) then we may not add at this stage ( f 0 ;w 0 ) F (with the subsequent computational savings) b ecause we will nd it later on (and add it to the provisional set of stable matchings) as a rm-optimal stable matching of a subsequent truncation of P ( f;w ) . Corollary 1. Let P ( f;w ) ;P ( f 0 ;w 0 ) be two truncations such that ( f 0 ;w 0 ) F 2 S ( P ) . If w = 2 ( f 0 ;w 0 ) F ( f ) then ( f 0 ;w 0 ) F 2 S P ( f;w ) : Proof. Notice that w = 2 ( f 0 ;w 0 ) F ( f ) implies that ( f 0 ;w 0 ) F 2 IR P ( f;w ) : Hence, by Lemma 5, ( f 0 ;w 0 ) F 2 S ( P ( f;w ) ) : Next lemma establishes a useful fact ab out the set of stable matchings: a worker who is matched to the same rm in the two optimal-stable matchings has also to b e matched to the same rm in all stable matchings. Lemma 6. Assume w 2 F ( f ) \ W ( f ) . Then, w 2 ( f ) for al l 2 S ( P ) : Proof. Assume otherwise; that is, we can nd w , f ,and 2 S ( P )such that w 2 F ( f ) \ W ( f )and w = 2 ( f ). By Remark 1, Ch ( F ( f ) [ ( f ) ;P ( f )) = F ( f ) (14) 17
and Ch ( W ( f ) [ ( f ) ;P ( f ))= ( f ) : (15) Since w 2 F ( f ) condition (14) implies that w 2 Ch ( F ( f ) \ ( f ) ;P ( f )). Lemma 7 and its Corollary 2 guarantee that any non-optimal stable matching will eventually be identied and selected as the rm-optimal stable matching corresp onding to a preference prole which will b e obtained after truncating the preferences of a sequence of rms. Lemma 7. Let 2 S ( P ) be such that F 6 = 6 = W : Then there exists P ( f;w ) such that 2 S ( P ( f;w ) ) : Proof. Since F 6 = then there exists w and f suchthat w 2 F ( f ) n ( f ). Therefore, by Lemma 6, w = 2 W ( f ). Consider the preference prole P ( f;w ) and notice that ( f;w ) W = W : Because w = 2 ( f )wehave that 2 IR P ( f;w ) : Hence, Lemma 5 implies that 2 S P ( f;w ) : Remark 2 As a consequence of Lemma 7 and the fact that F = 2 S ( P ( f;w ) ) we have that # S ( P ) > # S ( P ( f;w ) ) whenever w 2 F ( f ) n W ( f ) : Corollary 2. Let 2 S ( P ) be such that F 6 = 6 = W : Then there exists asequence of pairs ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) such that = ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) F 2 S ( P ( f i 1 ;w j 1 ) ::: ( f i k ;w j k ) ) : Proof. Let 2 S ( P )be such that F 6 = 6 = W . By Lemma 5 there exists P ( f;w ) suchthat 2 S ( P ( f;w ) ) : If = ( f;w ) F the statementfollows. Otherwise, since W = ( f;w ) W ; we apply again Lemma 5 replacing the roles of P and F by P ( f;w ) and ( f;w ) F ; resp ectively. Now, we are ready to show that the outcome of the algorithm is the set of stable matchings. Pro of of the Theorem. First, from Lemma 4, we have S 1 ( P ) S ( P ) : Applying iteratively Lemma 4 to successive stages we obtain S K ( P ) S ( P ) : Second, assume that 2 S ( P ) : By Corollary 2, there exists k K such that 2 S k ( P ). Therefore, S ( P ) S K ( P ) : 18
5 App endix To illustrate the deferred-acceptance algorithm in which rms make oers we use the preference prole P ( f 4 ;w 4 )( f 4 ;w 3 )( f 3 ;w 3 ) of Example 2 to compute ( f 4 ;w 4 )( f 4 ;w 3 )( f 3 ;w 3 ) F ; that is, F = f f 1 ;f 2 ;f 3 ;f 4 g and W = f w 1 ;w 2 ;w 3 ;w 4 g are the two sets of agents with the following substitutable prole of preferences P ( f 1 )= w 1 w 2 ;w 1 w 3 ;w 2 w 4 ;w 3 w 4 ;w 1 w 4 ;w 2 w 3 ;w 1 ;w 2 ;w 3 ;w 4 P ( f 2 )= w 1 w 2 ;w 2 w 3 ;w 1 w 4 ;w 3 w 4 ;w 1 w 3 ;w 2 w 4 ;w 1 ;w 2 ;w 3 ;w 4 P ( f 3 )= w 1 w 4 ;w 1 w 2 ;w 2 w 4 ;w 1 ;w 2 ;w 4 P ( f 4 )= w 1 w 2 ;w 1 w 4 ;w 1 ;w 2 P ( w 1 )= f 3 f 4 ;f 2 f 3 ;f 2 f 4 ;f 1 f 4 ;f 1 f 3 ;f 1 f 2 ;f 1 ;f 2 ;f 3 ;f 4 P ( w 2 )= f 3 f 4 ;f 2 f 3 ;f 1 f 4 ;f 2 f 4 ;f 1 f 3 ;f 1 f 2 ;f 1 ;f 2 ;f 3 ;f 4 P ( w 3 )= f 1 f 2 ;f 2 f 3 ;f 1 f 3 ;f 2 f 4 ;f 1 f 4 ;f 3 f 4 ;f 1 ;f 2 ;f 3 ;f 4 P ( w 4 )= f 1 f 2 ;f 1 f 3 ;f 1 f 4 ;f 2 f 3 ;f 2 f 4 ;f 3 f 4 ;f 1 ;f 2 ;f 3 ;f 4 . The oers made by rms, and received and accepted by workers, in Step 1are: f 1 f 2 f 3 f 4 w 1 w 2 w 1 w 2 w 1 w 4 w 1 w 2 w 1 w 2 w 3 w 4 f 1 f 2 f 3 f 4 f 1 f 2 f 4 ; f 3 f 3 f 4 f 1 f 4 ; f 3 : The provisional matching 1 after Step 1is: f 1 f 2 f 3 f 4 1 w 2 ; w 1 w 4 w 1 w 2 : The oers made by rms, and received and accepted by workers, in Step 2are: f 1 f 2 f 3 f 4 w 2 w 4 w 3 w 4 w 1 w 4 w 1 w 2 w 1 w 2 w 3 w 4 f 3 f 4 f 1 f 4 f 2 f 1 f 2 f 3 f 3 f 4 f 1 f 4 f 2 f 1 f 2 : The provisional matching 2 after Step 2is: f 1 f 2 f 3 f 4 2 w 2 w 4 w 3 w 4 w 1 w 1 w 2 : The oers made by rms, and received and accepted by workers, in Step 3are: f 1 f 2 f 3 f 4 w 2 w 4 w 3 w 4 w 1 w 2 w 1 w 2 w 1 w 2 w 3 w 4 f 3 f 4 f 1 f 3 f 4 f 2 f 1 f 2 f 3 f 4 f 3 f 4 f 2 f 1 f 2 : 19
The provisional matching 3 after Step 3is: f 1 f 2 f 3 f 4 3 w 4 w 3 w 4 w 1 w 2 w 1 w 2 : The oers made by rms, and received and accepted by workers, in Step 4are: f 1 f 2 f 3 f 4 w 3 w 4 w 3 w 4 w 1 w 2 w 1 w 2 w 1 w 2 w 3 w 4 f 3 f 4 f 3 f 4 f 1 f 2 f 1 f 2 f 3 f 4 f 3 f 4 f 1 f 2 f 1 f 2 : the provisional matching 4 after Step 4is: f 1 f 2 f 3 f 4 4 w 3 w 4 w 3 w 4 w 1 w 2 w 1 w 2 : The algorithm stops after Step 4 b ecause all oers have b een accepted. The provisional matching 4 , b ecomes denite, and it is the rm-optimal stable matching. 6 References A. Alkan (1999). \On Preferences Over Subsets and the Lattice Structure of Stable Matchings", mimeo. C. Blair (1988). \The Lattice Structure of the Set of Stable Matchings with Multiple Partners", Mathematics of Operations Research 13 , 619-628. D. Gale and L. Shapley (1962). \College Admissions and the Stability of Marriage", American Mathematical Monthly 69 ,9-15. D. Guseld and R. Irving (1989). The Stable Marriage Problem: Structure and Algorithms . Cambridge: MIT Press. A. Kelso and V. Crawford (1982). \Job Matching, Coalition Formation, and Gross Substitutes", Econometrica 50 , 1483-1504. R. Martnez, J. Masso, A. Neme, and J. Oviedo (1999). \A Note on the Lattice Structure of the Set of Stable Matchings", mimeo. A. Roth (1984). \Stability and Polarization of Interests in Job Matching", Econometrica 52 , 47-57. A. Roth (1985). \Conict and Coincidence of Interest in Job Matching: Some New Results and Op en Questions", Mathematics of Operations Research 10 , 379-389. 20
A. Roth and M. Sotomayor (1990). Two-sided Matching: A Study in Game- Theoretic Modeling and Analysis . Cambridge University Press, Cambridge, England. [Econometrica So ciety Monographs No. 18]. M. Sotomayor (1999). \The Lattice Structure of the Set of Stable Outcomes of the Multiple Partners Assignment Game", International Journal of Game Theory 28 , 567-583 . 21