In mathematics, economics, and computer science, the stable matching problem 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 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) where both prefer each other to their current partner under the matching. The problem has been stated as a stable marriage problem:
Given n men and n women, where each person has ranked all members of the opposite sex in order of preference, marry the men and women to each other such that there are no two people of opposite sex who would both rather have each other than their current partners. When there are no such pairs of people, the set of marriages is deemed stable. 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.
Applications Algorithms for finding solutions to the stable matching 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 was awarded to Lloyd S. Shapley and Alvin E. Roth "for the theory of stable allocations and the practice of market design." An extension of the Gale-Shapley algorithm has been used in content delivery networks. Optimizing performance from a user's point of view and balancing server load requires a good matching of clusters of users accessing a given type of content (e.g. web pages or video) with clusters of servers well-positioned to serve them the desired content. This can be modeled as user clusters and server clusters having (partial) preferences over each other based on variables such as network topology or contractual agreements with internet service providers. This can then be solved as a stable matching problem. A generalization of the classic Gale-Shapley approach is necessary because there are unequal numbers of clusters on each side, because demand and capacity can vary between clusters, and because the preferences are partial instead of total. The Gale–Shapley algorithm for stable matching is used to assign rabbis who graduate from Hebrew Union College to Jewish congregations.
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 matching problem can be given the structure of a finite distributive lattice, and this structure leads to efficient algorithms for several problems on stable matchings. In a uniformly-random instance of the stable matching problem with n men and n women, the average number of stable matchings is asymptotically e−1nlnn. In a stable matching instance chosen to maximize the number of different stable matchings, this number is an exponential function of n. Counting the number of stable matchings in a given instance is #P-complete.
Algorithmic solution
In 1962, David Gale and Lloyd Shapley proved that, for any equal number in different groups, in the context of college admissions and individuals wanting heterosexual marriage it is always possible to solve as matched couples to make all resultant pairings / matched factors stable. They presented an algorithm to do so. The Gale–Shapley algorithm (also known as the deferred acceptance algorithm) involves a number of "rounds" (or "iterations"):
… excerpt ends here. Continue reading the full article.
