# Maximum Locally Stable Matchings

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

**Our Contribution.**In this paper, we continue the study of locally stable matchings, focusing on those with maximum cardinality. We call them the maximum locally stable matchings. In our opinion, not only are the locally stable matchings inherently interesting but they are also an intriguing alternative to stable matchings. In some applications, requiring a matching to be stable can be too strong a requirement. It can also unnecessarily limit the size of the matching. This has led researchers to suggest other kinds of matchings that still take participants’ preferences into consideration. They include popular matchings [3] and its many variants (e.g., [4,5,6], etc.), rank maximal matchings [7], and “almost stable" maximum matchings—which are maximum matchings with few blocking pairs [8]. In the job market context, locally stable matchings may not only be larger than stable matchings, they may be just as robust since participants are unlikely to leave their assignments. Here are our main contributions:

- First, we present families of instances where the problem of finding a maximum locally stable matchings is computationally easy. For one family of instances, every stable matching of the instance is a maximum locally stable matching. This family includes the case when G, the social network of the workers, is a complete graph. For the other family of instances, every maximum matching of the firms and workers is a maximum locally stable matching. This family includes the case when G is an empty graph.
- Next, we show that when $\overline{G}$, the complement of G, has a maximum matching of size r, the size of a maximum locally stable matching of the instance is at most r more than the size of a stable matching of the instance. Thus, when G is almost a complete graph, a stable matching of the instance is a good approximation to its maximum locally stable matching. On the other hand, we show that when G has a constant number of edges—i.e., G is almost an empty graph—finding a maximum locally stable matching can still be done in polynomial time.
- Finally, in spite of the results above, we show that finding a maximum locally stable matching is computationally hard in general. In particular, we prove that finding a locally stable matching of a certain size is NP-complete and that approximating the size of a maximum locally stable matching within $21/19-\delta $ is NP-hard. Recently, Hoefer and Wagner [9] have shown that this problem cannot be approximated within $1.5-\u03f5$ under the Unique Games Conjecture. Hence, our result differs from theirs as we require only the weaker assumption that $P\ne NP$.

## 2. Preliminaries

**Proposition 1.**In the HR instance I, let μ be a stable matching and σ be a maximum matching of I. Then $\left|\mu \right|\le \left|\sigma \right|\le 2\left|\mu \right|$.

#### 2.1. HR+SN and Max-HR+SN

**Proposition 2.**If μ is a locally stable matching in the HR+SN instance $(I,G)$, then ${\mu}^{\left(1\right)}$ is a locally stable matching in the HR+SN instance $({I}^{\left(1\right)},G)$.

**Proposition 3.**In the HR+SN instance $(I,G)$, let μ be a stable matching and $\widehat{\mu}$ be a maximum locally stable matching. Then $\left|\mu \right|\le |\widehat{\mu}|\le 2|\mu |$.

**Proposition 4.**Let $(I,G)$ be an HR instance. Suppose two workers ${w}_{1}$ and ${w}_{2}$ do not have a firm in common in their preference list or, equivalently, there is no firm that has ${w}_{1}$ and ${w}_{2}$ in its preference list. Let $e=\{{w}_{1},{w}_{2}\}$. Then $(I,G-e)$ and $(I,G+e)$ have the same set of locally stable matchings as $(I,G)$.

## 3. The Easy Cases

**Theorem 1.**Let $(I,G)$ be an HR+SN instance. Suppose that whenever two workers have a firm in common in their preference lists, the two workers also share an edge in G. Then every stable matching of I is a maximum locally stable matching of $(I,G)$. Consequently, when G is the complete graph, every stable matching of I is a maximum locally stable matching of $(I,G)$.

**Theorem 2.**Let $(I,G)$ be an HR+SN instance. Suppose that the size of the largest matching in $\overline{G}$, the complement of G, is r. Let $\widehat{\mu}$ be a maximum locally stable matching of $(I,G)$ and μ be a stable matching of I. Then $|\widehat{\mu}|\le |\mu |+r$.

