Stable Matching Problems with Exchange Restrictions

Similar documents
The Man-Exchange Stable Marriage Problem

Stable Marriage with Ties and Bounded Length Preference Lists

Glasgow eprints Service

STABLE MARRIAGE PROBLEM WITH TIES AND INCOMPLETE BOUNDED LENGTH PREFERENCE LIST UNDER SOCIAL STABILITY

Three-dimensional Stable Matching Problems. Cheng Ng and Daniel S. Hirschberg. Department of Information and Computer Science

Modelling and Solving the Stable Marriage Problem Using Constraint Programming

Input. A set of men M, and a set of women W.

The Generalized Median Stable Matchings: finding them is not that easy

Cheating to Get Better Roommates in a Random Stable Matching

Weights in stable marriage problems increase manipulation opportunities

SEQUENTIAL ENTRY IN ONE-TO-ONE MATCHING MARKETS

Efficient Algorithms for Bipartite Matching Problems with Preferences

Two Algorithms for the Student-Project Allocation Problem

Matching Theory. Mihai Manea. Based on slides by Fuhito Kojima. MIT

Glasgow eprints Service

Socially stable matchings in the Hospitals/Residents problem

Algorithmics of Two-Sided Matching Problems

Bipartite Matchings and Stable Marriage

1. REPRESENTATIVE PROBLEMS

CSC2556. Lecture 5. Matching - Stable Matching - Kidney Exchange [Slides : Ariel D. Procaccia]

Glasgow eprints Service

An improved approximation algorithm for the stable marriage problem with one-sided ties

Improving Man-Optimal Stable Matchings by Minimum Change of Preference Lists

Approximation Algorithms for Stable Marriage Problems

This is the author s final accepted version.

Weights in Stable Marriage Problems Increase Manipulation Opportunities

Ma/CS 6b Class 3: Stable Matchings

Deposited on: 30 September 2010

PROBLEMS OF MARRIAGE Eugene Mukhin

What do you do when you can t use money to solve your problems?

Two-Sided Matching. Terence Johnson. December 1, University of Notre Dame. Terence Johnson (ND) Two-Sided Matching December 1, / 47

1. REPRESENTATIVE PROBLEMS

Analysis of Algorithms Fall Some Representative Problems Stable Matching

Consider a complete bipartite graph with sets A and B, each with n vertices.

A (ln 4)-Approximation Algorithm for Maximum Stable Matching with One-Sided Ties and Incomplete Lists

1 Definitions and Things You Know

Ma/CS 6b Class 3: Stable Matchings

Two s Company, Three s a Crowd: Stable Family and Threesome Roommates Problems

Stable matching. Carlos Hurtado. July 5th, Department of Economics University of Illinois at Urbana-Champaign

Matching. Terence Johnson. April 17, University of Notre Dame. Terence Johnson (ND) Matching April 17, / 41

An Efficient Algorithm for Batch Stability Testing

Stable Matching with Uncertain Linear Preferences

arxiv: v2 [cs.gt] 25 Jul 2014

Math 301: Matchings in Graphs

We set up the basic model of two-sided, one-to-one matching

Popular Matchings with Lower Quotas

Subramanian s stable matching algorithm

Matchings in Graphs. Definition 3 A matching N in G is said to be stable if it does not contain a blocking pair.

THREE ESSAYS ON GAME THEORY. Demet Yilmazkuday. Dissertation. Submitted to the Faculty of the. Graduate School of Vanderbilt University

arxiv: v1 [cs.gt] 11 Jul 2016

The Blocking Lemma and Strategy-Proofness in Many-to-Many Matchings

Stable Matching with Uncertain Pairwise Preferences

The stable marriage problem with restricted pairs

Incentives in Large Random Two-Sided Markets

Matching Theory and the Allocation of Kidney Transplantations

1. STABLE MATCHING. stable matching problem Gale Shapley algorithm hospital optimality context

Glasgow eprints Service

arxiv: v1 [cs.gt] 2 Jan 2012

Sisterhood in the Gale-Shapley Matching Algorithm

APPROXIMATION ALGORITHMS FOR THE STABLE MATCHING PROBLEM

Matching: The Theory. Muriel Niederle Stanford and NBER. September 26, 2011

Coalition Manipulation of the Gale-Shapley Algorithm

Glasgow eprints Service

CS364B: Frontiers in Mechanism Design Lecture #3: The Crawford-Knoer Auction

Game Theory: Lecture #5

AN IMPOSSIBILITY THEOREM IN MATCHING PROBLEMS

A Note on Perfect Partial Elimination

Marriage Matching: A Conjecture of Donald Knuth

The key is that there are two disjoint populations, and everyone in the market is on either one side or the other

Published: Social Choice and Welfare, 33(1), June 2009, pp doi: /s SEQUENTIAL ENTRY IN MANY-TO-ONE MATCHING MARKETS

1. REPRESENTATIVE PROBLEMS

Two-Sided Matching. Terence Johnson. September 1, University of Notre Dame. Terence Johnson (ND) Two-Sided Matching September 1, / 37

The Complexity of Maximum. Matroid-Greedoid Intersection and. Weighted Greedoid Maximization

COMP251: Bipartite graphs

Lecture 5: The Principle of Deferred Decisions. Chernoff Bounds

Local Search Approaches in Stable Matching Problems

Strategy-Proofness and the Core in House Allocation Problems

The Generalized Stable Allocation Problem

Random paths to stability in the roommate problem

Strategic Behavior and Manipulation in Gender- Neutral Matching Algorithms

Stable Matching Existence, Computation, Convergence Correlated Preferences. Stable Matching. Algorithmic Game Theory.

On preferences over subsets and the lattice structure of stable matchings

Two-sided Matching Theory

Finding Stable Matchings that are Robust to Errors in the Input

Detecting Backdoor Sets with Respect to Horn and Binary Clauses

Approximation and Randomized Algorithms (ARA) Lecture 1, September 3, 2012

COMP251: Bipartite graphs

arxiv:cond-mat/ v1 [cond-mat.dis-nn] 18 Apr 2001

Out-colourings of Digraphs

Recent Advances in Generalized Matching Theory

Faster Algorithms For Stable Allocation Problems

Parameterized Complexity and Local Search Approaches for the Stable Marriage Problem with Ties

Pareto Optimality in Coalition Formation

Higher education admission in Hungary by a score-limit algorithm

Manipulation via Capacities in Two-Sided Matching Markets

Competition and Resource Sensitivity in Marriage and Roommate Markets

