CSE331 Lecture 10

# CSE331 Lecture 10 - Lecture 10 CSE 331 Online Office Hr...

This preview shows pages 1–6. Sign up to view the full content.

Lecture 10 CSE 331 Sep 21, 2011

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Online Office Hr Toinght 9:30- 10:00
Please do let me know if I’m mumbling

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Gale-Shapley Algorithm 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 At most n 2 iterations At most n 2 iterations O(1) time implementatio n O(1) time implementatio n
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 Linked list of free women Linked list of free women

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 18

CSE331 Lecture 10 - Lecture 10 CSE 331 Online Office Hr...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online