announcements
play

Announcements Its on the web. Homework 1, Due October 4 CSE 421 - PDF document

Announcements Its on the web. Homework 1, Due October 4 CSE 421 Its on the web Algorithms Subscribe to the mailing list Richard Anderson Richards office hours: Autumn 2006 Tuesday, 2:30-3:20 pm, Friday,


  1. Announcements • It’s on the web. • Homework 1, Due October 4 CSE 421 – It’s on the web Algorithms • Subscribe to the mailing list Richard Anderson • Richard’s office hours: Autumn 2006 – Tuesday, 2:30-3:20 pm, Friday, 2:30-3:20 pm. Lecture 2 • Ning’s office hours: – Monday, 12:30-1:20 pm, Tuesday, 4:30-5:20 pm. A closer look Algorithm under specified • Stable matchings are • Many different ways of picking m’s to propose not necessarily fair • Surprising result – All orderings of picking free m’s give the same result m 1 w 1 m 1 : w 1 w 2 w 3 m 2 : w 2 w 3 w 1 • Proving this type of result m 2 w 2 m 3 : w 3 w 1 w 2 – Reordering argument – Prove algorithm is computing something mores m 3 w 3 specific w 1 : m 2 m 3 m 1 • Show property of the solution – so it computes a specific w 2 : m 3 m 1 m 2 stable matching w 3 : m 1 m 2 m 3 How many stable matchings can you find? Proposal Algorithm finds the best Proof possible solution for M • Formalize the notion of best possible solution • See the text book – pages 9 – 12 • (m, w) is valid if (m, w) is in some stable • Related result: Proposal algorithm is the matching worst case for W • best(m): the highest ranked w for m such that • Algorithm is the M-optimal algorithm (m, w) is valid • Proposal algorithms where w’s propose is • S* = {(m, best(m)} W-Optimal • Every execution of the proposal algorithm computes S* 1

  2. Best choices for one side are bad But there is a stable second choice for the other • Design a configuration for m 1 : • Design a configuration for m 1 : problem of size 4: problem of size 4: m 2 : m 2 : – M proposal algorithm: – M proposal algorithm: m 3 : m 3 : • All m’s get first choice, all w’s • All m’s get first choice, all w’s get last choice get last choice m 4 : m 4 : – W proposal algorithm: – W proposal algorithm: • All w’s get first choice, all m’s • All w’s get first choice, all m’s w 1 : w 1 : get last choice get last choice – There is a stable matching w 2 : w 2 : where everyone gets their second choice w 3 : w 3 : w 4 : w 4 : Key ideas M-rank and W-rank of matching • Formalizing real world problem • m-rank: position of m 1 : w 1 w 2 w 3 m 1 w 1 matching w in – Model: graph and preference lists m 2 : w 1 w 3 w 2 preference list – Mechanism: stability condition m 3 : w 1 w 2 w 3 m 2 w 2 • M-rank: sum of m- • Specification of algorithm with a natural w 1 : m 2 m 3 m 1 ranks operation w 2 : m 3 m 1 m 2 – Proposal • w-rank: position of w 3 : m 3 m 1 m 2 m 3 w 3 matching m in • Establishing termination of process through preference list invariants and progress measure What is the M-rank? • W-rank: sum of w- • Under specification of algorithm ranks • Establishing uniqueness of solution What is the W-rank? Suppose there are n m’s, and n w’s Random Preferences • What is the minimum possible M-rank? Suppose that the preferences are completely random • What is the maximum possible M-rank? m 1 : w 8 w 3 w 1 w 5 w 9 w 2 w 4 w 6 w 7 w 10 m 2 : w 7 w 10 w 1 w 9 w 3 w 4 w 8 w 2 w 5 w 6 … w 1 : m 1 m 4 m 9 m 5 m 10 m 3 m 2 m 6 m 8 m 7 • Suppose each m is matched with a w 2 : m 5 m 8 m 1 m 3 m 2 m 7 m 9 m 10 m 4 m 6 random w, what is the expected M-rank? … If there are n m’s and n w’s, what is the expected value of the M-rank and the W-rank when the proposal algorithm computes a stable matching? 2

  3. Expected Ranks Expected M rank • Expected M rank • Expected M rank is the number of steps until all M’s are matched – (Also is the expected run time of the algorithm) • Expected W rank • Each steps “selects a w at random” – O(n log n) total steps – Average M rank: O(log n) Guess – as a function of n Expected W-rank Probabilistic analysis • If a w receives k random proposals, the • Select items with replacement from a set expected rank for w is n/(k+1). of size n. What is the expected number of items to be selected until every item has been selected at least once. • On the average, a w receives O(log n) proposals • Choose k values at random from the – The average w rank is O(n/log n) interval [0, 1). What is the expected size of the smallest item. What is the run time of the Stable O(1) time per iteration Matching Algorithm? • Find free m Initially all m in M and w in W are free Executed at most n 2 times While there is a free m • Find next available w w highest on m’s list that m has not proposed to if w is free, then match (m, w) • If w is matched, determine m 2 else • Test if w prefer m to m 2 suppose (m 2 , w) is matched if w prefers m to m 2 • Update matching unmatch (m 2 , w) match (m, w) 3

  4. What does it mean for an algorithm to be efficient? 4

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend