It's Not Easy Being Three: The Approximability of Three-Dimensional Stable Matching Problems
IIt’s Not Easy Being Three: The Approximability ofThree-Dimensional Stable Matching Problems
Rafail Ostrovsky ∗ Will Rosenbaum † December 4, 2014
Abstract
In 1976, Knuth [14] asked if the stable marriage problem (SMP) can be generalizedto marriages consisting of 3 genders. In 1988, Alkan [1] showed that the naturalgeneralization of SMP to 3 genders (3GSM) need not admit a stable marriage. Threeyears later, Ng and Hirschberg [16] proved that it is NP-complete to determine if givenpreferences admit a stable marriage. They further prove an analogous result for the 3person stable assignment (3PSA) problem.In light of Ng and Hirschberg’s NP-hardness result for 3GSM and 3PSA, we initiatethe study of approximate versions of these problems. In particular, we describe two op-timization variants of 3GSM and 3PSA: maximally stable marriage/matching ( MSM )and maximum stable submarriage/submatching ( MSS ). We show that both variants areNP-hard to approximate within some fixed constant factor. Conversely, we describe asimple polynomial time algorithm which computes constant factor approximations forthe maximally stable marriage and matching problems. Thus both variants of MSMare APX-complete.
Since Gale and Shapley first formalized and studied the stable marriage problem (SMP) in1962 [5], many variants of the SMP have emerged (see, for example, [7, 14, 15, 19]). While ∗ University of California, Los Angeles (Departments of Computer Science and Mathematics). Worksupported in part by NSF grants 09165174, 1065276, 1118126 and 1136174, US-Israel BSF grant 2008411,OKAWA Foundation Research Award, IBM Faculty Research Award, Xerox Faculty Research Award, B.John Garrick Foundation Award, Teradata Research Award, and Lockheed-Martin Corporation ResearchAward. This material is based upon work supported by the Defense Advanced Research Projects Agencythrough the U.S. Office of Naval Research under Contract N00014-11-1-0392. The views expressed are thoseof the author and do not reflect the official policy or position of the Department of Defense or the U.S.Government. † University of California, Los Angeles (Department of Mathematics). a r X i v : . [ c s . CC ] D ec any of these variants admit efficient algorithms, two notably do not : (1) incompletepreferences with ties [10], and (2) 3 gender stable marriages (3GSM) [16].In the case of incomplete preferences with ties, it is NP-hard to find a maximum car-dinality stable marriage [10]. The intractability of exact computation for this problemled to the study of approximate versions of the problem. These investigations have re-sulted in hardness of approximation results [9, 20] as well as constant factor approximationalgorithms [12, 13, 17, 20].In 3GSM, players are one of three genders: women, men, and dogs (as suggested byKnuth). Each player holds preferences over the set of pairs of players of the other twogenders. The goal is to partition the players into families, each consisting of one man, onewoman, and one dog, such that no triple mutually prefer one another to their assignedfamilies. In 1988, Alkan showed that for this natural generalization of SMP to threegenders, there exist preferences which do not admit a stable marriage [1]. In 1991, Ngand Hirschberg showed that, in fact, it is NP-complete to determine if given preferencesadmit a stable marriage [16]. They further generalize this result to the three person stableassignment problem (3PSA). In 3PSA, each player ranks all pairs of other players withoutregard to gender. The goal is to partition players into disjoint triples where again, no threeplayers mutually prefer each other to their assigned triples.Despite the advances for stable marriages with incomplete preferences and ties (see [15]for an overview of relevant work), analogous approximability results have not been obtainedfor 3 gender variants of the stable marriage problem. In this paper, we achieve the firstsubstantial progress towards understanding the approximability of 3GSM and 3PSA. gender stable marriages ( GSM)
We formalize two optimization variants of 3GSM: maximally stable marriage (3G-MSM)and maximum stable submarriage (3G-MSS). For 3G-MSM, we seek a perfect (3 dimen-sional) marriage which minimizes the number of unstable triples—triples of players whomutually prefer each other to their assigned families. For 3G-MSS, we seek a largest car-dinality sub marriage which contains no unstable triples among the married players. Exactcomputation of both of these problems is NP-hard by Ng and Hirschberg’s result [16].Indeed, exact computation of either allows one to detect the existence of a stable marriage.We obtain the following inapproximability result for 3G-MSM and 3G-MSS.
Theorem 1.1 (Special case of Theorem 3.1) . There exists an absolute constant c < c .In fact, we prove a slightly stronger result for 3G-MSM and 3G-MSS. We show thatthe problem of determining if given preferences admit a stable marriage or if all marriages Assuming, of course, P (cid:54) =NP!
Theorem 1.2.
There exists a polynomial time algorithm,
AMSM , which computes a -factor approximation to 3G-MSM. Corollary 1.3. PSA)
We also consider the three person stable assignment problem (3PSA). In this problem,players rank all pairs of other players and seek a (3 dimensional) matching—a partition ofplayers into disjoint triples. Notions of stability, maximally stable matching, and maximumstable submatching are defined exactly as the analogous notions for 3GSM. We show thatTheorems 1.1 and 1.2 have analogues with 3PSA:
Theorem 1.4.
There exists a constant c < c . Theorem 1.5.
There exists a polynomial time algorithm,
ASA , which computes a -factorapproximation to 3PSA-MSM.Our proofs of the lower bounds in Theorems 1.1 and 1.4 use a reduction from the 3dimensional matching problem (3DM) to 3G-MSM. Kann [11] showed that Max-3DM isMax-SNP complete. Thus, by the PCP theorem [2, 3] and [4], it is NP-complete to ap-proximate Max-3DM to within some fixed constant factor. Our hardness of approximationresults then follow from a reduction from 3DM to 3G-MSM.Theorems 1.2 and 1.5 follow from a simple greedy algorithm. Our algorithm constructsmarriages (or matchings) by greedily finding triples whose members are guaranteed toparticipate in relatively few unstable triples. Thus, we are able to efficiently constructmarriages (or matchings) with a relatively small fraction of blocking triples. GSM)
In the 3 gender stable marriage problem, there are disjoint sets of women , men , and dogs denoted by A (for Alice), B (for Bob), and D (for Dog), respectively. We assume | A | = | B | = | D | = n , and we denote the collection of players by V = A ∪ B ∪ D . A family is a triple abd consisting of one woman a ∈ A , one man b ∈ B , and one dog d ∈ D .A submarriage S is a set of pairwise disjoint families. A marriage M is a maximalsubmarriage—that is, one in which every player v ∈ V is contained in some (unique) familyso that | M | = n . Given a submarriage S , we denote the function p S : V → V ∪ { ∅ } which3ssigns each player v ∈ V to their partners in S , with p S ( v ) = ∅ if v is not contained inany family in S .Each player v ∈ V has a preference , denoted (cid:31) v over pairs of members of the othertwo genders. That is, each woman a ∈ A holds a total order (cid:31) a over B × D ∪ { ∅ } , andsimilarly for men and dogs. We assume that each player prefers being in some family tohaving no family. For example, bd (cid:31) a ∅ for all a ∈ A , b ∈ B and d ∈ D . An instance ofthe three gender stable marriage problem (3 GSM ) consists of A , B , and D togetherwith a set P = {(cid:31) v | v ∈ V } of preferences for each v ∈ V .Given a submarriage S , a triple abd is an unstable triple if a , b and d each prefer thetriple abd to their assigned families in S . That is, abd is unstable if and only if bd (cid:31) a p S ( a ), ad (cid:31) b p S ( b ), and ab (cid:31) d p S ( d ). A triple abd which is not unstable is stable . In particular, abd is stable if at least one of a , b and d prefers their family in S to abd . Let A S , B S and D S be the sets of women, men and dogs (respectively) which have families in S . Asubmarriage S is stable if there are no unstable triples in A S × B S × D S .Unlike the two gender stable marriage problem, this three gender variant arbitrarypreferences need not admit a stable marriage. In fact, for some preferences, every marriagehas many unstable triples (see Section 3.1). Thus we consider two optimization variants ofthe three gender stable marriage problem. G-MSM)
The maximally stable marriage problem (3G-MSM) is to find a marriage M withthe maximum number of stable triples with respect to given preferences P . For fixedpreferences P and marriage M , the stability of M with respect to P is the number ofstable triples in A × B × D : stab( M ) = |{ abd | abd is stable }| . Thus, M is stable if and only if stab( M ) = n . Dually, we define the instability of M byins( M ) = n − stab( M ). For fixed preferences P , we defineMSM( P ) = max { stab( M ) | M is a marriage } . For preferences P and fixed c <
1, we define
Gap c - G-MSM to be the problem ofdetermining if MSM( P ) = n or MSM( P ) ≤ cn . The maximum stable submarriage problem (3G-MSS) is to find a maximum cardi-nality stable submarriage S . We denoteMSS( P ) = max {| S | | S is a stable submarriage } Note that P admits a stable marriage if and only if MSS( P ) = n . For fixed c <
1, we define
Gap c - G-MSS to be the problem of determining if MSS( P ) = n or if MSS( P ) ≤ cn .4 .2 Three person stable assignment ( PSA)
In the three person stable assignment problem (3 PSA ), there is a set U of | U | = 3 n players who wish to be partitioned into n disjoint triples. For a set C ⊆ U , we denotethe set of k -subsets of C by (cid:0) Ck (cid:1) . A submatching is a set S ⊆ (cid:0) U (cid:1) of disjoint triples in U . A matching M is a maximal submatching—a submatching with | M | = n . Given asubmatching S , U S is the set of players contained in some triple in S : U S = { u ∈ U | u ∈ t for some t ∈ S } . Each player u ∈ U holds preferences among all pairs of potential partners. That is, each u ∈ U holds a linear order (cid:31) u on (cid:0) U \{ u } (cid:1) ∪ { ∅ } . We assume that each player prefersevery pair to an empty assignment. Given a set P of preferences for all the players anda submatching S , we call a triple uvw ∈ (cid:0) U S (cid:1) unstable if each of u , v and w prefer thetriple uvw to their assigned triples in S . Otherwise, we call uvw stable . A submatching S is stable if it contains no unstable triples in (cid:0) U S (cid:1) . We define the stability of S bystab( S ) = (cid:12)(cid:12)(cid:12)(cid:12)(cid:26) uvw ∈ (cid:18) U S (cid:19) (cid:12)(cid:12)(cid:12)(cid:12) uvw is stable (cid:27)(cid:12)(cid:12)(cid:12)(cid:12) . Dually, the instability of S is ins( S ) = (cid:0) | S | (cid:1) − stab( S ).The maximally stable matching problem (3 PSA-MSM ) is to find a matching M which maximizes stab( M ). The maximum stable submatching problem (3 PSA-MSS ) is to find a stable submatching S of maximum cardinality. Remark 2.1.
We may consider a variant of 3PSA with unacceptable partners . In thisvariant, each player u ∈ U ranks only a subset of (cid:0) U \{ u } (cid:1) , and prefers being unmatched tounranked pairs. 3GSM is a special case of this variant where U = A ∪ B ∪ D and each playerranks precisely those pairs consisting of one player of each other gender. This observationwill make our hardness results for 3GSM easily generalize to 3PSA. c - DM- Our proofs of Theorems 1.1 and 1.4 use a reduction from the three dimensional matchingproblem (3DM). In this section, we briefly review 3DM, and state the approximabilityresult we require for our lower bound results.Let W , X and Y be finite disjoint sets with | W | = | X | = | Y | = m . Let E ⊆ W × X × Y be a set of edges. A matching M ⊆ E is a set of disjoint edges. The maximum dimensional matching problem ( Max- DM ) is to find (the size of) a matching M oflargest cardinality in E . Max- DM- W ∪ X ∪ Y is contained in at most 3 edges. For a fixed constant c <
1, wedefine
Gap c - DM- I of Max-3DM-3 hasa perfect matching (a matching M of size m ) or if every matching has size at most cm .5 heorem 2.2. There exists an absolute constant c < c -3DM-3 is NP-hard.Kann showed that Max-3DM-3 is Max-SNP complete by giving an L -reduction fromMax-3SAT- B to Max-3DM-3 [11]. By the celebrated PCP theorem [2, 3] and [4], Kann’sresult immediately implies that Max-3DM-3 is NP-hard to approximate to within somefixed constant factor. However, Kann’s reduction gives a slightly weaker result than The-orem 2.2. In Kann’s reduction, satisfiable instances of 3SAT- B do not necessarily reduceto instances of 3DM-3 which admit perfect matchings. In Appendix A, we describe howto alter Kann’s reduction so that satisfiable instances of 3SAT- B admit perfect matchings,while far-from-satisfiable instances are far from admitting perfect matchings. In this section, we prove the main hardness of approximation results. Specifically, we willprove the following theorems.
Theorem 3.1.
Gap c -3G-MSM and Gap c -3G-MSS are NP-hard. Theorem 3.2.
There exists an absolute constant c < c -3PSA-MSM andGap c -3PSA-MSS are NP-hard. GSM with Many Unstable Triples
Theorem 3.3.
There exist preferences P for 3GSM and a constant c < P ) ≤ cn .We describe preferences P for which every marriage has Ω( n ) blocking triples below.Assuming n is even, we partition each gender into two equal sized sets A = A ∪ A , B = B ∪ B , and D = D ∪ D player preferences a ∈ A B D B D · · · a ∈ A B D · · · b ∈ B A D · · · b ∈ B A D A D · · · d ∈ D A B A D · · · d ∈ D A B · · · The sets appearing in the preferences indicate that the player prefers all pairs in that set(in any order) followed by the remaining preferences. For example, all a ∈ A prefer allpartners bd ∈ B × D , followed by all partners in B × D , followed by all other pairsin arbitrary order. Within B × D and B × D , a ’s preferences are arbitrary. The fullproof of Theorem 3.3 is given in Appendix B. The complexity class Max-SNP was introduced by Papadimitriou and Yannakakis in [18], where theauthors also show that Max-3SAT- B is Max-SNP complete. .2 The Embedding We now describe an embedding of 3DM-3 into 3G-MSM. Our embedding is a modificationof the embedding described by Ng and Hirschberg [16]. Let I be an instance of 3DM-3 withground sets W, X, Y and edge set E . We assume | W | = | X | = | Y | = m . We will constructan instance f ( I ) of 3G-MSM with sets A, B and D of women, men and dogs of size n = 6 m and suitable preferences P . We divide each gender into two sets A = A ∪ A , B = B ∪ B and D = D ∪ D where (cid:12)(cid:12) A j (cid:12)(cid:12) = (cid:12)(cid:12) B j (cid:12)(cid:12) = (cid:12)(cid:12) D j (cid:12)(cid:12) = 3 m for j = 1 ,
2. Let W = { a , a , . . . , a m } , X = { b , b , . . . , b m } and Y = { d , d , . . . , d m } , and denote E = n (cid:91) i =1 { a i b k d (cid:96) , a i b k d (cid:96) , a i b k d (cid:96) } . Without loss of generality, we assume each a i is contained in exactly 3 edges by possiblyincreasing the multiplicity of edges containing a i . For j = 1 ,
2, we form sets A j = (cid:110) a ji [ k ] (cid:12)(cid:12)(cid:12) i ∈ [ n ] , k ∈ [3] (cid:111) , B j = (cid:110) b ji , w ji , y ji (cid:12)(cid:12)(cid:12) i ∈ [ n ] (cid:111) , D j = (cid:110) d ji , x ji , z ji (cid:12)(cid:12)(cid:12) i ∈ [ n ] (cid:111) for j = 1 ,
2. We now define preferences for each set of players, beginning with those in A . a i [ m ] w i x i y i z i b k m d (cid:96) m B D B D · · · a i [ m ] w i x i y i z i b k m d (cid:96) m B D · · · The players in B have preferences given by w i a i [1] x i a i [2] x i a i [3] x i A D · · · y i a i [1] z i a i [2] z i a i [3] z i A D · · · b i A D · · · w i a i [1] x i a i [2] x i a i [3] x i A D A D · · · y i a i [1] z i a i [2] z i a i [3] z i A D A D · · · b i A D A D · · · The preferences for D are given by x i a i [3] w i a i [2] w i a i [3] w i A B A B · · · z i a i [3] y i a i [2] y i a i [3] y i A B A B · · · d i A B A B · · · x i a i [3] w i a i [2] w i a i [3] w i A B · · · z i a i [3] y i a i [2] y i a i [3] y i A B · · · d i A B · · · A j , B j and D j in the preferences described above indicate that all players in thesesets appear consecutively in some arbitrary order in the preferences. Ellipses indicate thatall remaining preferences may be completed arbitrarily. For example, a [1] most prefers w x , followed by y z and b k m d (cid:96) m . She then prefers all remaining pairs in B D in anyorder, followed by all pairs in B D , followed by the remaining pairs in any order. Lemma 3.4.
The embedding f : 3DM-3 −→ I ) = m —that is, I admits a perfect matching—then f ( I ) admits a stablemarriage (i.e. MSM( P ) = n ).2. If opt( I ) ≤ cm for some c <
1, then there exists a constant c (cid:48) < c such that MSM( P ) ≤ c (cid:48) n . Proof.
To prove the first claim assume, without loss of generality, that M (cid:48) = { a i b k d (cid:96) | i ∈ [ n ] } is a perfect matching in E . It is easy to verify the marriage M = (cid:110) a ji [1] b jk d j(cid:96) (cid:111) ∪ (cid:110) a ji [2] w ji x ji (cid:111) ∪ (cid:110) a ji [3] y ji z ji (cid:111) contains no blocking triples, hence is a stable marriage.For the second claim, let M be an arbitrary marriage in A × B × D . We observe thatthere are at least (1 − c ) m players a ∈ A and (1 − c ) m players a ∈ A that are notmatched with pairs from their top three choices. Suppose to the contrary that α > (2+ c ) m players a ∈ A are matched with their top 3 choices. This implies that more than cm women a ∈ A are matched in triples of the form a b k d (cid:96) with ab k d (cid:96) ∈ E , implying that E contains a matching of size α − m > cm , a contradiction. Thus at least 2(1 − c ) m womenin A ∪ A are matched below their top three choices.Let A (cid:48) denote the set of women matched below their top three choices, and B (cid:48) and D (cid:48) thesets of partners of a ∈ A (cid:48) in M . By the previous paragraph, | A (cid:48) | ≥ − c ) m = (1 − c ) m/ A (cid:48) , B (cid:48) and D (cid:48) are precisely those describedin Theorem 3.3. Thus, by Theorem 3 .
3, any marriage M among these players induces atleast | A (cid:48) | /
128 blocking triples. Hence M must contain at least | A (cid:48) | ≥ (1 − c ) n blocking triples. Proof of Theorem 3.1.
The reduction f : 3DM-3 −→ f is a polynomial time reduction from Gap c -3DM-3 to Gap c (cid:48) -3G-MSM where c (cid:48) = 1 − (1 − c ) / c -3G-MSM isthen an immediate consequence of Theorem 2.2.The hardness of Gap c -3G-MSS is a consequence of the hardness Gap c -3G-MSM. Con-sider an instance of 3GSM with preferences P . We make the following observations.8. MSM( P ) = n if and only if MSS( P ) = n .2. If MSM( P ) ≤ (1 − ε ) n for ε >
0, then MSS( P ) ≤ (1 − ε ) n .The first observation is clear. To prove the second, suppose that MSS( P ) > (1 − ε ) n , andlet S be a maximum stable submarriage. We can form a marriage M by arbitrarily adding εn disjoint families to S . Since each new family can induce at most 3 n blocking triples, M has at most 3 εn blocking triples, hence MSM( P ) > (1 − ε ) n . The two observationsabove imply that any decider for Gap (1 − ε ) -3G-MSS is also a decider for Gap (1 − ε ) -3G-MSM. Thus, the NP-hardness of Gap c -3G-MSM immediately implies the analogous resultfor Gap c -3G-MSS.A sketch of the proof of analogous lower bounds for 3PSA is given in Appendix C.1. GSM approximation
In this section, we describe a polynomial time approximation algorithm for MSM, therebyproving Theorem 1.2. Consider an instance of 3GSM with preferences P , and as before A = { a , a , . . . , a n } , B = { b , b , . . . , b n } , and D = { d , d , . . . , d n } . Given a triple a i b j d k ,we define its stable set S ijk to be the set of (indices of) triples which cannot form unstabletriples with a i b j d k . Specifically, we have S ijk = (cid:8) αβδ ∈ [ n ] (cid:12)(cid:12) b β d δ (cid:22) a i b j d k , α = i (cid:9) ∪ (cid:8) αβδ ∈ [ n ] (cid:12)(cid:12) a α d δ (cid:22) b j a i d k , β = j (cid:9) ∪ (cid:8) αβδ ∈ [ n ] (cid:12)(cid:12) a α b β (cid:22) d k a i b j , δ = k (cid:9) The idea of our algorithm is to greedily form families that maximize | S ijk | . Pseudocode isgiven in Algorithm 1. Algorithm 1 AMSM ( A, B, D, P )find ijk ∈ [ n ] which maximize | S ijk | A (cid:48) ← A \ { a i } , B (cid:48) ← B \ { b j } , D (cid:48) ← D \ { d k } P (cid:48) ← P restricted to A (cid:48) , B (cid:48) , and D (cid:48) return { a i b j d k } ∪ AMSM ( A (cid:48) , B (cid:48) , D (cid:48) , P (cid:48) )It is easy to see that AMSM can be implemented in polynomial time. The naivealgorithm for computing | S ijk | for fixed ijk ∈ [ n ] by iterating through all triples αβδ ∈ [ n ] and querying each player’s preferences can be implemented in time ˜ O ( n ). The maximalsuch | S ijk | can then be found by iterating through all ijk ∈ [ n ] . Thus the first stepin AMSM can be accomplished in time ˜ O ( n ). Finally, the recursive step of AMSM terminates after n iterations, as each iteration decreases the size of A , B , and D by one.9 emma 4.1. For any preferences P , and sets A , B and D with | A | = | B | = | D | = n , thereexists a triple ijk ∈ [ n ] with | S ijk | ≥ n − n − . (1) Proof.
We will show that there exists a triple a i b j d k such that at least two of a i , b j , and d k respectively rank b j d k , a i d k , and a i b j among their top n / (cid:12)(cid:12)(cid:8) βδ ∈ [ n ] (cid:12)(cid:12) b β d δ (cid:23) a i b j d k (cid:9)(cid:12)(cid:12) ≤ n , (cid:12)(cid:12)(cid:8) αδ ∈ [ n ] (cid:12)(cid:12) a α d δ (cid:23) b j a i d k (cid:9)(cid:12)(cid:12) ≤ n , and (cid:12)(cid:12)(cid:8) αβ ∈ [ n ] (cid:12)(cid:12) a α b β (cid:23) d k a i b j (cid:9)(cid:12)(cid:12) ≤ n a i b j d k which satisfies one of the above inequalities. Each a i induces n + 1marks, so we get n + n marks from all a ∈ A . Similarly, we get n + n marks from B and D . Thus, marks are placed on at least n + 3 n triples. By the pigeonhole principle, atleast one triple is marked twice.We claim that the triple a i b j d k satisfying two of the above inequalities satisfies equa-tion (1). Without loss of generality, assume that a i b j d k satisfies the first two equations.Thus, a i and b j must each contribute at least n − a i b j d k .Further, at most n − a i and b j , as such triplesmust be of the form a i b j d δ for δ (cid:54) = k . Thus (1) is satisfied, as desired.We are now ready to prove that AMSM gives a constant factor approximation for themaximally stable marriage problem.
Proof of Theorem 1.2.
Let M be the marriage found by AMSM , and suppose M = { a b d , a b d , . . . , a n b n d n } where a b d is the first triple found by AMSM , a b d is the second, et cetera. ByLemma 4.1, | S | ≥ n − O ( n ). Therefore, the players a , b , and d can be contained inat most n + O ( n ) unstable triples in any marriage containing the family a b d . Similarly,for 1 ≤ i ≤ n the i th family a i b i d i can contribute at most ( n − i + 1) + O ( n ) new unstabletriples (not containing any a j , b j , or d j for j < i ). Thus, the total number of unstabletriples in M is at most n (cid:88) i =1 (cid:18)
53 ( n − i + 1) + O ( n ) (cid:19) = 59 n + O ( n ) . Thus, we have stab( M ) ≥ n / − O ( n ) as desired.A proof of the analogous result for 3PSA (Theorem 1.5) is given in Appendix C.2.10 Concluding Remarks and Open Questions
While
AMSM gives a simple approximation algorithm for 3G-MSM, we do not generalizethis result to 3G-MSS. Indeed, even the first two families output by
AMSM may includeblocking triples. We leave the existence of an efficient approximation for 3G-MSS as atantalizing open question.
Open Problem 5.1.
Is it possible to efficiently compute a constant factor approximationto 3G-MSS?Finding an approximation algorithm for maximally stable marriage was made easierby the fact that any preferences admit a marriage/matching with Ω( n ) stable triples.However, for 3G-MSS, it is not clear whether every preference structure admits stablesubmarriages of size Ω( n ). We feel that understanding the approximability of 3G-MSS isa very intriguing avenue of further exploration. Open Problem 5.2.
How small can a maximum stable submarriage/submatching be?What preferences achieve this bound?In our hardness of approximation results (Theorems 3.1 and 3.2), we do not stateexplicit values of c for which Gap c -3G-MSM and Gap c -3G-MSS (and the correspondingproblems for three person stable assignment) are NP-complete. The value implied byour embedding of 3SAT- B via 3DM-3 is quite close to 1. It would be interesting to find abetter (explicit) factor for hardness of approximation. Conversely, is it possible to efficientlyachieve a better than 4 / Open Problem 5.3.
For the maximally stable marriage/matching problems, close thegap between the 4 / − ε )-factor hardness ofapproximation.The preference structure described in the proof of Theorem 3.3 (upon which our hard-ness of approximation results rely), there exist many quartets of pairs b d , b d , b , d ,and b d such that b d (cid:31) a b d and b d (cid:31) a b d . Thus a does not consistently preferpairs including b to those including b or vice versa. Ng and Hirschberg describe suchpreferences as inconsistent , and asked whether consistent preferences always admit a (3gender) stable marriage. Huang [8] showed that consistent preferences need not admit sta-ble marriages, and indeed it is NP-complete to determine whether or not given consistentpreferences admit a stable marriage. Open Problem 5.4.
Are MSM and MSS still hard to approximate if preferences arerestricted to be consistent? 11 eferences [1] Ahmet Alkan. Nonexistence of stable threesome matchings.
Mathematical SocialSciences , 16(2):207–209, 1988.[2] Sanjeev Arora, Carsten Lund, Rajeev Motwani, Madhu Sudan, and Mario Szegedy.Proof Verification and the Hardness of Approximation Problems.
J. ACM , 45(3):501–555, 1998.[3] Sanjeev Arora and Shmuel Safra. Probabilistic Checking of Proofs: A New Charac-terization of NP.
J. ACM , 45(1):70–122, 1998.[4] Irit Dinur. The PCP theorem by gap amplification.
Journal of the ACM (JACM) ,54(3):12, 2007.[5] D Gale and L S Shapley. College Admissions and the Stability of Marriage.
TheAmerican Mathematical Monthly , 69(1):pp. 9–15, 1962.[6] Michael R. Garey and David S. Johnson.
Computers and Intractability: A Guide tothe Theory of NP-Completeness . W. H. Freeman & Co., New York, NY, USA, 1979.[7] Dan Gusfield and Robert W Irving.
The stable marriage problem: structure andalgorithms , volume 54. MIT press Cambridge, 1989.[8] Chien-Chung Huang. Two’s Company, Three’s a Crowd: Stable Family and ThreesomeRoommates Problems. In Lars Arge, Michael Hoffmann, and Emo Welzl, editors,
Algorithms – ESA 2007 , pages 558–569. Springer Berlin Heidelberg, 2007.[9] Robert W Irving, David F Manlove, and Gregg O’Malley. Stable marriage with tiesand bounded length preference lists.
Journal of Discrete Algorithms , 7(2):213–219,2009.[10] Kazuo Iwama, Shuichi Miyazaki, Yasufumi Morita, and David Manlove. Stable mar-riage with incomplete lists and ties. In
Automata, Languages and Programming , pages443–452. Springer, 1999.[11] Viggo Kann. Maximum bounded 3-dimensional matching is MAX SNP-complete.
Information Processing Letters , 37(1):27–35, 1991.[12] Zolt´an Kir´aly. Better and simpler approximation algorithms for the stable marriageproblem.
Algorithmica , 60(1):3–20, 2011.[13] Zolt´an Kir´aly. Linear time local approximation algorithm for maximum stable mar-riage.
Algorithms , 6(3):471–484, 2013. 1214] Donald Ervin Knuth.
Stable marriage and its relation to other combinatorial problems:An introduction to the mathematical analysis of algorithms , volume 10. AmericanMathematical Soc., 1997.[15] David Manlove.
Algorithmics of matching under preferences . World Scientific Pub-lishing, 2013.[16] Cheng Ng and Daniel S Hirschberg. Three-Dimensional Stabl Matching Problems.
SIAM Journal on Discrete Mathematics , 4(2):245–252, 1991.[17] Katarzyna Paluch. Faster and simpler approximation of stable matchings.
Algorithms ,7(2):189–202, 2014.[18] Christos H Papadimitriou and Mihalis Yannakakis. Optimization, approximation,and complexity classes. In
Proceedings of the Twentieth Annual ACM Symposium onTheory of Computing , pages 425–440, New York, NY, USA, 1991. ACM.[19] Alvin E Roth and Marilda A Oliveira Sotomayor.
Two-sided matching: A study ingame-theoretic modeling and analysis . Cambridge University Press, 1992.[20] Hiroki Yanagisawa.
Approximation algorithms for stable marriage problems . PhDthesis, Kyoto University, Graduate School of Informatics, 2007.
A Hardness of Gap c - DM- The goal of this section is to prove Theorem 2.2, the NP hardness of Gap c -3DM-3. Inthe first subsection, we review Kann’s reduction from Max-3SAT- B to Max-3 DM -3. Inthe following subsection, we describe how to modify Kann’s reduction in order to obtainTheorem 2.2. A.1 Kann’s reduction
Let I be an instance of 3SAT- B . Specifically, I consists of a set U of n Boolean variables, U = { u , u , . . . , u n } , and a set C of m clauses C = { c , c , . . . , c m } . Each clause is a disjunction of at most 3 literals, and each variable u i or its negation u i appears in at most B clauses. For each i ∈ [ n ], let d i denote the number of clausesin which u i or u i appears, where d i ≤ B . Kann’s construction begins with the classicalreduction from 3SAT to 3DM used to show the NP-completeness of 3DM, as describedin [6]. Each variable u i gets mapped to a ring of 2 d i edges. The points of the ring13orrespond alternatingly to u i and u i . A maximal matching on the ring corresponds toa choice a truth value of u i : if the edges containing the vertices labeled u i are in thematching, this corresponds to u i having the value true; if the edges containing u i arechosen, this corresponds to u i taking the value false. See Fig 1.In the classical construction, the points of the ring corresponding to u i are connectedto clause vertices via clause edges which encode the clauses in C . This is done in sucha way that the formula I is satisfiable if and only if the corresponding matching problemadmits a perfect matching. The problem with this embedding, however, is that even if arelatively small fraction of clauses in C can be simultaneously satisfied, the correspondingmatching problem may still admit a nearly perfect matching.To remedy this problem, Kann’s reduction maps each Boolean variable u i to many rings.The rings are then connected via a tree structure whose roots correspond to instances of u i in the clauses of C . This tree structure imposes a predictable structure on the maximalmatchings.We denote the parameter K = 2 (cid:98) log(3 B/ (cid:99) which is the number of rings to which each variable u i maps. We denote the “freeelements”—the points on the rings—associate to u i by the variables v i [ γ, k ] and v i [ γ, k ] for 1 ≤ γ ≤ d i , ≤ k ≤ K. These vertices are connected to rings as in Figure 1. The rings are connected via treeedges in 2 d i binary trees, such that for each fixed γ , v i [ γ, , v i [ γ, , . . . , v i [ γ, K ] are theleaves of a tree, and similarly for the v i [ γ, k ]. We label the root of this tree by u i [ γ ] or u i [ γ ]depending on the labels of the leaves. See Figure 2. We refer to the resulting structure for u i as the ring of trees corresponding to u i .The root vertices are connected via clause edges to clause vertices . For each c j ∈ C ,we associate two clause vertices s [ j ] and s [ j ]. If c j is u i ’s γ -th clause in C , then we includethe edge { u i [ γ ] , s [ j ] , s [ j ] } or { u i [ γ ] , s [ j ] , s [ j ] } depending if u i or its negation appears in c j and the parity of the of the tree of rings. Wedenote the resulting instance of 3DM by f ( I ). It is readily apparent from this constructionthat f ( I ) is in fact an instance of 3DM-3: all vertices in the rings of trees are contained inexactly 2 edges, while clause vertices are contained in at most 3 edges. Further, the vertexset V can be partitioned into a disjoint union W ∪ X ∪ Y such that each edge contains onevertex from each of these sets. Kann makes the following observations about the structureof optimal (maximum) matchings in f ( I ). Lemma A.1.
Let I be an instance of 3SAT- B . Let f ( I ) be an instance of 3DM-3 con-structed as above. Then each optimal matching M in f ( I ) is associated with an optimalassignment in I , and has the following structure.14 [1 , k ] v [1 , k ] v [2 , k ] v [3 , k ] v [4 , k ] v [2 , k ] v [3 , k ] v [4 , k ]Figure 1: The ring structure for the embedding of 3SAT- B into 3DM-3. The ring showncorresponds to a variable u i with d i = 4. An optimal matching in the ring corresponds toa truth value of for the variable u i : the blue edges correspond to the value true while thegreen edges correspond to the value false .1. For each variable u i , M contains either all edges containing v i [ γ, k ] or all the edgescontaining v i [ γ, k ], depending on the value u i in the optimal assignment for I .2. From each ring of trees, alternating tree edges are included in M so as to cover alltree (and ring) vertices, except possibly root vertices.3. If c j is satisfied in the optimal assignment in I , then M contains an edge containing s [ j ] and s [ j ].4. If c j is unsatisfied in the optimal assignment in I , then none of the edges containing s [ j ] and s [ j ] are contained in M .In particular, the only possible vertices left uncovered in an optimal matching are clausevertices corresponding to unsatisfied clauses and root vertices.15s a consequence of Kann’s analysis of the optimal matchings in f ( I ), he is able toshow that f is an L -reduction from 3SAT- B to 3DM-3. A.2 Modification of Kann’s reduction
In this section, we describe a reduction f (cid:48) : 3SAT- B −→ I of 3SAT- B , f (cid:48) ( I ) admits a perfect matching. In the reduction f above, even if I is satisfiable, there may be many root vertices that are not in an optimalmatching, M . In particular, if a clause c j is satisfied by u i and u i (cid:48) , then at most one of theedges { u i [ γ ] , s [ j ] , s [ j ] } and (cid:8) u i (cid:48) [ γ (cid:48) ] , s [ j ] , s [ j ] (cid:9) can appear in M . Hence, at most one of u i [ γ ] and u i (cid:48) [ γ (cid:48) ] can appear in M . To remedy thisproblem, we define f (cid:48) ( I ) to be the disjoint union of three copies of f ( I ) f (cid:48) ( I ) = f ( I ) (cid:116) f ( I ) (cid:116) f ( I ) . We then add an edge for each root vertex in f ( I ) that contains the corresponding rootvertices in each disjoint copy of f ( I ). Specifically, if u i [ γ ] , u i [ γ ] , and u i [ γ ] are the threecopies in f (cid:48) ( I ) of a root vertex u i [ γ ] in f ( I ), then we include the edge { u i [ γ ] , u i [ γ ] , u i [ γ ] } (2)in f (cid:48) ( I ). We now describe the structure of optimal matchings M (cid:48) in f (cid:48) ( I ). Let M , M ,and M be the restrictions of an optimal matching M (cid:48) for f (cid:48) ( I ) to f ( I ) , f ( I ) , and f ( I ) respectively. Thus, we can write M (cid:48) = M ∪ M ∪ M ∪ R (3)where R contains those edges in M (cid:48) of the form (2). Lemma A.2.
There exists an optimal matching M (cid:48) for f (cid:48) ( I ) such that the matchings M , M , and M contain precisely the same edges as an optimal matching M for f ( I ). Proof.
Suppose M (cid:48) is an optimal matching for f (cid:48) ( I ). We may assume without loss ofgenerality that the matchings M , M and M are all identical to some matching M on f ( I ). Indeed, if, say M is the largest of the three matchings, we can increase the size of M (cid:48) by replacing M and M with identical copies of M . Since the only edges between M , M , and M are edges of the form (2), replacing M and M with copies of M cannotdecrease the size of M (cid:48) . Thus, we may assume that (cid:12)(cid:12) M (cid:48) (cid:12)(cid:12) = 3 | M | + | R | where M is some matching on f ( I ), and R consists of edges of the form (2).16e will now argue that M is indeed an optimal matching on f ( I ), hence has the formdescribed in Lemma A.1. Notice that if M is optimal for f ( I ), then by including all edgesin R containing uncovered root vertices, M (cid:48) covers every ring, tree, and root vertex. Thus,the only way to obtain a larger matching would be to include more clause edges. However,by Lemma A.1, including more clause edges cannot increase the size of the matching M .Thus, we may assume M is an optimal matching for f ( I ). Corollary A.3. If I is an instance of 3-SAT- B with m clauses and opt( I ) = cm for some c ≤
1, then an optimal matching M (cid:48) in f (cid:48) ( I ) leaves precisely 6(1 − c ) m vertices uncovered. Lemma A.4.
There exists a constant
C > B such that the numberof vertices in f (cid:48) ( I ) is at most Cm . Proof.
We bound the number of ring, tree, and clause vertices separately. Since the vertexset of f (cid:48) ( I ) consists of three disjoint copies of the vertices in f ( I ), it suffices to bound thenumber of vertices in f ( I ). Ring vertices
For each variable u i , there are K = O ( B ) rings, each consisting of 4 d i = O ( B ). Thus there are O ( B ) ring vertices for each variable u i , hence a total of O ( B n ) ring vertices in f ( I ). Tree vertices
Since each ring vertex of the form v i [ γ, k ] is the leaf of a complete binarytree whose internal nodes and root are tree vertices, there are O ( B n ) tree verticesin f ( I ). Clause vertices
There two vertices s [ j ] and s [ j ] associated to each of m clauses, hencethere are O ( m ) clauses in total.Therefore, the total number of vertices in f ( I ) and hence f (cid:48) ( I ) is O ( m + B n ). Clearly,we may assume that n ≤ m , so that there are O ( B m ) vertices in f (cid:48) ( I ). Corollary A.5.
Let I be an instance of 3SAT- B , and let M ∗ = | f (cid:48) ( I ) | = | f ( I ) | be thenumber of vertices in f ( I ). Then for any c <
1, there exists a constant c (cid:48) < c and B such that: • if opt( I ) = m (i.e., I is satisfiable) then opt( f (cid:48) ( I )) = M ∗ ; • if opt( I ) ≤ cm then opt( f (cid:48) ( I )) ≤ c (cid:48) M ∗ .Theorem 2.2 follows immediately from Corollary A.5 and the following incarnation ofthe PCP theorem. Theorem A.6 (PCP Theorem [3, 2, 4]) . There exist a absolute constants c < B such that it is NP-hard to determine if an instance I of 3SAT- B satisfies opt( I ) = m oropt( I ) ≤ cm . 17 Preferences with Many Unstable Triples
We first consider the case where n = 2. We denote A = { a , a } , B = { b , b } , and D = { d , d } . Consider preference lists P as described in the following table, where mostpreferred partners are listed first.player preferences a b d b d · · · a b d · · · b a d · · · b a d a d · · · d a b a b · · · d a b · · · The ellipses indicate that the remaining preferences are otherwise arbitrary. Suppose M is a stable marriage for P . We must have either a b d ∈ M or a b d ∈ M , for otherwisethe triple a b d is unstable. However, if a b d ∈ M , then a b d is unstable. On theother hand, if a b d ∈ M then a b d is unstable. Therefore, no such stable M exists. Inparticular, every marriage M contains at least one unstable triple.The idea of the proof of Theorem 3.3 is to choose preferences P such that when restrictedto many sets of two women, two men and two dogs, the preferences are as above. Thusany marriage containing families consisting of these players must induce unstable triples. Proof of Theorem 3.3.
We partition the sets A , B and D each into two sets of equal size: A = A ∪ A , B = B ∪ B , D = D ∪ D . Consider the preferences P described inSection 3.1. We will prove that for P , every matching M contains at least n /
128 unstabletriples. Let M be an arbitrary marriage, and suppose ins( M ) < n / Case 1: | M ∩ ( A × B × D ) | ≤ n/ . Let A (cid:48) , B (cid:48) and D (cid:48) be the subsets of A , B and D respectively of players not in triples contained in A × B × D . By the hypothesis, | A (cid:48) | , | B (cid:48) | , | D (cid:48) | ≥ n/
4. Let d ∈ D (cid:48) . Notice that if p M ( d ) / ∈ A × B , then a b d isunstable for all a ∈ A (cid:48) , b ∈ B (cid:48) . Since fewer than n /
128 triples in A (cid:48) × B (cid:48) × D (cid:48) are unstable, at least 3 n/ d ∈ D (cid:48) must have families a b d ∈ A × B × D (cid:48) .Since | M ∩ ( A × B × D ) | ≥ n/
8, we must have | M ∩ ( A × B × D ) | ≤ n/ n/ a ∈ A with partners not in ( B × D ) ∪ ( B × D ). However, every such a forms an unstable triple with every b ∈ B and d ∈ D which are not in families in A × B × D . Since there at least 3 n/ b and d , there are at least (cid:16) n (cid:17) (cid:18) n (cid:19) (cid:18) n (cid:19) > n ase 2: | M ∩ ( A × B × D ) | > n/ . In this case, we must have | M ∩ ( A × B × D ) | 4. This implies that | M ∩ ( A × B × D ) | > n/ a b d ∈ ( A × B × D ) with p M ( b ) / ∈ A × D form more than n / 128 unstable triples. But (4) contradicts the Case 2 hypothesis, as | A | = n/ M contains at least n / 128 unstable triples, as desired. C Results for PSA In this appendix, we prove our main results for 3PSA, Theorems 3.2 and 1.5. C.1 PSA hardness of approximation Proof sketch of Theorem 3.2. As noted in Remark 2.1, we may view 3GSM as a specialcase of 3PSA with incomplete preferences. The NP-hardness of approximation of 3PSAwith incomplete preferences is analogous to the proof of Theorem 3.1. Given an instance I of 3GSM with sets A , B , and D and preferences P , take U = A ∪ B ∪ D and form 3PSApreferences P (cid:48) by appending the remaining pairs to P arbitrarily. Analogues of Theorem3.3 and Lemma 3.4 hold for this instance of 3PSA, whence Theorem 3.2 follows. We leavedetails to the reader. C.2 PSA approximation AMSM can easily be adapted for 3PSA. Let U be a set of players with | U | = 3 n , and let P be a set of complete preferences for the players in U . Given a triple abc ∈ (cid:0) U (cid:1) , we formthe stable set S abc consisting of triples that at least one of a , b , c does not prefer to abc .The approximation algorithm ASA for 3PSA is analogous to AMSM : form a matching M by finding a triple abc that maximizes | S abc | , then recursing. The following lemma andits proof are analogous to Lemma 4.1. Lemma C.1. For any set U of players with | U | = 3 n and complete preferences P , thereexists a triples abc ∈ (cid:0) U (cid:1) such that | S abc | ≥ n − O ( n ) . Using Lemma C.1, we prove Theorem 1.5 analogously to Theorem 1.2. Proof of Theorem 1.5. Each triple abc can intersect at most 3 (cid:0) n (cid:1) ≤ n blocking triples.Thus, by Lemma C.1, the total number blocking triples in the matching M found by ASA 19s at most n − (cid:88) i =0 (cid:18) 152 ( n − i + 1) + O ( n ) (cid:19) = 52 n + O ( n ) . Therefore, stab( M ) ≥ n − O ( n ) , as the total number of triples in (cid:0) U (cid:1) is n − O ( n ). Hence M is a -approximation to amaximally stable matching, as desired. 20 i [ γ ] v [ γ, v [ γ, v [ γ, K − v [ γ, K ]... ... · · · Figure 2: The ring of trees structure for Kann’s embedding of 3SAT- B into 3DM-3.The red edges are tree edges . In addition to the tree shown, the ring of trees contains(identical) trees for each u i [ γ ] and u i [ γ ]. In the example pictured, γ ranges from 1 to4. The root vertices are labeled u i [1] , u i [1] , . . . , u i [ d i ] , u i [ d i ] where d i is the number ofoccurrences of u i or its negation in I . As described in Lemma A.1, an optimal matching inthe ring of trees can be obtained by a consistent choice of all blue or green vertices in allthe rings associated to u i , then covering as many remaining vertices as possible with treeedges (a greedy “leaf to root” approach works). It is clear that such a matching will coverall vertices, except for half of the root vertices (those corresponding to either u i or u ii