Problemadvanced
Egalitarian stable matching
Also called optimal stable marriage.
Find a stable matching that minimizes the sum of the ranks of partners. Irving, Leather and Gusfield solve it by min cut on rotations.
- Time
- O(n^4) worst
- Where
- n = the number of men and of women
- Model
- Word RAM
The egalitarian stable matching problem asks for the stable matching that is best for everyone on average: each person pays the rank of the partner in their own list, and the total over both sides must be as small as possible. It replaces the one-sided optimum of deferred acceptance with a fair objective. It is solved in polynomial time by optimizing over the lattice of stable matchings through its rotations, which turns the problem into a maximum-weight closure and so a minimum cut. Close objectives that look just as simple, such as balancing the costs of the two sides, are NP-hard.
In plain words
In a stable matching, nobody wants to break up and pair with someone who also wants them more. There can be many stable matchings. Deferred acceptance gives the one that is best for the side that proposes and worst for the other side. To be fair to both sides, give each person a score: one if they get their first choice, two for their second choice, and so on. Add up the scores of all people. The egalitarian stable matching is the stable matching with the smallest total. Trying all stable matchings is too slow, because there can be very many. But the stable matchings have a neat structure that turns the search into a flow problem, which is fast to solve.
Definition
An instance has men and women. Each person ranks all people of the other side in a strict order. Let be the position of in the list of (1 for the first choice), and define in the same way. The egalitarian cost of a perfect matching is
The task is to find a stable matching of minimum egalitarian cost. The output is the matching; the measure is .
The weighted version (the "optimal stable marriage" of Irving, Leather and Gusfield) gives each pair two weights, one for each person, that grow along each list, and minimizes the sum of the weights of the matched pairs.
Variants
- Incomplete lists. People may list only some partners. Every stable matching matches the same people (by the rural hospitals theorem), so the cost is still well defined, and the same algorithm applies.
- Minimum regret. Minimize the largest rank that any person gets. Gusfield (1987) solved it in time by walking down the lattice.
- Sex-equal stable matching. Minimize the difference between the men's total rank and the women's total rank. Kato (1993) proved it NP-hard.
- Ties. With ties in the lists and weak stability, finding a weakly stable matching of minimum egalitarian cost is NP-hard; see stable matching with ties.
- Roommates. The egalitarian version of the stable roommates problem is NP-hard, although a stable matching, if one exists, is found in polynomial time.
Examples
Four men and four women with these lists:
| person | list | person | list | |
|---|---|---|---|---|
There are exactly three stable matchings. All three contain the pair .
| stable matching | other pairs | men's total | women's total | cost |
|---|---|---|---|---|
| (man-optimal) | , , | 6 | 9 | 15 |
| , , | 8 | 6 | 14 | |
| (woman-optimal) | , , | 13 | 4 | 17 |
The egalitarian stable matching is , which neither proposing order of deferred acceptance finds. The lattice is the chain , with two rotations. The first, , moves to and to ; it changes the cost by for the men and for the women, so by . The second, , moves to and to ; it changes the cost by . The best closed set of rotations is the first rotation alone, which gives .
Known algorithms
- Enumeration. List all stable matchings with Gusfield's algorithm in time, where is their number, and take the best. This is exponential in the worst case, since can be exponential in .
- Rotations and minimum cut (Irving, Leather and Gusfield 1987). Compute the man-optimal matching and the rotation poset, which has rotations. Give each rotation the change in cost that its elimination causes; the cost of a stable matching is the cost of the man-optimal matching plus the weights of the rotations in its closed set. Finding a closed set of minimum total weight is a maximum-weight closure problem, solved by one minimum cut in a network with a node per rotation. The total time is . The method works for every weighted version in which the cost is a sum over people of a function of their own partner.
- Minimum regret (Gusfield 1987). time, also with rotations.
Bounds
- The problem is solvable in polynomial time, although the number of stable matchings can be exponential and counting them is #P-complete (Irving and Leather 1986).
- The input has size , so time is needed; the gap to the bound comes from the minimum cut.
- Objectives that are not sums of individual costs can be hard: the sex-equal problem is NP-hard, and so is the egalitarian problem with ties.
Reductions
- To maximum-weight closure. The stable matchings correspond one to one to the closed sets (down-sets) of the rotation poset, and the egalitarian cost is additive over rotations. So the problem is a maximum-weight closure problem with weights , where is the change in cost by rotation . The rotation poset is a directed acyclic graph, and the closure problem reduces to a minimum cut by the max-flow min-cut theorem.
- From the man-optimal matching. The rotations and their poset are found from one run of deferred acceptance and a walk from the man-optimal to the woman-optimal matching.
Applications
Knuth (1976) posed the problem of finding a fair stable matching, and the egalitarian cost is the most used fairness measure for stable marriage. It serves as a compromise between the two one-sided optima in matching markets where both sides are people and both sides' welfare counts. It is also the standard example of optimizing a linear function over a distributive lattice given by a poset of rotations.
References
- Robert W. Irving, Paul Leather and Dan Gusfield, An efficient algorithm for the "optimal" stable marriage, Journal of the ACM 34(3), 532 to 543 (1987), the whole paper (the O(n^4) algorithm through rotations and a minimum cut)
- Robert W. Irving and Paul Leather, The complexity of counting stable marriages, SIAM Journal on Computing 15(3), 655 to 667 (1986), the whole paper (rotations and the rotation poset)
- Dan Gusfield, Three fast algorithms for four problems in stable marriage, SIAM Journal on Computing 16(1), 111 to 128 (1987), the whole paper (the minimum regret stable matching and the listing of all stable matchings)
- Akiko Kato, Complexity of the sex-equal stable marriage problem, Japan Journal of Industrial and Applied Mathematics 10(1), 1 to 19 (1993), the whole paper (NP-hardness of the sex-equal problem)
- Dan Gusfield and Robert W. Irving, The Stable Marriage Problem, Structure and Algorithms, MIT Press (1989), the chapter on optimal stable matchings
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag SETRS2 Edit this page History Report an error Markdown