Elsevier

Journal of Algorithms

Volume 6, Issue 4, December 1985, Pages 577-595
Journal of Algorithms

An efficient algorithm for the “stable roommates” problem

https://doi.org/10.1016/0196-6774(85)90033-1Get rights and content

Abstract

The stable marriage problem is that of matching n men and n women, each of whom has ranked the members of the opposite sex in order of preference, so that no unmatched couple both prefer each other to their partners under the matching. At least one stable matching exists for every stable marriage instance, and efficient algorithms for finding such a matching are well known. The stable roommates problem involves a single set of even cardinality n, each member of which ranks all the others in order of preference. A stable matching is now a partition of this single set into n2 pairs so that no two unmatched members both prefer each other to their partners under the matching. In this case, there are problem instances for which no stable matching exists. However, the present paper describes an O(n2) algorithm that will determine, for any instance of the problem, whether a stable matching exists, and if so, will find such a matching.

References (8)

  • D Gale et al.

    College admissions and the stability of marriage

    Amer. Math. Monthly

    (1962)
  • S.Y Itoga

    The upper bound for the stable marriage problem

    J. Oper. Res. Soc.

    (1978)
  • D.E Knuth

    Mariages Stables

    (1976)
  • D.G McVitie et al.

    The stable marriage problem

    Comm. ACM

    (1971)
There are more references available in the full text version of this article.

Cited by (0)

Present address: Department of Computer Science, University of Glasgow, Glasgow G12 8QQ, United Kingdom.

View full text