Manuscript Offprint
arXiv:2611.06494A upper bound on the number of stable matchings
Abstract
We study the maximum number of stable matchings in an instance with men and women. Karlin, Oveis Gharan, and Weber (STOC 2018) proved the first single-exponential upper bound; their argument gives for sufficiently large . Palmer and Pálvölgyi (FOCS 2021) improved this bound to .
We prove that . This brings the exponential base closer to 2.28, the base of the best known lower bound. More precisely, we bound the number of stable matchings in each instance in terms of each person's number of stable partners, where a stable partner is someone matched to that person in at least one stable matching. Our proof assigns each person a weight determined by this number and uses these weights to bound the number of stable matchings by induction.
*Hamburg University of Technology, Institute for Algorithms and Complexity, Hamburg, Germany. ebrahim.ghorbani@tuhh.de †Hamburg University of Technology, Institute for Algorithms and Complexity, Hamburg, Germany. matthias.mnich@tuhh.de
1 Introduction
A stable matching instance, or simply an instance, consists of men and women, each having a strict ranking of all members of the other set. We call these rankings preferences. Equivalently, an instance is a complete bipartite graph with vertices in each class, where each vertex ranks the vertices in the opposite class. A matching is a bijection between the two sets. A man and a woman who are not matched with each other form a blocking pair if each prefers the other to their assigned partner. A matching is stable if it has no blocking pair.
Gale and Shapley [GS62] proved that every instance has a stable matching and gave an efficient algorithm to find one; see also the standard textbook by Gusfield and Irving [GI89, Chapter 1]. Since their introduction in 1962, stable matching models have found applications in college admissions [GS62] and the assignment of medical graduates to hospitals [Rot84]. Related matching models have also been used to organize kidney exchange [RSÜ04]. Galvin [Gal95] used the existence of stable matchings to resolve the Dinitz conjecture, which for many years was considered one of the widest-known open questions on list coloring.
Let be the number of stable matchings of an instance , and let be the maximum of over all instances with men and women. Determining is a long-standing problem, posed by Knuth in 1976 [Knu76]. Besides its interest as a counting problem, bounds on give bounds on the time needed to enumerate all stable matchings [Gus87]. Enumeration also solves optimization problems such as sex-equal stable marriage [Kat93] and balanced stable marriage [GRSZ21], by evaluating each stable matching and choosing the best one. Bounds on also give run time bounds for algorithms for the popular roommates problem [Kav25].
Lower bounds. A simple construction gives . Irving and Leather [IL86] improved this to when is a power of two. Thurber [Thu02] extended their construction to all , obtaining a lower bound of the form for an absolute constant .
Upper bounds. The immediate upper bound is , since there are only matchings. The problem of improving this bound was already raised by Knuth [Knu76] in 1976. In their by-now classic book on stable matchings, Gusfield and Irving [GI89, Section 1.3.2] list 12 open problems around stable marriage; one of these problems is to determine . Stathopoulos [Sta11] proved that for some constant . Drgas-Burchardt and Świtalski [DBŚ13] gave an upper bound of the form . The question of discovering was re-iterated in the fundamental book on algorithms of matching under preferences by Manlove [Man13, Section 2.2]. Despite considerable work on the problem, the first upper bound of the form , for an absolute constant , was only obtained in 2018, by Karlin, Oveis Gharan, and Weber [KOGW18]. Their argument gives for sufficiently large . The authors noted that their method does not give an exponential base close to the known lower bound of 2.28. Thus, they highlighted determining the precise asymptotic growth of as a challenging open problem [KOGW18, Section 5]. Further, Cechlárová, Cseh, and Manlove [CCM19, Section 3.2.1] explicitly list improving the known bounds on as an open problem in their survey. Palmer and Pálvölgyi [PP22] thereafter proved that .
Main contribution. Our main result gives the best upper bound on the number of stable matchings. By showing , we bring the exponential base close to the known lower bound of 2.28. More precisely, we bound in terms of the numbers of stable partners of the individual men and women. A stable partner is a partner occurring in at least one stable matching. As any instance has a stable matching, each man and woman has between one and stable partners.
Theorem 1. There is a sequence of positive numbers with such that the following holds. Let be an instance with men and women, and let and be the numbers of stable partners of man and woman , respectively. Then
In particular,
Consequences of Theorem 1. Beyond an object worthwhile being studied by itself, our improved upper bound on SM(n) has combinatorial and algorithmic consequences.
Combinatorially, first, the bound of Theorem 1 transfers to an upper bound on the number of stable assignments in the stable roommates problem, in which the graph of an instance I need not be bipartite as in the stable matching problem. Each person then ranks the other persons. As before, persons are matched in pairs, and such matching is stable if no two unmatched persons prefer each other over their current match. As observed by Karlin, Oveis Gharan and Weber [KOGW18], a standard reduction [DM10] can map to a stable matching instance with men and women, such that the stable roommate assignments are a subset of the stable matchings of . We thus get:
Corollary 1.1. Any stable roommates instance with persons and strict preferences has at most stable matchings.
Second, from we can derive an upper bound on the number pop() of so-called “popular matchings” of an instance . The notion of popular matchings dates back to Gärdenfors [Gär75] in 1975. A matching is popular if, for every other matching , one has . Any stable matching is popular, so pop() . Conversely, popular matchings of with men set and woman set can be mapped to stable matchings of an instance , via a construction by Cseh and Kavitha [CK18]. Instance has men and women . Each woman’s ranks all acceptable men first, in her original order, followed by the men in the same order. For each its preference list places first the original women in ’s list, followed by ; for start with and then the women in ’s list; for put before . There is a projection from the stable matchings of to the dominant matchings of , obtained by deleting the dummy edges and replacing by . Here, a popular matching is dominant if it is more popular than any (not necessarily popular) matching of larger cardinality; let be the number of dominant matchings. Cseh and Kavitha [CK18] show to be surjective, so every dominant matching of is the projection of some stable matching of . So . Every stable matching of projects to a popular matching of the complete instance; the projection is therefore perfect. And every dummy woman is matched in any stable matching of , otherwise would block, since is ’s top choice. Thus every stable matching of is perfect. We can complete the preference lists of by putting all previously unacceptable partners below every original acceptable partner, in arbitrary strict order. For the resulting instance , every stable matching of remains stable in : it is perfect and each new edge is worse at both endpoints than their current acceptable partners. Hence, . So . Defining as the maximum of over all instances with men and women shows , so Theorem 1 gives:
Corollary 1.2. Any popular matching instance with men and women has at most popular matchings.
Algorithmically, our bound on reduces the run time of Kavitha's algorithm [Kav25] for solving the popular roommates problem with strict preferences, from to . Further, for many practical applications of stable matchings the assumption of having complete preference lists for each man and each woman, is too strong, say for instance because of lack of information about all persons of the opposite sex. Other applications demand relaxations on the structure of preference lists, which lead to relaxations of the notion of stability. Among those, Miyazaki and Tamaki [MT26] consider the MAX-SMTI problem in which preference lists can be incomplete, and need not be strict but can contain ties. A partial matching is then a bijection between a subset of men and women. In their work, such a partial matching is called weakly stable if there is no edge in the bipartite men-women graph, such that either both are unmatched in (and thus can be added to to give a larger matching), or both are matched in but each prefers the other to their assigned partner. The objective in MAX-SMTI is to compute a weakly stable matching of maximum cardinality. They give an algorithm [MT26] to solve MAX-SMTI in time . Using our bound on from Theorem 1 within their algorithm, we thus improve its run time from as follows:
Corollary 1.3. For any instance with men and women, whose preference lists may be incomplete or contain ties, a maximum-cardinality weakly stable matching can be found in time .
Computing the number of stable matchings. Irving and Leather [IL86] proved that counting stable matchings exactly is #P-complete. For approximate counting, Dyer, Goldberg, Greenhill, and Jerrum [DGGJ04] established an equivalence with #BIS, the problem of counting independent sets in a bipartite graph. The reductions in both directions preserve the approximation. For the setting when all men have the same “master” preference list over all women (or vice-versa), Irving, Manlove and Scott [IMS08] showed how to find the unique stable matching greedily in linear time.
However, restrictions on preferences do not always make counting easier. Chebolu, Goldberg, and Martin [CGM12] proved the same equivalence with #BIS when preferences are determined by linear scores on three attributes, and when they are determined by Euclidean distances in two dimensions. These results use the representation of stable matchings as downsets of the rotation poset [IL86], which we also use in our proof.
Sampling stable matchings presents related difficulties. Bhatnagar, Greenberg, and Randall [BGR08] examined a natural Markov chain that moves along the edges of the stable matching lattice. They constructed instances for which its mixing time is exponential, even when rankings are determined by only two attributes. They obtained the same conclusion for the range-five model, where positions of any given man or woman across preference lists lie within five consecutive ranks. Their constructions also show that these restrictions allow exponentially many stable matchings.
The number of stable matchings in random instances. The choice of a probability model has a substantial effect on the number of stable matchings. For independent, uniformly random complete preference lists, Pittel [Pit89] proved that the expected number of stable matchings is asymptotic to . By Markov's inequality, the number of stable matchings is at most with probability tending to one. In particular, it is polynomial in with probability tending to one.
A common preference order can produce a different result. In the Mallows model [Mal57], the probability of a ranking is proportional to , where and counts inversions relative to a fixed reference order. Hoffman, Levy, and Mossel [HLM23] proved that, when preference lists are sampled independently from this model with a common reference order, the number of stable matchings is exponential in with probability tending to one, for each fixed . This work first appeared in Levy's thesis [Lev17].
The number of stable partners. Our bound also depends on the number of stable partners of each man and woman. For independent, uniformly random complete preferences, Knuth, Motwani, and Pittel [KMP90] showed that any fixed woman has stable partners with probability tending to one. The same statement holds for any fixed man by symmetry.
Short preference lists can greatly reduce the number of stable partners. Immorlica and Mahdian [IM05] allowed women to have arbitrary complete preference lists, while each man independently chooses a uniformly random list of k acceptable women. For fixed k, the expected number of women with more than one stable partner is bounded by a constant depending only on k.
Unequal numbers of men and women can have a similar effect even with complete lists. Ashlagi, Kanoria, and Leshno [AKL17] considered men and women with independent, uniformly random complete preferences. They proved that, with probability tending to one, all but a vanishing fraction of the men and women have a unique stable partner.
For broader treatments of stable matching, we refer to Roth and Sotomayor [RS90], Gusfield and Irving [GI89], Manlove [Man13], and Knuth [Knu97]. Roth [Rot15] discusses the design of matching markets and their practical uses.
1.2 Overview of the proof
Let be a stable matching instance. A rotation is a cyclic exchange of partners that changes one stable matching into another. Some rotations must happen before others; these requirements define a partial order on the rotations, giving the full rotation poset . Stable matchings correspond to the downsets of , cf. Irving and Leather [IL86], which are sets that are closed from below in . Write for the number of downsets of a poset .
Normalized instances. For the instance , we move each person's stable partners to the front of their preference list, preserving their relative order, and call the resulting instance the normalization of . We do this because our proof benefits from having the rotation order generated by shared participants, a property not assumed in the earlier exponential bounds of Karlin, Oveis Gharan, and Weber [KOGW18] and Palmer and Pálvölgyi [PP22]. This means that the order is determined by each person's sequence of rotations. For an arbitrary instance, these two orders need not coincide, but they coincide for normalized instances. Furthermore, every stable matching of remains stable in , and everyone's stable partners stay the same. Thus, . Working with normalized instances therefore allows us to assume that the entire order of is generated by shared participants.
The branching potential. Let be a family of finite posets containing . A nonnegative function on with is a branching potential if, for every nonempty , there exist
with such that and
Such a function gives the bound by induction on : The base case follows from , and the induction step gives
This is a direct induction on the branching recurrence; compare the measure-and-conquer method of Fomin, Grandoni, and Kratsch [FGK09].
Let be the family of rotation posets of normalized instances on the same men and women. We give each woman her partner's label in the man-optimal matching, whose existence and uniqueness follow from Gale and Shapley [GS62]. For a given , a person's degree is the number of rotations in containing them, which equals their number of stable partners minus one. Write for the degrees of the man and woman with label , respectively. Our goal is to find a branching potential on that depends on these degrees. For a given , the smaller posets are obtained by deleting certain rotations from . These smaller posets involve the same people, but each person may belong to fewer rotations. A bound depending only on would therefore not decrease. Instead, we give a person of degree a contribution , with . We choose to be increasing and bounded, with decreasing increments . When a person's degree drops from to , their weight drops by this increment. Thus, deleting one rotation gives a larger decrease when the person's degree is smaller. This allows small extra weights at large degrees while keeping larger decreases at small degrees.
We start with an unknown sequence , whose terms represent the increments , and define , and
where for . We choose the increments so that is a branching potential. Sufficient conditions for this are collected in Definition 4.1, where a sequence satisfying these conditions is called admissible.
Theorem 2. For every admissible sequence , the function is a branching potential on .
If an admissible sequence has finite sum , then . We construct such a sequence by solving a finite convex optimization problem that minimizes subject to conditions ensuring admissibility. We obtain the following result.
Theorem 3. There exists an admissible sequence such that .
Together, (2), Theorems 2 and 3 essentially prove Theorem 1, since
Our approach differs from those of Karlin, Oveis Gharan, and Weber [KOGW18] and Palmer and Pálvölgyi [PP22] in two ways. First, we use a somewhat different rotation poset, whose order is generated entirely by shared participants. Second, Karlin, Oveis Gharan, and Weber count downsets by choosing elements with many predecessors and successors, while Palmer and Pálvölgyi reveal downsets along the participant chains in random order. Our counting argument instead uses a potential depending on each person's degree to measure progress when rotations are deleted.
The main technical ingredient is Theorem 2. In the rest of this subsection, we outline its proof.
Branch losses. Let and . Let consist of and all its predecessors in , and let consist of and all its successors. Set and . The downsets of can be partitioned into those containing and those avoiding . This gives . We prove that and that, in , the degree of a person equals their degree in minus the number of deleted rotations involving . Set and , and put for . To show that is a branching potential, we need to verify (1). For this, we seek a rotation for which
Let be the active labels. The man and woman with label remain matched until their common first rotation . We prove that
(BC)
Then some satisfies , so gives the required rotation. We call the cost of label .
The proof plan is now more concrete: we first rewrite the right-hand side of (BC) as a sum of contributions from each person's rotations, and then show that these contributions cover the total cost of all labels.
Grouping rotations. We first estimate the right-hand side of (BC). The support of a rotation is
It records which initial pairs must have changed partners by the time is performed. After a person's rotation, they have had distinct partners, so the support of that rotation contains at least labels. Consider the potential for men alone, and write for the decrease in the men's potential when and all its successors are deleted. If , deleting also deletes . Fix a man , and let be his rotation. For each label , deleting removes and all later rotations involving . The decrease in 's contribution therefore includes . There are at least such labels , so this same increment appears in at least terms of the sum . This gives
where and collects the extra contributions from supports larger than . The same identity holds for women. We use these amounts to cover the costs on the left-hand side of (BC). We need to be finite so that stays bounded. We also need to grow fast enough to cover terms such as . For weights behaving like , the first requirement needs , while the second rules out . We choose , the largest possible exponent in this family. With this choice, the factor in the definition of makes each term behave like . Thus , while . Choosing therefore makes eventually exceed , giving the required comparison for large degrees.
Considering men and women together. To prove (BC), we use (3) to cover the total cost of all labels. We estimate the costs for men and women separately. For each person, we reserve together with part of their first two rotations' contributions to , and denote this amount by .
Roughly, these amounts cover the costs after we group labels according to their common first rotation. The main difficulty comes from the following situation.
Start from the man-optimal matching. Men and first exchange partners. Then men and exchange partners. This rotation is a swap (a rotation in which two men exchange partners). It is 's second rotation and 's first, and its support is . In this situation, we call exceptional. We estimate the costs of these three labels together. After the second swap, man is matched to woman . He has changed partners once, while she has changed partners twice. They either stay together or both participate in another rotation. Hence,
When we express the cost bounds in terms of the reserved amounts , the first case adds an extra on the men's side, while the second saves on the women's side. Since the cases occur together, these terms cancel when we combine the estimates.
Some costs may still remain uncovered when exceptional people change partners again. We examine their second and third rotations and the other people involved. Nobody can return to a previous partner, so only a limited number of changes are possible within a small set of people. Further changes must involve new labels and enlarge the supports, giving additional contributions to . If the people involved stop changing partners instead, their final degrees allow sharper cost bounds. We show that these additional contributions and sharper bounds cover the remaining costs, without using any contribution twice. This proves (BC) and gives a rotation suitable for the branching induction.
Organization. In Section 2 and Section 3, we reduce the problem of counting stable matchings to normalized instances and establish the required recurrence for downsets. In Section 4, we prove Theorem 1 assuming Theorems 2 and 3. In the same section, we show that Theorem 2 follows from the branching criterion (BC). We then prove this criterion: Section 5 reduces it to Proposition 5.8, which we prove in Section 6–Section 8. Finally, in Section 9, we construct the weights required by Theorem 3.
2 Stable partners and normalized instances
Throughout this section, fix an instance with men and women. For a matching , write for the woman matched to man , and for the man matched to woman .
We first recall facts about rotations and maximal chains that we will use. We then construct a new instance by moving each person's stable partners to the beginning of their preference list. We prove that and have the same stable partners and that every stable matching of is stable in .
2.1 Rotations and maximal chains
There is a stable matching in which every man receives his most preferred stable partner and every woman receives her least preferred stable partner. This is the man-optimal stable matching, denoted by . Similarly, the woman-optimal stable matching, denoted by , gives every woman her most preferred stable partner and every man his least preferred stable partner. These properties follow from the optimality theorem of Gale and Shapley [GS62, Theorem 2]; see also the work of Gusfield [Gus87, Section 2], and Cai and Thomas [CT19, Claim 2.1 and Corollary 2.3]. These two matchings are the minimum and maximum elements, respectively, of the order defined below.
The stable matchings form a poset under the relation when every man prefers his partner in to his partner in , or has the same partner in both. With this convention, men's partners become worse and women's partners become better as we move upwards. A stable matching covers if and there is no stable matching with .
For a stable matching and a man , scan 's preference list below and find the first woman who prefers to her partner under . Write ; if there is no such woman, leave undefined. We use the classic definition of a rotation by Gusfield [Gus87, Section 3.1]:
Definition 2.1. An ordered list
of distinct pairs of is a rotation exposed in if for every , with indices modulo . Its elimination replaces by and leaves all other pairs unchanged. The resulting matching is denoted . The length of is .
Eliminating a rotation makes a cyclic exchange of partners: each man receives , with indices taken modulo . The resulting matching is stable [Gus87, Theorem 6]. Eliminating an exposed rotation gives exactly a cover in the order on stable matchings, as stated in the following:
Lemma 2.2 ([Gus87, Theorem 6]; see also [CT19, Claim 4.2]). A stable matching covers if and only if for a rotation exposed in .
Let be the set of all rotations exposed in at least one stable matching of . In describing a rotation, the choice of starting pair is irrelevant. In fact, starting the list at another pair and keeping the same cyclic order describes the same rotation.
Proposition 2.3 ([Gus87, Theorems 2 and 6]; see also [CT19, Claims 4.3(2) and 4.5]). The following statements hold for the instance .
(i) Every maximal chain from to eliminates every rotation in exactly once. Consequently, all such chains have steps. Their orders of elimination may differ.
(ii) When a man participates in a rotation, his partner changes to the next woman in his list of stable partners, ordered from most to least preferred. When a woman participates, her partner changes to the next man in her list of stable partners, ordered from least to most preferred.
Fix a maximal chain of stable matchings of :
(MC)
Here, maximality means that no stable matching can be inserted between two consecutive matchings in the chain. Thus, covers and is obtained from it by eliminating an exposed rotation, denoted by . By Proposition 2.3, the list contains every element of exactly once, so . If there is only one stable matching, then , is empty, and .
Along (MC), each man starts with his best stable partner and ends with his worst. Each time his partner changes, he receives the next stable partner in his preference order. He therefore receives every stable partner, without skipping any. Each woman similarly receives all her stable partners, starting with her worst and ending with her best.
For a person , let be the number of their stable partners and let be the number of rotations in containing them. Since every such rotation is eliminated exactly once along the chain, and each changes their partner,
2.2 Normalized instance
Call an instance normalized if each person ranks all their stable partners before all their other partners. For a given instance , construct by moving each person's stable partners to the beginning of their preference list, preserving their relative order, and placing all remaining partners afterwards in their original relative order.
The next lemma constructs preference lists from a prescribed sequence of partner exchanges. If no man or woman returns to a previous partner, we can choose the preferences so that each exchange is a rotation elimination. We will use this construction to obtain normalized instances.
Lemma 2.4. Fix men and women, and let be perfect matchings between them. Suppose each matching is obtained from the preceding one by cyclically exchanging the partners of at least two men, and no man or woman returns to a partner after leaving them.
There exists a normalized instance in which is a maximal chain of stable matchings, with each prescribed exchange eliminating an exposed rotation. The stable pairs of are exactly the pairs appearing in these matchings.
Proof. For each man, rank his partners in the order in which he receives them in , from most to least preferred. For each woman, rank her partners in the reverse order, so that she prefers each new partner to her previous one. For every person, place all partners not encountered in the sequence after the encountered partners, in any order. These preference lists define the instance .
Consider a matching in the sequence. If a man prefers a woman to 's partner, she was his partner earlier in the sequence. Since their partnership ended, she has received a later partner, whom she prefers to him. Thus, no pair blocks .
At each step, a participating man's next partner is immediately below his current partner on his list. She prefers him to the man she leaves. Hence the specified exchange is an exposed rotation, and the step is a cover by Lemma 2.2. The first matching gives every man his first choice, and the last gives every woman her first choice. The sequence is therefore a maximal chain between the two optimal matchings. By Proposition 2.3, a maximal chain visits every stable partner, so the encountered pairs are exactly the stable pairs of this instance. This also proves normalization.
Proposition 2.5. Every stable matching of is stable in . The two instances have the same stable partners for every person, and every maximal chain of remains a maximal chain of with the same rotations. In particular, is normalized and .
Proof. Apply Lemma 2.4 to a fixed maximal chain of , keeping the original order of partners not encountered on the chain. Each person encounters all their stable partners, in preference order for men and reverse preference order for women. Thus the resulting lists are exactly those of . The lemma proves that is normalized, has the same stable partners as , and retains the chain with the same rotations. The same argument applies to every maximal chain of .
Every stable matching of belongs to a maximal chain of . Since that chain remains a maximal chain of , every stable matching of is stable in . Hence .
Since every stable matching of is also stable in , it suffices to bound the number of stable matchings of normalized instances. Moreover, and have the same stable partners for every person. Thus replacing by does not change any of the numbers appearing in Theorem 1.
3 The rotation poset and downsets
In this section, given an instance , we use the fixed maximal chain (MC) to define a partial order on . When is normalized, we show that the downsets of this poset are in bijection with the stable matchings of . We also show that deleting a downset or an upset of rotations leaves the rotation poset of another normalized instance, as needed for the induction.
Let be the rotations of , listed in the order in which they are eliminated along the fixed maximal chain (MC). Define a relation on by writing if , or if there are indices
such that and contain a common man for all . This relation is a partial order: it is reflexive and transitive by construction, and antisymmetric because every comparison between distinct rotations follows the increasing indices. We call it the shared-participant order. Let be the resulting poset. For each man , the rotations containing form a chain in , which we denote by . The rotations in are ordered by their elimination along (MC). The chains may overlap, because a rotation belongs to the chain of every man participating in it. All comparisons in follow from these chains by transitivity. For example, if precedes on , and precedes on , then , even if and have no man in common. More generally, for distinct rotations exactly when one can go from to through a sequence of rotations, with each consecutive pair appearing in that order on some man's chain. In this sense, the chains generate .
For each rotation , its participating men and their partners before and after elimination are specified by and , respectively. We label each woman by the man matched to her in .
An upset of is a subset such that and imply . For each , put
Thus contains and all rotations smaller than it, while contains and all rotations larger than it. The proper past of is , consisting of all rotations .
Whenever we delete elements from , we retain the same comparisons between the remaining elements; that is, we take the induced poset. A linear extension of is a list of all its elements, each appearing exactly once, in which appears before whenever and .
Remark. Karlin, Oveis Gharan, and Weber [KOGW18] and Palmer and Pálvölgyi [PP22] formulate their bounds using the full rotation order, denoted here by . For distinct rotations and , we write if every rotation elimination sequence starting from and containing eliminates before . We instead work with the shared-participant order , generated by the order of rotations along each man's chain. This description lets us track partner changes and construct the smaller instances needed for induction. For normalized instances, however, the two orders agree. We prove this below and then use the description through participant chains.
Let be the full rotation poset of .
Lemma 3.1 (Irving-Leather [IL86]). Let be a stable matching instance, and let be its full rotation poset. For every downset of , eliminating the rotations in from , in any order consistent with , gives a stable matching . The map is a bijection between the downsets of and the stable matchings of . In particular, .
3.1 Reordering rotations in one instance
We first show that, for normalized instances, the two orders and agree.
Lemma 3.2. If is normalized, then .
Proof. By Proposition 2.3, rotations involving the same man must follow his sequence of stable partners. Thus every comparison in also holds in .
Conversely, take any linear extension of . It can be obtained from by swapping adjacent incomparable rotations. At each swap, the two exchanges involve disjoint sets of men. They also involve disjoint sets of women: if a woman participated in both exchanges, her partner between them would be a man participating in both. Therefore the exchanges can be performed in either order, with the same matching after both.
These swaps preserve each man's and woman's sequence of partners. By Proposition 2.3, the original chain visits every stable partner, in preference order for men and reverse preference order for women. Since is normalized, the construction in Lemma 2.4, applied to the reordered history and keeping the original order of all remaining partners, gives exactly . Hence every linear extension of is a valid elimination order in . It follows that has no additional comparisons: otherwise, some linear extension of would reverse one of them. Thus .
Lemma 3.3. Suppose that is normalized.
(i) Every linear extension of gives a valid sequence of rotation eliminations from to . Each man and woman receives the same successive partners, in the same order, as along (MC).
(ii) For every downset of , there is such a sequence eliminating all rotations in before those outside .
Proof. By Lemma 3.2, . Thus every linear extension gives a valid elimination sequence by Lemma 3.1. The assertion about successive partners follows from Proposition 2.3.
For (ii), concatenate a linear extension of with a linear extension of . Since is a downset, this is a linear extension of , so (i) applies.
Recall that each woman is labelled by her partner in . The next lemma shows that every downset involves the same labels among men and women.
Lemma 3.4. Suppose that is normalized.
(i) For every pair matched in , either neither partner participates in any rotation, or both have the same first rotation.
(ii) For every downset of , the set of labels of the men participating in rotations of equals the set of labels of the women participating in rotations of .
Proof. For (i), let and be matched in . They remain matched until the first rotation involving either of them. That rotation must involve both, so their first rotations coincide. If neither participates, they remain matched throughout.
For (ii), since , the rotations involving any fixed man or woman form a chain in . Thus, a man or woman participates in a rotation of if and only if their first rotation belongs to .
By (i), the two partners in each initial pair therefore either both participate in rotations of or neither does. Since they have the same label, the two sets of labels are equal.
Proposition 3.5. If is normalized, then . For an arbitrary instance , let be its normalization. Then .
Proof. If is normalized, Lemma 3.2 gives , so the first assertion follows from Lemma 3.1. Applying this to and using Proposition 2.5 proves the second assertion.
3.2 Instances obtained by deleting downsets and upsets
We now prescribe that certain rotations have been eliminated and that certain others will not be eliminated. The next lemma realizes the remaining matchings as the stable matchings of another normalized instance. This ensures that the induction stays within the class of posets just described.
Lemma 3.6. Let be the rotation poset of a normalized instance . Let be a downset and an upset of , with , and put . There is a normalized instance on the same people whose rotation poset is the induced poset on . Each person's rotation chain consists of their retained rotations. The map
is a bijection from the downsets of to the downsets of that contain and avoid . Corresponding downsets give the same matching in and .
Proof. Choose a linear extension with first, next, and last. This is possible because is a downset and is an upset. By Lemma 3.3, it gives an elimination sequence with the same successive partners as the original chain. Retain the portion just after and just before . Apply Lemma 2.4 to this portion. It gives a normalized instance with precisely the retained rotations and partner changes.
The set is order-convex: if and , then would imply , while would imply . Thus . Consequently, every path of common-participant comparisons between retained rotations stays in . The retained chains therefore generate exactly the induced order on . By definition, this is the shared-participant order of . Since is normalized, Lemma 3.2 identifies it with the full rotation order of . Each person's degree is the number of their retained rotations.
For a downset of , every predecessor in of an element of lies in ; it cannot lie in , since is an upset. Hence is a downset of containing and avoiding . Conversely, deleting from any such downset gives a downset of . These maps are inverse. The initial matching of is the matching reached after , and the retained rotations make the same partner changes. Thus, corresponding downsets give the same matching.
Lemma 3.7. For every rotation ,
Both smaller posets are rotation posets of normalized instances on the same people, with degrees equal to their numbers of retained occurrences.
Proof. The recurrence holds for every finite poset: partition its downsets according to whether they contain ; see the work of Karlin, Oveis Gharan and Weber [KOGW18, Section 3]. Apply Lemma 3.6 with or , respectively, to obtain normalized instances whose rotation posets are and .
For the rest of the proof, is the rotation poset of a normalized instance, together with a fixed maximal chain and its cyclic partner changes. This convention includes every instance obtained by Lemma 3.6. Label each woman by her partner in the initial matching of the current chain. Write for the rotation in which receives the current partner of , with indices modulo ; when , this is a swap. The number of rotations containing a person is their degree. The word “new” means that a person has not yet occurred in the current chain. Each participation of a person in a rotation is called an “occurrence” of that person. Formally, an occurrence is a pair , where person participates in rotation . Its rank is the position of on that person's rotation chain. For example, if participates in rotations , in that order, then has three occurrences, of ranks 1, 2, 3, respectively. Two people participating in the same rotation give two distinct occurrences.
4 Building the branching potential
In this section, we define a function on the family of rotation posets of normalized instances on fixed sets of men and women. For each , we assign each man and woman a weight depending on their degree. The weights are determined by a fixed sequence . To ensure that is a branching potential, we impose certain conditions on . If its sum is finite, then , giving an upper bound of on the number of stable matchings. Thus we seek a sequence with a small sum that also satisfies the conditions needed for the branching argument. We collect these conditions below and call sequences satisfying them admissible. Their role will become clear as the proof proceeds. In Section 9, we construct an admissible sequence with , completing the proof of Theorem 1.
4.1 Admissible sequences
Let . Set , and
Also, for t > 0, define
Definition 4.1. A sequence is admissible if it satisfies the following five conditions, with and for :
(H1) .
(H2) for every .
(H3) for every and .
(H4) , , and .
(H5) and .
Fix sets of men and women. Let be the family of posets obtained from normalized instances on these people, each with its specified rotations and a chosen maximal chain. By Lemma 3.6, deleting a principal downset or a principal upset gives another member of . Fix an arbitrary admissible sequence , and for every define
As we proceed with the proof, we explain how conditions (H1)–(H5) ensure that is a branching potential.
We want the potential to be small, but to decrease enough when rotations are deleted. If the weights have finite sum , then and . When a person's degree falls from to , the value decreases by . Since is decreasing, this loss is larger for smaller degrees.
Let . To ensure is branching potential, we need, for some (see (7) below). For small , the value is approximately . Thus, if deleting causes only a small decrease in , deleting must cause a large decrease. The fact that partners never repeat helps us obtain the required decreases. Consider men and women separately. For each person who participates in a rotation, delete their first rotation and all its successors, and sum the resulting decreases in . We will show that a person's increment is counted at least times in this sum, because by their rotation they have had distinct partners; see Lemma 5.2.
Thus a person of degree contributes at least to the sum. We want the weights to have a finite sum, while grows fast enough to satisfy (H2). This suggests choosing : then is finite, whereas
Taking therefore makes grow faster than . In Section 9, we use
which satisfies and has the exact sum . We choose and the first 32 weights by finite convex optimization, ensuring that all admissibility conditions hold and that . Then
Hence eventually grows faster than , as needed for (H2). Moreover, , so the total weight is finite and easy to calculate.
We also record some properties of used below. It is decreasing and convex, since and . We will use
and
The latter follows by integrating from to .
4.2 Labels and branch losses
For each , let be the man-optimal matching of its associated instance. This is the initial matching of its chosen chain. Label each woman by her partner in ; thus the woman with label is . In an argument concerning men, the person with label means man ; in an argument concerning women, it means woman . These labels remain fixed as partners change. When we pass to a smaller poset , we use its own initial matching . First rotations, ranks, and women's labels are then defined anew.
Arguments that apply separately to men and women are written for men; the same arguments apply to women after interchanging the sexes. In these arguments, we omit and from the notation. For example, denotes the degree of the person with label , with the sex clear from the context. When we need to distinguish men from women, we write and . We use the same convention for the other quantities below.
For one sex, put
Write and . Then the potential defined above satisfies
All these potentials are nonnegative and vanish on an empty poset. In a smaller instance, degrees count the retained occurrences. Relabelling women does not change the sums, which depend only on the degrees of the same people. For a rotation , define the one-sex losses
The losses for are their averages:
Every loss is positive, since the deleted set contains . By Lemma 3.7, to prove that is a branching potential, it suffices to find, for every nonempty , a rotation such that
Rearranging and taking logarithm of both sides gives the equivalent inequality .
Active labels and first rotation . Call a label active if , and put
The equality follows from Lemma 3.4. The man and woman with active label have the same first rotation, denoted by . All these choices refer to the current poset . Unless an explicit range is given, subsequent sums over labels are over active labels . A degree-zero person has no first rotation and contributes zero to and to the sums of . Labels sharing the same first rotation are counted separately.
Proposition 4.2. For every admissible sequence and every nonempty ,
(BC)
We prove this proposition in Section 5.4. Before doing so, we show that it implies that is a branching potential, and then use this to prove the main theorem.
Proof of Theorem 2 assuming Proposition 4.2. Fix an admissible sequence and a nonempty . There is at least one active label. By Proposition 4.2, some satisfies
Thus satisfies (7). The downsets containing and avoiding are counted by and , respectively, by Lemma 3.7. Both residuals belong to by Lemma 3.6, and both have fewer rotations. Together with , these facts show that is a branching potential.
Proof of Theorem 1 assuming Theorems 2 and 3. By Theorem 3, choose an admissible sequence such that . Let be the normalized instance associated with , and let be its rotation poset. By Proposition 3.5, Theorem 2, and (2),
Normalization preserves every person's stable partners, so (4) gives
This proves the degree bound in Theorem 1. Since every degree is at most ,
Thus, . Since was arbitrary, .
5 Supports and costs
We now develop the estimates needed to prove (BC). We first calculate the sum of the losses by counting how often each weight appears. We then group labels with the same first rotation and estimate the corresponding terms . These estimates apply separately to men and women. They handle some groups directly and leave the remaining groups for the later sections.
5.1 Supports and deletion losses
For a rotation , define its support by
Write . These are exactly the labels participating in . Indeed, a person's first rotation precedes all their other rotations. The support is the same for men and women by Lemma 3.4, and supports increase along the partial order.
For one sex, list a person's rotations as in their order on that person's chain. Thus, is an occurrence of rank .
Lemma 5.1. Let be the rotation containing person . Then
Proof. We first consider a man and put . By Lemma 3.3 (ii), we may eliminate all rotations in before eliminating any other rotation. Every man participating in these rotations has a label in . Initially, the men with these labels are matched to the women with the same labels. Each rotation only redistributes their current partners among its participants. Thus, these men remain matched to exactly the women with labels in throughout the elimination. Exactly rotations in contain : they are his first rotations. Each gives him a new partner, and he never returns to an earlier partner. Including his initial partner, he therefore has distinct partners. All their labels belong to , so . The same argument applies to women: by Lemma 3.4, is also the set of labels of women participating in .
Define the support excess by
Every summand is nonnegative. We call the summand indexed by that occurrence's contribution to .
Lemma 5.2. For either sex,
The first occurrence of person v contributes to .
Proof. Fix one sex and a person , whose rotations are . For each , the upset intersects this chain in a suffix, possibly empty. Deleting this suffix decreases 's contribution by the sum of the corresponding weights . Hence,
Summing over v and interchanging the sums gives
The inner sum counts the labels in . The last equality follows from and (10). Finally, , so the first occurrence of contributes to .
5.2 First groups
For a rotation that is first for at least one person, put
We call a first group. Since for every , we have . The first groups partition .
Lemma 5.3. Let be a first group and put . Then, for either sex,
and
Proof. For each , the only rotation in containing is itself, since it is 's first rotation. Deleting therefore changes the term to , with . All other terms in cannot increase under deletion. Summing these up gives (12). Since is decreasing and convex,
Multiplying by k gives (13).
We next consider first groups of size one. Write , so is the first rotation of . Since every rotation has at least two participants, also contains someone who has participated earlier. That earlier rotation involves at least two labels and does not involve . Hence .
When , the first occurrence of contributes only to , compared with at least when . This smaller contribution is why groups with need separate treatment. The next lemma describes their structure exactly.
Lemma 5.4. Suppose and . Then , where is necessarily a swap, say , and is the first rotation of both and . Moreover, or . Each of can take part in at most one such swap with a new person, which must be their second rotation.
Proof. We describe the rotations using men. Write . Since is the first rotation of , no rotation strictly before contains . Every such rotation must therefore swap and . There is at least one earlier rotation, since is the only label whose first rotation is . There cannot be two, since both would swap and . The second swap would return them to their initial partners, which is impossible. Thus, , , and is the first rotation of both and .
After eliminating , the partners of have labels , respectively. If involved all three men, one of would receive his initial partner again. Hence, must be a swap: either or . This swap is the second rotation of the participant other than . Since each person has only one second rotation, each of can participate in at most one such swap with a person moving for the first time. The same argument applies with the sexes interchanged.
5.3 Costs of first groups
We call the cost of label . To prove (BC), we group the costs on its left-hand side according to the first groups. All labels in have first rotation , so their total cost is . We begin with one sex and omit sex indices. The corresponding cost of is . For the corresponding one-sex sum on the right-hand side of (BC), Lemma 5.2 gives . To relate the costs to the right-hand side, we will compare them with the degree terms and the support excess . Every statement in this section applies separately to each sex.
The three kinds of rotation. We classify rotations with according to and . Recall that consists of the labels whose first rotation is .
• An initial swap is a swap that is the first rotation of both participants. Thus, .
- An exceptional swap is a rotation with and . By Lemma 5.4, we may write after an initial swap . We call exceptional and its parent. We say that is associated with and with the initial swap .
• An ordinary rotation is a rotation with that is neither an initial swap nor an exceptional swap. Its first group and the people with labels in are also called ordinary.
Each parent has at most one associated exceptional person, because the exceptional swap must be the parent's second rotation. For an exceptional swap following , we call its association triple.
Lemma 5.5. The following holds for :
(i) If is exceptional and , then .
(ii) If participates in an initial swap, has no associated exceptional person, and , then .
(iii) If is ordinary with , then .
Proof. We describe the rotations using men. The same arguments apply for women.
For (i), let be exceptional. Write for its associated initial swap and for its first rotation. By Lemma 5.4, . After these two swaps, has had all three women with labels in , so he cannot participate again within these labels. The only remaining possible rotation is , but this would return to his initial partner. Thus, if , the rotation must have support containing at least one further label. Hence, .
For (ii), suppose participates in an initial swap and . By Lemma 5.1, . If equality holds, eliminate first. Write the initial swap as and the support as . If participates before , its first rotation must be , since 's next rotation is . The argument for (i) then rules out any further rotation using only these three labels, a contradiction. Thus first participates at , and . By Lemma 5.4, is an exceptional swap with parent . This contradicts the assumption that has no associated exceptional person. Therefore, .
For (iii), let be ordinary with . If , no earlier rotation is possible, since it would swap the same two people and would restore their initial partners. Hence, is an initial swap, contrary to being ordinary. Suppose instead that . If , then is an exceptional swap. If , the third label must have participated in an earlier rotation, since it is not in . But that rotation cannot involve either label in , leaving only one possible participant. This is impossible. Thus, .
For each active person , define as plus the portions of their first two occurrence terms in specified in Table 1. In the table, and is the size of 's first group. Here, equals 1 if the condition holds, and 0 otherwise.
| Person | Reserved amount |
|---|---|
| Ordinary, | |
| Ordinary, | |
| Exceptional | |
| Participant in an initial swap with an associated exceptional person | |
| Participant in an initial swap without an associated exceptional person |
Table 1: The amounts reserved for each person. The terms added to are taken from that person's first two occurrence terms in .
The terms involving are taken from the first occurrence term . An exceptional person has . An ordinary person has when , and when . Thus these first occurrence terms supply the amounts specified in the table. Whenever the table also reserves , the person has a second rotation whose support has size at least four, by Lemma 5.5. Their second occurrence term therefore supplies this amount.
Each reservation uses only that person's own terms. Consequently, the total amount left unreserved is
This includes all third and later occurrence terms, together with the unused parts of the first two. For each ordinary rotation , we will prove that covers its cost . For each initial swap, we will consider its two participants together with their associated exceptional people. We will bound how much their total cost can exceed the sum of their reserved amounts. Later sections will combine the two sexes and cover any remaining excess using and amounts left over from ordinary groups. This will establish (BC).
We now show that the reserved amounts cover the costs of ordinary groups. We first extend (H2) to degree one.
Lemma 5.6. Every admissible sequence satisfies
Proof. For , this is (H2). For , (H1) and give .
Lemma 5.7. For an ordinary rotation with , it holds
Proof. By (13), it suffices to show that for every . Fix and write . If , then
If k = 1, 2, then
In each case, the final expression is as defined in Table 1.
Define the unused amount of an ordinary group by
This is the part of its reserved amount that is left after its actual cost is covered.
Let be the set of initial swaps, and let be the set of ordinary rotations. For , let be the set of exceptional labels associated with . By Lemma 5.4, . Put
The first groups partition . For each initial swap , the set is the union of its first group and all exceptional first groups associated with . Each exceptional first group is associated with exactly one initial swap. The remaining first groups are those of ordinary rotations. Thus
is a partition of . For each , define
Thus is the total cost of the labels in minus the average of the reserved sums for men and women.
5.4 Proof of the branching criterion
The partition (17) reduces the branching criterion to the estimate in Proposition 5.8 below. For , let
be the unreserved occurrence surplus, as in (14).
Proposition 5.8. For every admissible sequence and every ,
Proof of Proposition 4.2 assuming Proposition 5.8. For an ordinary first group, convexity and the definition of its saving give
For an initial-swap block, its cost is its averaged reserved amount plus . Summing over the partition (17), and using Lemma 5.2, therefore yields
The last inequality is Proposition 5.8. This is precisely (BC).
The next three sections prove Proposition 5.8. We first bound each block's deficit, then retain the slack of low-degree parents and describe the matching constraints on four labels. The simultaneous allocation in Section 8 covers every remaining positive deficit without reusing contributions.
6 Costs of initial and exceptional swaps
We first bound how much the total cost of the labels in can exceed the average of their reserved amounts for men and women. For , define
We prove that . In Section 7, we improve this bound when a parent has small degree. Finally, in Section 8, we show that the amounts left unused by ordinary groups and by the first three occurrences are enough to cover every positive , without using any amount twice. This proves Proposition 5.8.
We first derive some consequences of admissibility that will be used in our arguments. For an exceptional label with , we will first bound , with as in Definition 4.1. Compared with the reserved amount , includes an additional when and an additional when . We will account for these additional amounts later.
For and , put
In fact, is the decrease in a degree- person's potential when their first two rotations are deleted. Define,
This supremum is finite. Indeed, for ,
by (H2); the term with is also finite. Deleting removes exactly one of their rotations, so their contribution to is . If the sum of the other people's contributions is at least , then . Since is decreasing,
This gives a bound that does not depend on . The function is decreasing and convex, since each function has these properties.
Condition (H3) gives for . The following lemma also gives bounds for , using only (H1) and (H2).
Lemma 6.1. Every admissible sequence satisfies the following:
(i) For every it holds .
(ii) .
Proof. Write and . By Lemma 5.6, for and . For , monotonicity and (H2) give
For c = 1, (H1) gives
Taking the supremum over gives , proving (ii). The case of (i) follows because and is decreasing. For , rearrange (H3) and take the supremum over .
We will use the following consequence of convexity. Since both and are decreasing, every convex function satisfies
Indeed, the two arguments on the left lie between the two arguments on the right and have the same sum. Applying convexity to each term and adding proves the inequality.
Lemma 6.2. For every initial swap A, it holds
Proof. Fix . For , let and be the degrees of its parent in the men's and women's descriptions, respectively. We first use the men's occurrence chains and omit the index . Write and . We prove
Since , we have . Convexity gives
If is associated with and , then , and therefore
The corresponding bound for an association with v has a, b interchanged. We also use
which follows from (15).
If , then (15) gives
This proves (20) in this case.
Suppose . We may assume that is associated with . Then
If , put and . Monotonicity of the weights and of , followed by Lemma 6.1 (i), gives
Since when , and otherwise, we have . Hence
If a = 2, Lemma 6.1 (ii) gives
Thus, in both cases,
This proves (20) when , since .
Finally, suppose , with one exceptional label associated with each parent. Applying (19) to and then using Lemma 6.1 (i) gives
Combining this with the bound for proves (20), since and .
The same argument applies to the women's occurrence chains, using their degrees and parents. Thus we have both the men's and women's versions of (20). For and , the definitions give
Substituting this identity and into the corresponding version of (20) gives
Fix . Interchanging if necessary, write after . After , man is matched with woman , and man is matched with woman . This is the first occurrence of man and woman , and the second occurrence of man and woman . Each pair remains matched until the next rotation involving either partner. Consequently,
Since and , these equivalences give
Thus, the terms in (21) cancel when the inequalities for men and women are added. By convexity,
Apply this to and each , and average (21) for and . Since the terms cancel, we obtain
7 Small supports and low-degree parents
We prove two facts needed in Section 8. For an initial swap with two associated exceptional labels, we show that if any of is at most three. We also examine partner changes among four labels. Since nobody can return to a previous partner, some pairs cannot change again without involving an additional label. We identify when this happens and show that the support must then grow. These facts help us cover the remaining positive values of .
The proofs use (H4) and (H5). Throughout this section, write , , and .
7.1 Retaining the slack of a parent
Put for , and define
Like , this is decreasing and convex, and . It is the appropriate bound when the exceptional people in one description all have degree at least two. For , define
These are the amounts left after the estimates in Lemma 6.2. Both are nonnegative by Lemma 6.1 (i), and because . By Lemma 6.1 (i), both quantities are nonnegative. They measure the part of a parent's degree contribution left over after the estimates in Lemma 6.2.
Lemma 7.1. Every admissible sequence satisfies , , and .
Proof. We first note two elementary comparisons:
For t > 0, we use the elementary bounds
Taking negative logarithms gives
where the second inequality also uses . Moreover, (H5) gives and . The inequality for therefore yields
For , the function is increasing on : its derivative is at least . Condition (H2) consequently gives
Since and , the first comparison in (22) proves . Similarly, and give , using . Finally, the term omitted from is
because , , and . Taking the maximum with the bound for proves the remaining assertion.
Lemma 7.2. Suppose . If , then
Proof. All four parent degrees are at least two. In one sex, with parent degrees , use if both exceptional degrees are at least two, and otherwise use . Applying (19) to gives
As in the two-association estimate of Lemma 6.2, this yields
When both exceptional degrees are at least two, we may use either or . We now substitute
For each exceptional swap, its degree-one indicators in the two sexes equal the opposite parent degree-two indicators, as proved in Lemma 6.2. Thus the terms cancel when the two inequalities are added. If of the four parent degrees equal two, exactly exceptional people, counting both sexes, have degree at least two. For each sex , let be the total amount retained for the two parents: set when using , and when using . By convexity of , averaging the estimates for men and women gives
If , use for both men and women. Lemma 7.1 makes the right-hand side at most . If , both exceptional degrees in the sex of that degree-two parent are at least two: the opposite sex has no degree-two parent. Use in that sex to obtain a saving of at least 3b, again making (24) nonpositive. Finally, if , use in both sexes. Any parent degree three then supplies at least 4b, which covers the entire first term. Positivity therefore forces all four degrees to be at least four.
7.2 When four labels cannot support a further change
Suppose a person's last rotation in has support and their current pair is fixed within . If their next rotation exists, then by monotonicity of supports. If , we can eliminate first and then the remaining rotations of the downset . This separates the pair at using only labels in , a contradiction. Hence strictly contains .
Call a current pair fixed within K if it cannot separate through such changes. This happens if one partner has already been matched to every possible partner in K. It also happens if all partners that person has not yet had belong to pairs already known to be fixed within K. We will use this reasoning repeatedly. If a person's last rotation in D has support K and their current pair is fixed within K, their next rotation must have support strictly containing K.
The labels involved in a downset form a union of whole first groups. Also, association triples belonging to different initial swaps are disjoint, since they lie in the disjoint sets . We use these facts to determine the possible fourth label in the following lemma.
Lemma 7.3. Let and be initial and exceptional swaps. Suppose the second rotation of has support , and put .
(i) If , man 's pair after is fixed within . Thus, stops or its second support has size at least five.
(ii) If is ordinary and , the matching after , in the order , has partner labels . All its pairs are fixed within , and each man's last occurrence in has support .
(iii) If is exceptional, it belongs to , , and . The pairs of after are fixed within . Moreover, if an ordinary label has first support of size four contained in , then stops or its second support has size at least five.
Proof. Eliminate first. The partner labels of are , and no further rotation on is possible. Woman , held by , has visited men .
If , she must move to y, exhausting her partners in K and fixing their pair. This proves (i).
If is ordinary and moves before , its first rotation omits and must contain ; otherwise it would be the exceptional swap . Man can receive only woman , so his pair is now fixed. At , man must receive woman , and woman must go to . The remaining partner of is woman . Man and woman have exhausted all partners in . Fixing their pairs also fixes 's pair and hence the remaining pair. The first rotation of follows on 's chain, so has support . After it, any rotation before must contain (it cannot use the fixed or the not-yet-moving ). Finally, must move at or after that first rotation, because his partner changes from to . All four last occurrences therefore have support .
If is exceptional, the union-of-first-groups observation forces its initial swap to be , with parent . After , the women held by are ; each can move within only to the other man. Thus , after which both women have visited every man in , fixing these pairs. For the final assertion, the first support of consists of and one of , say . The next rotations of require the missing label , so neither can move in this support. The first rotation of is consequently after . It exhausts 's partners, fixing their pair. Man then holds woman , whose only unvisited man in this support is the fixed . Thus 's pair is fixed as well.
We also record how this argument detects a first support of size five. If all pairs are fixed after a downset supported on four labels , and every man's last occurrence there has support , then any continuation with just one further label starts with of support . Indeed, the first further rotation must contain and an old participant whose preceding occurrence already has support . This first group is an ordinary singleton.
8 Covering the remaining costs
We now prove Proposition 5.8 by showing that the amounts left unused are enough to cover every positive . We first use contributions from first occurrences in ordinary groups whose supports have size at least five. For the remaining cases, we use amounts left over from ordinary groups and from second and third occurrences. We show that each amount is used at most once. Write and .
Lemma 8.1. Let be an ordinary rotation with . Let be the set of initial swaps having an association triple contained in . Then
For each sex, the right-hand side is available from the unreserved first-occurrence contributions of .
Proof. Put , , and . Choose one association triple contained in for each . These triples are disjoint and avoid , so . We claim that . For , this follows from and . For ,
which also proves the claim. By Lemma 6.2, every initial swap satisfies . Using from (H4), we obtain
For either sex, each person in contributes to at their first occurrence. The reservation table uses at most from this contribution. Thus the first occurrences of leave at least unreserved, as required.
Let be the set of initial swaps having an association triple contained in for some ordinary rotation with . Put , and define
For each , choose one such rotation . By Lemma 8.1, the unused first-occurrence contributions of each chosen group are enough to cover all amounts assigned to it, separately for men and women. Thus is covered without using any contribution twice.
We now consider the initial swaps in . For each , let be the set of labels whose first rotation is ordinary and whose support contains an association triple of . Since , each such support has size at most four. The association triple uses three labels outside , so the support has size exactly four and . The sets are disjoint for different : a support of size four cannot contain two disjoint association triples.
For each , consider one sex and define
Also set for , and when :
Put
Lemma 8.2. All quantities and are nonnegative. For either sex s,
Moreover, for each :
(i) if , or if and .
(ii) if the proper past of contains a degree-two person of the sex under consideration.
Proof. An exceptional person’s second support has size at least four, and their third support has size at least four by Lemma 5.1. Thus, . For , the first support has size four, so any second support also has size at least four. Since , this gives . We next check that these amounts are available. For an exceptional person , the unreserved part of the second occurrence is . The third occurrence contributes , none of which was reserved. These are exactly the terms in . Similarly, uses the ordinary group’s saving and the unreserved part of ’s second occurrence. The sets and are disjoint for different . Also, each forms an ordinary singleton group. Thus no occurrence contribution or ordinary saving is used twice. The amount uses only first occurrences of ordinary groups with support size at least five, so it uses none of the contributions just listed. This proves (25).
To prove (i), suppose first that . Then and , so
by (H4). If , the second term in is already at least b.
For (ii), write and . Deleting removes a rotation of the degree-two person, contributing at least , as well as 's first rotation, contributing . Hence . If , then , so . Using (H2), we obtain
If , then . To show that this exceeds 2b, define
The function is strictly convex. Since ,
Also, , so . Rearranging this inequality gives , completing the proof.
Lemma 8.3. If and , then for either sex
Proof. Fix one sex and suppress the corresponding superscript. By Lemma 8.2, all terms in are nonnegative. Since , any with already gives . We may therefore assume that for every . We use from (H4).
Case 1. Two exceptional people have a common second rotation of support four. Write , , and for the initial swap and its two exceptional swaps. By Lemma 7.3 (iii), the common second rotation is , with support . In particular, .
After , each of and is matched to a parent of the opposite sex for whom is the third rotation. If either or had no further rotation, that person's partner would also have no further rotation and would have degree three. This contradicts Lemma 7.2, since . Thus, both and have a third rotation. Their pairs after are fixed within by Lemma 7.3 (iii), so both third supports strictly contain .
If both third supports have size at least six, then , as required. Otherwise, one of the third rotations, say , has support for some . We show that .
Since , we have . The four labels in first occur at , , or , none of which contains . Hence , so is not an initial swap. If were exceptional, its associated initial swap would have to be : any other initial swap would require two labels in , which contains only . But each parent in already has an associated exceptional person. Thus, is ordinary. By Lemma 5.5 (iii), . Hence contains at least three labels of , including at least one of and . The first rotation of that exceptional label precedes , so its entire association triple lies in . If , this ordinary rotation would put in , contrary to . Thus and . The final assertion of Lemma 7.3 (iii) now gives either or . In either case, Lemma 8.2 (i) gives . Since both third supports have size at least five, . Therefore, .
Case 2. There is no common second rotation of support four. Consider any counted by , and let . By Lemma 5.5 (i), . If , its contribution to is at least b. We may therefore assume that .
Name the parents so that and , and write . Put . Since , we have . The labels first occur at or , neither of which contains . Thus, . If were exceptional, Lemma 7.3 (iii) would make a common second rotation of and , contrary to the assumption of this case. Hence is ordinary, and Lemma 5.5 (iii) gives . It follows that . In particular, contains the association triple , so .
If , then Lemma 7.3 (i) gives either or . Thus Lemma 8.2 (i) gives .
Suppose instead that . By Lemma 7.3 (ii), after eliminating all four pairs are fixed within , and the last rotation of each of the four people of the chosen sex has support . The proof of that lemma also gives . If , the proper past of would therefore contain the rotation of the degree-two person . By Lemma 8.2 (ii), this would give , contrary to our assumption.
Thus, has a third rotation . Since its pair after is fixed within , we have . Suppose , and write . Eliminate first within . By the observation following Lemma 7.3, the first subsequent rotation is the ordinary first rotation , with support . This support has size five and contains the association triple , which would put in . Hence , and its contribution to is at least .
We have obtained at least for each counted by , either from its own or from a term with . These terms are distinct. Indeed, if two distinct exceptional labels used the same , then would contain both association triples and as well as the ordinary label . This would require five labels in a support of size four. Summing over the exceptional people gives .
Proof of Proposition 5.8. Let . If , then , since . If , Lemmas 6.2 and 8.3 give
Thus this bound holds for every . By the definition of we have . Since and partition , summing gives
Finally, averaging (25) for men and women gives
Combining these inequalities proves the proposition.
9 Finding the weights by finite optimization
We have proved that every admissible sequence makes a branching potential. It remains to construct one that also satisfies . In this section, we reduce this task to a finite convex optimization problem. We then give one feasible solution which serves as explicit weights and verify that they satisfy all the required inequalities, completing the proof of Theorem 3.
9.1 A finite prefix and a telescoping tail
As explained in Section 4, the support identity suggests as . For ease of computation, choose an integer and set
We leave and C unknown. This choice gives an exact formula for the total sum:
We do not assume that every admissible sequence, or an optimal one, must have the tail (26). We next construct an admissible sequence of this form. As discussed before, we choose so that grows faster than for large . For the estimates below, we impose the slightly stronger linear restriction
We still choose in the optimization, subject to this bound. The bound ensures that the comparisons below hold for all large degrees, without needing to know the values of in advance.
Lemma 9.1. Suppose that (26) and (28) hold. For every ,
Moreover, is strictly increasing for .
Proof. For , we have and . Only the increment of is needed:
Since , (28) implies
For , (6) gives
As , the expression decreases for . This proves the maximum formula. Applying the same comparison to proves that increases there as well.
9.2 The finite convex problem
Choose integers and . The unknowns are ; every later is given by (26). In particular, all and appearing below are affine functions of these unknowns. Consider the following finite problem:
(P)
The first two rows make the entire sequence positive and decreasing. The final row is a uniform bound for degrees beyond . Its value is imposed as a constraint in the optimization; we do not know in advance.
The objective is linear. Conditions not involving are linear. Every other inequality is a sum of convex functions of affine arguments bounded above by an affine function. Thus (P) is a convex optimization problem. Its constraints contain no prescribed exponential base: a feasible objective value yields the base for our exponential upper bound.
Proposition 9.2. Every feasible solution of (P), extended by (26), gives an admissible sequence with finite sum . Consequently, .
Proof. Fix finite integers and , and assume that (P) has a feasible solution. Extend its weights using (26). The resulting weights are positive and decreasing, and satisfy (H1), (H4), and (H5), by the finite constraints. Their sum is finite by (27). For (H2), the finite comparisons give up to , and Lemma 9.1 extends this inequality to every larger .
For (H3), put . For , the finite constraints give for ; Lemma 9.1 extends this to all . The last row of (P) says that
For and any , monotonicity of and Lemma 9.1 therefore give
This is (H3). By Theorem 2, is a branching potential. Hence (2) gives . Since , we obtain .
9.3 The computed sequence
By Proposition 9.2, we may choose any integers and , provided that we find a feasible solution of (P). The parameter determines how many weights we choose independently
| 1 | 346573640280 | 9 | 19459568288 | 17 | 6773799446 | 25 | 3246293563 |
| 2 | 156726247027 | 10 | 16264151541 | 18 | 6096070881 | 26 | 3011434741 |
| 3 | 99061162159 | 11 | 14149746663 | 19 | 5509913479 | 27 | 2799883120 |
| 4 | 68322728671 | 12 | 12347392810 | 20 | 5000447702 | 28 | 2608984251 |
| 5 | 49770893583 | 13 | 10836070115 | 21 | 4555520046 | 29 | 2436248177 |
| 6 | 37763080994 | 14 | 9561451451 | 22 | 4165164703 | 30 | 2279535656 |
| 7 | 29565950277 | 15 | 8481331264 | 23 | 3821175296 | 31 | 2136999249 |
| 8 | 23740554322 | 16 | 7561379311 | 24 | 3516764526 | 32 | 2007039302 |
Table 2: The first 32 weights found by optimization and rounding. Each listed integer equals .
before using (26). The parameter determines how many degrees we check individually before applying the final uniform bound. Increasing these parameters allows more flexibility, but also requires more computation. We use and . These values give a feasible solution with , as certified below, while keeping the computation small: there are only 33 unknowns, namely and . In particular, the last constraint of (P) holds with . We only need one feasible solution giving the desired bound; the parameters need not be optimal. We minimize numerically, allowing small positive margins in the constraints. We then round the values to a fixed number of decimal places and check all constraints exactly, using fractions and rigorous upper and lower bounds for exponentials. The resulting feasible solution has
and the first 32 weights listed in Table 2. These values and (26) specify the complete sequence. Its total weight is
The values of and are exact.
Proof of Theorem 3. By direct computation (using verify_weights.py, linked in Footnote 1), we verify that the sequence specified by Table 2, (26), and (30) is admissible and satisfies
The program checks the following inequalities:
-
positivity and monotonicity of the prefix and its junction with , together with (28);
-
conditions (H1), (H4), and (H5);
-
for ;
-
for and ;
-
for .
The weights were found and verified using the Python scripts find_weights.py and verify_weights.py, respectively, available at https://github.com/ebrahim-ghorbani/stable-matching. The first finds candidate weights using SLSQP with explicit derivatives; the second verifies the stated weights using exact rational arithmetic and certified bounds for exponentials.
All comparisons use exact rational arithmetic and rigorous upper and lower bounds for exponentials. For instance, an inequality is checked in the equivalent form
Proposition 9.2 therefore proves admissibility for all degrees, including those beyond the finite checked ranges.
We obtain the exact value of in (31) by adding the first 32 weights in Table 2 and , which is the sum of all remaining weights. The same certified bounds for exponentials give , which is equivalent to .
Exact feasibility is the numerical input needed by the proof. We make no claim that the candidate is an exact optimizer of (P); proving optimality is unnecessary for the upper bound.
Acknowledgments. The second author sincerely thanks Ildikó Schlotter for introducing the problem, and for discussions substantiating the entropy-based approach of Palmer and Pálvölgyi.
References
[AKL17] I. Ashlagi, Y. Kanoria, and J. D. Leshno. Unbalanced random matching markets: The stark effect of competition. Journal of Political Economy, 125(1):69–98, 2017.
[BGR08] N. Bhatnagar, S. Greenberg, and D. Randall. Sampling stable marriages: Why spouse-swapping won’t work. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2008), pages 1223–1232, 2008.
[CCM19] K. Cechlárová, Á. Cseh, and D. F. Manlove. Selected open problems in matching under preferences. Bulletin of the European Association for Theoretical Computer Science, (128), 2019.
[CGM12] P. Chebolu, L. A. Goldberg, and R. Martin. The complexity of approximately counting stable matchings. Theoretical Computer Science, 437:35–68, 2012.
[CK18] Ágnes Cseh and Telikepalli Kavitha. Popular edges and dominant matchings. Mathematical Programming, 172(1):209–229, 2018.
[CT19] L. Cai and C. Thomas. Representing all stable matchings by walking a maximal chain. Technical report, 2019. https://arxiv.org/abs/1910.04401v1.
[DBŠ13] E. Drgas-Burchardt and Z. Šwitalski. A number of stable matchings in models of the Gale–Shapley type. Discrete Applied Mathematics, 161(18):2932–2936, 2013.
[DGGJ04] M. Dyer, L. A. Goldberg, C. Greenhill, and M. Jerrum. The relative complexity of approximate counting problems. Algorithmica, 38(3):471–500, 2004.
[DM10] Brian C. Dean and Siddharth Munshi. Faster algorithms for stable allocation problems. Algorithmica, 58(1):59–81, 2010.
[FGK09] F. V. Fomin, F. Grandoni, and D. Kratsch. A measure & conquer approach for the analysis of exact algorithms. Journal of the ACM, 56(5):25:1–25:32, 2009.
[Gal95] F. Galvin. The list chromatic index of a bipartite multigraph. Journal of Combinatorial Theory, Series B, 63(1):153–158, 1995.
[Gär75] Peter Gärdenfors. Match making: assignments based on bilateral preferences. Behavioral Science, 20(3):166–173, 1975.
[GI89] D. Gusfield and R. W. Irving. The Stable Marriage Problem: Structure and Algorithms. MIT Press, Cambridge, MA, 1989.
[GRSZ21] S. Gupta, S. Roy, S. Saurabh, and M. Zehavi. Balanced stable marriage: How close is close enough? Theoretical Computer Science, 883:19–43, 2021.
[GS62] D. Gale and L. S. Shapley. College admissions and the stability of marriage. The American Mathematical Monthly, 69(1):9–15, 1962.
[Gus87] D. Gusfield. Three fast algorithms for four problems in stable marriage. SIAM Journal on Computing, 16(1):111–128, 1987.
[HLM23] C. Hoffman, A. Levy, and E. Mossel. Stable matchings with correlated preferences. Technical report, 2023. https://arxiv.org/abs/2312.14813.
[IL86] Robert W. Irving and P. Leather. The complexity of counting stable marriages. SIAM Journal on Computing, 15(3):655–667, 1986.
[IM05] N. Immorlica and M. Mahdian. Marriage, honesty, and stability. In Proceedings of the Sixteenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA 2005), pages 53–62, 2005.
[IMS08] Robert W. Irving, David F. Manlove, and Sandy Scott. The stable marriage problem with master preference lists. Discrete Applied Mathematics, 156(15):2959–2977, 2008.
[Kat93] A. Kato. Complexity of the sex-equal stable marriage problem. Japan Journal of Industrial and Applied Mathematics, 10(1):1–19, 1993.
[Kav25] Telikepalli Kavitha. Popular roommates in simply exponential time. Algorithmica, 87(2):292–320, 2025.
[KMP90] D. E. Knuth, R. Motwani, and B. Pittel. Stable husbands. Random Structures & Algorithms, 1(1):1–14, 1990.
[Knu76] D. E. Knuth. Mariages stables et leurs relations avec d'autres problèmes combinatoires. Les Presses de l'Université de Montréal, Montréal, 1976.
[Knu97] D. E. Knuth. Stable Marriage and Its Relation to Other Combinatorial Problems: An Introduction to the Mathematical Analysis of Algorithms, volume 10 of CRM Proceedings & Lecture Notes. American Mathematical Society, Providence, RI, 1997.
[KOGW18] A. R. Karlin, S. Oveis Gharan, and R. Weber. A simply exponential upper bound on the maximum number of stable matchings. In Proceedings of the 50th Annual ACM SIGACT Symposium on Theory of Computing (STOC 2018), pages 920–925, 2018.
[Lev17] A. Levy. Novel uses of the Mallows model in coloring and matching. PhD thesis, University of Washington, 2017.
[Mal57] C. L. Mallows. Non-null ranking models. I. Biometrika, 44(1-2):114-130, 1957.
[Man13] D. F. Manlove. Algorithms of Matching Under Preferences, volume 2 of Series on Theoretical Computer Science. World Scientific, 2013.
[MT26] Shuichi Miyazaki and Suguru Tamaki. A single-exponential time algorithm for the maximum-cardinality weakly stable matching problem with ties and incomplete lists. Technical report, 2026. https://arxiv.org/abs/2610.39764.
[Pit89] B. Pittel. The average number of stable matchings. SIAM Journal on Discrete Mathematics, 2(4):530-549, 1989.
[PP22] C. Palmer and D. Pálvölgyi. At most stable matchings. In 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS), pages 217-227. IEEE, 2022.
[Rot84] A. E. Roth. The evolution of the labor market for medical interns and residents: A case study in game theory. Journal of Political Economy, 92(6):991-1016, 1984.
[Rot15] A. E. Roth. Who Gets What—and Why: The New Economics of Matchmaking and Market Design. Houghton Mifflin Harcourt, 2015.
[RS90] A. E. Roth and M. A. O. Sotomayor. Two-Sided Matching: A Study in Game-Theoretic Modeling and Analysis, volume 18 of Econometric Society Monographs. Cambridge University Press, 1990.
[RSÜ04] A. E. Roth, T. Sönmez, and M. U. Ünver. Kidney exchange. The Quarterly Journal of Economics, 119(2):457–488, 2004.
[Sta11] G. Stathopoulos. Variants of stable marriage: Algorithms, complexity and structural properties. Master's thesis, University of Athens, 2011.
[Thu02] E. G. Thurber. Concerning the maximum number of stable matchings in the stable marriage problem. Discrete Mathematics, 248(1-3):195–219, 2002.