Algorithms. [Knuth, TAOCP] An algorithm is a finite, definite, effective procedure, with some input and some output.

Dynamic Matching with a Fall-back Option

On rank-profiles of stable matchings a

Advanced Algorithms. Lecture Notes for April 5, 2016 Dynamic programming, continued (HMMs); Iterative improvement Bernard Moret

Transcription:

Stable Matching Problems with Exchange Restrictions Robert W. Irving Department of Computing Science, University of Glasgow, Glasgow G12 8QQ, UK. email: rwi@dcs.gla.ac.uk telephone: 44-141-330-4478 fax: 44-141-330-4913 Abstract We study variants of classical stable matching problems in which there is an additional requirement for a stable matching, namely that there should not be two participants who would prefer to exchange partners. The problem is motivated by the experience of real-world medical matching schemes that use stable matchings, where cases have arisen in which two participants discovered that each of them would prefer the other s allocation, a situation that is seen as unfair. Our main result is that the problem of deciding whether an instance of the classical stable marriage problem admits a stable matching, with the additional property that no two men would prefer to exchange partners, is NP-complete. This implies a similar result for more general problems, such as the hospitals/residents problem, the many-to-one extension of stable marriage. Unlike previous NP-hardness results for variants of stable marriage, the proof exploits the powerful algebraic structure underlying the set of all stable matchings. In practical matching schemes, however, applicants preference lists are typically of short fixed length, and we describe a linear time algorithm for the problem in the special case where all of the men s preference lists are of length 3. 1 Introduction and problem description The Stable Marriage problem (SM) was introduced in the seminal paper of Gale and Shapley [6]. In its classical form, an instance of SM involves n men and n women, each of whom specifies a preference list, which is a total order on the members of the opposite sex. A matching M is a set of man-woman pairs such that each person belongs to exactly one pair. If (m, w) M, we say that w is m s partner in M, and vice versa, and we write M(m) = w, M(w) = m. We say that a person x prefers y to y if y precedes y on x s preference list. A matching is stable if it admits no blocking pair, namely a man m and 1

woman w such that m prefers w to M(m) and w prefers m to M(w). Gale and Shapley proved that every instance of SM admits at least one stable matching; in general, there may be many. The Hospitals / Residents problem (HR) is a many-to-one generalisation of SM, so called because of its application in centralised matching schemes for the allocation of graduating medical students, or residents, to hospitals [16]. The best known such scheme is the National Resident Matching Program (NRMP) [15] in the US, but similar schemes exist in Canada [4], in Scotland [11, 18], and in a variety of other contexts and countries. In fact, this extension of SM was also discussed by Gale and Shapley under the name of the College Admissions problem. In an instance of HR, each resident has a preference list containing a subset of the hospitals - his/her acceptable set, and each hospital ranks the residents for which it is acceptable. In addition, each hospital has a quota of available posts. In this context, a matching is a set of acceptable residenthospital pairs so that each resident appears in at most one pair and each hospital in a number of pairs that is bounded by its quota. The definition of stability is easily extended to this more general setting see, for example, Gusfield and Irving [9] for details. It is again the case that every problem instance admits at least one stable matching. The extension SMI (Stable Marriage with Incomplete Lists) of SM can be viewed as the special case of HR in which every hospital has a quota of one. (Classical SM is the special case of SMI in which each the numbers of men and women are equal and everyone is acceptable to each person of the opposite sex.) It is obvious that, in a stable matching for an instance of SMI (or HR), not everyone need be matched. However, Gale and Sotomayor [7] showed that, in all stable matchings exactly the same sets of men and women are matched. In the stable marriage problem, the stability of a matching M does not preclude the possibility that two men, say m and m, might wish to exchange their partners, since m might prefer M(m ) to M(m) and m might prefer M(m) to M(m ). Of course, the fact that the matching is stable means that, in such a situation, neither of the women involved would prefer to swap. A similar situation can arise in HR, where two residents might prefer to exchange the hospitals allocated to them in a stable matching, although the hospitals would not sanction such a change. Indeed there is documented evidence [2] of at least one complaint submitted by participants in a medical matching scheme who had discovered that they were in just such a position, and who felt that a satisfactory matching should exclude this possibility. We say that a matching M for an instance of SM is man-exchange stable if it is stable in the normal sense, and in addition there do not exist two men m and m such that m prefers M(m ) to M(m) and m prefers M(m) to M(m ). A similar definition of resident-exchange stability applies in the HR context. So, in order to pre-empt complaints of the kind mentioned above, a centralised matching scheme might seek to impose a resident-exchange stable matching if one can be found. However, it is easy to see that such a matching need not exist. For example, the stable marriage instance shown in Figure 1 has just two stable matchings, namely {(m 1, w 1 ), (m 2, w 2 ), (m 3, w 3 ), (m 4, w 4 )} 2

and {(m 1, w 2 ), (m 2, w 4 ), (m 3, w 3 ), (m 4, w 1 )}. The first of these has the manexchange blocking pair {m 2, m 3 } while the second is blocked by the pairs {m 1, m 2 } and {m 1, m 4 }. Men s preferences Women s preferences m 1 : w 1 w 4 w 2 w 3 w 1 : m 4 m 1 m 2 m 3 m 2 : w 3 w 2 w 4 w 1 w 2 : m 1 m 2 m 4 m 3 m 3 : w 2 w 3 w 4 w 1 w 3 : m 3 m 2 m 1 m 4 m 4 : w 3 w 2 w 4 w 1 w 4 : m 2 m 4 m 3 m 1 Figure 1: A stable marriage instance with no man-exchange stable matching. On the other hand, the instance shown in Figure 2 has just one stable matching, namely {(m 1, w 4 ), (m 2, w 2 ), (m 3, w 1 ), (m 4, w 3 )}, and it is straightforward to check that this is also man-exchange stable. Men s preferences Women s preferences m 1 : w 1 w 4 w 3 w 2 w 1 : m 2 m 3 m 1 m 4 m 2 : w 4 w 2 w 1 w 3 w 2 : m 2 m 4 m 1 m 3 m 3 : w 2 w 1 w 4 w 3 w 3 : m 1 m 4 m 3 m 2 m 4 : w 2 w 3 w 4 w 1 w 4 : m 1 m 4 m 2 m 3 Figure 2: A stable marriage instance with a man-exchange stable matching (in bold). Unfortunately, there is little prospect of an efficient algorithm to determine, for a given instance of SM, whether there exists a man-exchange stable matching (or one that is resident-exchange stable for an instance of HR), and if so to find one we shall show that the decision problem is NP-complete. In many applications of stable matching, however, the preference lists on one side are of bounded, even fixed, length. For example, in medical matching schemes, residents are typically required to submit a fixed number of choices this can be as small as 3, for example in some runs of the SFAS matching scheme that is used in Scotland [18]. It is therefore of interest to consider variants of man-exchange stable marriage in which preference lists are incomplete, and the men have preference lists of length k for some fixed k. First of all, the case k = 1 is trivial; there is a unique stable matching, which is immediately man-exchange stable. As we shall see later, the case k = 2 is almost as simple. The case k = 3 turns out to be more interesting, but we will show that in this case there is also a polynomial-time algorithm to determine if a man-exchange stable matching exists, and to find one if it does exist. The formal description of the Man-Exchange Stable Marriage problem is as follows. 3

