Define and understand the stable matching problem.
Notes
This is from chapter 1 of our book.
I am not really able to follow a book, but I will somewhat try.
We will need to use other sources as some material is not covered.
And some material is not in the syllabus.
Chapter 1 gives us a nice overview of the semester however.
We will study an algorithm in detail, and return to it later.
We will look at a few other algorithms that will illustrate future concepts.
And I might throw in an additional one.
Given a set of n men and n women, all wising to find a match, find this match so that no two unmatched individuals prefer each other to their current partners.
The input is:
A set of men, M, each with a ranked list of the women.
A set of women, W, each with a ranked list of the men.
Limitations:
|M| = |W|
For any preference list, no two preferences are equal.
The output is a set of pairs (mi,wj) that is stable.
But what is stable?
This is more easily explained by an example.
Assume we have two men {Abe, Bob}, and two women {Anne, Betty}.
And the preferences are as follows
Abe
Anne
Betty
Bob
Betty
Anne
Anne
Abe
Bob
Betty
Bob
Abe
The Set {(Abe, Betty), (Bob, Anne)} is in-stable
Abe prefers Anne to Betty
Anne prefers Abe to Bob,
So there is no "cost" for them to change partners.
Note Betty and Bob have no say in this issue, but they are happy with the swap as well.
The Set {(Abe, Anne), (Bob, Betty)} is stable
You can't find a pair that would be happier in a different situation.
Let's try again with a difference preference table
Abe
Anne
Betty
Bob
Anne
Betty
Anne
Abe
Bob
Betty
Bob
Abe
{(Abe, Betty), (Bob, Anne)}
Is this stable? IE, Would (Abe, Anne) or (Bob, Betty) be a better match?
Bob is happy, but Anne is not, she would be happier with Abe
Betty is happy, but Abe is not, he would be happier with Anne