**Theorem 3.**Let $(I,G)$ be an HR+SN instance. Suppose that whenever two workers have a firm in common in their preference lists, the two workers do not share an edge in G. Then the matchings of I are exactly the locally stable matchings of $(I,G)$. Hence, every maximum matching of I is a maximum locally stable matching of $(I,G)$. Consequently, when G is the empty graph, the matchings of I are exactly the locally stable matchings of $(I,G)$, and every maximum matching of I is a maximum locally stable matching of $(I,G)$.

**Theorem 4.**Suppose that in the HR+SN instance $(I,G)$, G has a constant number of edges. Then a maximum locally stable matching of $(I,G)$ can be found in time polynomial in $\left|I\right|$.

## 4. Hardness Results

**Theorem 5.**Let I be an SMTI instance where only the firms’ preference lists contain ties, and the ties are consistent. Let ${I}^{\prime}$ be the SMI instance obtained by breaking the ties in the preference lists of I arbitrarily. Let G be a graph such that whenever two workers w and ${w}^{\prime}$ appear together in some firm’s preference list in I, w and ${w}^{\prime}$ are adjacent if and only if they are not in a tie. Then the following are true:

**Fact 1.**(Irving et al. [13]) Suppose that in the SMTI-2ML instance I, there are n firms and n workers. Determining if $(I,G)$ has a stable matching of size n is NP-complete even if the ties occur in one master list only. The result holds even when (i) there is only one tie in that master list or (ii) all the ties are of length 2.

**Theorem 6.**Suppose that in the HR+SN instance $(I,G)$, there are n firms and n workers, and each firm has capacity 1. Let ${K}_{z}$ denote the complete graph on z vertices. Determining if I has a locally stable matching of size n is NP-complete, even when $G\cong {K}_{n}-{K}_{{n}^{\prime}}$ where ${n}^{\prime}<n$ or $G\cong {K}_{n}-F$ where F is a matching in ${K}_{n}$.

**Fact 2.**(Halldórsson et al. [14]) It is NP-hard to approximate max-SMTI within a factor of $21/19-\delta $ for any constant $\delta >0$.

**Theorem 7.**It is NP-hard to approximate max-HR+SN within a factor of $21/19-\delta $ for any constant $\delta >0$.

## 5. Final Remarks

**Theorem 8.**In the HR+SN instance $(I,G)$, let ${W}^{\prime}$ be the set of workers that get matched in every stable matching of I. Suppose that in graph G, whenever ${w}_{1}\in {W}^{\prime}$ and ${w}_{2}\in W-{W}^{\prime}$ have a firm in common in their preference lists, ${w}_{1}$ and ${w}_{2}$ are adjacent in G. Let μ be a stable matching of I and $\widehat{\mu}$ be a maximum locally stable matching of $(I,G)$. Then $|\widehat{\mu}|\le \frac{3}{2}\left|\mu \right|$.

## References