Man-Exchange Stable Marriage (MESM) INSTANCE: A set of n men and a set of n women, and for each person a total order on the persons of the opposite sex. QUESTION: Does there exist a one-to-one matching of men to women that (a) is stable in the classical sense, and (b) admits no man-exchange blocking pair? A similar concept of exchange-stability was introduced by Alcalde [1] in the context of the non-bipartite stable roommates problem, but without the pre-requisite that the matching be stable in the classical sense. A version of this problem was subsequently shown to be NP-complete by Cechlárová [3]. Cechlárová and Manlove [5] studied a number of variants of exchange-stable matching. They showed that, if the requirement for stability in the classical sense is dropped, then a matching that is man-exchange stable in this weaker sense is guaranteed to exist, and can be found in polynomial time. On the other hand, if, in addition, we allow a pair of women, as well as a pair of men, to form a blocking pair, (but still do not require classical stability) then the resulting Exchange-stable Marriage problem is NP-complete. However, none of the results mentioned has any implications for our notion of Man-Exchange Stability, where the pre-requisite of stability in the classical sense completely changes the nature of the problem. Indeed, the existence of a polynomial-time algorithm for MESM was posed as an open problem in [5]. (Note that, in [5], the term Man-exchange-stable marriage is used to refer to the version of the problem where classical stability is not required; our use of terminology differs from this.) The remainder of this paper is structured as follows. Section 2 summarises the Gale-Shapley algorithm for the stable marriage problem, and the concepts of man-optimal and woman-optimal stable matchings. In Section 3, we review the key results that characterise the lattice structure of the set of stable matchings. These are needed to understand the ideas underlying the NP-completeness reduction for MESM and the polynomial-time algorithm for the special case described above. The NP-completeness reduction, using as starting point a variant of Satisfiability, is presented in Section 4, together with the necessary correctness proofs. Section 5 describes a polynomial-time algorithm for the version of MESM in which the men s preference lists are of length 3. We conclude with a summary and some additional observations in Section 6. 2 The Gale-Shapley algorithm The (man-oriented version of the) Gale-Shapley algorithm involves a sequence of proposals from men to women. Each proposal may be accepted if the woman is free, or if she prefers this man to her current partner and otherwise is rejected; if it is accepted, the man and woman become partners, and she rejects her current partner, if any, setting him free. This process continues until there is no free man, at which point the set of partners forms a stable matching. A version of the Gale-Shapley algorithm is presented in Figure 3. 4

assign each person to be free; while (some man m is free) { w = first woman on m s list to whom he has not proposed; if (w is free) w accepts m; else if (w prefers m to her partner m ) w rejects m, setting m free, and accepts m; else w rejects m; } Figure 3: The Gale-Shapley Algorithm It is well known that the apparent non-determinism inherent in the algorithm is immaterial, and that all possible executions of the Gale-Shapley algorithm find the man-optimal stable matching [6], i.e., the stable matching in which every man has the best partner that he can have in any stable matching (and, as it turns out, every woman the worst). Of course, interchanging the roles of men and women in the algorithm leads to the woman-optimal stable matching, which is simultaneously optimal for all of the women, and pessimal for all of the men. For further details, see the comprehensive treatment of Gusfield and Irving [9]. In some sense the man-optimal stable matching has the best chance of being man-exchange stable, since the further down a man s preference list that his partner is, the more possibilities that man has to be a member of a man-exchange blocking pair. However, it is easy to see that there are cases where the manoptimal is not exchange-stable but some other stable matching is it may even be the case that there are many stable matchings, but only the woman-optimal is man-exchange stable. For example, the instance shown in Figure 4 has 3 stable matchings: {(m 1, w 1 ), (m 2, w 2 ), (m 3, w 3 ), (m 4, w 4 ), (m 5, w 5 ), (m 6, w 6 )}; this is manoptimal, and is blocked by the men {m 1, m 2 }; {(m 1, w 1 ), (m 2, w 2 ), (m 3, w 4 ), (m 4, w 3 ), (m 5, w 5 ), (m 6, w 6 )} is blocked by the men {m 1, m 2 } and {m 3, m 4 }; {(m 1, w 3 ), (m 2, w 4 ), (m 3, w 5 ), (m 4, w 6 ), (m 5, w 1 ), (m 6, w 2 )}; this is womanoptimal, and it is man-exchange stable. 3 Rotations and the rotation poset In this section we summarise the fundamental structural results for stable marriage that are relevant for our purpose. The reader is referred to the monograph of Gusfield and Irving [9] for further details and proofs of these various results. 5

