COMS 482: unofficial class blog


Lecture 1: Stable Matching

Posted in Class Notes by Elliott Back on January 24th, 2005. [Del.icio.us]

Instructor: Paul Chew
Course page: cs.cornell.edu/courses/cs482/
For Wednesday: Read chapter 1, preview 2 & 3.

Stability in Matching:

The set of couples:

(Alice, Bob)
(Carol, Dave)

  • unstable, if A prefers D and D prefers A, or B prefers C and C prefers B.
  • stable, if A prefers B and B prefers A, or A prefers D and D prefers C.

Opening questions:

Is it always possible, given a set of preferences, to find stable marriages? Look at the following preference lists:

A: B, D
B: C, A
C: B, D
D: A, C

Then, the matching {(A, B) (C,D)} is unstable, because C prefers B and B prefers C to its mate, so they will eagerly switch mates and disrupt the marriage. However, {(A,D) (C,B)} is stable, because C and B prefer each other and will not switch, even though A prefers B to D. Yes–there is always a stable solution.

Can we construct preferences so that there is no stable solution? Let’s try for the following exhaustive matchings:

{(A,B) (C,D)} 1 and {(A,D) (C,B)} 2

Now, pair one 1 has the following set of unstable preferences:

A: D, B
D: A, C

and

C: B, D
B: C, A

Pair two 2 has the following set of unstable preferences:

A: B, D
B: A, C

and

C: D, B
D: C, A

But, there is a contradiction between the two sets 1, 2. If you select a preference pair from matching one 1, you have already defined the rest of the preferences so that there is no instability in the second set of matchings.

Stable Matching Algorithm (Also called “Gale-Shapley” and misspelled “Gale-Shapely”):

Given n men m and women w, as well as a preference list L for each man or woman ranking all members of the opposite sex, each person is either free or engaged. All start free.

While( there exists a free man m ) {
    w = first woman on m’s list whom he has not proposed to
    if ( w is free ){
        (m, w) -> engaged
    } else if ( w is engaged to m’ && w prefers m to m’ ) {
        (m, w) -> engaged
        m’ -> free
    }
}

Convert all engagements to marriages.

Proofs:

“Each man can find a woman to propose to.”

If there is a free man, then there is also a free woman, because they engage in pairs. If a woman is free, she has never been proposed to, which means she must still be on the man’s list.

“The algorithm terminates.”

From the woman’s perspective, every new engagement is an improvement. Every guy gets worse. Every proposal is new. Since every time through the loop, a new proposal happens, and there are a finite number of proposals (n2), the algorithm terminates within n-squared time.

“The algorithm results in stable marriages.”

Assume that there is an instability such that there is (m,w) and (m’, w’) where m prefers w’ and w’ prefers m. So, m’ is the best that w’ has seen. But, m would have proposed to w’ before w because he ranks w’ higher. Yet, since he’s married to w, he must have proposed to w’ already. But she cannot reject him because w’ prefers m… contradiction.

This entry was posted on Monday, January 24th, 2005 at 12:13 pm and is tagged with , , , , , , , , , , , , , , , , , . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback.

2 Responses to 'Lecture 1: Stable Matching'

  1. […] vious. Show there are no instabilities by simple contradition. See Lecture 1 for more on Stable Matching / Marriage. Bre […]

Leave a Reply

Protected by the ample, great, and mighty Wordpress Spam-be-gone plugin!

Please take time to enjoy the archives: May 2005 (1) April 2005 (11) March 2005 (11) February 2005 (15) January 2005 (7)

Fresh, related resources:

Supplied by Google Blog Search
  • A tour of the climate evidence There is no evidence human-emitted ...
    But even a genuine attempt to explain the science, such as An Inconvenient Truth, sailed close to the wind at times in order to sustain the level of drama in what is basically a 90-minute lecture. In one example, Gore made much of the ...
  • I am flaky
    There are 4 hours of lecture each day, with homework at night. Some people study 14 hours a day. I, on the other hand, am not a bachelor without a church calling or a job. I am actually the opposite of that person. ...
  • Nobel Prize Women in Science - Part 1
    As late as 1897 when the electron was discovered, physicists had assumed that atoms were solid, indivisible, stable, and immutable. Yet radium was proof that some powerful force existed inside the atom, a force powerful enough to emit ...
  • MANY PASSIONS NO REGRETS
    Given a seven-year contract by MGM, Ava soon discovered that studio head Louis Mayer was at least as demanding as her mother had been: Like other starlets in his stable, she was placed in the hands of calisthenics instructors, ...
  • Origins of the World Ocean
    All of this brings us around to our topic for today?s lecture: What is Earth?s place in the solar system and why does it have so much water? To answer these questions, we need to take a brief look at the origins of our solar system and ...