Finding all stable matchings in roommate (and marriage) problems

Patrick Prosser has some great java code at http://www.dcs.gla.ac.uk/~pat/roommates/distribution/ which, among other things, can compute all the stable matchings in roommate problems.

If you are interested in two-sided matchings, rejoice : Patrick’s code allows preferences over roommates to include unacceptable roommates. To implement a two-sided market, just make sure any roommates on one side of the market views any other roommate on the same side of the market as unacceptable, and you’re good to go.

If (like myself) you are not used to java, you might struggle a little to get the code working. Here is a little tutorial for Mac OS, which worked for me as of today.

 

 

Advertisements