Men s preferences Women s preferences m 1 : w 2 w 1 w 3 w 4 w 6 w 5 w 1 : m 5 m 1 m 6 m 2 m 3 m 4 m 2 : w 1 w 2 w 3 w 4 w 5 w 6 w 2 : m 6 m 2 m 1 m 4 m 3 m 5 m 3 : w 3 w 4 w 2 w 5 w 1 w 6 w 3 : m 1 m 4 m 3 m 6 m 2 m 5 m 4 : w 4 w 1 w 3 w 5 w 6 w 2 w 4 : m 2 m 3 m 4 m 5 m 1 m 6 m 5 : w 5 w 1 w 4 w 6 w 3 w 2 w 5 : m 3 m 5 m 6 m 4 m 2 m 1 m 6 : w 1 w 6 w 2 w 3 w 5 w 4 w 6 : m 4 m 6 m 3 m 1 m 5 m 2 Figure 4: The woman-optimal (in bold) can be the only man-exchange stable matching. For a given stable marriage instance, a partial order relation is defined on the set of stable matchings as follows: matching M dominates matching M if every man has at least as good a partner in M as he has in M. As pointed out by Knuth [13], and attributed by him to John Conway, the set of stable matchings forms a distributive lattice under this partial order; in the meet M M, each man has the better of his partners in M and M, and in the join M M, each man has the poorer of these two partners (or, in each case, the same partner as in M and M if these coincide). Proofs that these operations yield stable matchings can be found in [13]. The man-optimal stable matching M m and the woman-optimal M w are the top and bottom of this lattice, respectively. An instance of SM can have exponentially many stable matchings [13]. However, the so-called rotation poset, first described by Irving and Leather [12], gives a compact representation of the lattice. We will exploit this structural characterisation in our NP-completeness proof in Section 4. Let M be a stable matching for an instance I of SM. For each man m such that M(m) M w (m), we define the successor woman for m relative to M, denoted s M (m), to be the first woman w on m s list, following M(m), such that w prefers m to M(w). There must be such a woman if M(m) M w (m), since M w (m) qualifies, but s M (m) is undefined if M(m) = M w (m). A cyclic sequence of pairs ρ = (m i0, w i0 ),..., (m ir 1, w ir 1 ), for some r > 1, such that M(m ij ) = w ij and s M (m ij ) = w ij+1 for all j (j + 1 taken modulo r) is called a rotation exposed in M. To eliminate the exposed rotation ρ from the stable matching M means to pair m ij with w ij+1 for all m ij in the rotation (j + 1 again taken modulo r) and otherwise leave the pairs unchanged. The resulting matching also turns out to be stable. Every stable matching M M w has at least one exposed rotation; to find one, choose a man x 0 for whom M(x 0 ) M w (x 0 ) and generate the sequence x j+1 = M(s M (x j )) until it cycles, setting m ij = x t+j, where x t is the first repeated man in the sequence. It turns out that every stable matching can be obtained by starting with the man-optimal and successively eliminating a sequence of exposed rotations. Furthermore, rotations are disjoint a pair can belong to at most one rotation and each stable matching is characterised by the set of rotations that must be eliminated 6

to produce it. A partial order relation can be defined on the rotations for an SM instance as follows: rotation ρ precedes rotation ρ, written ρ ρ, if, in order to obtain a stable matching in which ρ is exposed, rotation ρ must be eliminated. The set R of rotations under this partial order is known as the rotation poset. A subset S of the rotation poset with the property that ρ S, σ ρ σ S is called closed. The following theorem, Theorem 2.5.7 of [9], gives what, for our purposes, is the key characterisation of the set of stable matchings in terms of the rotation poset. Theorem 3.1 For an instance of Stable Marriage, there is a one-to-one correspondence between the stable matchings and the closed subsets of the rotation poset. A stable matching can be obtained from the man-optimal by eliminating, in any valid sequential order, the rotations in the corresponding closed subset. We refer to the unique closed subset of the rotation poset R corresponding to a given stable matching M simply as the rotation set of M. A further important aspect of the set of rotations is that it allows the identification of the stable pairs, i.e., the man-woman pairs that are matched in at least one stable matching, as the following theorem, Theorem 2.5.6 of [9], indicates. Theorem 3.2 The stable pairs for a stable marriage instance are precisely the pairs that appear in some rotation together with the pairs in the woman-optimal stable matching M w. It turns out that, for computational purposes, it is appropriate to use a particular sparse representation of R as a directed graph, which we denote by D and refer to as the rotation digraph. This digraph can be constructed directly and efficiently from the preference lists, and its key properties are summarised in the following theorem [9, 10]. Theorem 3.3 For any instance of SM (or SMI), (i) the transitive closure of the rotation digraph D is the rotation poset R; (ii) the number of edges in D is O(n 2 ), or in the case of SMI, O(a), where a is the sum of the lengths of the preference lists; (iii) the set of rotations can be found, and the rotation digraph D constructed, in O(n 2 ) time, or O(a) time in the case of SMI. Full coverage of how the structural aspects of stable marriage can be exploited to give efficient algorithms for a range of problems related to the set of stable matchings, is given by Gusfield and Irving [9]. For instance, in view of Theorems 3.2 and 3.3(iii), all the stable pairs for an instance of SM can be identified in O(n 2 ) time, or O(a) time in the case of SMI. 7

4 NP-completeness of man-exchange stable marriage We prove that the Man-Exchange Stable Marriage problem is NP-complete by describing a polynomial-time reduction from a variant of Satisfiability. This variant is defined as follows: Unnegated One-in-Three 3SAT (U-1in3-3SAT) INSTANCE: A set U of variables, a collection C of clauses over U such that each clause C C has C = 3 and no clause contains a negated variable. QUESTION: Is there a truth assignment for U such that each clause in C has exactly one true literal? This problem was shown to be NP-complete by Schaefer [17] see also [8, Page 259, Problem LO4]. First of all we describe how, given an instance of U-1in3-3SAT, we construct an instance of MESM, and then, via a sequence of lemmas we show that this construction has all of the properties required of a polynomial-time reduction. Let I be an instance of U-1in3-3SAT involving n variables a 1,..., a n and t clauses C 1,..., C t. We introduce 5tn men m ijk and 5tn women w ijk (1 i n, 1 j t, 1 k 5), and an additional n men x i and n women y i (1 i n). The preference lists for the men are defined as follows: If a i C j = {a i, a p, a q } (where, of course, a i, a p and a q are all distinct) m ij1 : A w ij1 B w ij2 C w ij3... (if j = 1) m ij1 : w ij1 B w ij2 C w ij3... (if j > 1) m ij2 : w ij2 w ij3 w ij4... m ij3 : w ij3 w ij4 w ij5... m ij4 : w ij4 w ij5 w i(j+1)1... m ij5 : w ij5 w i(j+1)1 w ij2... i j m ij1 : A w ij1 w ij2... (if j = 1) m ij1 : w ij1 w ij2... (if j > 1) m ij2 : w ij2 w ij3... m ij3 : w ij3 w ij4... m ij4 : w ij4 w ij5... m ij5 : w ij5 w i(j+1)1... where A = {w s11 : a i and a s appear together in some clause} B = {w pj2, w qj2 } C = {w pj3, w qj3 }. Here, a set of women included at a certain position in a preference list may appear in any order, the symbol... indicates all remaining women not explicitly 8

