R implementation of the pseudo code by Stephan Mertens (2014) based on Irving's algorithm (1985). Preliminary and incomplete
Example from Wikipedia http://en.wikipedia.org/wiki/Stable_roommates_problem
References:
-
Robert W. Irving, An efficient algorithm for the “stable roommates” problem, Journal of Algorithms, Vol. 6, Issue 4, 1985
-
Stephan Mertens, Stable Roommates Problem with Random Preferences, arXiv, 2014