54
Lecture 23: Stable Marriage (Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton) Shang-Hua Teng

Shang-Hua Teng

  • Upload
    dinos

  • View
    63

  • Download
    0

Embed Size (px)

DESCRIPTION

Lecture 23: Stable Marriage ( Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton). Shang-Hua Teng. Dating Scenario. There are n “men” and n “women” Each woman has her own ranked preference list of ALL the men Each man has his own ranked preference list of ALL the women - PowerPoint PPT Presentation

Citation preview

Page 1: Shang-Hua Teng

Lecture 23:Stable Marriage(Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton)

Shang-Hua Teng

Page 2: Shang-Hua Teng

Dating Scenario• There are n “men” and n “women”

• Each woman has her own ranked preference list of ALL the men

• Each man has his own ranked preference list of ALL the women

• The lists have no ties

Page 3: Shang-Hua Teng

3,5,2,1,4

1

5,2,1,4,3

4,3,5,1,2

3

1,2,3,4,5

4

2,3,4,1,5

5

1

3,2,5,1,4

2

1,2,5,3,4

3

4,3,2,1,5

4

1,3,4,2,5

5

1,2,4,5,3

2

Page 4: Shang-Hua Teng

The Matching (Marriage) Problem

Question: How do we pair them off? Which criteria come to mind?

Page 5: Shang-Hua Teng

There is more than one notion of what constitutes a “good” pairing.

• Maximizing the number of people who get their first choice

• Maximizing average satisfaction

• Maximizing the minimum satisfaction

Page 6: Shang-Hua Teng

Couple of “Mutually Cheating Hearts”

• Suppose we pair off all the men and women. Now suppose that some man and some woman prefer each other to the people they married. They will be called a couple of MCHs.

Page 7: Shang-Hua Teng

Why be with them when we can be with each other?

Page 8: Shang-Hua Teng

Stable Pairings

• A pairing of men and women is called stable if it contains no couple of MCHs.

Page 9: Shang-Hua Teng

Stability is Primary.

• Any list of criteria for a good pairing must include stability. (A pairing is doomed if it contains a shaky couple.)

• Any reasonable list of criteria must contain the stability criterion.

Page 10: Shang-Hua Teng

The study of stability will be the subject of the entire lecture.

•We will:– Analyze an algorithm that looks a lot like dating

in the early 1950’s

– Discover the naked mathematical truthnaked mathematical truth about which sex has the romantic edge

– Learn how the world’s largest, most successful dating service operates

Page 11: Shang-Hua Teng

How do we find a stable pairing?

Page 12: Shang-Hua Teng

How do we find a stable pairing?

Wait! There is a more primary question!

Page 13: Shang-Hua Teng

How do we find a stable pairing?

How do we know that a stable pairing always

exists?

Page 14: Shang-Hua Teng

A “Traditional” Marriage Algorithm

Choose the best among those who propose,

“get a commitment”

Propose to the best who is still available

Page 15: Shang-Hua Teng

A Today’s Dating Algorithm

Page 16: Shang-Hua Teng

Traditional Marriage Algorithm•For each day each single man does the following:– MorningMorning

• Each bachelorette sits in her favorite coffee house• Each single men proposes to the best bachelorette to whom he has not yet

proposed – Afternoon (for those bachelorettes with at least one suitor)Afternoon (for those bachelorettes with at least one suitor)

• To today’s best suitor: “Maybe, come back tomorrow, and ask me “Maybe, come back tomorrow, and ask me again”again”

• To any others: “Not me, but good luck” “Not me, but good luck”– EveningEvening

• Each single man is ready to propose next bachelorette on his list

The day WILL COME that no bachelor is rejectedEach bachelorette marries the last bachelor to whom she said “maybe”

Page 17: Shang-Hua Teng

Does the Traditional Marriage Algorithm always produce a

stable pairing?

Page 18: Shang-Hua Teng

Does the Traditional Marriage Algorithm always produce a

stable pairing?

Wait! There is a more primary

question!

Page 19: Shang-Hua Teng

Does the TMA work at all?

– Does it eventually stop?

– Is everyone married at the end?

Page 20: Shang-Hua Teng

Theorem: The TMA always terminates in at most n2 days

• Each day that at least one Bachelor gets a “No”.

• There can be at most n2 “No”s.

Page 21: Shang-Hua Teng

Does the TMA work at all?

– Does it eventually stop?

– Is everyone married at the end?

Page 22: Shang-Hua Teng