listed earlier, in arbitrary order, and (j + 1) becomes 1 in the case where j = t. Note that the set A may be empty in some cases. Finally, x i : w i11 y i... The preference lists for the women are defined as follows: w i11 : m it4 m it5 m i11 x i... w ij1 : m i(j 1)4 m i(j 1)5 m ij1... (j > 1) w ij2 : m ij5 m ij1 m ij2... w ij3 : m ij1 m ij2 m ij3... w ij4 : m ij2 m ij3 m ij4... w ij5 : m ij3 m ij4 m ij5... y i : x i... Again, the symbol... indicates all remaining men not explicitly listed earlier, in arbitrary order. Before presenting the formal proofs, we give an overview of the rationale for this construction. The rotation structure for the derived instance of MESM is as follows: for each i (1 i n) ρ i = ((m i11, w i11 ), (m i12, w i12 ),..., (m i15, w i15 ), (m i21, w i21 ),..., (m it5, w it5 )) is a rotation of length 5t that has no predecessors in the rotation poset; for each i, j (1 i n, 1 j t) such that a i C j, σ ij = ((m ij1, w ij2 ), (m ij2, w ij3 ), (m ij3, w ij4 ), (m ij4, w ij5 ), (m ij5, w i(j+1)1 )) is a rotation of length 5 that is a successor of ρ i, and only ρ i, in the rotation poset. The entries A in the men s preference lists ensure that, for each clause C j = {a p, a q, a r }, at least two of the rotations ρ p, ρ q and ρ r must be in a rotation set that corresponds to a stable matching that avoids a man-exchange blocking pair. Furthermore, the entries B and C ensure that, if all three of these rotations are in a rotation set then a man-exchange blocking pair for the corresponding stable matching cannot be avoided. Hence we can have a man-exchange stable matching only if we can choose a subset of the original variables that has an intersection of size 2 with each clause - and this subset represents the false variables in a satisfying assignment. The argument works in the other direction too. We now formalise this argument, and thereby establish the validity of our reduction. Lemma 4.1 For the derived instance of MESM, the man-optimal stable matching pairs m ijk with w ijk for all i, j, k, and x i with y i for all i. 9

Proof As described in Section 2, the man-optimal stable matching is produced by applying the Gale-Shapley algorithm from the men s side, and in so doing the order in which men propose is immaterial. A possible execution of the algorithm is as follows: 1. m ij2 proposes to w ij2 for all i, j; all proposals accepted; 2. m ij3 proposes to w ij3 for all i, j; all proposals accepted; 3. m ij4 proposes to w ij4 for all i, j; all proposals accepted; 4. m ij5 proposes to w ij5 for all i, j; all proposals accepted; 5. x i proposes to w i11 for all i; all proposals accepted; 6. m i11 proposes to all the women in set A for all i; all proposals rejected because each woman in A prefers the man x who proposed to her previously; 7. m ij1 proposes to w ij1 for all i and j; all proposals accepted, and all x i rejected; 8. x i proposes to y i for all i; all proposals accepted. The algorithm terminates at this point, and it is clear that the matching produced is the one listed in the statement of the lemma, which is therefore the man-optimal stable matching. Lemma 4.2 For the derived instance of MESM, each of the cyclic sequences ρ i defined above is a rotation that is exposed in the man-optimal M m, and which therefore has no predecessors in the rotation poset. Proof It is immediate from the previous lemma that M m (m ijk ) = w ijk for all j and k. By inspection of the preference lists, it is also immediate that s Mm (m ij2 ) = w ij3, s Mm (m ij3 ) = w ij4, s Mm (m ij4 ) = w ij5, and s Mm (m ij5 ) = w i(j+1)1 for all j, where j + 1 becomes 1 in the case j = t. Furthermore, in the case of m ij1, all of the women in the set B prefer their partner in M m to m ij1, from which it follows, again by inspection of the preference lists, that s Mm (m ij1 ) = w ij2 for all j. Lemma 4.3 For the derived instance of MESM, each of the cyclic sequences σ ij defined above is a rotation that has only ρ i as a predecessor in the rotation poset. Proof Consider the stable matching M i obtained from M m by the elimination of rotation ρ i. It is immediate that M i (m ij1 ) = w ij2, M i (m ij2 ) = w ij3, M i (m ij3 ) = w ij4, M i (m ij4 ) = w ij5, and M i (m ij5 ) = w i(j+1)1 for all j. By inspection of the preference lists, it is also immediate that s Mi (m ij2 ) = w ij4, s Mi (m ij3 ) = w ij5, s Mi (m ij4 ) = w i(j+1)1, and s Mi (m ij5 ) = w ij2 for all relevant j. In the case of m ij1, all of the women in the set C prefer their partner in M i 10

to m ij1, from which it follows, again by inspection of the preference lists, that s Mi (m ij1 ) = w ij3 for all relevant j. Hence σ ij is a rotation exposed in M i. But this rotation clearly cannot be exposed unless ρ i has been eliminated, so it has ρ i, and only ρ i as a predecessor. Lemma 4.4 Suppose that the derived instance of MESM admits a man-exchange stable matching M, and let S be the rotation set corresponding to M. Then for each clause C j = {a p, a q, a r }, exactly two of ρ p, ρ q, ρ r are in S. Proof Consider the man-optimal stable matching M m. From the preference lists we can verify that {m p11, m q11 } forms a man-exchange blocking pair, since m p11 prefers w q11 (who is in the relevant set A) to w p11, and likewise m q11 prefers w p11 to w q11. Similarly {m p11, m r11 } and {m q11, m r11 } also form man-exchange blocking pairs. Since the pairs (m p11, w p11 ), (m q11, w q11 ) and (m r11, w r11 ) are in the rotations ρ p, ρ q and ρ r respectively, it follows that at least two of these rotations must be eliminated to avoid these three man-exchange blocking pairs. Suppose that ρ p and ρ q are in S. If neither σ pj nor σ qj is in S then M(m pj1 ) = w pj2 and M(m qj1 ) = w qj2, so that {m pj1, m qj1 } forms a manexchange blocking pair for M because of the women in B. On the other hand, if both σ pj and σ qj are in S then M(m pj1 ) = w pj3 and M(m qj1 ) = w qj3, so that this same pair again forms a man-exchange blocking pair for M, this time because of the women in C. If all three of ρ p, ρ q, ρ r are in S, then we would require exactly one of σ pj, σ qj, exactly one of σ pj, σ rj, and exactly one of σ qj, σ rj to be in S, which is clearly impossible. It follows that exactly two of ρ p, ρ q, ρ r are in S. Lemma 4.5 Suppose that the derived instance of MESM admits a man-exchange stable matching M. Then the given instance of U-1in3-3SAT admits a satisfying assignment. Proof From Lemma 4.4, it follows that the closed subset S of the rotation poset corresponding to a stable matching that is also man-exchange stable must contain exactly two of the rotations ρ i corresponding to each clause in the given instance. Consequently, if we assign variable a i to be false if and only if ρ i S, the resulting assignment will satisfy the given boolean expression with exactly one true literal in each clause, as required. Lemma 4.6 Suppose that the given instance of U-1in3-3SAT admits a satisfying assignment. Then the derived instance of MESM admits a man-exchange stable matching. Proof Given a satisfying assignment for the instance of U-1in3-3SAT, define the subset S of the rotation poset to consist of all of the rotations ρ i corresponding to variables a i that are assigned false, and for each clause C j = {a p, a q, a r } in which, say a p and a q are assigned false, exactly one of the rotations σ pj, σ qj. It follows from Lemmas 4.2 and 4.3 that S is a closed subset of the rotation poset. 11

