stable-marriage

How can I implement the Gale-Shapley stable marriage algorithm in Perl?

Problem statement: We have equal number of men and women. Each man has a preference score toward each woman. So do the woman for each man. Each of the men and women have certain interests. Based on the interest, we calculate the preference scores. So initially, we have an input in a file having x columns. The first column is the person...

Stable Matching Problem

I am currently reading an Algorithm's book and came across the Stable Matching Problem. And a question came to mind that I'm curious about, but the book doesn't answer. In every SMP is it possible to always have one pair where each prefers the other one the most? Like in the classic marriage example. Is there always a pair that have one ...