Stable Marriage
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
,
economics Economics () is the social science that studies the Production (economics), production, distribution (economics), distribution, and Consumption (economics), consumption of goods and services. Economics focuses on the behaviour and intera ...
, and
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, the stable marriage problem (also stable matching problem or SMP) is the problem of finding a stable matching between two equally sized sets of elements given an ordering of preferences for each element. A matching is a
bijection In mathematics, a bijection, also known as a bijective function, one-to-one correspondence, or invertible function, is a function between the elements of two sets, where each element of one set is paired with exactly one element of the other s ...
from the elements of one set to the elements of the other set. A matching is ''not'' stable if: In other words, a matching is stable when there does not exist any pair (''A'', ''B'') which both prefer each other to their current partner under the matching. The stable marriage problem has been stated as follows: The existence of two classes that need to be paired with each other (heterosexual men and women in this example) distinguishes this problem from the
stable roommates problem In mathematics, economics and computer science, particularly in the fields of combinatorics, game theory and algorithms, the stable-roommate problem (SRP) is the problem of finding a stable matching for an even-sized set. A matching is a separati ...
.


Applications

Algorithms for finding solutions to the stable marriage problem have applications in a variety of real-world situations, perhaps the best known of these being in the assignment of graduating medical students to their first hospital appointments. In 2012, the
Nobel Memorial Prize in Economic Sciences The Nobel Memorial Prize in Economic Sciences, officially the Sveriges Riksbank Prize in Economic Sciences in Memory of Alfred Nobel ( sv, Sveriges riksbanks pris i ekonomisk vetenskap till Alfred Nobels minne), is an economics award administered ...
was awarded to
Lloyd S. Shapley Lloyd Stowell Shapley (; June 2, 1923 – March 12, 2016) was an American mathematician and Nobel Prize-winning economist. He contributed to the fields of mathematical economics and especially game theory. Shapley is generally considered one o ...
and
Alvin E. Roth Alvin Eliot Roth (born December 18, 1951) is an American academic. He is the Craig and Susan McCaw professor of economics at Stanford University and the Gund professor of economics and business administration emeritus at Harvard University.
"for the theory of stable allocations and the practice of market design." An important and large-scale application of stable marriage is in assigning users to servers in a large distributed Internet service. Billions of users access web pages, videos, and other services on the Internet, requiring each user to be matched to one of (potentially) hundreds of thousands of servers around the world that offer that service. A user prefers servers that are proximal enough to provide a faster response time for the requested service, resulting in a (partial) preferential ordering of the servers for each user. Each server prefers to serve users that it can with a lower cost, resulting in a (partial) preferential ordering of users for each server.
Content delivery network A content delivery network, or content distribution network (CDN), is a geographically distributed network of proxy servers and their data centers. The goal is to provide high availability and performance by distributing the service spatially re ...
s that distribute much of the world's content and services solve this large and complex stable marriage problem between users and servers every tens of seconds to enable billions of users to be matched up with their respective servers that can provide the requested web pages, videos, or other services.


Different stable matchings

In general, there may be many different stable matchings. For example, suppose there are three men (A,B,C) and three women (X,Y,Z) which have preferences of: : A: YXZ   B: ZYX   C: XZY   :X: BAC   Y: CBA   Z: ACB There are three stable solutions to this matching arrangement: * men get their first choice and women their third - (AY, BZ, CX); * all participants get their second choice - (AX, BY, CZ); * women get their first choice and men their third - (AZ, BX, CY). All three are stable, because instability requires both of the participants to be happier with an alternative match. Giving one group their first choices ensures that the matches are stable because they would be unhappy with any other proposed match. Giving everyone their second choice ensures that any other match would be disliked by one of the parties. In general, the family of solutions to any instance of the stable marriage problem can be given the structure of a finite
distributive lattice In mathematics, a distributive lattice is a lattice in which the operations of join and meet distribute over each other. The prototypical examples of such structures are collections of sets for which the lattice operations can be given by set uni ...
, and this structure leads to efficient algorithms for several problems on stable marriages. In a uniformly-random instance of the stable marriage problem with men and women, the average number of stable matchings is asymptotically e^n\ln n. In a stable marriage instance chosen to maximize the number of different stable matchings, this number is an
exponential function The exponential function is a mathematical function denoted by f(x)=\exp(x) or e^x (where the argument is written as an exponent). Unless otherwise specified, the term generally refers to the positive-valued function of a real variable, a ...
of . Counting the number of stable matchings in a given instance is #P-complete.