We claim that the stable matching M corresponding to set S is man-exchange stable. Firstly, suppose that a i is a true variable. Man m i11 is paired with w i11 in M, so prefers only women w s11 such that variable a s is in some clause with a i. So a s must be a false variable, and w s11 is therefore paired with either m st5 or m st4 in M. But neither of these men prefers w i11 to w s11, so m i11 cannot be a member of a man-exchange blocking pair. Any man m ijk (j 1 or k 1) has his first choice woman as partner in M, so also cannot be a member of a man-exchange blocking pair. Secondly, if a i is a false variable, consider whether any man m ij2 could be in a man-exchange blocking pair. Such a man prefers only w ij2, and possibly w ij3 to his partner in M. But the partner of w ij2 is either m ij1 or m ij5, and neither of these men prefers m ij2 s partner to his own. If m ij2 prefers w ij3 to his partner w ij4, then w ij3 must have m ij1 as partner, and he does not prefer w ij4. The same argument holds for m ij3 and m ij4. In the case of m ij5, he prefers only w ij5, and possibly w i(j+1)1 to his partner in M, and once again it is easy to check that neither of these women s partners prefers m ij5 s partner to his own. Next, for a false variable a i, consider whether a man m ij1 could be in a manexchange blocking pair. Suppose first that σ ij S, so that M(m ij1 ) = w ij2. Then m ij1 prefers the following women to his partner in M: 1. w ij1 ; 2. w pj2 and w qj2, where C j = {a i, a p, a q }; 3. when j = 1, women w s11 for all values of s such that a i and a s occur together in some clause. In case (1), M(w ij1 ) = m i(j 1)r for r = 4 or r = 5, and these men prefer their own partners to w ij2. For case (2), we know that one of a p, a q is true and the other false; suppose that a p is true. Then ρ p S, so that m pj2 has his first choice woman w pj2 as his partner in M. It follows that a q is false, so ρ q S and further we must have σ qj S, so M(w qj2 ) = m qj5. But inspection of m qj5 s preference list reveals that he does not prefer w ij2 to his own partner. We subdivide case (3) into two subcases. If ρ s S then M(w s11 ) = m s11, and m s11 does not prefer w i12. If ρ s S then M(w s11 ) = m st4 or m st5, and again neither of these men prefers w i12. Finally, suppose that σ ij S, so that M(m ij1 ) = w ij3. Then m ij1 prefers the following women to his partner in M: 1. w ij1 ; 2. w ij2 ; 3. w pj2 and w qj2, where C j = {a i, a p, a q }; 4. w pj3 and w qj3, where C j = {a i, a p, a q }; 12

5. when j = 1, women w s11 for all values of s such that a i and a s occur together in some clause. In case (1), M(w ij1 ) = m i(j 1)r for r = 4 or r = 5, and these men prefer their own partners to w ij3. In case (2), M(w ij2 ) = m ij5, and this man prefers his own partner w ij2 to w ij3. For cases (3) and (4),again assume that a p is true and a q false, so that ρ p S and ρ q S. In case (3), M(w pj2 ) = m pj2 and m pj2 prefers w pj2 to w ij3, while M(w qj2 ) = m qj1, since σ qj S, and m qj1 prefers w qj2 to w ij3. In case (4), M(w pj3 ) = m pj3 and m pj3 prefers w pj3 to w ij3, while M(w qj3 ) = m qj2, since σ qj S, and m qj2 prefers w qj3 to w ij3. Lastly, we subdivide case (5) into two subcases. If ρ s S then M(w s11 ) = m s11, and m s11 does not prefer w i13. If ρ s S then M(w s11 ) = m st4 or m st5, and again neither of these men prefers w i13. Theorem 4.1 The man-exchange stable marriage problem is NP-complete. Proof Membership in NP is immediate. NP-completeness follows from Lemmas 4.5 and 4.6, together with the known NP-completeness of U-1in3-3SAT. A more constrained version of the MESM problem arises if we also insist that there should be no two women each of whom prefers the other s partner to her own; we refer to the problem of determining whether there is a stable matching with this even stronger exchange-stability property as General Exchange Stable Marriage (GESM). Perhaps it is not surprising that this variant also turns out to be NP-complete. Theorem 4.2 The general exchange stable marriage problem is NP-complete. Proof We use the same transformation as for MESM. An examination of the women s preference lists, and the set of stable matchings, for the derived instance, reveals that none of the stable matchings has an exchange blocking pair of women, and the result follows at once from this observation. 5 Special cases solvable in polynomial time In this section we consider the variant MESMI (Man-Exchange Stable Marriage with Incomplete lists) in which some man-woman pairs are unacceptable. Each person s preference list contains only their acceptable partners, and since both stable pairs and blocking pairs must be acceptable pairs, we lose nothing by assuming that the preference lists are filtered so as to reflect pairings that are acceptable to both members. So we assume that woman w appears on the list of man m if and only if man m appears on the list of woman w. We further define k-mesmi to be the restriction of MESMI in which each man s preference list is of length k, and consider the complexity of k-mesmi for particular values of k. 13

