Differences
This shows you the differences between two versions of the page.
| courses:cs211:winter2014:journals:colin:chapter1 [2014/01/09 02:02] – created mohnacsc | courses:cs211:winter2014:journals:colin:chapter1 [2014/01/16 07:02] (current) – Initial commit mohnacsc | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Chapter 1: Introduction ===== | ===== Chapter 1: Introduction ===== | ||
| - | === 1.1 - Stable Matching === | + | ==== 1.1 - Stable Matching ==== |
| + | |||
| + | The Stable Matching Problem was created by David Gale and Lloyd Shapley in 1962 based on the question: //Could one design a college admissions process, or a job recruiting process, that was self-enforcing?// | ||
| + | |||
| + | Concerns with the process: | ||
| + | Better offers come along and change the matching of applicants, causing a domino effect | ||
| + | |||
| + | Both applicants and employers must be happy to maintain a stable state. | ||
| + | * E prefers every one of its accepted applicants to A; or | ||
| + | * A prefers her current situation over working for employer E | ||
| + | |||
| + | |||
| + | === The Problem === | ||
| + | |||
| + | Consider matching men and women where set M = {m(1), | ||
| + | |||
| + | M X W denotes the set of all ordered pairs of the form (m, w). | ||
| + | |||
| + | A matching S is a set of ordered pairs with the property that each member of M and W appears in at most one pair in S. A perfect matching S’ is a matching with the property that each member of M and W appears in exactly one pair in S’. | ||
| + | |||
| + | Preferences must also be accounted for - in this problem, men rank all women. | ||
| + | |||
| + | Matching S is stable if: | ||
| + | * It is perfect | ||
| + | * There is no instability with respect to S | ||
| + | |||
| + | |||
| + | === Designing the Algorithm === | ||
| + | |||
| + | Basic ideas: | ||
| + | * Initially, every person is free. During the matching process, pairs may enter a state of engagement. | ||
| + | * If an engaged women w of pair (m,w) receives a more preferred offer from m’, she becomes engaged to m’ and m becomes free. | ||
| + | * The algorithm terminates when no one is free. | ||
| + | |||
| + | Concrete description of Gale-Shapley algorithm: | ||
| + | < | ||
| + | Initially all m (in M) and w (in W) are free | ||
| + | While there is a man m who is free and hasn’t proposed to every woman | ||
| + | Choose such a man m | ||
| + | Let w be the highest-ranked woman in m’s preference list to whom m has not yet proposed | ||
| + | If w is free then | ||
| + | (m,w) become engaged | ||
| + | Else w is currently engaged to m’ | ||
| + | If w prefers m’ to m then | ||
| + | m remains free | ||
| + | Else w prefers m to m’ | ||
| + | (m,w) become engaged | ||
| + | m’ becomes free | ||
| + | Endif | ||
| + | Endif | ||
| + | Endwhile | ||
| + | Return the set S of engaged pairs | ||
| + | </ | ||
| + | |||
| + | === Analyzing the Algorithm === | ||
| + | |||
| + | w remains engaged from first proposal, and her partners increase in terms of preference. | ||
| + | |||
| + | The sequence of women to whom m proposes gets worse in terms of preference. | ||
| + | |||
| + | The G-S algorithm terminates after at most n^2 iterations of the while loop. | ||
| + | * Proof: | ||
| + | |||
| + | If m is free at some point, then there remains a free w | ||
| + | |||
| + | The set S returned at termination is a perfect matching | ||
| + | * Proof: | ||
| + | |||
| + | Consider and execution of the G-S algorithm that returns a set of pairs S. The set S is a stable matching. | ||
| + | * Proof: | ||
| + | |||
| + | All executions yield the same matching, set S*. | ||
| + | * Proof: | ||
| + | |||
| + | In the stable matching S*, each woman is paired with her worst valid partner. | ||
| + | * Proof: | ||
| + | |||
| + | From this we can conclude that the gender doing the proposing ends up with a more desirable stable matching. | ||
| - | === 1.2 - Five Representative Problems === | ||
