Lattice of stable matchings

From Wikipedia, the free encyclopedia

In mathematics, economics, and computer science, a lattice of stable matchings is a distributive lattice whose elements are all the solutions to a given instance of the stable matching problem. These solutions, called stable matchings, pair up participants of two types in such a way that no two participants would prefer to be paired with each other than to accept their assigned pairings. Being a lattice means that, for a comparison operation between stable matchings based on the preferences of the participants, each two stable matchings have a unique greatest lower bound and a unique least upper bound. Together, the greatest lower bound and least upper bound operations obey the distributive law. This structure was originally described in the 1970s by John Horton Conway and Donald Knuth.[1][2]

The Gale–Shapley algorithm can find either of two special stable matchings, the greatest and least matchings in the lattice. The entire lattice has a concise representation that can be constructed in polynomial time, by using Birkhoff's representation theorem to describe it as the family of lower sets of an underlying partially ordered set. The elements of this partially ordered set are called rotations; they are cycle graphs that describe the symmetric difference between two stable matchings that are adjacent in the lattice. Algorithms that operate on this partial order instead of directly on stable matchings, and that search for lower sets that are optimal in some way, can find in polynomial time the minimum or maximum weight stable matching, for weighted instances of the stable matching problem.

Every finite distributive lattice can be represented as a lattice of stable matchings. The number of matchings in the lattice can vary from an average case of to a worst case of exponential, where is the number of participants of each kind to be matched. Computing the number of stable matchings for a given instance of stable matching is #P-complete.

In its simplest form, an instance of the stable matching problem consists of two equal-sized finite sets of participants to be matched to each other, for instance doctors seeking jobs and hospitals seeking to hire a doctor. Each participant has a preference ordering on the elements of the other type: the doctors each have different preferences for which hospital they would like to work at (for instance based on which cities they would prefer to live in), and the hospitals each have preferences for which doctor they would like to work for them (for instance based on specialization or recommendations). The goal is to find a matching that is stable: no pair of a doctor and a hospital prefer each other to their assigned match. Versions of this problem are used, for instance, by the National Resident Matching Program to match American medical students to hospitals.[3]

In general, there may be many different stable matchings. For example, suppose there are three doctors (A,B,C) and three hospitals (X,Y,Z) which have preferences of:

A: YXZ   B: ZYX   C: XZY
X: BAC   Y: CBA   Z: ACB

There are three stable matchings for this system of preferences:

  1. The doctors get their first choice and the hospitals get their third: AY, BZ, CX.
  2. All participants get their second choice: AX, BY, CZ.
  3. The hospitals get their first choice and the doctors their third: AZ, BX, CY.

The lattice of stable matchings organizes this collection of solutions, for any instance of stable matching, giving it the structure of a distributive lattice. (For the definition of a distributive lattice, see § Distributive lattice, below.)[1]

Structure

Partial order on matchings

The lattice of stable matchings is based on the following weaker structure, a partially ordered set whose elements are the stable matchings. Define a comparison operation on the stable matchings, where if and only if all doctors prefer matching to matching : either they have the same assigned hospital in both matchings, or they are assigned a better hospital in than they are in . If the doctors disagree on which matching they prefer, then and are incomparable: neither one is the other. The same comparison operation can be defined in the same way for any two sets of participants to be matched, not just doctors and hospitals. The choice of which of the two sets of participants to use in the role of the doctors is arbitrary. Swapping the roles of the doctors and hospitals reverses the ordering of every pair of stable matchings, but does not otherwise change the structure of the partial order.[1]

This ordering gives the matchings the structure of a partially ordered set. A partially ordered set is defined as an ordering that obeys the following three properties:

  • For every matching ,
  • For every two different matchings and , it cannot be the case that both and are true.
  • For every three different matchings , , and , if and , then .

For stable matchings, all three properties follow directly from the definition of the comparison operation.[1]

Top and bottom elements

Define the best match of a participant of a stable matching instance to be the participant that most prefers, among all the participants for which there exists a stable matching that pairs with , and define the worst match analogously. Then no two participants can have the same best match. For, suppose to the contrary that doctors and both have as their best match, and that prefers to . Then, in the stable matching that matches to (which must exist by the definition of the best match of ), and would be an unstable pair, because prefers to and prefers to any other partner in any stable matching. However, a stable matching cannot have an unstable pair. This contradiction shows that best matches are distinct, and therefore that assigning all doctors to their best matches gives a matching. It is a stable matching, because any unstable pair would also be unstable for one of the matchings used to define best matches. This matching, assigning all doctor to their best matches, also assigns all hospitals to their worst matches. In the partial ordering on stable matchings, it is greater than all other stable matchings.[1]

Symmetrically, assigning all doctors to their worst matches and assigning all hospitals to their best matches gives another stable matching. In the partial order on the matchings, it is less than all other stable matchings.[1]

The Gale–Shapley algorithm gives a process for constructing stable matchings, that can be described as follows: until a matching is reached, the algorithm chooses an arbitrary hospital with an unfilled position, and that hospital makes a job offer to the doctor it most prefers among the ones it has not already made offers to. If the doctor is unemployed or has a less-preferred assignment, the doctor accepts the offer (and resigns from their other assignment if it exists). The process always terminates, because each doctor and hospital interact only once. When it terminates, the result is a stable matching, the one that assigns each hospital to its best match and that assigns all doctors to their worst matches. An algorithm that swaps the roles of the doctors and hospitals (in which unemployed doctors send a job applications to their next preference among the hospitals, and hospitals accept applications either when they have an unfilled position or they prefer the new applicant, firing the doctor they had previously accepted) instead produces the stable matching that assigns all doctors to their best matches and each hospital to its worst match.[1]

Join and meet

Given any two stable matchings and for the same input, one can form two more matchings and in the following way:

  • In , each doctor gets their best choice among the two hospitals they are matched to in and (if these differ) and each hospital gets its worst choice among the two doctors it is matched to.
  • In , each doctor gets their worst choice among the two hospitals they are matched to in and (if these differ) and each hospital gets its best choice.

(The same operations can be defined in the same way for any two sets of elements to be matched, not just doctors and hospitals.)[1]

Then both and are matchings. It is not possible, for instance, for two doctors to have the same best choice and be matched to the same hospital in , for regardless of which of the two doctors is preferred by the hospital, that doctor and hospital would form an unstable pair in whichever of and they are not already matched in. Because the doctors are matched in , the hospitals must also be matched. The same reasoning applies symmetrically to .[1]

Additionally, both and are stable. There cannot be a pair of a doctor and hospital who prefer each other to their match, because the same pair would necessarily also be an unstable pair for at least one of and .[1]

Distributive lattice

The two operations and form the join and meet operations of a finite distributive lattice. In this context, a finite lattice is defined as a partially ordered finite set (here, the set of stable matchings) in which there is a unique minimum element and a unique maximum element, in which every two elements have a unique least element greater than or equal to both of them (their join) and every two elements have a unique greatest element less than or equal to both of them (their meet).[1]

In the case of the operations and defined above, the join is greater than or equal to both and because it was defined to give each doctor their preferred choice, and because these preferences of the doctors are how the ordering on matchings is defined. It is below any other matching that is also above both and , because any such matching would have to give each doctor an assigned match that is at least as good. Therefore, it fits the requirements for the join operation of a lattice. Symmetrically, the operation fits the requirements for the meet operation.[1]

Because they are defined using an element-wise minimum or element-wise maximum in the preference ordering, these two operations obey the same distributive laws obeyed by the minimum and maximum operations on linear orderings: for every three different matchings , , and ,

and

Therefore, the lattice of stable matchings is a distributive lattice.[1]

Representation by rotations

Join-irreducible matchings

Birkhoff's representation theorem states that any finite distributive lattice can be represented by a family of finite sets, with intersection and union as the meet and join operations, and with the relation of being a subset as the comparison operation for the associated partial order. More specifically, these sets can be taken to be the lower sets of an associated partial order. In the general form of Birkhoff's theorem, this partial order can be taken as the induced order on a subset of the matchings in the lattice, the join-irreducible matchings (matchings that cannot be formed as joins of a subset of other matchings).[4]

When a stable matching is join-irreducible, let be the join of the matchings below in the partial order of stable matchings. Then is not , because it is a join of matchings distinct from and is not such a join. is below in the partial order of stable matchings, and there are no other stable matchings between and .[5]

Rotations

For the lattice of stable matchings, the partial order of Birkhoff's representation theorem can alternatively be described in terms of structures called rotations, first described in 1986 by Robert W. Irving and Paul Leather.[5]

Suppose that two different stable matchings and are comparable and have no third stable matching between them in the partial order. Another way of stating this is that and form a pair of the covering relation of the partial order of stable matchings. For instance, this is true for any join-irreducible matching and the matching formed by the join of the elements below . Then the set of pairs of elements that are matched in one but not both of and (the symmetric difference of their sets of matched pairs) is called a rotation. It forms a cycle graph whose edges alternate between matched pairs from and from . Removing one of these two alternating sets of pairs, and adding the other alternating set, transforms into or vice versa.[5]

More than one pair of matchings and may define the same rotation . For any rotation, the top elements of pairs defining that rotation are closed under meet operations: if and are each the top matchings of pairs and with , then their meet is also the top matching of another pair defining the same rotation. For every rotation, let be the meet of all the top matchings of pairs defining that rotation. Then is join-irreducible, and the rotation is where is the join of the matchings below . This gives a one-to-one correspondence between rotations and join-irreducible stable matchings.[5]

Matchings from lower sets

If the rotations are given the same partial ordering as their corresponding join-irreducible stable matchings, then Birkhoff's representation theorem gives a one-to-one correspondence between lower sets of rotations and all stable matchings. The set of rotations associated with any given stable matching can be obtained by changing the given matching by rotations downward in the partial ordering, choosing arbitrarily which rotation to perform at each step, until reaching the bottom element, and listing the rotations used in this sequence of changes. The stable matching associated with any lower set of rotations can be obtained by applying the rotations to the bottom element of the lattice of stable matchings, choosing arbitrarily which rotation to apply when more than one can apply.[5]

Every pair of elements of a given stable matching instance belongs to at most two rotations: one rotation that, when applied to the lower of two matchings, removes other assignments to and and instead assigns them to each other, and a second rotation that, when applied to the lower of two matchings, removes pair from the matching and finds other assignments for those two elements. Because there are pairs of elements, there are rotations.[5]

Properties of the lattice

Algorithmic consequences

References

Related Articles

Wikiwand AI