As observed earlier, the case in which each man s preference list is of length 1 is trivial. The case of 2-MESMI is almost as simple. If the man-optimal solution M m is man-exchange stable then we are done. Otherwise, if m and m form a blocking pair for M m, and their partners in M m are w and w respectively, then it is immediate that these are also their partners in every stable matching, and so every such matching is blocked by m and m. Hence, in this case, the manoptimal stable matching is the only stable matching that can be man-exchange stable. In the case k = 3, the first step in our algorithm is the application of the Gale- Shapley algorithm to find the man-optimal and woman-optimal stable matchings M m and M w respectively. (As observed in Section 1, all stable matchings match the same set of people, so any men and women who are unmatched in M m play no further role in what follows.) If either M m or M w is man-exchange stable we are done. Otherwise we compute the rotations and the rotation digraph D, and we identify the stable pairs. Our strategy is to construct an instance E of 2-SAT, with a variable x i for each rotation ρ i, which has a satisfying assignment if and only if a man-exchange stable matching exists; we show how to find a satisfying assignment in which the true variables represent the rotations that should be eliminated to produce a stable matching with the required property. We require some additional notation to represent particular rotations. Let (m, w) be a stable pair such that (m, w) M w. Then there is a rotation ρ = (m i0, w i0 ),..., (m ir 1, w ir 1 ) such that (m, w) = (m ij, w ij ) for some j; in other words such that the elimination of ρ breaks the pairing (m, w). This is because, like any other stable matching, M w can be derived from M m by the elimination of a set of rotations, and if the pair (m, w) were not in any of these rotations then this pair would be preserved in M w. We denote this rotation by ρ (m,w). Also, if (m, w) is a stable pair that is not in M m, then there is a rotation ρ = (m i0, w i0 ),..., (m ir 1, w ir 1 ) such that (m, w) = (m ij, w ij+1 ) for some j; in other words such that the elimination of ρ creates the pairing (m, w). Again this is because any stable matching that contains the pair (m, w) can be derived from M m by elimination of a set of rotations, and if (m, w) is not in M m, one of these rotations must create that pair by its elimination. We denote this rotation by ρ (m,w). We will also denote by r(m, w) the rank of woman w in the preference list of man m. The construction of E from D proceeds as follows. First of all, if (ρ i, ρ j ) is an edge in D, then we include in E the clause (x i x j ). These are the type A clauses. We now consider potential blocking pairs of men {m, m }. Suppose (m, w) and (m, w ) are stable pairs, and that m prefers w to w and m prefers w to w. These pairs of men are the only potential blocking pairs, and if (m, w) and (m, w ) belong to a stable matching M it follows that M is not man-exchange stable. Furthermore, we can easily identify and list all such pairs (m, w) and (m, w ) in O(n 2 ) time in general, and in O(n) time when the men s preference lists have length 3. We consider three cases. 14

Case (i) r(m, w) = r(m, w ) = 3. If both (m, w) and (m, w ) are in M m, then these pairs must be in every stable matching and every stable matching is blocked by m and m. In this case we can include in E clauses (y) and (ȳ), for some new variable y, to ensure that E is not satisfiable. Otherwise, let ρ i = ρ (m,w) if it exists and ρ j = ρ (m,w ) if it exists. If both exist, we include the clause ( x i x j ) in E, if only ρ i exists we include ( x i ) and if only ρ j exists we include ( x j ). In case ρ i = ρ j we simply include the clause ( x i ). These are the type B clauses. Case (ii) r(m, w) = 2, r(m, w ) = 3 (so that r(m, w ) = 1). Let ρ i = ρ (m,w ) and ρ j = ρ (m,w). Then we include the clause ( x i x j ) in E. If (m, w ) M m, so that ρ (m,w ) is undefined, we include the clause (x j ) in E, and if (m, w) M w, so that ρ (m,w) is undefined, we include the clause ( x i ) in E. As in case (i), if neither of these rotations is defined, then the pair {m, m } blocks every stable matching, and we can handle this possibility with a pair of incompatible clauses. The case r(m, w) = 3, r(m, w ) = 2 is similar. These are the type C clauses. Case (iii) r(m, w) = 2, r(m, w ) = 2, so that r(m, w ) = 1, r(m, w) = 1. Let ρ i = ρ (m,w) and ρ j = ρ (m,w ). Case (iii)(a) Suppose that (m, w) M m, (m, w ) M m. Then we include the clause (x i x j ) in E. If ρ (m,w) is undefined then we include the clause (x j ) and if ρ (m,w ) is undefined we include the clause (x i ); it is clear that if neither is defined the pair {m, m } blocks every stable matching, and we can handle this as before. These are the type D clauses. Case (iii)(b) On the other hand, suppose (m, w ) M m, (m, w) M m. Then it is immediate that ((m, w ), (m, w)) is a rotation; we call such a rotation awkward. If ρ k is an awkward rotation, then variable x k occurs in no clauses of E other than those of type A. Theorem 5.1 The instance E of 2-SAT constructed by the above algorithm has a satisfying assignment if and only if there is a man-exchange stable matching for the given instance of SMI, and given such a satisfying assignment, a man exchange stable matching can be constructed in O(n) time. The overall construction requires O(n) time, so there is an O(n) time algorithm for man-exchange stable marriage in the case where all preference lists have length 3. Proof First suppose that we have a satisfying assignment for E. The type A clauses ensure that the set of rotations corresponding to true literals form a closed subset S of the rotation poset, so let M be the stable matching corresponding to S, i.e. the stable matching arising from the elimination of the rotations in S. If M is blocked (in terms of man-exchange stability) by men m and m then one of cases (i) - (iii) must apply. In case (i), m and m can block M only if ρ i, if it exists, has been eliminated, and ρ j, if it exists, has been eliminated, i.e., both ρ i and ρ j, if they exist, are in S. But the presence of the type B clauses in E ensures that this cannot be 15