Improvement Lemma: If a bachelorette has a committed suitor, then she will always have someone at least as good the next day (and on the final day).

– She would only let go of him in order to “maybe” someone better

– She would only let go of that guy for someone even better

– She would only let go of that guy for someone even better

– AND SO ON . . . . . . . . . . . . .

Page 23: Shang-Hua Teng

Corollary: Each bachelorette will marry her absolute favorite of the bachelors who proposed to her during the TMA

Page 24: Shang-Hua Teng

Lemma: No bachelor can be rejected by all the bachelorettes

Proof by contradiction.

Suppose Bob is rejected by all the women. At that point:

Each women must have a suitor other than Bob (By Improvement Lemma, once a woman has a suitor she will always have at least one)

The n women have n suitors, Bob not among them. Thus, there must be at least n+1 men!

Contradiction

Page 25: Shang-Hua Teng

Great! We know that TMA will terminate and produce a pairing.

But is it stable?

Page 26: Shang-Hua Teng

Theorem: The pairing produced by TMA is stable.

– This means Bob likes Mia more than his partner, Alice.– Thus, Bob proposed to Mia before he proposed to Alice.– Mia must have rejected Bob for someone she preferred.– By the Improvement lemma, she must like her parnter LukeLuke

more than Bob.

BobBobAliceAlice

MiaMia

LukeLuke

– Proof by contradiction: Suppose Bob and Mia are a couple of MCHs.

Contradiction!

Page 27: Shang-Hua Teng

Opinion Poll

Who is better off

in traditio

nal

dating, the men

or the women?

Page 28: Shang-Hua Teng

Forget TMA for a moment

• How should we define what we mean when we say “the optimal woman for Bob”?

Flawed Attempt:Flawed Attempt: “The woman at the top of “The woman at the top of Bob’sBob’s

list”list”

Page 29: Shang-Hua Teng

The Optimal Match

A man’s optimal match is the highest ranked woman for whom there is some stable pairing

in which they are matched

She is the best woman he can conceivably be matched in a stable world. Presumably, she might be better than the woman he gets matched to in the stable pairing output by TMA.

Page 30: Shang-Hua Teng

The Pessimal Match

A man’s pessimal match is the lowest ranked woman for whom there is some stable pairing in which the man is matched to.

She is the least ranked woman he can conceivably get to be matched to in a stable world.

Page 31: Shang-Hua Teng

Dating Dilemmas

•A pairing is man-optimal if every man gets his optimal match. This is the best of all possible stable worlds for every man simultaneously.

•A pairing is man-pessimal if every man gets his pessimal match. This is the worst of all possible stable worlds for every man simultaneously.

Page 32: Shang-Hua Teng

Dating Dilemmas

•A pairing is woman-optimal if every woman gets her optimal match. This is the best of all possible stable worlds for every woman simultaneously.

•A pairing is woman-pessimal if every woman gets her pessimal match. This is the worst of all possible stable worlds for every woman simultaneously.

Page 33: Shang-Hua Teng

The Naked Mathematical Truth!

The Traditional Marriage Algorithm always produces a man-optimal, and woman-pessimal pairing.

Page 34: Shang-Hua Teng

Theorem: TMA produces a man-optimal pairing

– Suppose not: i.e. that some man gets rejected by his optimal match during TMA.

– In particular, let’s say Bob is the first man to be rejected by his optimal match Mia: Let’s say she said “maybe” to Luke, whom she prefers.

– Since Bob was the only man to be rejected by his optimal match so far, Luke must like Mia at least as much as his optimal match.

Page 35: Shang-Hua Teng

We are assuming that Mia is Bob’s optimal match Mia likes Luke more than Bob. Luke likes Mia at least as much as his optimal match.

•We now show that any pairing S in which Bob marries Mia cannot be stable (for a contradiction).

•Suppose S is stable:– Luke likes Mia more than his partner in S

• Luke likes Mia at least as much as his best match, but he is not matched to Mia in S

– Mia likes Luke more than her partner Bob in S

LukeLuke MiaMiaContradiction!

Page 36: Shang-Hua Teng

•We’ve shown that any pairing in which Bob marries Mia cannot be stable.– Thus, Mia cannot be Bob’s optimal match

(since he can never marry her in a stable world).

– So Bob never gets rejected by his optimal matchin the TMA, and thus the TMA is man-optimal.

We are assuming that Mia is Bob’s optimal match.Mia likes Luke more than Bob. Luke likes Mia at least as much as his optimal match.

Page 37: Shang-Hua Teng

