Rotation-Based Formulation for Stable Matching

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10416)


We introduce new CP models for the many-to-many stable matching problem. We use the notion of rotation to give a novel encoding that is linear in the input size of the problem. We give extra filtering rules to maintain arc consistency in quadratic time. Our experimental study on hard instances of sex-equal and balanced stable matching shows the efficiency of one of our propositions as compared with the state-of-the-art constraint programming approach.



We thank the anonymous reviewers for their constructive comments that helped to improve the presentation of the paper.

We thank Begum Genc for generating the instances.

This publication has emanated from research conducted with the financial support of Science Foundation Ireland (SFI) under Grant Number SFI/12/RC/2289.


  1. 1.
    Baïou, M., Balinski, M.: Many-to-many matching: stable polyandrous polygamy (or polygamous polyandry). Discrete Appl. Math. 101(1–3), 1–12 (2000)MathSciNetCrossRefMATHGoogle Scholar
  2. 2.
    Bansal, V., Agrawal, A., Malhotra, V.S.: Polynomial time algorithm for an optimal stable assignment with multiple partners. Theor. Comput. Sci. 379(3), 317–328 (2007)MathSciNetCrossRefMATHGoogle Scholar
  3. 3.
    Eirinakis, P., Magos, D., Mourtos, I., Miliotis, P.: Finding all stable pairs and solutions to the many-to-many stable matching problem. INFORMS J. Comput. 24(2), 245–259 (2012)MathSciNetCrossRefMATHGoogle Scholar
  4. 4.
    Feder, T.: A new fixed point approach for stable networks and stable marriages. J. Comput. Syst. Sci. 45(2), 233–284 (1992)MathSciNetCrossRefMATHGoogle Scholar
  5. 5.
    Fleiner, T., Irving, R.W., Manlove, D.: Efficient algorithms for generalized stable marriage and roommates problems. Theor. Comput. Sci. 381(1–3), 162–176 (2007)MathSciNetCrossRefMATHGoogle Scholar
  6. 6.
    Gale, D., Shapley, L.S.: College admissions and the stability of marriage. Am. Math. Mon. 69(1), 9–15 (1962)MathSciNetCrossRefMATHGoogle Scholar
  7. 7.
    Gent, I.P., Irving, R.W., Manlove, D.F., Prosser, P., Smith, B.M.: A constraint programming approach to the stable marriage problem. In: Walsh, T. (ed.) CP 2001. LNCS, vol. 2239, pp. 225–239. Springer, Heidelberg (2001). doi: 10.1007/3-540-45578-7_16 CrossRefGoogle Scholar
  8. 8.
    Gusfield, D., Irving, R.W.: The Stable Marriage Problem - Structure and Algorithms. Foundations of Computing Series. MIT Press, Cambridge (1989)MATHGoogle Scholar
  9. 9.
    Gusfield, D., Irving, R.W.: The Stable Marriage Problem: Structure and Algorithms. MIT Press, Cambridge (1989)MATHGoogle Scholar
  10. 10.
    Hebrard, E.: Mistral, a constraint satisfaction library. In: Proceedings of the CP 2008 Third International CSP Solvers Competition, pp. 31–40 (2008)Google Scholar
  11. 11.
    Hebrard, E., Siala, M.: Explanation-based weighted degree. In: Salvagnin, D., Lombardi, M. (eds.) CPAIOR 2017. LNCS, vol. 10335, pp. 167–175. Springer, Cham (2017). doi: 10.1007/978-3-319-59776-8_13 CrossRefGoogle Scholar
  12. 12.
    Irving, R.W., Leather, P.: The complexity of counting stable marriages. SIAM J. Comput. 15(3), 655–667 (1986)MathSciNetCrossRefMATHGoogle Scholar
  13. 13.
    Manlove, D.F., O’Malley, G., Prosser, P., Unsworth, C.: A constraint programming approach to the hospitals/residents problem. In: Hentenryck, P., Wolsey, L. (eds.) CPAIOR 2007. LNCS, vol. 4510, pp. 155–170. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-72397-4_12 CrossRefGoogle Scholar
  14. 14.
    Manlove, D.F.: Algorithmics of Matching Under Preferences. Series on Theoretical Computer Science, vol. 2. WorldScientific, Singapore (2013)MATHGoogle Scholar
  15. 15.
    Michel, L., Hentenryck, P.: Activity-based search for black-box constraint programming solvers. In: Beldiceanu, N., Jussien, N., Pinson, É. (eds.) CPAIOR 2012. LNCS, vol. 7298, pp. 228–243. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-29828-8_15 CrossRefGoogle Scholar
  16. 16.
    Moskewicz, M.W., Madigan, C.F., Zhao, Y., Zhang, L., Malik, S.: Chaff: engineering an efficient SAT solver. In: Proceedings of the 38th Design Automation Conference, DAC 2001, Las Vegas, NV, USA, 18–22 June 2001, pp. 530–535 (2001)Google Scholar
  17. 17.
    Prosser, P.: Stable roommates and constraint programming. In: Simonis, H. (ed.) CPAIOR 2014. LNCS, vol. 8451, pp. 15–28. Springer, Cham (2014). doi: 10.1007/978-3-319-07046-9_2 CrossRefGoogle Scholar
  18. 18.
    Refalo, P.: Impact-based search strategies for constraint programming. In: Wallace, M. (ed.) CP 2004. LNCS, vol. 3258, pp. 557–571. Springer, Heidelberg (2004). doi: 10.1007/978-3-540-30201-8_41 CrossRefGoogle Scholar
  19. 19.
    Rossi, F., van Beek, P., Walsh, T. (eds.): Handbook of Constraint Programming. Foundations of Artificial Intelligence, vol. 2. Elsevier (2006)Google Scholar
  20. 20.
    Siala, M., O’Sullivan, B.: Revisiting two-sided stability constraints. In: Quimper, C.-G. (ed.) CPAIOR 2016. LNCS, vol. 9676, pp. 342–357. Springer, Cham (2016). doi: 10.1007/978-3-319-33954-2_25 Google Scholar
  21. 21.
    Unsworth, C., Prosser, P.: A specialised binary constraint for the stable marriage problem. In: Zucker, J.-D., Saitta, L. (eds.) SARA 2005. LNCS (LNAI), vol. 3607, pp. 218–233. Springer, Heidelberg (2005). doi: 10.1007/11527862_16 CrossRefGoogle Scholar
  22. 22.
    Unsworth, C., Prosser, P.: An n-ary constraint for the stable marriage problem. CoRR, abs/1308.0183 (2013)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  1. 1.Insight Centre for Data Analytics, Department of Computer ScienceUniversity College CorkCorkIreland

Personalised recommendations