so. If neither of these rotations exists, i.e., (m, w) and (m, w ) are both in M m, then E contains incopatible clauses and cannot have a satisfying assignment. In case (ii), if ρ i has been eliminated then m is paired with w, so that m cannot be paired with w, and the rotation ρ (m,w ), if it exists, must also have been eliminated. Hence m and m can block M only if ρ i has been eliminated but ρ j has not, but the presence of the type C clauses in E ensures that this cannot be so. The special case in which neither ρ i nor ρ j exists is handled as in case (i). In case (iii)(a), m and m can block M only if neither ρ i nor ρ j has been eliminated, but the presence of the type D clauses in E ensures that this cannot be so. In case (iii)(b), ρ k = ((m, w ), (m, w)) is an awkward rotation, and (m, m ) can block M only if ρ k has been eliminated, but none of its successor rotations has. This means that x k is true, but the only clauses in which this variable appears are of type A, and in each of these clauses the other literal is also true. Hence we can change x k to be false, in other words, we simply do not eliminate ρ k, and this prevents (m, m ) from blocking the matching. We can proceed in a similar way for each awkward rotation. On the other hand, suppose that we have a man-exchange stable matching M, and that S is the corresponding closed subset of the rotation poset. We assign the variables corresponding to rotations in S to be true, and all other variables to be false. Every type A clause is satisfied because S is closed, and it is straightforward to verify that every clause of types B, C and D is satisfied because of the absence of a blocking pair for M. As far as complexity is concerned, we first note that application of the Gale- Shapley algorithm from both the men s side and the women s side, to produce the matchings M m and M w, requires O(n) time, since the combined length of all preference lists is O(n). For each of the b potential blocking pairs of men, the additional clauses can be constructed in O(1) time, so the overall time for construction of E, and hence the size of E, is O(b). An instance of 2-SAT can be solved in time that is linear in its length, hence O(n + b) time in this case, and the awkward rotations can be handled in O(b) time. Further, the man and woman optimal stable matchings can be found in O(n) time (since, in this case, the sum of the lengths of the preference lists is O(n)), and as observed earlier, the rotation digraph can be constructed within this same time bound. So the overall complexity is O(n + b), and it remains to show that b = O(n). Consider each of Cases (i), (ii), and (iii). In Case (i) it is immediate that (m, w) M w and (m, w ) M w. For each m, there are just two possible choices for m, namely those men who are paired in M w with his first and second choice women. In case (ii), it is again immediate that (m, w ) M w, and for each m there is just one possible choice for m, namely the man who has m s first choice woman as his partner in M w. In case (iii), there is just one possible choice of m for each man m, namely the man who has m s second choice woman as his first choice. Hence, in total, the number b of potential pairs is O(n), and the overall O(n) complexity is established. 16

6 Summary and conclusion In this paper we have introduced the Man-Exchange Stable Marriage problem, motivated by a significant practical application, and have shown that this problem, and therefore its generalisation to Hospitals / Residents, is NP-complete. By contrast, the problem is solvable in polynomial time if all of the men s preference lists have length 3, and this applies also, by a straightforward extension, to the Hospitals / Residents context. It is natural to ask how the situation is affected if we allow a stable matching to be blocked by any coalition of t 2 men, all of whom could improve if they permuted their partners in a suitable way. In the context of practical matching schemes, this man-coalition stable marriage problem could still be significant although, in reality, the chances that a set of more than two residents would realise that they could form such a coalition would be much diminished. In fact, for this extended problem, the situation is rather different, as the following theorem, first established by Cechlárová and Manlove [5] indicates. Theorem 6.1 For any stable marriage instance, the man-optimal stable matching is the only stable matching that can be man-coalition stable. Proof Let M be any stable matching other than the man-optimal, and let S be the corresponding (non-empty) rotation set. Let ρ = (m i0, w i0 ),..., (m ir 1, w ir 1 ) be a member of S with no successors in S. Then, for each j (0 j r 1), m ij prefers w ij to w ij+1, his partner in M (j + 1 taken modulo r). Hence the set {m i0,... m ir 1 } is a blocking coalition for M. It is a simple matter to determine, in O(n 2 ) time, whether a stable marriage instance involving n men admits a man-coalition stable matching. Construct a directed graph G with a vertex v i for each man m i and a directed edge from v i to v j if and only if m i prefers M(m j ) to M(m i ), where M is the man-optimal stable matching. Then it is easy to show that M is man-coalition stable if and only if G is acyclic. The man-optimal stable matching can be found in O(n 2 ) time by the Gale-Shapley algorithm, and the existence of a cycle in G can be checked also in O(n 2 ) time by standard means such as depth-first search. If we impose a fixed bound on the size of a man-coalition, then Theorem 6.1 no longer applies, and it would be interesting to establish whether the algorithm of Section 5 can be extended to apply to this case. The algorithm of Section 5 suggests the question as to what happens when the men s preference lists are of fixed length greater than 3. Many of the preference lists in the instance constructed in the reduction of Section 4 can be truncated to be of fixed length (in fact of length 2 or 3), but some of them are not of fixed length. However, the approach of Section 5 does not seem to work either, as the potential for rotation interaction is much greater than in the case where the men s lists are of length 3. We conjecture that the problem remains NP-complete even if all of the men s lists are of length 4. 1 1 This conjecture has recently been proved; see [14]. 17

References [1] J. Alcalde. Exchange-proofness or divorce-proofness? Stability in one-sided matching markets. Economic Design, 1:275 287, 1995. [2] J. Allan, NHS Scotland. Personal communication, 2002. [3] K. Cechlárová. On the complexity of exchange stable roommates. Discrete Applied Mathematics, 116:279-287, 2002. [4] Carms: the Canadian Resident Matching Scheme. Web document available at http://www.carms.ca/jsp/main.jsp. [5] K. Cechlárová and D.F. Manlove. The exchange-stable marriage problem. Discrete Applied Mathematics, 152:109-122, 2005. [6] D. Gale and L.S. Shapley. College admissions and the stability of marriage. American Mathematical Monthly, 69:9 15, 1962. [7] D. Gale and M. Sotomayor. Some remarks on the stable marriage problem. Discrete Applied Mathematics, 11:223 232, 1985. [8] M.J Garey and D.S. Johnson. Computers and Intractability: a Guide to the Theory of NP-completeness. Freeman, 1979. [9] D. Gusfield and R.W. Irving. The Stable Marriage Problem: Structure and Algorithms. MIT Press, 1989. [10] D. Gusfield. Three fast algorithms for four problems in stable marriage. SIAM Journal on Computing, 16:111-128, 1987. [11] R. W. Irving. Matching medical students to pairs of hospitals: a new variation on an old theme. Proceedings of ESA 98, the Sixth Annual European Symposium on Algorithms, Venice Italy, 1998, LNCS vol. 1461:381-392, Springer 1998. [12] R.W. Irving and P. Leather. The complexity of counting stable marriages. SIAM Journal on Computing, 15:655 667, 1986. [13] D.E. Knuth. Mariages Stables. Les Presses du l Université de Montréal, 1976. [14] E. McDermid, C. Cheng, and I. Suzuki. Hardness Results on the Man- Exchange Stable Marriage Problem with Short Preference Lists. to appear in Information Processing Letters. [15] National Resident Matching Program. About the NRMP. Web document available at http://www.nrmp.org/about_nrmp/how.html. [16] A.E. Roth. The evolution of the labor market for medical interns and residents: a case study in game theory. Journal of Political Economy, 92(6):991 1016, 1984. 18

[17] T.J. Schaefer. The complexity of satisfiability problems. Proc. 10th. Ann. ACM Symp. on Theory of Computing, ACM New York, 216 226, 1978. [18] SFAS: Scottish Foundation Allocation Scheme. Web document available at http://www.nes.scot.nhs.uk/sfas/. 19