key: cord-0229007-kdf07op1 authors: Kavitha, Telikepalli title: Maximum Matchings and Popularity date: 2020-11-06 journal: nan DOI: nan sha: e46cbb0248fab40c8c33a26ec6c62467c21ad253 doc_id: 229007 cord_uid: kdf07op1 Let $G$ be a bipartite graph where every node has a strict ranking of its neighbors. For every node, its preferences over neighbors extend naturally to preferences over matchings. Matching $N$ is more popular than matching $M$ if the number of nodes that prefer $N$ to $M$ is more than the number that prefer $M$ to $N$. A maximum matching $M$ in $G$ is a"popular max-matching"if there is no maximum matching in $G$ that is more popular than $M$. Such matchings are relevant in applications where the set of admissible solutions is the set of maximum matchings and we wish to find a best maximum matching as per node preferences. It is known that a popular max-matching always exists in $G$. Here we show a compact extended formulation for the popular max-matching polytope. So when there are edge costs, a min-cost popular max-matching in $G$ can be computed in polynomial time. This is in contrast to the min-cost popular matching problem which is known to be NP-hard. We also consider Pareto-optimality, which is a relaxation of popularity, and show that computing a min-cost Pareto-optimal matching/max-matching is NP-hard. Consider a bipartite graph G = (A ∪ B, E) on n nodes and m edges where every node ranks its neighbors in a strict order of preference. The goal is to find an optimal matching in G and the typical notion of optimality in such an instance is stability. A matching M is stable if no edge blocks M ; an edge (a, b) blocks M if a and b prefer each other to their respective assignments in M . Gale and Shapley [14] in 1962 showed that stable matchings always exist in G and gave a linear time algorithm to find one. Stable matchings and their variants are used in many real-world applications such as matching students to schools and colleges [1, 4] . Observe that stability empowers every edge with the power to block a matching -thus this is a rather strict notion. Popularity is a natural relaxation of stability that captures collective decision. Preferences of a node over its neighbors extend naturally to preferences over matchings as follows. We say node u prefers matching M to matching N if (i) u is matched in M and unmatched in N or (ii) u is matched in both M and N and it prefers its partner in M to its partner in N . Let φ(M, N ) be the number of nodes that prefer M to N and similarly, let φ(N, M ) be the number of nodes that prefer N to M . We say N is more popular than M if φ(N, M ) > φ(M, N ). The notion of popularity was introduced by Gärdenfors [16] in 1975 and he observed that every stable matching is popular. One of the main merits of popularity is that it allows larger matchings compared to stable matchings. All stable matchings have the same size [15] which may be as low as |M max |/2 (where M max is a maximum matching in G) and it is known that there is always a popular matching of size at least 2|M max |/3 and there are simple instances with no larger popular matching [20] . Maximum Matchings. In the domain of matchings under preferences, there are applications where the size of the matching computed is of utmost importance, say, in assigning doctors to hospitals during a pandemic. For instance, during the covid-19 pandemic in Mumbai, public hospitals were overwhelmed with rising number of patients and were severely short-staffed; so doctors associated with private clinics were asked to also work in public hospitals [3, 19] . This problem can be modeled as described below. 1 A relaxation of popularity. Pareto-optimality is a natural relaxation of popularity that any reasonable matching in this domain should satisfy. If M is a matching that is not Pareto-optimal then there is a better matching N , i.e., no node is worse-off in N than in M and at least one node is better-off. The unpopularity factor of M is defined as follows [24] : u(M ) = max N =M φ(N, M )/φ(M, N ). A matching M is Pareto-optimal if u(M ) < ∞. So there is no matching N such that φ(N, M ) > 0 and φ(M, N ) = 0. Observe that a popular matching M satisfies u(M ) ≤ 1. A maximum matching M that satisfies u(M ) < ∞ is a Pareto-optimal max-matching. We show that it is NP-hard to find a min-cost Pareto-optimal matching/max-matching (see Theorem 12) . Background. Many algorithmic questions in popular matchings have been investigated in the last 10-15 years; we refer to [6] for a survey. In the domain of popular matchings with two-sided preferences (every node has a preference order ranking its neighbors), other than a handful of positive results [8, 17, 20, 22] , most optimization problems (incl. finding a popular matching that is not a min-size/max-size popular matching) have turned out to be NP-hard [10] . Computing a min-cost quasi-popular matching M , i.e., u(M ) ≤ 2, is also NP-hard [9] . Compact extended formulations for the dominant matching 3 polytope [8, 9] and the popular fractional matching polytope [21, 23] are known but the popular matching polytope has near-exponential extension complexity [9] . Thus in contrast to stable matchings, the landscape of popular matchings has only a few positive results. However, within the set of maximum matchings, the notion of popularity seems more suitable than stability for algorithmic results. In the context of stability, a best maximum matching would be one with the least number of blocking edges. The problem of finding a maximum matching with the least number of blocking edges was considered in [5] and was shown to be NP-hard. Though an O(mn) time algorithm to find a popular max-matching in G is known [20] , there are no previous results on the optimization variant of this problem, i.e., to find a min-cost popular max-matching, which is a natural problem here. It is common in this domain to have an efficient algorithm to find a maxsize matching in some class -say, Pareto-optimal matchings for one-sided preferences (only nodes in A have preferences) studied in [2] or popular matchings [17, 20] , however finding a min-cost matching in such a class is NP-hard [2, 10] . Thus the existence of an efficient algorithm to find some popular max-matching was no guarantee on the tractability of the min-cost popular max-matching problem. Our Techniques. An algorithm called the "|A|-level Gale-Shapley algorithm" was given in [20] to find a popular max-matching in G = (A ∪ B, E). As we show in Section 2, this algorithm is equivalent to running Gale-Shapley algorithm in an auxiliary instance G * with |A| copies of each node in A and the proof in [20] can be easily adapted to show that there is a linear map from the set of stable matchings in G * to the set of popular max-matchings in G (see Theorem 5) . Our novel contribution here is to show that this map is surjective, i.e., every popular max-matching in G is the image of a stable matching in G * Our proof that every popular max-matching in G has a stable matching in G * as its preimage is based on LP-duality. Here we introduce the notion of dual certificates for popular max-matchings-dual certificates for popular matchings are well-understood: these are elements in {0, ±1} n [21] . We show in Section 3 that every popular max-matching in G has a dual certificate α ∈ Z n where α a ∈ {0, −2, −4, . . .} for a ∈ A and α b ∈ {0, 2, 4, . . .} for b ∈ B and α-values for some nodes can be restricted to fixed values (see Theorem 8) . Given a popular max-matching M in G and such a dual certificate α, we use α to construct a preimage S for M and prove that S is a stable matching in G * . In this section we first show a simple characterization of popular max-matchings. Then we show a method to construct matchings that satisfy this characterization. Let M be any matching in G = (A ∪ B, E). The following edge weight function wt M will be useful here. For any (a, b) ∈ E: Proof. Let M be a popular max-matching. We need to show that conditions (1) and (2) given in the theorem statement hold. Suppose not. Then there exists either an alternating path with an unmatched node as an endpoint or an alternating cycle wrt M (call this path/cycle ρ) such that wt M (ρ) > 0. Since wt M (e) ∈ {0, ±2}, wt M (ρ) ≥ 2. Consider N = M ⊕ρ. This is a maximum matching in G and observe that ∆(N, M ) ≥ wt M (ρ)−1. We are subtracting 1 here to count for that endpoint of ρ (when ρ is a path) that is matched in M but will become unmatched in N . Since wt M (ρ) ≥ 2, ∆(N, M ) ≥ 1. So N is more popular than M : this is a contradiction to M 's popularity within the set of maximum matchings. Thus conditions (1) and (2) have to hold. To show the converse, suppose M is a maximum matching that obeys conditions (1) and (2) . Consider the symmetric difference M ⊕ N , where N is any maximum matching in G and let C be any alternating cycle here. We know from (1) that wt M (C) ≤ 0. Let p be any alternating path in M ⊕ N . Since M and N are maximum matchings, p is an alternating path with exactly one node not matched in M as an endpoint. We know from (2) that wt M (p) ≤ 0. So we have: Thus M is popular within the set of maximum matchings in G. An auxiliary instance G * . We will now construct a new instance G * = (A * ∪ B * , E * ) such that every stable matching in G * maps to a maximum matching in G that satisfies properties (1) and (2) given in Theorem 4. The structure of the instance G * is inspired by an instance used in [8] whose stable matchings map to dominant matchings in G. We describe the node sets A * and B * . Let n 0 = |A|. For every a ∈ A, the set A * has n 0 copies of a: call them a 0 , . . . , a n0−1 . So A * = ∪ a∈A {a 0 , . . . , a n0−1 }. is a copy of the set B. So along with nodes inB, the set B * also contains n 0 − 1 nodes d 1 (a), . . . , d n0−1 (a) for each a ∈ A. These will be called dummy nodes. The edge set. For each (a, b) ∈ E, the edge set E * contains n 0 edges (a i ,b) for 0 ≤ i ≤ n 0 − 1. For each a ∈ A and i ∈ {1, . . . , n 0 − 1}, E * also has (a i−1 , d i (a)) and (a i , d i (a)). The purpose of d 1 (a), . . . , d n0−1 (a) is to ensure that in any stable matching in G * , at most one node among a 0 , . . . , a n0−1 is matched to a neighbor inB. For each i ∈ {1, . . . , n 0 − 1}, the preference order of d i (a) is a i−1 a i . Preference orders. Let a's preference order in G be b 1 · · · b k . Then a 0 's preference order in G * is b 1 · · · b k d 1 (a), i.e., it is analogous to a's preference order in G with d 1 (a) added as a 0 's last choice. -For i ∈ {1, . . . , n 0 − 2}, the preference order of a i in G * is as follows: Since each of a 0 , . . . , a n0−2 and d 1 (a), . . . , d n0−1 (a) is a top choice neighbor for some node, every stable matching in G * has to match all these nodes. So the only node among a 0 , . . . , a n0−1 , d 1 (a), . . . , d n0−1 (a) that can possibly be left unmatched in a stable matching in G * is a n0−1 . Consider any b ∈ B and let its preference order in G be a · · · z. Then the preference order ofb in G * is a n0−1 · · · z n0−1 all subscript n0 − 1 neighbors a n0−2 · · · z n0−2 all subscript n0 − 2 neighbors · · · a 0 · · · z 0 all subscript 0 neighbors That is,b's preference order in G * is all its subscript n 0 − 1 neighbors, followed by all its subscript n 0 − 2 neighbors, so on, and finally, all its subscript 0 neighbors. For each i ∈ {0, . . . , n 0 − 1}: within all subscript i neighbors, the order of preference forb in G * is b's order of preference in G. The set S . For any stable matching S in G * , define S ⊆ E to be the set of edges obtained by deleting edges in S that are incident to dummy nodes and replacing any edge (a i ,b) ∈ S with the original edge (a, b) ∈ E. Since S matches at most one node among a 0 , . . . , a n0−1 to a neighbor inB, the set S is a valid matching in G. The proof of Theorem 5 is based on the proof of correctness of the |A|-level Gale-Shapley algorithm (from [20] ) in the original instance G. Theorem 5. Let S be a stable matching in G * . Then S is a popular max-matching in G. , a i is matched in S to a neighbor inB. The left-out nodes in A, i.e., those in A\(A 0 ∪· · ·∪A n0−2 ), form the set A n0−1 (see Fig. 1 ). Similarly The dashed edges are blocking edges to S . The following properties hold: (these are proved in the appendix) Properties 1-4 imply that for any alternating cycle C wrt S , we have wt S (C) ≤ 0. Properties 1-5 imply that for any alternating path p with one unmatched node as an endpoint, we have wt S (p) ≤ 0. We refer to [20, Theorem 2] for more details. Property 6 states that S is a maximum matching in G. Hence S is a popular max-matching in G (by Theorem 4). Thus every stable matching in G * maps to a popular max-matching in G. We will show in Section 3 that every popular max-matching in G has to be realized in this manner. This is the tough part and we will use dual certificates here. We will see that dual certificates capture a useful profile of popular max-matchings. We first consider the simple case when G admits a perfect matching. Let M be a popular perfect matching in G. So no perfect matching is more popular than M . Consider the following linear program (LP1) that computes a max-weight (with respect to wt M ) perfect matching in G. It follows from the definition of the function wt M that the optimal value of (LP1) is max N ∆(N, M ) where N is a perfect matching in G. So if M is a popular perfect matching then the optimal value of (LP1) is 0, which is ∆(M, M ), i.e., the edge incidence vector of M is an optimal solution to (LP1). The linear program (LP2) is the dual of (LP1). Hence if M is a popular perfect matching then there exists a dual feasible α such that u∈A∪B α u = 0. Let α be an optimal dual solution. Observe that there exists an integral optimal solution to (LP2) since the constraint matrix is totally unimodular. Thus we can assume that α ∈ Z 2n0 , where n 0 = |A| = |B|. Proof. The dual feasibility constraints are α a + α b ≥ wt M (a, b) for all (a, b) ∈ E. For each edge (a, b) ∈ M : α a + α b = wt M (a, b) = 0 by complementary slackness. Since α b = −α a for (a, b) ∈ M and because wt M (e) ∈ {0, ±2} for each edge e, we can assume that in the sorted order of distinct α-values taken by nodes in A, for any two consecutive values α a , α a , where α a > α a , we have α a − α a = 2. Thus we can assume that Observe that k has no impact on the objective function since |A| = |B|: so k's and −k's cancel each other out. Let us update α as follows: α a = α a − k for every a ∈ A and α b = α b + k for every b ∈ B. The updated vector α continues to be dual feasible since α a + α b , for any edge (a, b), is unchanged by this update. Thus there is an optimal solution α to (LP2) such that α a ∈ {0, −2, −4, . . . , −2(n 0 − 1)} for all a ∈ A and Let M be a popular perfect matching in G. In order to define a stable matching S in G * such that M = S (the set S is defined above Theorem 5), we will use the vector α described in Lemma 6. Since M is perfect, we know that for any a ∈ A, there is an edge (a, b) ∈ M for some neighbor b of a. Recall that α a + α b = wt M (a, b) = 0 by complementary slackness. We will include the edge (a i ,b) in S where α a = −2i and α b = 2i. Thus we define S as follows: In more detail, the edges incident to dummy nodes that are present in S are as follows: if α a = −2i then these edges are (a j , d j+1 (a)) for 0 ≤ j ≤ i − 1 and (a j , d j (a)) for i + 1 ≤ j ≤ n 0 − 1. Since (a i ,b) ∈ S, all the n 0 nodes a 0 , . . . , a n0−1 and the dummy nodes d 1 (a), . . . , d n0−1 (a) corresponding to a in G * are matched in S. This holds for every a ∈ A. Also everyb ∈B is matched in S since M is a perfect matching in G. Thus S is a perfect matching in G * . It is easy to check that S = M . What we need to prove is the stability of S in G * . Proof. We need to show there is no edge in G * that blocks S. There is no blocking edge incident to a dummy node: this is because a dummy node d i (a) has only two neighbors and when d i (a) is matched in S to its second choice neighbor a i , its top choice neighbor a i−1 prefers its partner in S to d i (a). Let us now show that no node in a 0 , . . . , a n0−1 has a blocking edge incident to it, for any a ∈ A. Let (a i ,b) ∈ S where (a, b) ∈ M . All of a i+1 , . . . , a n0−1 are matched to their respective top choice neighbors d i+1 (a), . . . , d n0−1 (a). So there is no blocking edge incident to any of a i+1 , . . . , a n0−1 . All of a 0 , . . . , a i−1 are matched to their last choice neighbors-these are the dummy nodes d 1 (a), . . . , d i (a), respectively. Consider any neighbor w ∈ B of a. We need to show thatw ∈B is matched in S to a neighbor preferred to all of a 0 , . . . , a i−1 . We have α a + α w ≥ wt M (a, w). Since α a = −2i and wt M (e) ≥ −2 for every edge e, it follows that Thus there is no blocking edge betweenw and any of a 0 , . . . , a i−2 byw's preference order in G * . We will now show that (a i−1 ,w) cannot be a blocking edge. -If j ≥ i then byw's preference order in G * ,w prefers z j to a i−1 and so (a i−1 ,w) does not block S. So both a and w prefer their respective partners in M to each other. Thusw prefers Finally, we need to show that there is no blocking edge incident to a i . By the above argument, we only need to consider edges ( Hence either (a, w) ∈ M or one of a, w prefers its partner in M to the other. So either (a i ,w) ∈ S or one of a i ,w prefers its partner in S to the other; thus the edge (a i ,w) does not block S. Hence no edge in G * blocks S. We showed that when G has a perfect matching, our mapping from the set of stable matchings in G * to the set of popular max-matchings in G is surjective. Now we look at the general case, i.e., G need not have a perfect matching. Let M be a popular max-matching in G. Let U ⊆ A ∪ B be the set of nodes left unmatched in M . Consider (LP3) that computes a max-weight perfect matching (with respect to wt M ) in the subgraph G induced on The optimal value of (LP3) is max N ∆(N, M ) where N is a perfect matching in G . Any perfect matching in G is a maximum matching in G and since M is a popular max-matching in G, ∆(N, M ) ≤ 0 for any perfect matching N in G . Since ∆(M, M ) = 0, the edge incidence vector of M is an optimal solution to (LP3). The linear program (LP4) is the dual of (LP3). subject to Let n = |(A ∪ B) \ U |. There exists an optimal solution α ∈ Z n to (LP4) such that u∈(A∪B)\U α u = 0. Moreover, we can assume the following (see Lemma 6) where A = A \ U , B = B \ U , and |A | = |B | = n 0 : Proof. We know there exists an optimal solution α to (LP4) such that α a ∈ {0, −2, . . . , −2(n 0 − 1)} for a ∈ A and α b ∈ {0, 2, . . . , 2(n 0 − 1)} for b ∈ B . Now we will update α so that it remains an optimal solution to (LP4) in the above format and it also satisfies properties (i) and (ii) given in the theorem statement. We will first update α so that α b = 2(n 0 − 1) for all b ∈ Nbr(U A ), i.e., property (ii) is obeyed. We will then update α so that it satisfies α a = 0 for all a ∈ Nbr(U B ), i.e., property (i) is obeyed. We then use the fact that M is a maximum matching to show that the second update did not undo the "good" caused by the first update, i.e., α satisfies property (i) and property (ii). Property (ii). Suppose the original vector α ∈ {0, . . . , ±2(n 0 − 1)} n does not satisfy property (ii). Then we will update α so that property (ii) is satisfied. First, we increase the α-values of nodes in Nbr(U A ) to 2(n 0 − 1) and decrease the α-values of their partners in M to −2(n 0 − 1). Now α may no longer be a feasible solution to (LP4). We will use the following three update rules for all a ∈ A to make α feasible again. Let At the onset, α was a feasible solution to (LP4): so α a + α b ≥ wt M (a, b) for (a, b) ∈ E . Then we moved nodes in Nbr(U A ) and their partners in M to sets B n0−1 and A n0−1 , resp., where A i = {a ∈ A : α a = −2i} and B i = {b ∈ B : α b = 2i} for all i. The subscript i will be called the level of nodes in A i ∪ B i . The nodes that moved to A n0−1 have a lower α-value than earlier and it is these nodes that "pull" their neighbors upwards to higher levels as given by rules 1-3. Let a be a new node in level i and let b be a neighbor of a such that α a + α b < wt M (a, b). Then b and M (b) move to: In turn, the nodes in A that have moved to these higher levels by rules 1-3 pull their neighbors and the partners of these neighbors upwards to higher levels by these rules. Thus we may get further new nodes in B n0−1 , A n0−1 and so on. While any of rules 1-3 is applicable, we apply that rule. So a rule may be applied many times to the same edge in E . Claim 1 (proved in the appendix) shows a useful property. We show in its proof that such a blocking edge creates a forbidden alternating cycle/path wrt M (as given in Theorem 4). Claim 1 By applying the above rules, suppose a node v 0 ∈ A moves to A n0−1 . Then there is no blocking edge (e such that wt M (e) = 2) incident to v 0 . Applying rules 1-3 increases the α-values of some nodes in B and it never decreases the α-value of any node in B . The nodes in B with increased α-values and their partners have moved to higher levels (see Fig. 1 ). This upwards movement of nodes has to terminate at level n 0 − 1. For the α-value of any b ∈ B to be increased beyond 2(n 0 − 1), we need a blocking edge (a, b) where a ∈ A n0−1 : this would cause rule 3 to be applied which would increase α b to 2n 0 . However there is no such blocking edge (by Claim 1). Since there are n 0 levels and because |B | = n 0 , there can be at most n 2 0 applications of these rules. When no rule is applicable, α is a feasible solution to (LP4). Moreover, u α u is invariant under this update of α-values, since we maintain α a + α b = 0 for every (a, b) ∈ M . Hence α is an optimal solution to (LP4). Thus for every popular max-matching M , there is an optimal solution α to (LP4) in the desired format that satisfies property (ii). Property (i). We now have an optimal solution α ∈ {0, ±2, . . . , ±2(n 0 − 1)} n to (LP4), where α a ≤ 0 for all a ∈ A and α b ≥ 0 for all b ∈ B , such that α b = 2(n 0 − 1) for all b ∈ Nbr(U A ). Suppose property (i) is not satisfied. Then we increase α-values of certain nodes in A -this moves several nodes downwards with respect to their level (see Fig. 1 ) and ensures that property (i) holds. First, we increase the α-values of nodes in Nbr(U B ) to 0 and their partners also have α-values updated to 0. Then we will use the following three update rules for all b ∈ B . Let α b = 2i where i ∈ {0, . . . , n 0 − 1}. Suppose there is an edge (a, b) ∈ E such that α a + α b < wt M (a, b). Let M (a) be a's partner in M . Applying rules 4-6 increases the α-values of some nodes in A and it never decreases the α-value of any node in A . The nodes in A with increased α-values and their partners have moved to lower levels. Moreover, the movement of nodes downwards has to stop at level 0 since no blocking edge can be incident to any node that moves to B 0 (analogous to Claim 1). While any of the above three rules is applicable, we apply that rule. When no rule is applicable, α is a feasible solution to (LP4). Since u α u = 0, α is an optimal solution to (LP4). So there is an optimal solution α to (LP4) in the desired format that satisfies property (i). Properties (i) and (ii). Note that we cannot claim straightaway that the above α satisfies both property (i) and property (ii). This is because rules 4-6 pull nodes downwards and this may have caused α b < 2(n 0 − 1) for some b ∈ Nbr(U A ). We will now show this is not possible. Suppose there is such a node w 1 ∈ Nbr(U A ). So there is some z ∈ U A such that (z, w 1 ) ∈ E and though α w1 = 2(n 0 −1) just before we started applying rules 4-6, the application of these rules caused w 1 to move downwards, i.e., α w1 < 2(n 0 −1) at the end. Initially we added nodes in Nbr(U B ) and their partners in M to A 0 and B 0 , respectively. Then we repeatedly applied rules 4-6 and this resulted in w 1 moving downwards from level n 0 −1. Corresponding to what caused w 1 to be "pulled" downwards, we will construct an alternating path p = w 1 −M (w 1 )−w 2 −M (w 2 )−· · ·−w r −M (w r )−u between w 1 and some node u ∈ U B . The path p will consist of r pairs of edges for some r ≥ 1. For 1 ≤ i ≤ r − 1: the i-th pair of edges is (w i , M (w i )) and (M (w i ), w i+1 ) where w i+1 is the node that pulled M (w i ) and w i downwards to their level due to the application of one of rules 4-6. The last pair of edges in p is (w r , M (w r )) and (M (w r ), u), where w r ∈ B 0 , M (w r ) ∈ A 0 , and u ∈ U B . Thus we have an alternating path p wrt M between w 1 and u ∈ U B . By adding the edge (z, w 1 ) as a prefix to the path p, we get an augmenting path z − w 1 − · · · − M (w r ) − u with respect to M . However there cannot be any augmenting path wrt M since M is a maximum matching in G. Thus α satisfies property (ii). So we have an optimal solution α to (LP4) in the desired format that satisfies both property (i) and property (ii). Theorem 9. Let M be any popular max-matching in G. Then there is a stable matching S in the graph G * such that M = S . Proof. Let U be the set of nodes left unmatched in M . A useful observation is that every node v in Nbr(U ) has to be matched in M to some neighbor that v prefers to all its neighbors in U . Otherwise by replacing (v, w) ∈ M with (v, u), where v prefers u ∈ U to w, we get a maximum matching more popular than M . In order to construct the matching S in G * , we will use the vector α described in Theorem 8. Let : (a, b) ∈ M and α a = −2i, α b = 2i} ∪ {necessary edges incident to dummy nodes in G * } where for each a ∈ A : if α a = −2i then the necessary edges incident to dummy nodes corresponding to a are (a j , d j+1 (a)) for 0 ≤ j ≤ i − 1 and (a j , d j (a)) for i + 1 ≤ j ≤ n 0 − 1. It is easy to check that S = M . We will now show that S is a stable matching in G * . Consider any edge (a j ,w) in G * where (a, w) ∈ E and 0 ≤ j ≤ n 0 − 1. The proof of Theorem 7 shows that (a j ,w) does not block S. Consider any edge (a, w) in E \ E . -Suppose a ∈ U A . So w ∈ Nbr(U A ): hence α w = 2(n 0 − 1) by property (ii). So (z n0−1 ,w) ∈ S for some neighbor z that w prefers to a. Thus (a n0−1 ,w) does not block S. For i ∈ {0, . . . , n 0 − 2}, none of the edges (a i ,w) can block S (byw's preference order). Finally, no edge incident to a dummy node blocks S. Hence S is stable in G * . Thus there is a linear map that is surjective from the set of stable matchings in G * to the set of popular max-matchings in G (by Theorem 5 and Theorem 9). Hence the stable matching polytope of G * is an extension of the popular max-matching polytope of G. The formulation of the stable matching polytope of G * (from [25] ) is given below. For any node u in G * , the set {v u v} is the set of all neighbors of u in G * that it prefers to v. Let δ * (u) denote the set of edges incident to u in G * . Let T = ∪ a∈A ({a 0 , . . . , a n0−2 } ∪ {d 1 (a), . . . , d n0−1 (a)}): every node in T has to be matched in all stable matchings in G * . -The topmost constraint captures the stability constraint for edge (a i ,b) ∈ E * where (a, b) ∈ E and 0 ≤ i ≤ n 0 − 1. We showed that the polytope described by the above constraints is an extension of the popular maxmatching polytope of G. Linear programming on the above formulation with min e∈E c(e) · x e as the objective function computes a min-cost popular max-matching in G in polynomial time. In this section we consider the problems of computing a min-cost Pareto-optimal matching and a min-cost Pareto-optimal max-matching in a marriage instance with edge costs in {0, 1}. We will show these problems are NP-hard. Given a 3SAT formula ψ, we will build an instance G ψ with edge costs in {0, 1} such that G ψ admits a Pareto-optimal matching of cost 0 if and only if ψ is satisfiable. Any Pareto-optimal matching of cost 0 would have to be a perfect matching in G ψ . Hence this will prove the NP-hardness of both the min-cost Pareto-optimal matching problem and the min-cost Pareto-optimal max-matching problem. Our reduction resembles a hardness reduction from [7] that showed the NP-hardness of deciding if an instance G has a stable matching M that is also dominant, i.e., M is more popular than every larger matching. As done in this reduction, we will first transform ψ so that every clause contains either only positive literals or only negative literals; moreover, there will be a single occurrence of each negative literal in the transformed ψ. This is easy to achieve: let X 1 , . . . , X n be the starting variables. For i ∈ [n]: replace all occurrences of ¬X i with the same variable X n+i (a new one) and add the two clauses (X i ∨ X n+i ) ∧ (¬X i ∨ ¬X n+i ) to capture ¬X i ≡ X n+i . Thus there are 2n variables in the transformed ψ. We build the graph G ψ as follows. There are two types of gadgets: those that correspond to positive clauses and those that correspond to negative clauses. Fig. 2 shows how a positive clause gadget with 3 literals looks like and Fig. 3 shows how a negative clause gadget looks like. We now describe the preference lists of nodes in a positive clause C = x ∨ y ∨ z (see Fig. 2 ). The nodes a x , a x , b x , b x occur in x's gadget and a y , a y , b y , b y occur in y's gadget and a z , a z , b z , b z occur in z's gadget: these gadgets are in the -th clause gadget C . Every occurrence of a literal has a separate gadget. Here a x 's top choice is b z , second choice b x , third choice d x , fourth choice b x , and similarly for other nodes. For every occurrence of a positive literal x: there will be a pair of consistency edges -the pair (a x , d x ) and (b x , c x ) in Fig. 4 -between this gadget of x and the unique gadget of ¬x. In our preferences, the neighbors on consistency edges are marked in red. The preference lists of nodes that occur in a clause gadget with 2 positive literals will be totally analogous to the preference lists of nodes in a clause gadget with 3 positive literals. We will now describe the preference lists of nodes in a negative clause k-the overall picture here is given in Fig. 3 . Fig. 3 . A clause gadget corresponding to a negative clause D k = ¬x ∨ ¬y; due to our transformation of ψ, every negative clause has only 2 literals. The nodes c x , c x , d x , d x and c y , c y , d y , d y occur in the gadgets of ¬x and ¬y, respectively. The nodes b x,i , . . . , b x,j (resp., b y,i , . . . , b y,j ) in the preference lists above are the b -nodes in the x-gadgets (resp., y-gadgets) in the various clauses that x (resp., y) occurs in. Similarly, a x,i , . . . , a x,j (resp., a y,i , . . . , a y,j ) are the a-nodes in the x-gadgets (resp., y-gadgets) in the various clauses that x (resp., y) occurs in. The preference order among the b -nodes and among the a-nodes in these lists is not important. The consistency edges between a gadget of x and the gadget of ¬x are shown in Fig. 4 . Thus any Pareto-optimal matching in G ψ of cost 0 is a perfect matching. It is easy to show Lemma 10. The above assignment satisfies ψ. Claim 2 uses the Pareto-optimality of M to show that every clause has at least one literal set to true. Its proof is given after the proof of Theorem 11. Hence if G ψ admits a Pareto-optimal matching M with cost(M ) = 0, then ψ is satisfiable. The converse. We will now show that if ψ is satisfiable then there is a Pareto-optimal matching M in G ψ such that cost(M ) = 0. There is a natural way of constructing the matching M -we will use the satisfying assignment for ψ to choose edges from each literal gadget. For any variable r, include the following edges in the matching M : if r = true then take the pair of edges (c r , d r ), (c r , d r ) from ¬r's gadget and the pair of edges (a r,i , b r,i ), (a r,i , b r,i ) from r's gadget in clause i (for every clause i that r belongs to). if r = false then take the pair of edges (c r , d r ), (c r , d r ) from ¬r's gadget and the pair of edges (a r,i , b r,i ), (a r,i , b r,i ) from r's gadget in clause i (for every clause i that r belongs to). It is easy to see that cost(M ) = 0. Since M is a perfect matching, there is no alternating path ρ wrt M such that φ(M, M ⊕ ρ) = 0. This is because for every alternating path ρ wrt M , we have |M ⊕ ρ| < |M | and the nodes matched in M and unmatched in M ⊕ ρ prefer M to M ⊕ ρ, so φ(M, M ⊕ ρ) > 0. Hence in order to prove M 's Pareto-optimality, what we need to show is Claim 3. There is no alternating cycle ρ with respect to M such that φ(M ⊕ρ, M ) > 0 and φ(M, M ⊕ρ) = 0. The proof of Claim 3 is given below. This finishes the proof of Theorem 11. Proof of Claim 2. Suppose this assignment does not satisfy ψ. We have 3 cases here. 1. Let C i = x ∨ y ∨ z. Suppose all the three variables x, y, z are in false state. Consider the following alternating cycle ρ wrt M : Since there are no consistency edges in H, any alternating cycle in H has to be contained within a single clause. We will now show there is no such cycle in H by using the fact that we constructed M using a satisfying assignment for ψ: thus every clause has at least one literal set to true. Let C = x ∨ y ∨ z and suppose y = true in ψ. Then (a y , b y ) and (a y , b y ) are in M , however the edge (a y , b y ) is non-blocking wrt M and hence it is missing in H. Thus there is no alternating cycle in H that is contained within the clause C. Now consider a negative clause D = ¬x ∨ ¬y and suppose x = false in ψ. Then (c x , d x ) and (c x , d x ) are in M , however the edge (c x , d x ) is non-blocking wrt M and it is missing in H. Thus there is no alternating cycle in H that is contained within the clause D. Consider the 4 edges of any literal gadget (say, r) in G ψ : if (a r , b r ) ∈ M then (a r , b r ) is a non-blocking edge wrt M and if (a r , b r ) ∈ M then (a r , b r ) is a non-blocking edge wrt M . Similarly, in the gadget of ¬r: if (c r , d r ) ∈ M then (c r , d r ) is a non-blocking edge wrt M and if (c r , d r ) ∈ M then (c r , d r ) is a non-blocking edge wrt M . Thus there is no alternating cycle wrt M in H. So there is no alternating cycle ρ in G ψ such that φ(M ⊕ ρ, M ) > 0 and φ(M, M ⊕ ρ) = 0. Observe that any Pareto-optimal matching in G ψ of cost 0 is a perfect matching. Thus Theorem 11 shows that the min-cost Pareto-optimal matching problem and the min-cost Pareto-optimal max-matching problem are NP-hard. Moreover, these problems are NP-hard to approximate to any multiplicative factor. Thus we have shown the following theorem. Theorem 12. Given G = (A ∪ B, E) with strict preferences and edge costs in {0, 1}, it is NP-hard to compute a min-cost Pareto-optimal matching in G; moreover, it is NP-hard to approximate this within any multiplicative factor. Proof of Claim 1. Let v 0 be the first node that moves to A n0−1 with a blocking edge incident to it. Recall our update procedure -we initially added nodes in Nbr(U A ) and their partners in M to B n0−1 and A n0−1 , respectively. Then we applied rules 1-3 in some order and this resulted in the node v 0 moving to A n0−1 . Corresponding to these rules, we will construct an alternating path p = v 0 − M (v 0 ) − v 1 − M (v 1 ) − v 2 − · · · − v k − M (v k ) − u between v 0 and some node u ∈ U A . A useful observation is that all the nodes v 0 , . . . , v k have moved upwards to their respective levels due to our update of α to ensure property (ii) and to maintain α as an optimal solution to (LP4). The path p can be partitioned into k + 1 pairs of edges for some k ≥ 0. For 0 ≤ i ≤ k − 1: the i-th pair consists of the matching edge (v i , M (v i )) of weight 0 and the non-matching edge e i = (M (v i ), v i+1 ) where v i+1 is the node that pulled M (v i ) and v i to their current level due to the application of one of the above three rules. Rule 1 implies wt M (e i ) = 0 while rule 2 implies wt M (e i ) = −2 and rule 3 implies wt M (e i ) = 2. Observe that rule 1 places M (v i ) in the same level as v i+1 while rule 2 places M (v i ) one level lower than v i+1 and rule 3 places M (v i ) one level higher than v i+1 . The last pair of edges in p are (v k , M (v k )) ∈ A n0−1 × B n0−1 and (M (v k ), u), where the latter edge has weight 0. The node v 0 is in level n 0 − 1 and the node M (v k ) is also in level n 0 − 1. So v 0 and v k are at the same level, hence the number of edges in p of weight −2 is exactly the same as the number of edges of weight 2, thus wt M (p) = 0. Suppose there is a blocking edge (v 0 , w). If w belongs to p, then it is easy to see that the alternating cycle C obtained by joining the endpoints of the v 0 -w subpath in p with the edge (v 0 , w) satisfies wt M (C) ≥ 2. This contradicts Theorem 4 since M is a popular max-matching. Hence w does not belong to path p. So let us add the 2-edge path M (w) − w − v 0 as a prefix to the v 0 -u path p and call this alternating path q: we have wt M (q) = wt M (p) + wt M (v 0 , w) = 2. Since wt M (q) > 0 and the unmatched node u is an endpoint of q, this again contradicts Theorem 4. Hence there is no blocking edge incident to v 0 . School choice: a mechanism design approach Pareto optimality in house allocation problems 1172 private doctors sign up to treat patients at govt hospitals in Mumbai Centralized admissions for engineering colleges in India Size versus stability in the marriage problem Popular matchings Understanding popular matchings via stable matchings Popular edges and dominant matchings Quasi-popular matchings, optimality, and extended formulations Popular matchings and limits to tractability A new fixed point approach for stable networks and stable marriages Network flow and 2-satisfiability A fixed-point approach to stable matchings and some applications College admissions and the stability of marriage Some remarks on the stable matching problem Match making: assignments based on bilateral preferences Popular matchings in the stable marriage problem. Information and Computation An efficient algorithm for the "optimal" stable marriage Mumbai struggles to tackle increasing number of COVID-19 cases. The Week A size-popularity tradeoff in the stable marriage problem Popular half-integral matchings Popular matchings with one-sided bias Popular mixed matchings The least-unpopularity-factor and least-unpopularity-margin criteria for matching problems with one-sided preferences Characterization of stable matchings as extreme points of a polytope The geometry of fractional stable matchings and its applications. Mathematics of Operations Research Concerning the maximum number of stable matchings in the stable marriage problem × B i ) follows from the definition of the sets B i . Recall that for 1 ≤ i ≤ n 0 − 1, B i is the set of nodes b such that (a i ,b) ∈ S for some a ∈ A i . Also, B 0 contains all nodes b such that (a 0 ,b) ∈ S for some a ∈ The stability of S restricted to each set A i ∪ B i is byb's preference order in G * . Recall that within subscript i neighbors, the order of preference forb in G * is b's order of preference in G. Thus the stability of S in G * implies the stability of S restricted to A i ∪ B i for each i. Proof of property 2 Sinceb prefers subscript i + 1 nodes to subscript i nodes,b prefers a i+1 to its partner z i in S. It follows from the stability of S in G * that a i+1 has to prefer its partnerw in S tob, otherwise (a i+1 ,b) would block b ∈ B j . So the edge (a j+1 , d j+2 (a)) ∈ S. Since d j+2 (a) is a j+1 's least preferred neighbor in G * , the stability of S implies thatb prefers its partner in S to a j+1 . However b ∈ B j and sob's partner in S is a subscript j node z j . This contradictsb's preference order follows from the definitions of the sets A 0 A n0−1 to an unmatched b ∈ B 0 moves across sets as follows: A n0−1 − B n0−1 − A n0−1 − B n0−2 − A n0−2 − B n0−3 − · · · − A 1 − B 0 − A 0 − B 0 . This implies there are at least n 0 + 1 nodes in A. However |A| = n 0 Acknowledgments. Thanks to Yuri Faenza for helpful comments that improved the presentation.