CSE331 Lecture 10

CSE331 Lecture 10 - Lecture 10 CSE 331 Online Office Hr Toinght 9:3010:00 Please do let me know if Im mumbling Gale-Shapley Algorithm At most n2

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

View Full Document Right Arrow Icon
Lecture 10 CSE 331 Sep 21, 2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
Online Office Hr Toinght 9:30- 10:00
Background image of page 2
Please do let me know if I’m mumbling
Background image of page 3

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

View Full DocumentRight Arrow Icon
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
Background image of page 4
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
Background image of page 5

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

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 12/11/2011 for the course CSE 331 taught by Professor Rudra during the Fall '11 term at SUNY Buffalo.

Page1 / 18

CSE331 Lecture 10 - Lecture 10 CSE 331 Online Office Hr Toinght 9:3010:00 Please do let me know if Im mumbling Gale-Shapley Algorithm At most n2

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online