1 / 19

Lecture 4

Lecture 4. CSE 331 Sep 3, 2014. Submit the form. I ’ ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!. More clarification on sources. Office Hours. Frank: Tue + Th 1:00-1:50pm. Davis 302. Zulkar: Wed 4:00-4:50pm

Download Presentation

Lecture 4

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. Lecture 4 CSE 331 Sep 3, 2014

  2. Submit the form I’ll need confirmation in writing. No graded material will be handed back till I get this signed form from you!

  3. More clarification on sources

  4. Office Hours Frank: Tue + Th 1:00-1:50pm Davis 302 Zulkar: Wed 4:00-4:50pm + Th 2:00-2:50pm Atri: Mon 2-2:50pm Wed 3-3:50pm

  5. Main Steps in Algorithm Design Problem Statement Real world problem Problem Definition Precise mathematical def Algorithm “Implementation” Data Structures Analysis Correctness/Run time

  6. National Resident Matching

  7. (Screen) Docs are coming to BUF Buffalo General Hawkeye (M*A*S*H) Millard Filmore (Gates Circle) JD (Scrubs) Millard Filmore (Suburban)

  8. The situation can be unstable!

  9. What happens in real life Preferences Information Preferences

  10. NRMP plays matchmaker

  11. Questions/Comments?

  12. Matching Employers & Applicants Input: Set of employers (E) Set of applicants (A) Preferences Output: An assignment of applicants to employers that is “stable” For every x in A and y in E such that x is not assigned to y, either (i) y prefers every accepted applicant to x; or (ii) x prefers her employer to y

  13. Simplicity is good http://xkcd.com/353/

  14. Questions to think about 1) How do we specify preferences? Preference lists 2) Ratio of applicant vs employers 1:1 3) Formally what is an assignment? (perfect) matching 4) Can an employer get assigned > 1 applicant? NO 5) Can an applicant have > 1 job? NO 6) How many employer/applicants in an applicants/employers preferences? All of them 7) Can an employer have 0 assigned applicants? NO 8) Can an applicant have 0 jobs? NO

  15. Questions/Comments?

  16. Discuss: Naïve algorithm!

  17. The naïve algorithm Go through all possible perfect matchings S If S is a stable matching then Stop n! matchings Else move to the next perfect matching

  18. Gale-Shapley Algorithm David Gale Lloyd Shapley O(n3) algorithm

  19. Moral of the story… >

More Related