matching problems toby walsh nicta and unsw. motivation agents may express preferences for issues...
TRANSCRIPT
![Page 1: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/1.jpg)
Matching problems
Toby Walsh
NICTA and UNSW
![Page 2: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/2.jpg)
Motivation
Agents may express preferences for issues other than a collective decision Preferences for a spouse Preferences for a room-mate Preferences for a work assignment …
All examples of matching problems Husbands with Wives Students with Rooms Doctors with Hospitals …
![Page 3: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/3.jpg)
Stable marriage
What do I know? Ask me again after
June 21st
Mathematical abstraction Idealized model All men can totally
order all women …
QuickTime™ and a decompressor
are needed to see this picture.
![Page 4: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/4.jpg)
Stable marriage
Given preferences of n men Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Given preferences of n women Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
![Page 5: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/5.jpg)
Stable marriage
Given preferences of n men Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Given preferences of n women Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
Find a stable marriage
![Page 6: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/6.jpg)
Stable marriage
Given preferences of n menGiven preferences of n womenFind a stable marriage
Assignment of men to women (or equivalently of women to men)
Idealization: everyone marries at the same time No pair (man,woman) not married to each other
would prefer to run off together Idealization: assumes no barrier to divorce!
![Page 7: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/7.jpg)
Stable marriage
Unstable solution Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
Bertha & Greg would prefer to elope
![Page 8: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/8.jpg)
Stable marriage
One solution Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
Men do ok, women less well
![Page 9: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/9.jpg)
Stable marriage
Another solution Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
Women do ok, men less well
![Page 10: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/10.jpg)
Gale Shapley algorithm
Initialize every person to be freeWhile exists a free man
Find best woman he hasn’t proposed to yet If this woman is free, declare them engaged
Else if this woman prefers this proposal to her current fiance then declare them engaged (and “free” her current fiance)
Else this woman prefers her current fiance and she rejects the proposial
![Page 11: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/11.jpg)
Gale Shapley algorithm
Initialize every person to be free While exists a free man
Find best woman he hasn’t proposed to yet
If this woman is free, declare them engaged
Else if this woman prefers this proposal to her current fiance then declare them engaged (and “free” her current fiance)
Else this woman prefers her current fiance and she rejects the proposial
Greg: Amy>Bertha>Clare
Harry: Bertha>Amy>Clare
Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian
Bertha: Greg>Harry>Ian
Clare: Greg>Harry>Ian
![Page 12: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/12.jpg)
Gale Shapley algorithm
Terminates with everyone matched Suppose some man is unmatched at the end Then some woman is also unmatched But once a woman is matched, she only “trades” up Hence this woman was never proposed to
• But if a man is unmatched, he has proposed to and been rejected by every woman
This is a contradiction as he has never proposed to the unmatched woman!
![Page 13: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/13.jpg)
Gale Shapley algorithm
Terminates with perfect matching Suppose there is an unstable pair in the final
matching Case 1. This man never proposed to this
woman As men propose to women in preference order, man
must prefer his current fiance Hence current pairing is stable!
![Page 14: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/14.jpg)
Gale Shapley algorithm
Terminates with perfect matching Suppose there is an unstable pair in the final
matching Case 1. This man never proposed to this
woman Case 2. This man had proposed to this woman
But the woman rejected him (immediately or later) However, women only ever trade up Hence the woman prefers her current partner So the current pairing is stable!
![Page 15: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/15.jpg)
Gale Shapley algorithm
Each of n men can make at most (n-1) proposalsHence GS runs in O(n2) time
There may be more than one stable marriageGS finds man optimal solutionThere is no stable matching in which any man does betterGS finds woman pessimal solutionIn all stable marriages, every woman does at least as well or better
![Page 16: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/16.jpg)
Gale Shapley algorithm
GS finds male optimal solution Suppose some man is engaged to someone who is not
the best possible woman Then they have proposed and been rejected by this woman Consider first such man A, who is rejected by X in favour
ultimately of marrying B• There exists (some other) stable marriage with A married to X
and B to Y By assumption, B has not yet been rejected by his best
possible woman Hence B must prefer X at least as much as his best possible
woman So (A,X) (B,Y) is not a stable marriage as B and X would
prefer to elope!
![Page 17: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/17.jpg)
Gale Shapley algorithm
GS finds woman pessimal solution Suppose some womman is engaged to someone who is
not the worst possible man Let (A,X) be married but A is not worst possible man for X There exists a stable marriage with (B,X) (A,Y) and B
worse than A for X By male optimality, A prefers X to Y Then (A,Y) is unstable!
![Page 18: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/18.jpg)
Gale Shapley algorithm
Initialize every person to be free While exists a free man
Find best woman he hasn’t proposed to yet
If this woman is free, declare them engaged
Else if this woman prefers this proposal to her current fiance then declare them engaged (and “free” her current fiance)
Else this woman prefers her current fiance and she rejects the proposial
Greg: Amy>Bertha>Clare
Harry: Bertha>Amy>Clare
Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian
Bertha: Greg>Harry>Ian
Clare: Greg>Harry>Ian
![Page 19: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/19.jpg)
Gale Shapley algorithm woman optimal
Initialize every person to be free While exists a free woman
Find best man she hasn’t proposed to yet
If this man is free, declare them engaged
Else if this man prefers this proposal to his current fiance then declare them engaged (and “free” his current fiance)
Else this man prefers his current fiance and he rejects the proposial
Greg: Amy>Bertha>Clare
Harry: Bertha>Amy>Clare
Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian
Bertha: Greg>Harry>Ian
Clare: Greg>Harry>Ian
![Page 20: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/20.jpg)
Extensions: ties
Cannot always make up our minds Angelina or Jennifer? Either would be equally
good! Stability
(weak) no couple strictly prefers each other
(strong) no couple such that one strictly prefers the other, and the other likes them as much or more
![Page 21: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/21.jpg)
Extensions: ties
Stability (weak) no couple strictly prefers each other (strong) no couple such that one strictly prefers the
other, and the other likes them as much or moreExistence
Strongly stable marriage may not exist O(n4) algorithm for deciding existence
Weakly stable marriage always exists Just break ties aribtrarily Run GS, resulting marriage is weakly stable!
![Page 22: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/22.jpg)
Extensions: incomplete preferences
There are some people we may be unwilling to marry I’d prefer to remain single
than marry Margaret (m,w) unstable iff
m and w do not find each other unacceptable
m is unmatched or prefers w to current fiance
w is unmatched or prefers w to current fiance
![Page 23: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/23.jpg)
Extensions: incomplete prefs
GS algorithm Extends easily
Men and woman partition into two sets Those who have partners in all stable marriages Those who do not have partners in any stable
marriage
![Page 24: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/24.jpg)
Extensions: ties & incomplete prefs
Weakly stable marriages may be different sizes Unlike with just ties where they are all complete
Finding weakly stable marriage of max. cardinality is NP-hard Even if only women declare ties
![Page 25: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/25.jpg)
Extensions: unequal numbers
For instance, more men than woman See China!
Matching unstable if pair (m,w) m and w do not find each other unacceptable m is unmatched or prefers w to current fiance w is unmatched or prefers w to current fiance
![Page 26: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/26.jpg)
Extensions: unequal numbers
GS algorithm Extends easily
If |men|>|women| then all woman are married in a stable solution Men partition into two sets
Those who have partners in all stable marriages Those who do not have partners in any stable
marriage
![Page 27: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/27.jpg)
Strategy proofness
GS is strategy proof for men Assuming male optimal algorithm No man can do better than the male optimal
solution
However, women can profit from lying Assuming male optimal algorithm is run And they know complete preference lists
![Page 28: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/28.jpg)
Strategy proofness
Greg: Amy>Bertha>Clare Harry: Bertha>Amy>Clare Ian: Amy>Bertha>Clare
Amy: Harry>Greg>Ian Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
Amy lies
Amy: Harry>Ian>Greg Bertha: Greg>Harry>Ian Clare: Greg>Harry>Ian
![Page 29: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/29.jpg)
Impossibility of strategy proofness
[Roth 82] No matching procedure for which stating the truth
is a dominant strategy for all agents when preference lists can be incomplete
Consider Greg: Amy>Bertha Amy: Harry>Greg Harry: Bertha>Amy Bertha: Greg>Harry
Two stable marriages: (Greg,Amy)(Harry,Bertha) or (Greg,Bertha)(Harry,Amy)
![Page 30: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/30.jpg)
Impossibility of strategy proofness
Consider Greg: Amy>Bertha Amy: Harry>Greg Harry: Bertha>Amy Bertha: Greg>Harry
Two stable marriages: (Greg,Amy)(Harry,Bertha) or (Greg,Bertha)(Harry,Amy)
Suppose we get male optimal solution (Greg,Amy)(Harry,Bertha) If Amy lies and says Harry is only acceptable partner Then we must get (Harry,Amy)(Greg,Bertha) as this is the
only stable marriage Other cases can be manipulated in a similar way
![Page 31: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/31.jpg)
Impossibility of strategy proofness
Strategy proofness is hard to achieve [Roth and Sotomayor 90] With any matching procedure, if
preference lists are strict, and there is more than one stable marriage, then at least one agent can profitably lie assuming the other agents tell the truth
But one side can have no incentive to lie [Dubins and Freedman 81] With a male-proposing
matching algorithm, it is a weakly-dominant strategy for the men to tell the truth
Weakly-dominant=???
![Page 32: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/32.jpg)
Some lessons learnt?
Historically men have in fact proposed to woman Men: propose early and
often Men: don’t lie Women: ask out the
guys (Bad news) Women:
lying and turning down proposals can be to your advantage!
![Page 33: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/33.jpg)
Hospital residents problem
Matching of residents to hospitals Hospitals express preferences over resident Hospitals declare how many residents they take Residents express preferences over hospitals
Matching (h,r) unstable iff They are acceptable to each other r is unmatched or r prefers h to current hospital h is not full or h prefers r to one its current residents
![Page 34: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/34.jpg)
Stable roommate
2n agents Each ranks every other agent Pair up agents according to preferences
No stable matching may exist Adam: Bob>Chris>Derek Bob: Chris>Adam>Derek Chris: Adam>Bob>Derek Derek: Adam>Bob>Chris
![Page 35: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/35.jpg)
Conclusions
Preferences turn up in matching problems Stable marriage Roommate Hospital-residents problem
We may wish to represent Ties Incompatability (aka “incomplete preference lists) ..
Complexity depends on this Stable marriage on total orders is O(n2) Stable marriage with ties and incomplete preference lists
is NP-hard
![Page 36: Matching problems Toby Walsh NICTA and UNSW. Motivation Agents may express preferences for issues other than a collective decision Preferences for a](https://reader036.vdocuments.us/reader036/viewer/2022062409/56649c9c5503460f9495b358/html5/thumbnails/36.jpg)
Conclusions
Many different formalisms for representing preferences CP nets, soft constraints, utilities, …
Many different dimensions to analyse these formalisms along Expressiveness, succinctness, …
Many interesting computational problems Computing optimal, ordering outcomes, manipulating
result, deciding when to terminate preference elicitation, …