Abstract
In the stable roommates (SR) problem we have n agents, where each agent ranks all n − 1 other agents. The problem is then to match agents into pairs such that no two agents prefer each other to their matched partners. A remarkably simple constraint encoding is presented that uses O(n 2) binary constraints, and in which arc-consistency (the phase-1 table) is established in O(n 3) time. This leads us to a specialized n-ary constraint that uses O(n) additional space and establishes arc-consistency in O(n 2) time. This can model stable roommates with incomplete lists (SRI), consequently it can also model stable marriage (SM) problems with complete and incomplete lists (SMI). That is, one model suffices. An empirical study is performed and it is observed that the n-ary constraint model can read in, model and output all matchings for instances with n = 1,000 in about 2 seconds on current hardware platforms. Enumerating all matchings is a crude solution to the egalitarian SR problem, and the empirical results suggest that although NP-hard, egalitarian SR is practically easy.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
choco constraint programming system, http://choco.sourceforge.net/
Stable Roommates, http://www.dcs.gla.ac.uk/~pat/roommates/distribution
Cheeseman, P., Kanefsky, B., Taylor, W.M.: Where the really hard problems are, pp. 331–337. Morgan Kaufmann (1991)
Gale, D., Shapley, L.S.: College admissions and the stability of marriage. American Mathematical Monthly 69, 9–15 (1962)
Gale, D., Sotomayor, M.: Some remarks on the stable matching problem. Discrete Applied Mathematics 11, 223–232 (1985)
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)
Gusfield, D., Irving, R.W.: The Stable Marriage Problem: Structure and Algorithms. The MIT Press (1989)
Irving, R.W.: An efficient algorithm for the “stable roommates” problem. J. Algorithms 6(4), 577–595 (1985)
Irving, R.W.: Optimal Stable Marriage. In: Encyclopedia of Algorithms. Springer (2008)
Mackworth, A.K.: Consistency in networks of relations. Artificial Intelligence 8, 99–118 (1977)
Manlove, D.: Algorithmics of Matching under Preferences. Theoretical Computer Science, vol. 2. World Scientific (2013)
Manlove, D.F., O’Malley, G.: Modelling and solving the stable marriage problem using constraint programming. In: Proceedings of the Fifth Workshop on Modelling and Solving Problems with Constraints, held at the 19th International Joint Conference on Artificial Intelligence (IJCAI 2005), pp. 10–17 (2005)
Mertens, S.: Random stable matchings. In: Journal of Statistical Mechanics: Theory and Experiments (2005)
Pittel, B., Irving, R.W.: An upper bound for the solvability of a random stable roommates instance. Random Struct. Algorithms 5(3), 465–487 (1994)
Roth, A.E.: The evolution of the labor market for medical interns and residents: a case study in game theory. Journal of Political Economy 92(6), 991–1016 (1984)
Roth, A.E., Sotomayor, M.A.O.: Two-sided matching: a study in game-theoretic modeling and analysis. Econometric Society Monographs, vol. 18. Cambridge University Press (1990)
Unsworth, C., Prosser, P.: An n-ary constraint for the stable marriage problem. In: Proceedings of the Fifth Workshop on Modelling and Solving Problems with Constraints, held at the 19th International Joint Conference on Artificial Intelligence (IJCAI 2005) (2005)
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)
van Hentenryck, P., Deville, Y., Teng, C.-M.: A generic arc-consistency algorithm and its specializations. Artificial Intelligence 57, 291–321 (1992)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2014 Springer International Publishing Switzerland
About this paper
Cite this paper
Prosser, P. (2014). Stable Roommates and Constraint Programming. In: Simonis, H. (eds) Integration of AI and OR Techniques in Constraint Programming. CPAIOR 2014. Lecture Notes in Computer Science, vol 8451. Springer, Cham. https://doi.org/10.1007/978-3-319-07046-9_2
Download citation
DOI: https://doi.org/10.1007/978-3-319-07046-9_2
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-07045-2
Online ISBN: 978-3-319-07046-9
eBook Packages: Computer ScienceComputer Science (R0)