Algorithmic solution

In 1962,
David Gale David (; , "beloved one") (traditional spelling), , ''Dāwūd''; grc-koi, Δαυΐδ, Dauíd; la, Davidus, David; gez , ዳዊት, ''Dawit''; xcl, Դաւիթ, ''Dawitʿ''; cu, Давíдъ, ''Davidŭ''; possibly meaning "beloved one". w ...
and
Lloyd Shapley Lloyd Stowell Shapley (; June 2, 1923 – March 12, 2016) was an American mathematician and Nobel Prize-winning economist. He contributed to the fields of mathematical economics and especially game theory. Shapley is generally considered one of ...
proved that, for any equal number of men and women, it is always possible to solve the SMP and make all marriages stable. They presented an
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algorithms are used as specificat ...
to do so. The
Gale–Shapley algorithm In mathematics, economics, and computer science, the Gale–Shapley algorithm (also known as the deferred acceptance algorithm or propose-and-reject algorithm) is an algorithm for finding a solution to the stable matching problem, named for Davi ...
(also known as the deferred acceptance algorithm) involves a number of "rounds" (or "
iteration Iteration is the repetition of a process in order to generate a (possibly unbounded) sequence of outcomes. Each repetition of the process is a single iteration, and the outcome of each iteration is then the starting point of the next iteration. ...
s"): * In the first round, first ''a'') each unengaged man proposes to the woman he prefers most, and then ''b'') each woman replies "maybe" to her suitor she most prefers and "no" to all other suitors. She is then provisionally "engaged" to the suitor she most prefers so far, and that suitor is likewise provisionally engaged to her. * In each subsequent round, first ''a'') each unengaged man proposes to the most-preferred woman to whom he has not yet proposed (regardless of whether the woman is already engaged), and then ''b'') each woman replies "maybe" if she is currently not engaged or if she prefers this man over her current provisional partner (in this case, she rejects her current provisional partner who becomes unengaged). The provisional nature of engagements preserves the right of an already-engaged woman to "trade up" (and, in the process, to "jilt" her until-then partner). * This process is repeated until everyone is engaged. This algorithm is guaranteed to produce a stable marriage for all participants in time O(n^2) where n is the number of men or women. Among all possible different stable matchings, it always yields the one that is best for all men among all stable matchings, and worst for all women. It is a
truthful mechanism In game theory, an asymmetric game where players have private information is said to be strategy-proof or strategyproof (SP) if it is a weakly-dominant strategy for every player to reveal his/her private information, i.e. given no information about ...
from the point of view of men (the proposing side), i.e., no man can get a better matching for himself by misrepresenting his preferences. Moreover, the GS algorithm is even ''group-strategy proof'' for men, i.e., no coalition of men can coordinate a misrepresentation of their preferences such that all men in the coalition are strictly better-off. However, it is possible for some coalition to misrepresent their preferences such that some men are better-off and the other men retain the same partner. The GS algorithm is non-truthful for the women (the reviewing side): each woman may be able to misrepresent her preferences and get a better match.


Rural hospitals theorem

The
rural hospitals theorem The rural hospitals theorem (RHT) is a fundamental theorem in the theory of stable matching. It considers the problem of matching doctors to hospitals for residency, where each doctor is matched to a single hospital but each hospital has several ...
concerns a more general variant of the stable matching problem, like that applying in the problem of matching doctors to positions at hospitals, differing in the following ways from the basic -to- form of the stable marriage problem: *Each participant may only be willing to be matched to a subset of the participants on the other side of the matching. *The participants on one side of the matching (the hospitals) may have a numerical capacity, specifying the number of doctors they are willing to hire. *The total number of participants on one side might not equal the total capacity to which they are to be matched on the other side. *The resulting matching might not match all of the participants. In this case, the condition of stability is that no unmatched pair prefer each other to their situation in the matching (whether that situation is another partner or being unmatched). With this condition, a stable matching will still exist, and can still be found by the Gale–Shapley algorithm. For this kind of stable matching problem, the rural hospitals theorem states that: * The set of assigned doctors, and the number of filled positions in each hospital, are the same in all stable matchings. * Any hospital that has some empty positions in some stable matching, receives exactly the same set of doctors in ''all'' stable matchings.


Related problems

In
stable matching with indifference Stable marriage with indifference is a variant of the stable marriage problem. Like in the original problem, the goal is to match all men to all women such that no pair of man and woman who are unmarried to each other, would simultaneously like to ...
, some men might be indifferent between two or more women and vice versa. The
stable roommates problem In mathematics, economics and computer science, particularly in the fields of combinatorics, game theory and algorithms, the stable-roommate problem (SRP) is the problem of finding a stable matching for an even-sized set. A matching is a separati ...
is similar to the stable marriage problem, but differs in that all participants belong to a single pool (instead of being divided into equal numbers of "men" and "women"). The hospitals/residents problem – also known as the college admissions problem – differs from the stable marriage problem in that a hospital can take multiple residents, or a college can take an incoming class of more than one student. Algorithms to solve the hospitals/residents problem can be ''hospital-oriented'' (as the
NRMP The National Resident Matching Program (NRMP), also called The Match, is a United States-based private non-profit non-governmental organization created in 1952 to place U.S. medical school students into residency training programs located in Uni ...
was before 1995) or ''resident-oriented''. This problem was solved, with an algorithm, in the same original paper by Gale and Shapley, in which the stable marriage problem was solved. The hospitals/residents problem with couples allows the set of residents to include couples who must be assigned together, either to the same hospital or to a specific pair of hospitals chosen by the couple (e.g., a married couple want to ensure that they will stay together and not be stuck in programs that are far away from each other). The addition of couples to the hospitals/residents problem renders the problem
NP-complete In computational complexity theory, a problem is NP-complete when: # it is a problem for which the correctness of each solution can be verified quickly (namely, in polynomial time) and a brute-force search algorithm can find a solution by tryi ...
. The
assignment problem The assignment problem is a fundamental combinatorial optimization problem. In its most general form, the problem is as follows: :The problem instance has a number of ''agents'' and a number of ''tasks''. Any agent can be assigned to perform any ta ...
seeks to find a matching in a weighted
bipartite graph In the mathematical field of graph theory, a bipartite graph (or bigraph) is a graph whose vertices can be divided into two disjoint and independent sets U and V, that is every edge connects a vertex in U to one in V. Vertex sets U and V are ...
that has maximum weight. Maximum weighted matchings do not have to be stable, but in some applications a maximum weighted matching is better than a stable one. The matching with contracts problem is a generalization of matching problem, in which participants can be matched with different terms of contracts. An important special case of contracts is matching with flexible wages.


See also

*
Matching (graph theory) In the mathematical discipline of graph theory, a matching or independent edge set in an undirected graph is a set of edges without common vertices. Finding a matching in a bipartite graph can be treated as a network flow problem. Definit ...
– matching between different vertices of the graph; usually unrelated to preference-ordering. *
Envy-free matching In economics and social choice theory, an envy-free matching (EFM) is a matching between people to "things", which is envy-free in the sense that no person would like to switch his "thing" with that of another person. This term has been used in se ...
– a relaxation of stable matching for many-to-one matching problems *
Rainbow matching In the mathematical discipline of graph theory, a rainbow matching in an edge-colored graph is a matching in which all the edges have distinct colors. Definition Given an edge-colored graph , a rainbow matching in is a set of pairwise non-adja ...
for edge colored graphs *
Stable matching polytope In mathematics, economics, and computer science, the stable matching polytope or stable marriage polytope is a convex polytope derived from the solutions to an instance of the stable matching problem. Description The stable matching polytope is the ...


References


Further reading

* Kleinberg, J., and Tardos, E. (2005) ''Algorithm Design'', Chapter 1, pp 1–12. See companion website for the Tex

. * * * * * See Section 10.6.4
downloadable free online
*


External links



*https://web.archive.org/web/20080512150525/http://kuznets.fas.harvard.edu/~aroth/alroth.html#NRMP *http://www.dcs.gla.ac.uk/research/algorithms/stable/EGSapplet/EGS.html
SMP Lecture Notes
{{Authority control Combinatorics Game theory Cooperative games Mathematical problems Stable matching Lloyd Shapley