Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 8 CSE 331 Sep 17, 2010. HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm.

Similar presentations


Presentation on theme: "Lecture 8 CSE 331 Sep 17, 2010. HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm."— Presentation transcript:

1 Lecture 8 CSE 331 Sep 17, 2010

2 HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm

3 HW 1 solutions At the end of the lecture

4 HW 2 has been posted harder than HW 1, so start early!

5 Return signed forms I’ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!

6 ≤ n 2 iterations of the while loop Intially all men and women are free While there exists a free woman who can propose Let w be such a woman and m be the best man she has not proposed to w proposes to m If m is free (m,w) get engaged Else (m,w’) are engaged If m prefers w’ to w w remains free Else (m,w) get engaged and w’ is free Output the engaged pairs as the final output Each iteration has one proposal Each proposal is new # iterations ≤ # proposals ≤ # pairs (m,w) ≤ n 2 # iterations ≤ # proposals ≤ # pairs (m,w) ≤ n 2

7 Today’s lecture GS algorithms always outputs a stable marriage

8 Observation 1 Intially all men and women are free While there exists a free woman who can propose Let w be such a woman and m be the best man she has not proposed to w proposes to m If m is free (m,w) get engaged Else (m,w’) are engaged If m prefers w’ to w w remains free Else (m,w) get engaged and w’ is free Output the engaged pairs as the final output Once a man gets engaged, he remains engaged (to “better” women)

9 Observation 2 Intially all men and women are free While there exists a free woman who can propose Let w be such a woman and m be the best man she has not proposed to w proposes to m If m is free (m,w) get engaged Else (m,w’) are engaged If m prefers w’ to w w remains free Else (m,w) get engaged and w’ is free Output the engaged pairs as the final output If w proposes to m after m’, then she prefers m’ to m

10 Questions/Comments?

11 HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm

12 Proof technique de jour Source: 4simpsons.wordpress.com Proof by contradiction Assume the negation of what you want to prove After some reasoning

13 Claim: GS algo outputs a matching


Download ppt "Lecture 8 CSE 331 Sep 17, 2010. HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm."

Similar presentations


Ads by Google