Design & Co-design of Embedded Systems Final Project: “The Match Maker” Second Phase Oral Presentation Safa S. Mahmoodian.

Slides:



Advertisements
Similar presentations
Stable Matching Problems with Constant Length Preference Lists Rob Irving, David Manlove, Gregg OMalley University Of Glasgow Department of Computing Science.
Advertisements

Blah blah blah. Zoes shark Thanks to the conference artist Phoebe.
Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
1 Overview of Graph Theory Addendum “The Stable Marriage Problem” Instructor: Carlos Pomalaza-Ráez Fall 2003 University of Oulu, Finland.
Naveen Garg, CSE, IIT Delhi
Matching Theory.
Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision  Preferences for a.
Specialised N-ary Constraint for the Stable Marriage Problem By Chris Unsworth and Patrick Prosser.
WHAT DOES THE BIBLE SAY ABOUT.  God Instituted Marriage Gen 2:22-25 And the rib that the Lord had taken from the man he made into a woman and brought.
“Wife of Bath” Prologue. Calling Dr. Wife of Bath! What subject does the wife feel that she has expert knowledge? Marriage- she has been married 5 times.
Social Networks 101 P ROF. J ASON H ARTLINE AND P ROF. N ICOLE I MMORLICA.
Lecture 6 CSE 331 Sep 14. A run of the GS algorithm Mal Wash Simon Inara Zoe Kaylee.
CSE 421 Algorithms Richard Anderson Lecture 2. Announcements Office Hours –Richard Anderson, CSE 582 Monday, 10:00 – 11:00 Friday, 11:00 – 12:00 –Yiannis.
Lecture 4 CSE 331 Sep 9, Blog posts for lectures Starts from today See Sep 8 post on the blog.
Lecture 5 CSE 331 Sep 11, HW 1 out today Will be handed out at the END of the lecture Read the homework policy document carefully START EARLY! ©ehow.com.
A Longer Example: Stable Matching UNC Chapel HillZ. Guo.
Lecture 8 CSE 331 Sep 17, HW 1 due today Place Q1 and Q2 in separate piles I will not accept HWs after 1:15pm.
Week 11 - Friday.  What did we talk about last time?  Exam 2 post mortem  Cycle detection  Connectivity.
Lecture 6 CSE 331 Sep 10, Homeworks HW 1 posted online: see blog/piazza Pickup graded HW 0 in TA OHs.
Chapter 10: Iterative Improvement Simplex Method The Design and Analysis of Algorithms.
The Stable Marriage Problem
1 Stable Matching Problem Goal. Given n men and n women, find a "suitable" matching. n Participants rate members of opposite sex. n Each man lists women.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Adapted from a presentation by Stephen Rudich.
The Mathematics Of 1950’s Dating: Who wins the battle of the sexes? Presentation by Shuchi Chawla with some modifications.
Lecture 2 CSE 331. Day 1 Survey On UBlearns Day 1 Survey (talking points) Security MS PhD for research Building PC’s for 442 It’s ok to play games –
Stable Matchings a.k.a. the Stable Marriage Problem
Lecture 5 CSE 331 Sep 11, Submit the form I’ll need confirmation in writing. No graded material will be handed back till I get this signed form.
Stable Marriage Problem Introductory talk Yosuke KIKUCHI Dept Comp. and Info. Eng. Tsuyama College of Tech OKAYAMA, JAPAN.
Great Theoretical Ideas in Computer Science.
1 The Stable Marriage Problem Algorithms and Networks 2014/2015 Hans L. Bodlaender Johan M. M. van Rooij.
Marriage and Mathematics Lau Ting Sum Samson Suen Wai.
All Pair Shortest Path IOI/ACM ICPC Training June 2004.
Lecture 23: Stable Marriage ( Based on Lectures of Steven Rudich of CMU and Amit Sahai of Princeton) Shang-Hua Teng.
Stable Matching Lecture 7: Oct 3. Matching A B C DE Boys Girls Today’s goal: to “match” the boys and the girls in a “good” way.
Bipartite Matching. Unweighted Bipartite Matching.
1 Psych 5510/6510 Chapter 13 ANCOVA: Models with Continuous and Categorical Predictors Part 2: Controlling for Confounding Variables Spring, 2009.
CSE 421 Algorithms Richard Anderson (for Anna Karlin) Winter 2006 Lecture 2.
The Stable Marriage Problem
Matching Lecture 19: Nov 23.
Fair Shares.
Graph Algorithms Maximum Flow - Best algorithms [Adapted from R.Solis-Oba]
CSCI 256 Data Structures and Algorithm Analysis Lecture 2 Some slides by Kevin Wayne copyright 2005, Pearson Addison Wesley all rights reserved, and some.
Market Design and Analysis Lecture 2 Lecturer: Ning Chen ( 陈宁 )
Algorithms used by CDNs Stable Marriage Algorithm Consistent Hashing.
Stable marriages Competitive programming and problem solving Yoram Meijaard.
Matching Boys Girls A B C D E
Cybernetica AS & Tartu University
Stable Matching.
Stable Marriage Problem
Lecture 4 CSE 331 Sep 7, 2016.
Introduction to the Design and Analysis of Algorithms
The Stable Marriage Problem
Maximum Flow - Best algorithms
CSE 421: Introduction to Algorithms
Lecture 5 CSE 331 Sep 10, 2010.
Lecture 7 CSE 331 Sep 15, 2010.
Lecture 6 CSE 331 Sep 13, 2010.
Richard Anderson (for Anna Karlin) Winter 2006 Lecture 1
S. Raskhodnikova; based on slides by K. Wayne
CSE 421: Introduction to Algorithms
Lecture 5 CSE 331 Sep 6, 2013.
Lecture 5 CSE 331 Sep 7, 2012.
Blah blah blah.
Lecture 10 CSE 331 Sep 21, 2012.
Lecture 6 CSE 331 Sep 12, 2011.
Lecture 5 CSE 331 Sep 5, 2014.
Richard Anderson Winter 2019 Lecture 1
Stable Matchings.
Piyush Kumar (Lecture 3: Stable Marriage)
Week 10 - Wednesday CS221.
Presentation transcript:

Design & Co-design of Embedded Systems Final Project: “The Match Maker” Second Phase Oral Presentation Safa S. Mahmoodian

Jan, 2006"The Match Maker"2 The Stable Marriage Problem Consider the following information: ► a collection of eligible men, each with a rank ordered list of girlfriends ► a collection of eligible women, each with a rank ordered list of boyfriends Assume that: ► the number of men and women are equal ► all men rank all women, and vice versa ► rank ordered lists are in decreasing order of preference

Jan, 2006"The Match Maker"3 The Stable Marriage Problem (cont’d) We define a marriage arrangement to be a pairing of the men and women such that: ► each man is paired with one woman and ► every person appears in exactly one pair. We say that a marriage arrangement is stable if there does not exist a woman X and man Y such that: ► X prefers Y over X's husband, and ► Y prefers X over Y's wife. Note: If there would exist such people, then they would want to run off together, creating an unstable situation.

Jan, 2006"The Match Maker"4 The Stable Marriage Problem (cont’d) The problem is: “Given the preference rankings of the men and women, construct a stable marriage arrangement.”

Jan, 2006"The Match Maker"5 The Stable Marriage Problem (cont’d) The method For solving this problem works something like this: ► The first man will propose to the first woman on his list. ► She having no better offer at this point, will accept. ► The second man will then propose to his first choice, and so on. ► Eventually it may happen that a man proposes to a woman who already has a partner.

Jan, 2006"The Match Maker"6 The Stable Marriage Problem (cont’d) ► She will compare the new offer to her current partner and will accept whoever is higher on her list. ► The man she rejects will then go back to his list and propose to his second choice, third choice, and so forth until he comes to a woman who accepts his offer. ► If this woman already had a partner, her old partner gets rejected and he in turn starts proposing to women further down his list. ► Eventually everything gets sorted out.

Jan, 2006"The Match Maker"7 The Stable Marriage Problem (cont’d) Algorithm:  Each person starts with no people "canceled" from his or her list.  People will be canceled from lists as the algorithm progresses.  For each man m, do propose(m), as defined below.

Jan, 2006"The Match Maker"8 The Stable Marriage Problem (cont’d) propose(m): Let W be the first uncanceled woman on m's preference list. Do: refuse(W,m), as defined in the next slide. refuse(W,m): Let m' be W 's current partner (if any). If W prefers m' to m, then she rejects m, in which case: cancel m off W 's list and W off m's list; do: propose(m). (Now m must propose to someone else.) Otherwise, W accepts m as her new partner, in which case: cancel m' off W 's list and W off m' 's list; do: propose(m'). (Now m' 's must propose to someone else.)

Jan, 2006"The Match Maker"9 The Stable Marriage Problem (cont’d) How do we know the final arrangement will be stable? Suppose there exists a man Y and woman X such that they prefer each other over their own spouses. Since Y prefers X over his own spouse, then he must have proposed to her before proposing to his own spouse. So there are two possibilities of what happened at the time of that proposal. Either: ► X rejected Y, which means that she was already engaged to someone she preferred over Y (she had scratched Y off her list). Therefore, she must either be married to that person or someone else who was on her list at the time of the proposal. Therefore, she could not prefer Y to her own spouse, contradicting our assumption. ► X accepted Y, but dumped him later. Since she would have dumped him only in order to become engaged to someone higher ranked on her list, she must not prefer Y over her own spouse, again contradicting the assumption.

Jan, 2006"The Match Maker"10 The Stable Marriage Problem (cont’d) In both cases, the assumption is contradicted. So, there cannot exist a man Y and woman X such that they prefer each other over their own spouses.  The arrangement is stable. How do we know everyone gets paired off? Since the number of men and women are equal, the only way for a man to remain eligible at the end is for there to be an unengaged woman who rejects him. However, the only rejections come from women who are engaged.

Jan, 2006"The Match Maker"11 The Stable Marriage Problem (cont’d) Before proceeding further, we need to choose Data Structures to hold the relevant information. Let's think about what happens as the algorithm runs. At any point in the algorithm: ► a man is either eligible or engaged ► a woman is engaged to at most one man ► each man and woman has a ranked list of preferences For eligible men, we can use a list of men. For the engagements, we can use a mapping from women to men. Each man and woman can be an object that contains a list of preferences.

Jan, 2006"The Match Maker"12 The Stable Marriage Problem (cont’d) The main procedure for the algorithm thus becomes: void findMarriages() { while (eligible != null) { Man m = (Man) eligible.person; Woman w = m.topPick(); if (w.likes(m)) { Man oldHusband = (Man) couples.lookup(w); if (oldHusband == null) eligible = eligible.next; else eligible = new PersonList(oldHusband, eligible.next); couples.map(w, m); w.trimList(m); } m.scratchTop(); } }

Jan, 2006"The Match Maker"13 Example: We Have a list of 4 men and 4 women and their prefrence list as below: Asghar: Donya Azita Cobra Bahar Behnam: Azita Cobra Donya Bahar Cirous: Cobra Donya Bahar Azita Dani: Donya Azita Cobra Bahar Azita: Asghar Cirous Dani Behnam Bahar: Dani Asghar Behnam Cirous Cobra: Cirous Behnam Dani Asghar Donya: Behnam Dani Cirous Asghar

Jan, 2006"The Match Maker"14 Example: (cont’d) Asghar: Donya Azita Cobra Bahar Behnam: Azita Cobra Donya Bahar Cirous: Cobra Donya Bahar Azita Dani: Donya Azita Cobra Bahar Azita: Asghar Cirous Dani Behnam Bahar: Dani Asghar Behnam Cirous Cobra: Cirous Behnam Dani Asghar Donya: Behnam Dani Cirous Asghar AsgharDonyaAzita BehnamAzitaCobraDonya Cirous Cobra Dani Donya AzitaCobraBahar Asghar Behnam Cirous Dani Azita Donya Cobra Bahar Stable Marriages!

Jan, 2006"The Match Maker"15 The Stable Marriage Problem (cont’d) Who gets a better deal in this algorithm, the men or the women? It turns out that since the unengaged women in this algorithm accept any proposal, the men end up happier on average! For example, suppose there are 5 men and 5 women, and suppose every man has a different first choice. Then they'll all get their first choice, regardless of the preferences of the woman!!! This is actually rather facetious viewpoint; this problem is typically applied to relationships somewhat more paradigmatic than marriage, such as roommate assignments, dormitory room assignments, university admissions, match graduating medical students to hospitals and in konkoor.

Jan, 2006"The Match Maker"16 The BIG Question: What have I done till present day?!!! ► Collected a list of materials relevant to the subject (if you want the list, just call me) ► Finally sorted out the algorithm (as I presented) ► Written a C++ code of the algorithm that actually works! Simple procedures and methods In result, so many procedures and methods Easier to manipulate for the next level ► (Next level!) Thought about choosing HW or SW for each procedure and method to obtain the optimum solution (I didn’t get anywhere with this!)

Jan, 2006"The Match Maker"17 The BIG Question: (#2) What will I do from present day?!!! ► Continue thinking! ► If (any result) Then: Write the HW parts in SystemC Simulate both HW and SW separately Synthesize the system (Try to make them work “Together!”)

Jan, 2006"The Match Maker"18 Question time! Any questions???