1 / 38

Lecture 3

Lecture 3. CSE 331 Aug 31, 2018. Enroll on Piazza. https://piazza.com/buffalo/fall2018/cse331/. Please do keep on asking Qs!. Read the syllabus CAREFULLY!. No graded material will be handed back till you pass the syllabus quiz!. You can submit the following now.

Download Presentation

Lecture 3

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 3 CSE 331 Aug 31, 2018

  2. Enroll on Piazza https://piazza.com/buffalo/fall2018/cse331/

  3. Please do keep on asking Qs!

  4. Read the syllabus CAREFULLY! No graded material will be handed back till you pass the syllabus quiz!

  5. You can submit the following now You should be on Autolab now

  6. Autolab FAQ

  7. TA office hours Finalized by today Details on 1-on-1 meeting by Monday

  8. HW 0 Solution posted

  9. Two comments on Programming Programming is worth about 10% of your final grade Algorithm design/proofs are worth about 84% of your final grade Invest your time wisely 331 is not the place to learn a new language!

  10. Questions/Comments?

  11. Make broadband more available Say you are tasked to come up with the infrastructure

  12. Make broadband more available Input requirements Decide whether this will be for-profit enterprise Where are the customers located? What are technology should we use? What are the bandwidth requirements? Get regulatory approval How is the input represented? Get funding What objective are we optimizing? Hire people How should the connections be configured? Output requirements Get access to physical space Outreach Problem Definition Where should we lay down the physical stuff? Algorithm Design What algorithm should be use to do this? Implement the scheme How should we do testing and maintenance?

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

  14. National Resident Matching

  15. (Screen) Docs are coming to BUF Buffalo General Bailey (Grey’s Anatomy) Millard Filmore (Gates Circle) JD (Scrubs) Millard Filmore (Suburban)

  16. What can go wrong?

  17. The situation is unstable!

  18. What happens in real life Preferences Information Preferences

  19. NRMP plays matchmaker

  20. Stable Matching Problem David Gale Lloyd Shapley

  21. Questions/Comments?

  22. 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

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

  24. 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

  25. Lost in Notation….

  26. Questions/Comments?

  27. Non-feminist reformulation n men Each with a preference list n women Match/marry them in a “stable” way

  28. On matchings Mal Inara Wash Zoe Simon Kaylee

  29. A valid matching Mal Inara Wash Zoe Simon Kaylee

  30. Not a matching Mal Inara Wash Zoe Simon Kaylee

  31. Perfect Matching Mal Inara Wash Zoe Simon Kaylee

  32. Preferences Mal Inara Wash Zoe Simon Kaylee

  33. Instability Mal Inara Wash Zoe Simon Kaylee

  34. Questions/Comments?

  35. Discuss: Naïve algorithm!

  36. 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

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

  38. Moral of the story… >

More Related