Journal of Combinatorial Optimization

, Volume 19, Issue 3, pp 279–303 | Cite as

Keeping partners together: algorithmic results for the hospitals/residents problem with couples

  • Eric J. McDermidEmail author
  • David F. Manlove


The Hospitals/Residents problem with Couples (HRC) is a generalisation of the classical Hospitals/Residents problem (HR) that is important in practical applications because it models the case where couples submit joint preference lists over pairs of hospitals (h i ,h j ). We consider a natural restriction of HRC in which the members of a couple have individual preference lists over hospitals, and the joint preference list of the couple is consistent with these individual lists in a precise sense. We give an appropriate stability definition and show that, in this context, the problem of deciding whether a stable matching exists is NP-complete, even if each resident’s preference list has length at most 3 and each hospital has capacity at most 2. However, with respect to classical (Gale-Shapley) stability, we give a linear-time algorithm to find a stable matching or report that none exists, regardless of the preference list lengths or the hospital capacities. Finally, for an alternative formulation of our restriction of HRC, which we call the Hospitals/Residents problem with Sizes (HRS), we give a linear-time algorithm that always finds a stable matching for the case that hospital preference lists are of length at most 2, and where hospital capacities can be arbitrary.


Stable matching problem NP-completeness Polynomial-time algorithm 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. Berman P, Karpinski M, Scott AD (2003) Approximation hardness of short symmetric instances of MAX-3SAT. Electronic Colloquium on Computational Complexity Report, number 49 Google Scholar
  2. Cantala D (2004) Matching markets: the particular case of couples. Econ Bull 3(45):1–11 MathSciNetGoogle Scholar
  3. Cheng C, McDermid E, Suzuki I (2008) A unified approach to finding good stable matchings in the hospitals/residents setting. Theor Comput Sci 400(1–3):84–99 zbMATHCrossRefMathSciNetGoogle Scholar
  4. Dean BC, Goemans MX, Immorlica N (2006) The unsplittable stable marriage problem. In: Proceedings of IFIP TCS 2006: the fourth IFIP international conference on theoretical computer science. IFIP international federation for information processing, vol 209. Springer, Berlin, pp 65–75 CrossRefGoogle Scholar
  5. Dutta B, Massó J (1997) Stability of matchings when individuals have preferences over colleagues. J Econ Theory 75:464–475 zbMATHCrossRefGoogle Scholar
  6. Gale D, Shapley LS (1962) College admissions and the stability of marriage. Am Math Mon 69:9–15 zbMATHCrossRefMathSciNetGoogle Scholar
  7. Gale D, Sotomayor M (1985) Some remarks on the stable matching problem. Discrete Appl Math 11:223–232 zbMATHCrossRefMathSciNetGoogle Scholar
  8. Gusfield D (1987) Three fast algorithms for four problems in stable marriage. SIAM J Comput 16(1):111–128 zbMATHCrossRefMathSciNetGoogle Scholar
  9. Gusfield D, Irving RW (1989) The stable marriage problem: structure and algorithms. MIT Press, Cambridge zbMATHGoogle Scholar
  10. Irving RW (1998) Matching medical students to pairs of hospitals: a new variation on a well-known theme. In: Proceedings of ESA ’98: the sixth European symposium on algorithms. Lecture notes in computer science, vol 1461. Springer, Berlin, pp 381–392 Google Scholar
  11. Irving RW, Manlove DF, O’Malley G (2009) Stable marriage with ties and bounded length preference lists. J Discrete Algorithms 7(2):213–219 zbMATHCrossRefMathSciNetGoogle Scholar
  12. Klaus B, Klijn F (2005) Stable matchings and preferences of couples. J Econ Theory 121:75–106 zbMATHCrossRefMathSciNetGoogle Scholar
  13. Klaus B, Klijn F (2007) Paths to stability for matching markets with couples. Games Econ Behav 58:154–171 zbMATHCrossRefMathSciNetGoogle Scholar
  14. Klaus B, Klijn F, Nakamura T (2009) Corrigendum: stable matchings and preferences of couples. J Econ Theory. doi: 10.1016/j.jet.2009.06.001 Google Scholar
  15. Knuth DE (1976) Mariages stables. Les Presses de L’Université de Montréal, Montreal zbMATHGoogle Scholar
  16. McVitie D, Wilson LB (1971) The stable marriage problem. Commun ACM 14:486–490 CrossRefMathSciNetGoogle Scholar
  17. Ronn E (1990) NP-complete stable matching problems. J Algorithms 11:285–304 zbMATHCrossRefMathSciNetGoogle Scholar
  18. Roth AE (1984) The evolution of the labor market for medical interns and residents: a case study in game theory. J Polit Econ 92(6):991–1016 CrossRefGoogle Scholar
  19. Roth AE (1986) On the allocation of residents to rural hospitals: a general property of two-sided matching markets. Econometrica 54:425–427 CrossRefMathSciNetGoogle Scholar
  20. Roth AE, Sotomayor MAO (1990) Two-sided matching: a study in game-theoretic modeling and analysis. Econometric society monographs, vol 18. Cambridge University Press, Cambridge zbMATHGoogle Scholar

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  1. 1.Department of Computing ScienceUniversity of GlasgowGlasgowUK

Personalised recommendations