1 / 16

Introduction to Algorithms: Course Overview and Stable Matching

This lecture introduces the Algorithms course and covers topics such as mechanics, weekly homework, exams, and algorithm design. A specific algorithm, Stable Matching, is discussed as an introductory problem, including its formal notions and an intuitive idea for an algorithm. The lecture concludes with a discussion of the termination and stability of the algorithm.

maynarde
Download Presentation

Introduction to Algorithms: Course Overview and Stable Matching

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CSE 421Algorithms Richard Anderson Lecture 1

  2. Course Introduction • Instructor • Richard Anderson, anderson@cs.washington.edu • Teaching Assistant • Yiannis Giotas, giotas@cs.washington.edu

  3. All of Computer Science is the Study of Algorithms

  4. Mechanics • It’s on the web • Weekly homework • Midterm • Final exam • Subscribe to the mailing list

  5. Text book • Algorithm Design • Jon Kleinberg, Eva Tardos • Read Chapters 1 & 2

  6. How to study algorithms • Zoology • Mine is faster than yours is • Algorithmic ideas • Where algorithms apply • What makes an algorithm work • Algorithmic thinking

  7. Introductory Problem:Stable Matching • Setting: • Assign TAs to Instructors • Avoid having TAs and Instructors wanting changes • E.g., Prof A. would rather have student X than her current TA, and student X would rather work for Prof A. than his current instructor.

  8. Formal notions • Perfect matching • Ranked preference lists • Stability m1 w1 m2 w2

  9. m1: w1 w2 m2: w2 w1 w1: m1 m2 w2: m2 m1 m1: w1 w2 m2: w1 w2 w1: m1 m2 w2: m1 m2 Examples

  10. m1: w1 w2 m2: w2 w1 w1: m2 m1 w2: m1 m2 Examples

  11. Intuitive Idea for an Algorithm • m proposes to w • If w is unmatched, w accepts • If w is matched to m2 • If w prefers m to m2, w accepts • If w prefers m2 to m, w rejects • Unmatched m proposes to highest w on its preference list

  12. Algorithm Initially all m in M and w in W are free While there is a free m w highest on m’s list that m has not proposed to if w is free, then match (m, w) else suppose (m2, w) is matched if w prefers m to m2 unmatch (m2, w) match (m, w)

  13. Does this work? • Does it terminate? • Is the result a stable matching? • Begin by identifying invariants and measures of progress • m’s proposals get worse • Once w is matched, w stays matched • w’s partners get better

  14. Claim: The algorithms stops in at most n2 steps • Why?

  15. The algorithm terminates with a perfect matching • Why?

  16. The resulting matching is stable • Suppose • m1 prefers w2 to w1 • w2 prefers m1 to m2 • How could this happen? m1 w1 m2 w2

More Related