- Arcaute, E.; Vassilvitskii, S. Social Networks and Stable Matchings in the Job Market. In Proceeding of WINE ’09: the 5th Workshop on Internet and Network Economics, Rome, Italy, 14–18 December 2009; Springer: Berlin/Heidelberg, Germany, 2009; Volume 5929, Lecture Notes in Computer Science. pp. 220–231. [Google Scholar]
- Hoefer, M. Local Matching Dynamics in Social Networks. In Proceedings of ICALP ’11: 39th International Colloquium on Automata, Languages and Programming, Zurich, Switzerland, 4–8 July 2011; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6756, Lecture Notes in Computer Science. pp. 113–124. [Google Scholar]
- Abraham, D.; Irving, R.; Kavitha, T.; Mehlhorn, K. Popular matchings. SIAM J. Comput.
**2007**, 37, 1030–1045. [Google Scholar] [CrossRef] - Mestre, J. Weighted Popular Matchings. In Proceedings of ICALP ’06: the 33rd International Colloquium on Automata, Languages and Programming, Venice, Italy, 9–16 July 2006; Springer: Berlin/Heidelberg, Germany, 2006; Volume 4051, Lecture Notes in Computer Science. pp. 715–726. [Google Scholar]
- McCutchen, R. The Least-unpopularity-factor and Least-unpopularity-margin Criteria for Matching Problems with One-sided Preferences. In Proceedings of LATIN ’08: the 8th Latin-American Theoretical Informatics Symposium, Rio De Janeiro, Brazil, 7–11 April 2008; Springer: Berlin/Heidelberg, Germany, 2008; Volume 4957, Lecture Notes in Computer Science. pp. 593–604. [Google Scholar]
- Kavitha, T.; Nasre, M. Popular Matchings with Variable Job Capacities. In Proceedings of ISAAC ’09: the 20th International Symposium on Algorithms and Computation, Honolulu, USA, 16–18 December 2009; Springer-Verlag: Berlin/Heidelberg, Germany, 2009; pp. 423–433. [Google Scholar]
- Irving, R.; Kavitha, T.; Mehlhorn, K.; Michail, D.; Paluch, K. Rank-maximal matchings. ACM Trans. Algorithms
**2006**, 2, 602–610. [Google Scholar] [CrossRef] - Biró, P.; Manlove, D.F.; Mittal, S. Size versus stability in the marriage problem. Theor. Comput. Sci.
**2010**, 411, 1828–1841. [Google Scholar] [CrossRef] - Hoefer, M.; Wagner, L. Locally stable matching with general preferences.
**2012**. [Google Scholar] - Gale, D.; Shapley, L. College admissions and the stability of marriage. Am. Math. Mon.
**1962**, 69, 9–15. [Google Scholar] [CrossRef] - Gale, D.; Sotomayor, M. Some remarks on the stable matching problem. Discret. Appl. Math.
**1985**, 11, 223–232. [Google Scholar] [CrossRef] - Gusfield, D.; Irving, R. The Stable Marriage Problem: Structure and Algorithms; MIT Press: Cambridge, MA, USA, 1989. [Google Scholar]
- Irving, R.; Manlove, D.; Scott, S. The stable marriage problem with master preference lists. Discret. Appl. Math.
**2008**, 156, 2959–2977. [Google Scholar] [CrossRef] - Halldórsson, M.; Iwama, K.; Miyazaki, S.; Yanagisawa, H. Improved approximation of the stable marriage problem. ACM Trans. Algorithms
**2007**, 3:3, Article No. 30. [Google Scholar] [CrossRef] - Dinur, I.; Safra, S. The Importance of Being Biased. In Proceedings of STOC ’02: the 34th Symposium on the Theory of Computing, Montreal, Canada, 21–24 May 2002; ACM: New York, NY, USA, 2002; pp. 33–42. [Google Scholar]
- McDermid, E. A 3/2-approximation Algorithm for General Stable Marriage. In Proceedings of ICALP ’09: the 36th International Colloquium on Automata, Languages and Programming, Rhodes, Greece, 5–12 July 2009; Lecture Notes in Computer Science. pp. 689–700.
- Király, Z. Better and simpler approximation algorithms for the stable marriage problem. Algorithmica
**2011**, 60, 3–20. [Google Scholar] [CrossRef] - Paluch, K. Faster and simpler approximation of stable matchings. 2011. In Proceedings WAOA ’11: the 9th Workshop on Approximation and Online Algorithms, Saarbrucken, Germany, 8–9 September 2011; Lecture Notes in Computer Science. pp. 176–187.

© 2013 by the authors; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution license (http://creativecommons.org/licenses/by/3.0/).

## Share and Cite

**MDPI and ACS Style**

Cheng, C.T.; McDermid, E.
Maximum Locally Stable Matchings. *Algorithms* **2013**, *6*, 383-395.
https://doi.org/10.3390/a6030383

**AMA Style**

Cheng CT, McDermid E.
Maximum Locally Stable Matchings. *Algorithms*. 2013; 6(3):383-395.
https://doi.org/10.3390/a6030383

**Chicago/Turabian Style**

Cheng, Christine T., and Eric McDermid.
2013. "Maximum Locally Stable Matchings" *Algorithms* 6, no. 3: 383-395.
https://doi.org/10.3390/a6030383