ArticleslgStudy

mathematics

Stable matching problem

Stable matching problem is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Stable matching problem rather than just read about it. In short: 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.

Stable matching problem — main illustration
Stable matching problem — illustration

Key takeaways

  • Stable matching problem belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Stable matching problem to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Stable matching problem from memory before moving on to harder problems.

Reference excerpt

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−1nln⁡n. 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.

Worked examples

Example 1 — a first encounter with Stable matching problem

Start with the simplest possible case. Write down what Stable matching problem claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Stable matching problem before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Stable matching problem ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Stable matching problem

In research
Stable matching problem appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Stable matching problem in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Stable matching problem is common in secondary-school and first-year university syllabi. It links to neighbouring topics Combinatorics, Cooperative games, Game theory game classes, so understanding it makes those chapters shorter.
In everyday life
Look for Stable matching problem outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Stable matching problem” →

How to study Stable matching problem in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Stable matching problem means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Stable matching problem out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Stable matching problem in simple terms?

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…

Why does Stable matching problem matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Stable matching problem?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Stable matching problem.

Tags

  • Combinatorics
  • Cooperative games
  • Game theory game classes
  • Lloyd Shapley
  • Matching markets
  • Mathematical problems
  • Stable matching

Keep exploring