Theorem:The TMA pairing is woman-pessimal.

•We know it is man-optimal. Suppose there is a stable pairing S where some woman Alice does worse than in the TMA.•Let Luke be her partner in the TMA pairing. Let Bob be her partner in S.– By assumption, Alice likes Luke better than

her partner Bob in S – Luke likes Alice better than his partner in S

• We already know that Alice is his optimal match !

LukeLuke AliceAliceContradiction!

Page 38: Shang-Hua Teng

Lessons???

Page 39: Shang-Hua Teng

The largest dating service in the world uses a

computer to run TMA !

Page 40: Shang-Hua Teng

“The Match”:Doctors and Medical Residencies– Each medical school graduate submits a ranked

list of hospitals where he/she wants to do a residency

– Each hospital submits a ranked list of newly minted doctors that it wants

– A computer runs TMA (extended to handle polygamy)

– Until recently, it was hospital-optimal

Page 41: Shang-Hua Teng

An Instructive Variant:Team Projects

1

3

2,3,4

1,2,4

2

4

3,1,4

*,*,*

Page 42: Shang-Hua Teng

An Instructive Variant:Team Project

1

3

2,3,4

1,2,4

2

4

3,1,4

*,*,*

Page 43: Shang-Hua Teng

An Instructive Variant:Team Project

1

3

2,3,4

1,2,4

2

4

3,1,4

*,*,*

Page 44: Shang-Hua Teng

An Instructive Variant:Team Project

1

3

2,3,4

1,2,4

2

4

3,1,4

*,*,*

Page 45: Shang-Hua Teng

No Stable Teaming Possible

1

3

2,3,4

1,2,4

2

4

3,1,4

*,*,*

Page 46: Shang-Hua Teng

Stability

• Amazingly, stable pairings do always exist in the bipartite relations.

• Insight: We must make sure our arguments do not apply to the class project case, since we know all arguments must fail in that case.

Page 47: Shang-Hua Teng

REFERENCES

•D. Gale and L. S. Shapley, College admissions and the stability of marriage, American Mathematical Monthly 69 (1962), 9-15

•Dan Gusfield and Robert W. Irving, The Stable Marriage Problem: Structures and Algorithms, MIT Press, 1989

Page 48: Shang-Hua Teng

History: When Markets fail • 1900– Idea of hospitals having residents (then called

“interns”)

• Over the next few decades– Intense competition among hospitals for an inadequate

supply of residents• Each hospital makes offers independently

• Process degenerates into a race. Hospitals steadily advancing date at which they finalize binding contracts

Page 49: Shang-Hua Teng

History: When Markets fail

• 1944 Absurd Situation. Appointments being made 2 years ahead of time!– All parties were unhappy– Medical schools stop releasing any information

about students before some reasonable date– Did this fix the situation?

Page 50: Shang-Hua Teng

History: When Markets fail

• 1944 Absurd Situation. Appointments being made 2 years ahead of time!– All parties were unhappy– Medical schools stop releasing any information

about students before some reasonable date– Offers were made at a more reasonable date, Offers were made at a more reasonable date,

but new problems developedbut new problems developed

Page 51: Shang-Hua Teng

History: When Markets fail

• 1945-1949 Just As Competitive– Hospitals started putting time limits on offers– Time limit gets down to 12 hours– Lots of unhappy people– Many instabilities resulting from lack of

cooperation

Page 52: Shang-Hua Teng

History: When Markets fail

• 1950 Centralized System– Each hospital ranks residents – Each resident ranks hospitals– National Resident Matching Program produces

a pairing

Whoops! The pairings were not always stable. By 1952 the algorithm was the TMA (hospital-optimal) and

therefore stable.

Page 53: Shang-Hua Teng

History Repeats Itself!NY TIMES, March 17, 1989– “The once decorous process by which

federal judges select their law clerks has degenerated into a free-for-all in which some of the judges scramble for the top law school students . . .”

– “The judges have steadily pushed up the hiring process . . .”

– “Offered some jobs as early as February of the second year of law school . . .”

– “On the basis of fewer grades and flimsier evidence . . .”

Page 54: Shang-Hua Teng

NY TIMES– “Law of the jungle reigns . . “– The association of American Law Schools

agreed not to hire before September of the third year . . .

– Some extend offers from only a few hours, a practice known in the clerkship vernacular as a “short fuse” or a “hold up”.

– Judge Winter offered a Yale student a clerkship at 11:35 and gave her until noon to accept . . . At 11:55 . . he withdrew his offer