Discrete Mathematics 343 (2020) 111804
Contents lists available at ScienceDirect
Discrete Mathematics journal homepage: www.elsevier.com/locate/disc
The diameter of the stable marriage polytope: Bounding from below Pavlos Eirinakis a , Dimitrios Magos b , Ioannis Mourtos c a
Department of Industrial Management & Technology, University of Piraeus, 80 Karaoli & Dimitriou Str., 18534 Piraeus, Greece Department of Informatics and Computer Engineering, University of West Attica, Ag. Spyridonos Str., 12210 Egaleo, Greece Department of Management Science & Technology, Athens University of Economics and Business, 76 Patission Ave., 10434 Athens, Greece b c
article
info
Article history: Received 28 May 2018 Received in revised form 23 October 2019 Accepted 23 December 2019 Available online xxxx Keywords: Stable matching Stable marriage Rotation poset Polytope Diameter
a b s t r a c t An upper bound on the diameter of the Stable Matching (Stable Marriage) polytope is known to be ⌊ 2n ⌋ where n is the number of men (or women) involved in the matching. The current work complements that result by providing a lower bound and an algorithm computing it. It also presents a class of Stable Matching instances for which the lower bound coincides with the above-mentioned upper bound. © 2019 Elsevier B.V. All rights reserved.
1. Preliminaries Stable Marriage (SM) [10] is one of the most widely-studied variants of Bipartite Matching, with several important applications (a recent account can be found in [17]). SM and its variants have been studied for decades in Combinatorics, Computer Science, Mathematical Economics and Social Behaviour [10,12,15,17]. The problem assumes that each man m ∈ M has strict and transitive preferences over women, representable by a preference list P(m) that includes women from the set W in the order of preference of m; w >m w ′ denotes that m prefers w over w ′ . Analogous definitions and notation apply for a woman w ∈ W . Assume, without loss of generality, that w appears in P(m) if and only if m appears in P(w ) (in such a case (m, w ) is called acceptable). A stable matching µ is a matching of men to women with the property that there is no pair (m, w ) ∈ / µ such that w >m µ(m) and m >w µ(w), where µ(m) (µ(w)) denote the mate of m (w) in µ. The set of stable matchings S is always non-empty [10]. If a pair (m, w ) ∈ µ for some µ ∈ S, then it is called stable; otherwise, non-stable. Man m prefers µ ∈ S at least as much as µ′ ∈ S (denoted as µ ≥m µ′ ) if either µ(m) = µ′ (m) or µ(m) >m µ′ (m). Moreover, for µ, µ′ ∈ S, we say that µ dominates µ′ (and write µ >M µ′ ) if µ ̸ = µ′ and µ ≥m µ′ for all m ∈ M (analogous orderings hold for women). Note that, unlike ‘≥m ’ which imposes a total order over S, ‘>M ’ imposes a partial such order. In fact, L = (S , >M ) forms a distributive lattice [15] (and vice versa [4]) with µ ∨ µ′ representing the join of µ and µ′ , and µ ∧ µ′ their meet. Both these operations result in stable matchings; µ ∨ µ′ (µ ∧ µ′ ) matches each man m to the most (least) preferable between women µ(w ) and µ′ (w ) (and vice versa for women). The greatest element of L corresponds to the man-optimal (and woman-pessimal) stable matching µ0 , where every man is at least as better-off as under any other µ ∈ S ; the least element corresponds to the man-pessimal (and woman-optimal) stable matching µz E-mail addresses:
[email protected] (P. Eirinakis),
[email protected] (D. Magos),
[email protected] (I. Mourtos). https://doi.org/10.1016/j.disc.2019.111804 0012-365X/© 2019 Elsevier B.V. All rights reserved.
2
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
(conventionally, z = |S | − 1), where every woman is no better-off than under any other µ ∈ S. Hence, we call any (m, w ) ∈ µ0 as man-optimal and any (m, w ) ∈ µz as woman-optimal. The stable marriage polytope PS is the convex hull of the incidence vectors of all matchings in S, i.e., all stable matchings correspond to vertices of PS and vice versa. Two vertices of PS are called neighbours if forming a face of dimension 1. Any ′ ′ two non-neighbouring vertices xµ and xµ are said to have a connecting path xµ , x1 , . . . , xl , xµ if any two consecutive vertices in the sequence are neighbours; the length of the path is l + 1 and the minimum length (over all such paths) is the distance of µ and µ′ , denoted as d(µ, µ′ ). Then, the diameter of PS is defined as diam(PS ) = max{d(µ, µ′ ) : µ, µ′ ∈ S }. Although PS received considerable attention in previous decades (see [9,19,23] and references therein), its dimension and minimal description was only recently established [8], after exploiting the properties of a graphical representation of SM, namely the rotation-poset graph [11]. By exploiting the properties of an alternative such representation, namely the marriage graph [3,19], an upper bound on diam(PS ) was obtained [7]. In this paper, we provide a lower bound for diam(PS ) and an O(n2 ) algorithm computing it, where n = max{|M | , |W |}, by establishing a bijective relation between these two representations. A class of SM instances attaining this bound is also presented thus establishing its tightness. The diameter of a polytope is one of its primal attributes. Thus, for polytopes associated with fundamental problems such as the stable marriage problem, we consider diameter-related results as important on their own. Within an optimization framework, it is not yet known how to fully exploit the information conveyed by this attribute. Still, along the optimization line-of-research, the diameter provides some knowledge as it yields a lower bound on the number of iterations of the simplex method in the worst case. Our work adds to the literature on the diameter of polytopes of combinatorial problems and specifically of polytopes related to matching. In particular, the diameter is shown to be equal to the maximum size of the matching for the matching polytope [21, Corollary 25.3a] and the b-matching polytope [13]. On the negative side, in [20] it is shown that the problem of computing the diameter of the fractional matching polytope is strongly NP-hard. Results on the diameter of related (to matching) polytopes include the constant upper bound of two for the assignment polytope and the travelling salesman polytope [18], the linear bound on the diameter of the transportation polytope given in [5] or the quadratic bound on the diameter of the 3-way transportation polytope [6]. We also consider the bijective relation interesting on its own and of potential value for other SM variants admitting both graphical representations, e.g., the many-to-many stable matching [1] or the stable allocation problem [2]. That is, one could probably utilize the results presented here to obtain analogous diameter-related results for the associated polytopes or address open questions on those variants, e.g., a linear representation of the stable allocations polytope. The remaining parts of the paper are Section 2 that recalls properties of the marriage graph, Section 3 that establishes the lower bound, Section 4 that shows the bijective relation and Section 5 that computes the bound and presents a class of instances for which the lower bound coincides with the upper bound and thus with diam(PS ). 2. The marriage graph The marriage graph has been introduced in [16] and extensively used in [3,19]. Nodes in this graph correspond to acceptable pairs, while arcs represent the preferences of men and women. A formal definition follows. Definition 1. The directed marriage graph Γ (VΓ , AΓ ) has VΓ = {(m, w ) ∈ M × W : (m, w ) is acceptable} as node set and AΓ = {((m, w ), (m′ , w ′ )) : m′ = m and w ′ >m w or w ′ = w and m′ >w m} as arc set. We interchangeably use the terms ‘pair’ and ‘node’ when referring to some (m, w ) ∈ VΓ . Hence, a node of VΓ is (non-)stable if the corresponding pair is (non-)stable, while it is man-optimal (woman-optimal) if it corresponds to a pair which is optimal for the man (woman) participating in it. Stable matchings are in one-to-one correspondence with kernels in Γ [16], where a kernel is a set of pairwise nonconnected nodes VΓ′ ⊆ VΓ such that there is an arc from any node in VΓ \ VΓ′ to some node in VΓ′ . Two marriage graphs are called equivalent if having the same set of kernels and hence the same set of stable matchings. Balinski and Ratier [3] use the reduction algorithm to delete from VΓ some non-stable nodes along with their incident edges, thus yielding the reduced marriage graph Γ ∗ that is equivalent to Γ . Definition 2 ([19, Definition 9]). A subgraph C of the marriage graph Γ is a principal circuit of Γ if and only if it satisfies the following conditions: (i) If C has an edge which represents a preference of an individual, all the edges representing the preferences of this individual are edges of C . (ii) If the edges implied by the transitivity of the orders ‘>m ’ and the orders ‘>w ’ are dropped, then C is a circuit.
Γ ∗ is edge-decomposable into (principal) circuits [19, Lemma 3] hence each component of Γ ∗ is strongly connected. As usual, a component is called trivial if having a single node and non-trivial otherwise. Let I be the set indexing the non-trivial (strongly connected) components of Γ ∗ ; thus, Γi∗ , i ∈ I, denotes such a non-trivial component of Γ ∗ . A trivial
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
3
Fig. 1. Γ ∗ (Example 1).
component of Γ ∗ corresponds to a node that is both man-optimal and woman-optimal [12, Theorem 2.5.6] (thus appearing )
in all kernels of Γ ∗ ; the set of such fixed nodes is denoted as Vf = µ0 ∩ µz . It easily follows that VΓ ∗ = ∪i∈I VΓ ∗ i
∪ Vf
and AΓ ∗ = ∪i∈I AΓ ∗ . i
Definition 3 ([19, Definition 11]). For µ, µ′ ∈ S, Γ ∗ (µ, µ′ ) is the subgraph of Γ ∗ induced by the node set {(m, w ) : (µ ∨ µ′ )(m) ≥ m w ≥m (µ ∧ µ′ )(m) and (µ ∧ µ′ )(w ) ≥w m ≥w (µ ∨ µ′ )(w )}. It is easy to see that Γ ∗ (µ, µ′ ) = Γ ∗ (µ∨µ′ , µ∧µ′ ), while by [19, Lemma 6], the kernels of Γ ∗ (µ, µ′ ) are in one-to-one correspondence with the matchings in the set S(µ, µ′ ) = {µ∗ ∈ S : (µ ∨ µ′ ) ≥M µ∗ ≥M (µ ∧ µ′ )}. For simplicity, we say that Γ ∗ (µ, µ′ ) contains the matchings in S(µ, µ′ ); hence Γ ∗ = Γ ∗ (µ0 , µz ) contains the matchings in S = S(µ0 , µz ). Γ ∗ (µ, µ′ ) may not be connected and some of its components may be trivial; in fact, a trivial component of Γ ∗ (µ, µ′ ) corresponds to a pair that appears in all matchings in S(µ, µ′ ). We denote by I(µ, µ′ ) the set⏐indexing ⏐ the non-trivial components of Γ ∗ (µ, µ′ ). It will later become apparent that there is no formal relation between ⏐I(µ, µ′ )⏐ and |I |. Two stable matchings µ, µ′ ∈ S are called comparable, if either µ >M µ′ or µ′ >M µ, and incomparable otherwise. The relevance of Γ ∗ (µ, µ′ ) to d(µ, µ′ ) stems from the following statement. Proposition 4 ([19, Corollary 1]).For µ, µ′ ∈ S , vertices xµ and xµ are neighbours if and only if µ and µ′ are comparable and Γ ∗ (µ, µ′ ) has exactly one non-trivial component. ′
We occasionally refer to matchings that induce neighbouring vertices as neighbouring matchings. Example 1. We make use of [8, Example 1]; the corresponding graph Γ ∗ is provided in Fig. 1. The graphs Γ ∗ (µ1 , µ5 ) and Γ ∗ (µ4 , µ5 ) are depicted in Fig. 2, where arcs implied by the transitivity of the ‘>m ’ or the ‘>w ’ relation are omitted. Apparently, |I(µ1 , µ5 )| = 1 = |I | < 2 = |I(µ4 , µ5 )|. By Proposition 4, since µ1 >M µ5 and Γ ∗ (µ1 , µ5 ) has one non-trivial component (Fig. 2i), µ1 , µ5 are neighbouring matchings. Thus d(µ1 , µ5 ) = 1. On the other hand, since Γ ∗ (µ4 , µ5 ) has more than one non-trivial component (and µ4 , µ5 are incomparable), Proposition 4 yields that the vertices xµ4 and xµ5 are not neighbours implying that d(µ4 , µ5 ) ≥ 2. Remark 5 ([19, Section 3]). Each non-trivial component of Γ ∗ defines a stable matching subproblem (submarket), and the submarkets defined by different components are independent in the sense that the subsets of men and women participating in these submarkets are disjoint. For i ∈ I, the restriction of µ ∈ S to Γi∗ is defined as µ|Γ ∗ = {(m, w ) ∈ VΓ ∗ ∩ µ}. i
i
Lemma 6 ([19, Lemma 7]). µ is a stable matching in Γ ∗ if and only if µ|Γ ∗ is stable in Γi∗ for all i ∈ I. i
Hence, by putting together a solution (stable matching) for each (sub)problem defined by the corresponding Γi∗ and ( )
then adding the pairs in Vf , we get a stable matching µ ∈ S. Formally, µ = ∪i∈I µ|Γ ∗ ∪ Vf for any µ ∈ S. We sometimes refer to µ|Γ ∗ as a stable (sub)matching. i
i
4
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
Fig. 2. (i) Γ ∗ (µ1 , µ5 ) and (ii) Γ ∗ (µ4 , µ5 ) (Example 1).
For µ, µ′ ∈ S, as Γi∗ (i ∈ I) is by itself an independent subproblem and µ|Γ ∗ and µ′|Γ ∗ are stable matchings of that i
i
subproblem (Lemma 6), Definition 3 gives rise to the subgraph Γi∗ (µ|Γ ∗ , µ′|Γ ∗ ) (having Γi∗ in the role of Γ ∗ ). Again, i
i
Γi∗ (µ|Γi∗ , µ′|Γ ∗ ) may consist of more than one connected components some of which may be trivial; a trivial component i of Γi∗ (µ|Γ ∗ , µ′|Γ ∗ ) corresponds to a pair that appears in the restriction to Γi∗ of all matchings in S(µ, µ′ ) (hence appearing i i in both µ|Γ ∗ and µ′|Γ ∗ ). The following clarifies how Γi∗ (µ|Γ ∗ , µ′|Γ ∗ ) is related to Γi∗ and Γ ∗ (µ, µ′ ). i i i
i
Lemma 7 ([7, Lemma 3.4]). (a) Γi∗ (µ|Γ ∗ , µ′|Γ ∗ ) is an induced subgraph of Γi∗ , i ∈ I ; i
i
(b) VΓ ∗ (µ,µ′ ) ⊇ ∪i∈I VΓ ∗ (µ i
′ |Γi∗ ,µ|Γ ∗ )
and AΓ ∗ (µ,µ′ ) = ∪i∈I AΓ ∗ (µ
′ . |Γi∗ ,µ|Γ ∗ )
i
i
i
3. Bounding from below Observe that Lemma 7b yields that all Γi∗ (µ|Γ ∗ , µ′|Γ ∗ )’s are induced subgraphs of Γ ∗ (µ, µ′ ), without any edge between i i them. This observation, together with Proposition 4, has the following two implications. Corollary 8. For any µ, µ′ ∈ S such that vertices xµ and xµ are neighbours ′
(i) µ, µ′ differ in exactly one non-trivial component of Γ ∗ ; (ii) the single non-trivial component of Γ ∗ (µ, µ′ ) is a subgraph of a single Γi∗ (µ|Γ ∗ , µ′|Γ ∗ ), i ∈ I. i
i
By Remark 5 and Lemma 6, each Γi∗ , i ∈ I, defines the marriage market having the set of stable matchings Si = {µ|Γ ∗ : µ ∈ S }. i
Accordingly, the convex hull of the incidence vectors of members of Si is the polytope PSi . That is, µ, µ′ ∈ S yields
µ|Γi∗ , µ′|Γ ∗ ∈ Si , while the vectors x i
µ ∗
µ|Γ ∗ i
,x
µ′ ∗ |Γ i
are vertices of PSi . Then, let d(µ|Γ ∗ , µ′|Γ ∗ ) denote the distance between the i
µ′ ∗ |Γi
i
vertices x |Γi , x of PSi (we do not include the polytope in the notation used for the distance as this is always clear from the context). Notice that d(µ|Γ ∗ , µ′|Γ ∗ ) = d(µ, µ′ ) if Γ ∗ coincides with Γi∗ . i
i
Theorem 9. For any µ, µ′ ∈ S, d(µ, µ′ ) =
∑
i∈I d(
µ|Γi∗ , µ′|Γ ∗ ). i
Proof. We proceed by induction on the value of |I |. The result holds trivially for |I | = 1. The induction hypothesis for
|I | = t − 1 is that d(µ, µ′ ) =
t −1 ∑
d(µ|Γ ∗ , µ′|Γ ∗ ), i
i
i=1
i.e., that the result holds for any graph Γ ∗ having t − 1 non-trivial components.
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
5
Consider a graph Γ ∗ having |I | = t non-trivial components and µ, µ′ ∈ S. Either there is a non-trivial component where the same pairs are selected in both matchings or there exists no such component. In the first case, assume without loss of generality that the non-trivial component is t, i.e., µ|Γt∗ = µ′|Γ ∗ . By definition, t
d(µ|Γt∗ , µ′|Γ ∗ ) = 0 yielding t
t ∑
d(µ|Γ ∗ , µ′|Γ ∗ ) = i
t −1 ∑
i=1
d(µ|Γ ∗ , µ′|Γ ∗ ) i
i
i
i=1
which, by the induction hypothesis, is equal to d(µ, µ′ ). In the second case (i.e., µ|Γ ∗ ̸ = µ′|Γ ∗ for all i ∈ I), construct the matching µ′′ as µ′′|Γ ∗ = µ′|Γ ∗ , i = 1, . . . , t − 1, and i
i
i
µ′′|Γ ∗ = µ|Γt∗ ; Lemma 6 yields that µ′′ is stable, i.e., µ′′ ∈ S. Observe that t ∑t −1 ∑t −1 ′ ′′ ∗ ∗ d(µ, µ′′ ) = i=1 d(µ|Γi , µ|Γ ∗ ), i=1 d(µ|Γi , µ|Γ ∗ ) =
i
i
i
by the induction hypothesis and by construction of µ , while ′′
d(µ′′ , µ′ ) = d(µ′′|Γ ∗ , µ′|Γ ∗ ) = d(µ|Γt∗ , µ′|Γ ∗ ), t
t
t
also by construction of µ′′ . Thus, d(µ, µ′ ) ≤ d(µ, µ′′ ) + d(µ′′ , µ′ ) =
∑t
i=1 d(
µ|Γi∗ , µ′|Γ ∗ ) = i
∑
i∈I d(
µ|Γi∗ , µ′|Γ ∗ ). i
To complete the inductive step, we show that d(µ, µ′ ) ≥
∑
i∈I d(
µ|Γi∗ , µ′|Γ ∗ ).
(1)
i
Let us consider an arbitrary xµ − xµ path, i.e., a path comprising vertices of PS , where any two consecutive vertices are ′ neighbours. For convenience, we say that a matching is on the xµ − xµ path if the matching corresponds to a vertex on µ µ′ that path. By Corollary 8i, two neighbouring matchings on the x − x path must coincide in all non-trivial components of Γ ∗ except for one. Then, for a specific Γi∗ (i ∈ I), let ′
D(Γi∗ ) = {(µ, ˙ µ ¨ ) : µ, ˙ µ ¨ are neighbouring matchings on the xµ − xµ path that differ in component Γi∗ }. ′
That is, (µ, ˙ µ ¨ ) ∈ D(Γi∗ ) means that vertices xµ˙ and xµ¨ are neighbours, and therefore ∑ ′ Proposition 4. Also, Corollary 8i implies that the length of the xµ − xµ path is i∈I ⏐ ⏐ ⏐D(Γ ∗ )⏐ ≥ d(µ|Γ ∗ , µ′ ∗ ) suffices to prove (1). i |Γ i
¨ are comparable by ⏐µ˙ and ⏐µ ⏐D(Γ ∗ )⏐, hence showing that i
i
For a specific i ∈ I, we index the pairs of ⏐neighbouring matchings of D(Γi∗ ) in their order of appearance on the xµ − xµ ⏐ ˙ j, µ ¨ j ) the jth pair of neighbouring matchings belonging to path. In other words, for j ∈ {1, . . . , ⏐D(Γi∗ )⏐}, we denote by (µ ′ D(Γi∗ ) that we come across while moving from xµ to xµ . Consequently, ′
µ|Γi∗ = µ ˙ 1|Γi∗ ,
(2)
µ ¨ j|Γi∗
⏐ ⏐ =µ ˙ j+1|Γi∗ , ∀ j ∈ {1, . . . , ⏐D(Γi∗ )⏐ − 1},
(3)
µ′|Γ ∗ i
=µ ¨ |D(Γ ∗ )||Γ ∗ . i i
(4)
That is, since µ ˙ 1 is the first matching on the xµ − xµ path that appears in a pair in D(Γi∗ ), all matchings preceding µ ˙ 1 on that path (including µ) have the same restriction to Γi∗ as µ ˙ 1 , hence (2) holds. By definition of D(Γi∗ ), µ ¨ 1 is µ µ′ the matching immediately succeeding µ ˙ 1 on the x − x path (i.e., µ ¨ 1|Γi∗ ̸= µ ˙ 1|Γi∗ ) and having the same restriction to Γi∗ with⏐ all matchings following it until µ ˙ 2 , hence (3) holds for j = 1. It becomes trivial to repeat this argument for ⏐ j = 2, . . . , ⏐D(Γi∗ )⏐ − 1 and similarly show that µ ¨ |D(Γ ∗ )| has the same restriction to Γi∗ as µ′ , i.e., (4). ′
i
To conclude, note that for j ∈ {1, . . . , ⏐D(Γi∗ )⏐}, µ ˙ j|Γi∗ , µ ¨ j|Γi∗ are comparable (this follows from the fact that µ ˙ j, µ ¨ j are comparable) and Γi∗ (µ ˙ j|Γi∗ , µ ¨ j|Γi∗ ) has one non-trivial component (by Corollary 8ii); therefore, µ ˙ j|Γi∗ and µ ¨ j|Γi∗ correspond to neighbouring vertices of PSi (by Proposition 4 with Si and Γi∗ in the role of S and Γ ∗ , respectively). But then, Eqs. (2)–(4)
⏐
⏐
imply that the restrictions to Γi∗ of the stable matchings in D(Γi∗ ) form a path from x
µ|Γ ∗ i
to x
µ′ ∗ |Γ i
in PSi , whose length is
⏐ ⏐ ⏐ ⏐ µ′ ⏐D(Γ ∗ )⏐. Either this is a shortest path from xµ|Γi∗ to x |Γi∗ or there is a shorter one, hence ⏐D(Γ ∗ )⏐ ≥ d(µ|Γ ∗ , µ′ ∗ ), which i i |Γ i completes the proof.
■
i
A lower bound on diam(PS ) is now immediate. Corollary 10. diam(PS ) ≥ |I |+|I ′ |, where I ′ is the set indexing the non-trivial components of Γ ∗ containing two incomparable (sub)matchings.
6
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
Fig. 3. A marriage graph with two circuits that includes only comparable stable matchings.
Proof. Remark 5 and Lemma 6 imply that a stable matching in S can be constructed by gluing together one stable (sub)matching from every non-trivial component and then adding all isolated nodes (i.e., trivial components) of Γ ∗ . Therefore, we may construct µ, ˇ µ ˆ ∈ S such that µ ˇ |Γi∗ and µ ˆ |Γi∗ are incomparable for i ∈ I ′ and comparable for i ∈ I \ I ′ . ∗ This is possible because each Γi , i ∈ I, is non-trivial hence containing at least two different (sub)matchings; also, by definition of I ′ , each Γi∗ contains two incomparable (sub)matchings for i ∈ I ′ and only comparable ones for i ∈ I \ I ′ . By Proposition 4 (with Si and Γi∗ in the role of S and Γ ∗ , respectively), vertices x i ∈ I \ I ′ but not for i ∈ I ′ . Then, max {d(µ
µ,µ′ ∈S
|Γ ∗ i
, µ′|Γ ∗ )} i
≥ d(µ ˇ
|Γ ∗ i
,µ ˆ
{ |Γ ∗ ) i
≥
2, 1,
µ ˇ |Γ ∗ i
µ ˆ |Γ ∗
and x
i
are neighbours in PSi for
for i ∈ I ′ , for i ∈ I \ I ′ .
The result follows by applying Theorem 9, i.e., diam(PS ) = max {d(µ, µ′ )} = max µ,µ′ ∈S
µ,µ′ ∈S
∑
i∈I d(
µ|Γi∗ , µ′|Γ ∗ ) ≥ i
∑
i∈I d(
µ ˇ |Γi∗ , µ ˆ |Γi∗ ) ≥ 2|I ′ | + |I \ I ′ | = |I | + |I ′ |.
■
It is tempting to think that calculating |I | + |I ′ | is direct through examining Γ ∗ . Although this is true for calculating |I | (i.e., counting the connected components of Γ ∗ ), it appears problematic regarding |I ′ |. For example, a connected component of Γ ∗ containing multiple circuits does not necessarily contain non-comparable stable matchings, as shown by the graph of Fig. 3 that has two circuits but only comparable stable matchings, namely: (i) {(m1 , w1 ), (m2 , w4 ), (m3 , w3 ), (m4 , w2 )}, (ii) {(m1 , w3 ), (m2 , w4 ), (m3 , w1 ), (m4 , w2 )}, (iii) {(m1 , w3 ), (m2 , w2 ), (m3 , w1 ), (m4 , w4 )} Note that the matching {(m1 , w1 ), (m2 , w2 ), (m3 , w3 ), (m4 , w4 )} is not stable; (m2 , w3 ) blocks this matching, since w3 >m2 w2 and m2 >w3 m3 , and is a non-removable non-stable pair [8]. Therefore, to compute the lower bound, we need to relate the marriage graph with an alternative well-known graphical representation. 4. Relating the marriage and the rotation-poset graphs Rotations define a mechanism for obtaining one stable matching from another and admit a partial order that defines the rotation-poset. Let us recall some standard notation. For µ ∈ S, let rµ (m) be the first (i.e., most preferable) woman w in P(m) such that (m, w ) ∈ / µ and m >w µ(w), i.e., woman w is not matched to man m but prefers him to her mate in µ. Note that such a woman exists as long as there exists man m such that µ(m) ̸ = µz (m). Also, since µ is stable, µ(m) >m w . A formal definition of rotations is presented below. Definition 11. Given µ ∈ S \{µz }, a rotation ρ = {(m0 , w0 ), (m1 , w1 ), . . . , (mt −1 , wt −1 )}, where 2 ≤ t ≤ n, is an ordered list of pairs belonging to µ such that (a) mi = µ(wi ) and (b) wi = rµ (mi+1(mod t) ) for all i ∈ {0, . . . , t − 1}. We make use of the following terminology. A man m (or a woman w ) participates in rotation ρ if (m, w ) is in the ordered list defining ρ . A rotation is exposed in µ if the pairs (m, w ) forming ρ are in µ. Eliminating rotation ρ from µ implies that each woman wi participating in ρ breaks her marriage with mi and is matched to mi+1(mod t) , while all other pairs in µ remain the same. The elimination of ρ from µ produces the stable matching µ/ρ = (µ \ ρ ) ∪ {(m0 , wt −1 ), (m1 , w0 ), . . . , (mt −1 , wt −2 )}. Consequently, pairs (mi , wi ) belong to ρ while pairs (m(i+1) mod t , wi ) are produced by eliminating ρ , for i ∈ {0, . . . , t − 1}. Let us denote by R(S) the set of rotations, i.e., R(S) = {ρ : ρ is exposed in some µ ∈ S }. Lemma 12 ([12, Lemma 2.5.2]). For any µ ∈ S \ {µz } and ρ ∈ R(S) exposed in µ, µ/ρ ∈ S and µ >M µ/ρ . Also, [11, Theorem 6] shows that µz is obtained from µ0 by exposing and eliminating all rotations exactly once. Thus, let a µ0 − µz path be a sequence µi0 , µi1 , . . . , µik such that µi0 = µ0 , µik = µz , µiq+1 = µiq /ρiq (q = 0, . . . , k − 1) and
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
7
{ρi0 , . . . , ρik−1 } = R(S). The order of appearance for rotations in an µ0 −µz path is not arbitrary, i.e., perhaps some rotation ρ must be eliminated before some other rotation ρ ′ is exposed; this is denoted as ρ ≺ ρ ′ . Let nextm (w ) denote the first woman ‘following’ w in P(m) such that pair (m, nextm (w )) is stable. That is, there is no w′ ∈ P(m) such that pair (m, w′ ) is stable and w >m w′ >m nextm (w). The definition of nextw (m) is similar, i.e., there is no m′ ∈ P(w ) such that pair (m′ , w ) is stable and m >w m′ >w nextw (m). Definition 13 ([12, p. 105]). For (ρ, ρ ′ ) ∈ R(S), ρ ≺ ρ ′ if there is (i) a stable pair (m, w ) is produced by eliminating ρ and participates in ρ ′ or (ii) a non-stable pair (m, w ) such that (nextw (m), w ) participates in ρ and (m, nextm (w )) is produced by eliminating ρ ′ . The directed acyclic graph G(VG , AG ) associated with the rotation-poset (R(S), ≺) has VG = R(S) and (ρ, ρ ′ ) ∈ AG for any (ρ, ρ ′ ) ∈ R(S) such that ρ ≺ ρ ′ . It is known that there is a one-to-one correspondence between stable matchings, closed subsets of (R(S), ≺), and closed subsets of G ([14, Theorem 4.1] and [11, Lemma 6]). An R′ ⊆ R(S) is called closed if, for all ρ ′ ∈ R′ , ρ ≺ ρ ′ implies ρ ∈ R′ ; a V ′ ⊆ VG is called closed if there are no arcs (ρ, ρ ′ ) ∈ AG such that ρ ∈ VG \ V ′ and ρ ′ ∈ V ′ . Let G− (VG , AG− ) be the transitive reduction of the rotation-poset graph G(VG , AG ), i.e., (i) G− has the same set of nodes as G, (ii) there exists a directed u − v path in G− if and only if there is such a path in G, and (iii) the deletion of any arc in AG− violates condition (ii). It is easy to see that G− is minimal with respect to preserving the closed subsets of G (see the detailed example in [8]). Hence the following. Corollary 14. There is a one-to-one correspondence between stable matchings and closed subsets of nodes of G− (VG , AG− ). Focusing again on Γ ∗ , Remark 5 together with Lemma 6 implies that every stable matching of a market Γi∗ (i ∈ I) is part of at least one stable matching µ ∈ S and that, for every µ ∈ S, µ|Γ ∗ is a stable matching of (the market) Γi∗ thus i a member of Si . It follows that the market Γi∗ is associated with a set of rotations R(Si ); for every ρ ∈ R(Si ) there exist µ, µ′ ∈ S such that ρ is exposed in µ|Γi∗ and µ′|Γ ∗ = µ|Γi∗ /ρ . The following lemma establishes that R(Si ) ⊆ R(S), i.e., each i rotation ρ ∈ R(Si ) is a member of R(S). Lemma 15. For µ, µ′ ∈ S, ρ ∈ R(S) such that ρ is exposed in µ and µ′ = µ/ρ , there exists a unique non-trivial component Γi∗ (i ∈ I) such that ρ ⊆ µ|Γ ∗ and ρ −1 ⊆ µ′|Γ ∗ , where ρ −1 = µ′ \ µ. i
i
Proof. Let M(ρ ) and W (ρ ) denote the set of men and women, respectively, that participate in rotation ρ exposed in µ. Since µ′ = µ/ρ , the set ρ −1 = µ′ \ µ contains the pairs produced by the elimination of ρ . By definition, ρ ⊆ µ and ρ −1 ⊆ µ′ , and µ △ µ′ = ρ ∪ ρ −1 , where µ △ µ′ denotes the symmetric difference of µ and µ′ . Also observe that M(ρ ) = M(ρ −1 ) and W (ρ ) = W (ρ −1 ). We know that µ′ ∈ S and µ >M µ′ (Lemma 12). This implies that for any m ∈ M(ρ ), µ(m) >m µ′ (m) and thus there is an arc in Γ ∗ from node (m, µ′ (m)) to (m, µ(m)). Due to the same reasoning, for any w ∈ W (ρ ), µ′ (w ) >w µ(w ) implying that ((µ(w ), w ), (µ′ (w ), w )) ∈ AΓ ∗ . Because for each m ∈ M(ρ ) there exists w ∈ W (ρ ) such that (m, µ(m)) = (µ(w ), w ) and because the same applies with respect to ρ −1 , it follows that the nodes of ρ ∪ρ −1 are connected in Γ ∗ , i.e., they belong to the same non-trivial component Γi∗ (i ∈ I) of Γ ∗ . To better see that, let ρ = {(m0 , w0 ), (m1 , w1 ), . . . , (mt −1 , wt −1 )}, hence ρ −1 = {(m0 , wt −1 ), (m1 , w0 ), . . . , (mt −1 , wt −2 )} (recall Definition 11); then, the nodes of ρ ∪ ρ −1 form the path (nodes listed as implied by the direction of the arcs)
{(m0 , wt −1 ), (m0 , w0 ), (m1 , w0 ), (m1 , w1 ), . . . , (mt −1 , wt −2 ), (mt −1 , wt −1 )}. Thus, ρ ⊆ µ|Γ ∗ and ρ −1 ⊆ µ′|Γ ∗ . i
■
i
In other words, Lemma 15 states that for each ρ ∈ R(S), there is a non-trivial connected component of Γ ∗ such that ρ is exposed in one of the stable matching of Si and its elimination gives rise to a set ρ −1 which is also a subset of a stable matching in Si . This suggests an association between the non-trivial components of Γ ∗ and the components of G− (i.e., the transitive reduction of the rotation-poset graph G). We say that the subgraph induced by a subset of VG− is a component of G− if having no incoming or outgoing edges and is minimal with respect to that property. Let K = {1, . . .} denote the − set indexing the components of G− . Thus, G− k (k ∈ K ) denotes an arbitrary component of G , possibly trivial. By definition, − − ′ for any k, k ∈ K , there is no edge between (a node of) Gk and (any node of) Gk′ . Thus VG− = ∪k∈K VG− , AG− = ∪k∈K AG− . Lemma 15 implies a relation ϕ : follows.
⋃
k∈K
{G− k } →
⋃
i∈I
k
k
{Γi∗ } mapping components of G− to non-trivial components of Γ ∗ as
− − Lemma 16. For k ∈ K , there is a unique non-trivial component of Γ ∗ , namely ϕ (G− k ), such that, for any ρ ∈ VG , ρ ⊆ µ|ϕ (G ) ,
ρ −1 ⊆ µ′|ϕ (G− ) , where µ ∈ S is the stable matching in which ρ is exposed, µ′ = µ/ρ ∈ S and ρ −1 = µ′ \ µ. k
k
k
8
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
∗ Proof. We will show that for each k ∈ K , G− k maps (through ϕ ) to a unique non-trivial component of Γ . Observe that since VG− ̸ = ∅ there exists at least one rotation, namely ρ , such that ρ ∈ VG− . That rotation is exposed in a stable matching k
k
µ and according to Lemma 15 there exists a unique non-trivial component Γi∗ (i ∈ I) such that ρ ⊆ µ|Γi∗ . Hence, G− k maps to at least one Γi∗ . ∗ It remains to show that G− k is not mapped to more than one non-trivial components of Γ . Assuming the opposite, ∗ − consider α ∈ K such that Gα is associated through ϕ with the non-trivial components Γ1 , . . . , Γt∗ , where t ∈ I \ {1}. Since each Γi∗ (i ∈ {1, . . . , t }) is non-trivial, it consists of at least four nodes (corresponding to at least two men and two women) and |Si | ≥ 2, i.e., Si contains at least two stable (sub)matchings (the corresponding man- and woman-optimal). ¯ − (i ∈ {1, . . . , t }). Hence, the set of rotations associated with Γi∗ is not empty and gives rise to a rotation-poset graph G i − ∗ ¯ ¯− But since each Γi defines an independent market with a distinct set of agents, the graphs G1 , . . . , G t are disjoint. By − ¯ (i ∈ {1, . . . , t }). But then, contains pairs of agents of a single Γi∗ , thus appearing in exactly one G Lemma 15, each ρ ∈ VG− i α ∩ VG¯ − , for all i ∈ {1, . . . , t }) with no edge among them, i.e., a contradiction is partitioned into subsets (namely VG− VG− α α i
to the fact that G− α is minimal with respect to the property of having no incoming or outgoing edges.
■
Theorem 17. ϕ is bijective. Proof. First note that by Lemma 16, ϕ is a function, since for each k ∈ K , G− k maps (through ϕ ) to a unique non-trivial component of Γ ∗ . Next, we show that ϕ is one-to-one. Recall that each ρ ∈ VG− , k ∈ K , involves a specific set of pairs and an arc k (ρ, ρ ′ ) ∈ AG− is created by a stable pair (Definition 13i) or a non-stable pair (Definition 13ii). k If the arc is established by Definition 13i, there exists at least one man (say m) who participates in some pair both in ρ and ρ ′ (say (m, wρ ) ∈ ρ and (m, wρ ′ ) ∈ ρ ′ ). Hence, there exists a corresponding edge in Γ ∗ in row m from node (m, wρ ′ ) to node (m, wρ ) (since (ρ, ρ ′ ) implies that ρ ≺ ρ ′ and thus that wρ >m wρ ′ ). Similarly, if the arc is established by Definition 13ii, there exists at least a node (m, w ) in Γ ∗ such that there is an edge from (nextw (m), w ) (participating in ρ ) to (m, w ) in column w and an edge from (m, nextm (w )) (produced by eliminating ρ ′ ) to (m, w) in row m (by definition of nextw (m) and nextm (w) respectively). Hence, in both cases, the existence of an arc (ρ, ρ ′ ) ∈ AG− implies that there exist nodes participating in ρ and ρ ′ that k belong to the same connected component of Γ ∗ . Now let us assume that ϕ is not one-to-one, i.e., there exists α ∈ I such − − − ∗ ′ that ϕ (G− k ) = ϕ (Gk′ ) = Γα , where {k, k } ⊆ K . Since the graphs Gk , Gk′ are disjoint, any agent participating in a rotation ρ ∈ VG− will participate in no rotation ρ ∗ ∈ VG− ; otherwise (by Definition 13), a ρ − ρ ∗ path (possibly consisting of one k′
k
− ∗ edge) would exist in G− and thus G− k , Gk′ would not be disjoint. That is, there exist no edges in Γα between pairs that − include agents participating in two rotations that belong to the two different rotation-poset (sub)graphs G− k , Gk′ . This is a contradiction to the fact that Γα∗ is a strongly connected component of Γ ∗ . Finally, we show that ϕ is onto. Again assume the opposite, i.e., there exists α ∈ I such that the non-trivial component Γα∗ is not the image of any of the components of G− (or, with a small abuse of notation, that G− α = ∅). By Lemma 6, Γα∗ is itself a stable matching (sub)problem and by Corollary 14 there exists a one-to-one correspondence between the − stable (sub)matchings of Γα∗ and the closed subsets of G− α . Hence, in order for Gα = ∅, the stable matching (sub)problem corresponding to Γα∗ must have only one solution, i.e., the man-optimal coincides with the woman-optimal solution. But then, since Γα∗ corresponds to preferences derived after the application of the reduction algorithm, each man (woman) has in his (her) preferences only his (her) optimal choice, hence each man (woman) has no edges in his (her) corresponding row (column) in Γα∗ . This is a contradiction to the fact that Γα∗ is connected. ■
5. Computing the bound Two rotations ρ, ρ ′ are incomparable if neither ρ ≺ ρ ′ nor ρ ′ ≺ ρ . By [11, Lemma 6], for ρ, ρ ′ ∈ R(S), ρ ≺ ρ ′ if and only if there exists a ρ − ρ ′ path in G. Hence, two rotations ρ, ρ ′ belonging to the same component of G− are incomparable if and only if there is no directed path between them. The following is now direct. − − Corollary 18. For any k ∈ K , G− k contains only comparable rotations if and only if for each node ρ ∈ VG , its in-degree δρ
and out-degree δρ+ are less than 2 (i.e., if VG− is a path).
k
k
Two straightforward consequences of incomparability of rotations are revealed in the following lemmas. Lemma 19.
Two incomparable rotations ρ, ρ ′ ∈ R(S) have no common agent participating in them.
Proof. Assume the opposite. That is, there exists an agent, say man m, participating in both ρ and ρ ′ , with ρ, ρ ′ being incomparable. The process of exposing and eliminating a rotation (see Definition 11) results in every man participating in that rotation being matched with a woman he prefers less. Let (m, w ) ∈ ρ and (m, w ′ ) ∈ ρ ′ . Since preferences are strict, m prefers one of w, w ′ more than the other. Without loss of generality, let w >m w ′ .
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
9
Since ρ and ρ ′ are incomparable, there is an µ0 − µz path in which ρ ′ is eliminated before ρ is exposed. Let µ′ be the matching in which ρ ′ is exposed and µ the matching in which ρ is exposed. Since ρ ′ is eliminated before ρ is exposed, µ′ >M µ by Lemma 12. But (m, w) ∈ ρ and (m, w′ ) ∈ ρ ′ imply that (m, w) ∈ µ and (m, w′ ) ∈ µ′ . Then, having assumed w >m w ′ yields that m prefers µ to µ′ , i.e., a contradiction to the fact that µ′ >M µ. ■ ′ ′′ ′ ′′ − Lemma 20. For any k ∈ K , such that G− k contains incomparable rotations, there exist ρ, ρ , ρ ∈ VGk and µ, µ , µ ∈ S such that
(i) (ρ, ρ ′ ) ∈ AG− , (ρ, ρ ′′ ) ∈ AG− , µ′|Φ = µ|Φ /ρ ′ and µ′′|Φ = µ|Φ /ρ ′′ , or k
k
k
k
(ii) (ρ ′ , ρ ) ∈ AG− , (ρ ′′ , ρ ) ∈ AG− , µ|Φ = µ′|Φ /ρ ′ and µ|Φ = µ′′|Φ /ρ ′′ , where Φ = ϕ (Gk ). −
′ ′′ − Proof. Since G− k has at least two incomparable rotations, then by Corollary 18 there will exist ρ, ρ , ρ ∈ VG such that k
either (i) (ρ, ρ ′ ) ∈ AG− and (ρ, ρ ′′ ) ∈ AG− (δρ+ ≥ 2), or (ii) (ρ ′ , ρ ) ∈ AG− and (ρ ′′ , ρ ) ∈ AG− (δρ− ≥ 2). Note that both cases k k k k imply that ρ ′ and ρ ′′ are incomparable (if there were a path between ρ ′ and ρ ′′ , one of the two assumed edges in (i) or − (ii) would not exist, since Gk is the transitive reduction of Gk ). Let µ0|Φ be the man-optimal stable (sub)matching in Φ . Let VG− (ρ ′ , ρ ′′ ) = {ρˆ ∈ VG− : ρˆ ≺ ρ ′ or ρˆ ≺ ρ ′′ }. k k For (i), observe that ρ ∈ VG− (ρ ′ , ρ ′′ ), while the remaining members of VG− (ρ ′ , ρ ′′ ) correspond to the edges of a path in k k the lattice of Φ connecting µ0|Φ and the matching µ|Φ produced by the elimination of ρ . Thus VG− (ρ ′ , ρ ′′ ) = {ρi0 , . . . , ρit }, k
⏐ ⏐
⏐ ⏐
where t = ⏐VG− (ρ ′ , ρ ′′ )⏐ − 1, ρit = ρ and µ|Φ = µ0|Φ /ρi0 /.../ρit . Since all rotations of VG− preceding either ρ ′ or ρ ′′ or k
k
both, have already been eliminated upon reaching µ|Φ , ρ ′ and ρ ′′ can be both exposed in µ|Φ ; their elimination produces µ′|Φ and µ′′|Φ respectively. An analogous argument can be made for (ii). In that case observe that ρ ∈ / VG− (ρ ′ , ρ ′′ ). Now consider µ′|Φ = µ0|Φ / k ′ ′′ ′ ′ ′′ ρi0 /.../ρit /ρ and µ|Φ = µ0|Φ /ρi0 /.../ρit /ρ . Then, by eliminating ρ from µ|Φ as well as ρ ′′ from µ′′|Φ , we derive the same ′ ′′ ′′ ′ ■ matching, i.e., µ|Φ = µ0|Φ /ρi0 /.../ρit /ρ /ρ = µ0|Φ /ρi0 /.../ρit /ρ /ρ . Now, we can proceed with showing the relation between incomparable rotations in G− k and incomparable stable (sub)matchings in its bijection. Theorem 21. For any k ∈ K , the component G− k contains incomparable rotations if and only if the non-trivial component ∗ ϕ (G− ) of Γ contains incomparable (sub)matchings. k Proof. For brevity, we denote ϕ (G− k ) as Φ . ′ ′′ ′ ′′ − (⇒) If G− k has incomparable rotations, then there exist ρ, ρ , ρ ∈ VGk and µ, µ , µ ∈ S as declared in Lemma 20. As noted in its proof, ρ ′ and ρ ′′ are incomparable (both in the case of (i) as well as of (ii)). Let M(ρ ′ ) and M(ρ ′′ ) denote the set of men participating in rotations ρ ′ and ρ ′′ , respectively. Also, let M(µ|Φ ) denote the set of men participating in the matching µ|Φ . If (i) of Lemma 20 holds, Lemma 12 yields µ|Φ >M µ′|Φ and µ|Φ >M µ′′|Φ . In more detail,
µ|Φ (m)
{
>m µ′|Φ (m), = µ′|Φ (m),
for all m ∈ M(ρ ′ ), for all m ∈ M(µ|Φ ) \ M(ρ ′ ),
{
>m µ′′|Φ (m), = µ′′|Φ (m),
for all m ∈ M(ρ ′′ ), for all m ∈ M(µ|Φ ) \ M(ρ ′′ ).
while
µ|Φ (m)
But, since ρ ′ and ρ ′′ are incomparable, they contain no common agents (Lemma 19). Thus, M(ρ ′′ ) ⊆ (M(µ|Φ ) \ M(ρ ′ )) and M(ρ ′ ) ⊆ (M(µ|Φ ) \ M(ρ ′′ )). But then, for m ∈ M(ρ ′′ ) the above imply µ′|Φ (m) >m µ′′|Φ (m), while for m ∈ M(ρ ′ ) the above imply that µ′′|Φ (m) >m µ′|Φ (m). Therefore, µ′|Φ and µ′′|Φ are incomparable, thus Φ contains incomparable matchings. If (ii) of Lemma 20 holds, a contradiction arises again from the fact that µ′|Φ and µ′′|Φ are incomparable; any man participating in ρ ′ prefers µ′|Φ to µ′′|Φ , whereas any man participating in ρ ′′ prefers µ′′|Φ to µ′|Φ . (⇐) Recall that by Corollary 14, there exists a one-to-one ⏐ ⏐ correspondence between the stable (sub)matchings of Φ − − and the closed subsets of G− k . Let VG = {ρ0 , . . . , ρt }, t = ⏐VG ⏐ − 1. Given that Φ contains incomparable (sub)matchings,
⏐
k
⏐
k
− assume to the contrary that G− k contains only comparable rotations. This means that all rotations participating in Gk − are totally ordered, thus the corresponding closed subsets of Gk are ∅, {ρ0 }, {ρ0 , ρ1 }, . . . , {ρ0 , ρ1 , . . . , ρt }. Hence, for any stable (sub)matching µj|Φ , j = {0, . . . , t } (except for the woman-optimal (sub)matching µt +1|Φ ) there will exist a rotation ρj ∈ VG− such that µj+1|Φ = µj|Φ /ρj (and thus µj|Φ >M µj+1|Φ ). But this implies a total order on the stable (sub)matchings k of Φ , i.e., all (sub)matchings of Φ being comparable, a contradiction. ■
10
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
Recall from Corollary 10 that I ′ is the set indexing the non-trivial components of Γ ∗ containing incomparable (sub)matchings. Let K ′ be the set indexing the components of G− containing incomparable rotations. Theorems 17 and 21 yield the following.
⏐ ⏐
⏐ ⏐
Corollary 22. |I | = |K | and ⏐I ′ ⏐ = ⏐K ′ ⏐. Corollary 22 yields that the lower bound provided by Corollary 10 can be computed by counting the components of G− and the components of G− containing incomparable rotations. This is exploited by Algorithm 1. Algorithm 1 Calculating the lower bound of Corollary 10 Create G and then G− while keeping track of δρ− and δρ+ for each ρ ;
− Run DFS on G− to identify the components G− k and set comp(ρ ) := k for all ρ ∈ VG ;
low erBound := |K |; Create boolean array incomG− of size |K | and set incomG− [k] := false for k ∈ K ; for all ρ ∈ VG− do if (δρ− > 1) or (δρ+ > 1) then if incomG− [comp(ρ )] = false then low erBound := low erBound + 1; incomG− [comp(ρ )] := true; end if end if end for
k
Theorem 23. Algorithm 1 computes the lower bound on the diameter of PS in O(n2 ) steps. Proof. (Correctness) The algorithm initially creates graph G [11] and then derives G− [22]. During this process, simple book-keeping enables also computing δρ− and δρ+ for each node ρ of G− . Then, DFS is run on G− to identify and count its components, while also labelling each node ρ with the identifier of the component G− k (k ∈ K ) it belongs to (i.e., comp(ρ ) := k). Next, the variable low erBound is initially set to the value |K | and subsequently increased by one each time the algorithm identifies a component of G− with incomparable rotations that has not been identified as such before. This is implemented by checking whether the in-degree or out-degree of each examined rotation ρ is greater than − 1, which means that the component G− comp(ρ ) has at least two incomparable rotations by Corollary 18; array incomG is − utilized to examine whether Gcomp(ρ ) has been identified before as containing incomparable rotations. Upon termination ⏐ ⏐ of Algorithm 1, the variable low erBound contains the result of the addition of ⏐K ′ ⏐ to |K |, which via Corollary 22 equals the lower bound of Corollary 10. (Complexity) Graph G has at most O(n2 ) nodes and arcs and can be constructed in O(n2 ) steps [11, Lemma 5]. G− is obtained from G in O(|VG | + |AG |) (hence O(n2 )) steps [22]. The book-keeping procedure does not change the complexity of the algorithm, since it requires two additions for each arc of G and two subtractions for each arc belonging to AG \ AG− . DFS runs in O(|VG− | + |AG− |) steps; |VG− | = |VG | is the number of rotations, which is bounded by the number of pairs [14, Lemma 4.7], while |A(G− )| is also bounded by O(n2 ) by [11, Lemma 5] and the fact that |A(G)| ≥ |A(G− )|. Initializing array incomG− to false requires |K | operations, where |K | is bounded by the number of rotations, which is of O(n2 ). The for-loop contains only simple operations, while the number of iterations is bounded by the number of rotations, i.e., again by O(n2 ). ■ The following example shows that the obtained lower bound is tight by presenting a class of instances for which the lower bound coincides with the upper bound and thus with the actual value of the diameter. Example 2. Consider an instance of SM with preference lists of the form shown in Fig. 4, where the dots in each agent’s preference lists denote a sequence of agents of the opposite set who are eliminated by the reduction algorithm. The frames S1 , S2 , and S3 in the men’s and women’s preferences denote the three different (sub)markets that are formed. As per S1 , the (sub)market contains 2 stable matchings (i) (m1 , w1 ), (m2 , w2 ) and (ii) (m1 , w2 ), (m2 , w1 ). The corresponding rotation (sub)poset contains a single rotation ρ0 = (m1 , w1 ), (m2 , w2 ). As per S2 , the (sub)market contains 3 stable matchings (i.e., (i) (m3 , w3 ), (m4 , w4 ), (m5 , w5 ), (ii) (m3 , w4 ), (m4 , w3 ), (m5 , w5 ), and (iii) (m3 , w4 ), (m4 , w5 ), (m5 , w3 ). The corresponding rotation (sub)poset contains two comparable rotations, i.e., ρ1 = (m3 , w3 ), (m4 , w4 ) and ρ2 = (m4 , w3 ), (m5 , w5 ), where ρ1 ≺ ρ2 . As per S3 , the (sub)market contains 6 stable matchings, namely: (i) (m6 , w6 ), (m7 , w7 ), (m8 , w8 ), (m9 , w9 ) (ii) (m6 , w6 ), (m7 , w8 ), (m8 , w7 ), (m9 , w9 ) (iii) (m6 , w8 ), (m7 , w6 ), (m8 , w7 ), (m9 , w9 )
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804
11
Fig. 4. Preference lists (Example 2).
Fig. 5. The rotation-poset graph (Example 2).
(iv) (m6 , w6 ), (m7 , w8 ), (m8 , w9 ), (m9 , w7 ) (v) (m6 , w8 ), (m7 , w6 ), (m8 , w9 ), (m9 , w7 ) (vi) (m6 , w7 ), (m7 , w6 ), (m8 , w9 ), (m9 , w8 ) The corresponding rotation (sub)poset contains 4 rotations, namely ρ3 = (m7 , w7 ), (m8 , w8 ), ρ4 = (m6 , w6 ), (m7 , w8 ), ρ5 = (m8 , w7 ), (m9 , w9 ), and ρ6 = (m6 , w8 ), (m9 , w7 ), where ρ3 ≺ {ρ4 , ρ5 } ≺ ρ6 , i.e., ρ4 and ρ5 are incomparable. The rotation-poset graph is given in Fig. 5; note that it contains 3 components, one of which contains incomparable ⌊ ⌋ rotations. Hence, the lower bound of its diameter is 3 + 1 = 4, while the upper bound is also 29 = 4. That is, the diameter of this instance is 4, yielding that the lower bound is tight. Consider any SM instance with n participating men and women that consists of a combination of (sub)markets as the ones described in Example 2. Then, its diameter is the number of (sub)markets with 2 and 3 agents plus twice the number of (sub)markets with 4 agents (given that there are two incomparable rotations in the latter). Hence, for any n, we can construct an SM instance for which both the lower and upper bounds are tight. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Acknowledgement This research has been financed by the Research Centre of Athens University of Economics and Business, Greece. References [1] M. Baïou, M. Balinski, Many-to-many matching: stable polyandrous polygamy (or polygamous polyandry), Discrete Appl. Math. 101 (1) (2000) 1–12. [2] M. Baïou, M. Balinski, The stable allocation (or ordinal transportation) problem, Math. Oper. Res. 27 (4) (2002) 662–680. [3] M. Balinski, G. Ratier, Of stable marriages and graphs, and strategy and polytopes, SIAM Rev. 39 (4) (1997) 575–604. [4] C. Blair, Every finite distributive lattice is a set of stable matchings, J. Combin. Theory Ser. A 37 (3) (1984) 353–356. [5] G. Brightwell, J. van de Heuvel, L. Stougie, A linear bound on the diameter of the transportation polytope, Combinatorica 26 (2) (2006) 133–139. [6] J.A. De Loera, E.D. Kim, S. Onn, F. Santos, Graphs of transportation polytopes, J. Combin. Theory Ser. A 116 (8) (2009) 1306–1325. [7] P. Eirinakis, D. Magos, I. Mourtos, From one stable marriage to the next; How long is the way? SIAM J. Discrete Math. 28 (4) (2014) 1971–1979. [8] P. Eirinakis, D. Magos, I. Mourtos, P. Miliotis, Polyhedral aspects of stable marriage, Math. Oper. Res. 39 (3) (2014) 656–671. [9] T. Fleiner, A fixed-point approach to the stable matchings and some applications, Math. Oper. Res. 28 (1) (2003) 103–126.
12 [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23]
P. Eirinakis, D. Magos and I. Mourtos / Discrete Mathematics 343 (2020) 111804 D. Gale, L.S. Shapley, College admissions and the stability of marriage, Amer. Math. Monthly 69 (1962) 9–15. D. Gusfield, Three fast algorithms for four problems in stable marriage, SIAM J. Comput. 16 (1987) 111–128. D. Gusfield, R.W. Irving, The Stable Marriage Problem: Structure and Algorithms, MIT Press, Cambridge, MA, 1989. C.A.J. Hurkens, On the diameter of the b-matching polytope, in: A. Hajnal, L. Lovàsz, V.T. Sòs (Eds.), Proceedings 7th Hungarian Colloquium on Combinatorics, in: Colloquia Mathematica Societatis Jànos Bolyai, vol. 52, 1988, pp. 301–307. R.W. Irving, P. Leather, The complexity of counting stable marriages, SIAM J. Comput. 15 (1986) 655–667. D.E. Knuth, Marriage Stables, Montreal University Press, Montreal, 1976. F. Maffray, Kernels in perfect line-graphs, J. Combin. Theory Ser. B 55 (1992) 1–8. D.F. Manlove, Algorithmics of Matching under Preferences, World Scientific Publishing Company, 2013. M.W. Padberg, M.R. Rao, The travelling salesman problem and a class of polyhedra with diameter two, Math. Program. 7 (1974) 32–45. G. Ratier, On the stable marriage polytope, Discrete Math. 148 (1996) 141–159. Laura Sanità, The diameter of the fractional matching polytope and its hardness implications, in: FOCS, 2018, pp. 910–921. A. Schrijver, Combinatorial Optimization: Polyhedral and Efficiency, Springer, 2003. K. Simon, Finding a minimal transitive reduction in a strongly connected digraph within linear time, in: Graph-Theoretic Concepts in Computer Science (Kerkrade, 1989), Springer Verlag Berlin, 1990, pp. 244–259. J. Vande Vate, Linear programming brings marital bliss, Oper. Res. Lett. 8 (1989) 147–153.