stable marriage problem stable marriage problem
play

Stable Marriage Problem Stable Marriage Problem Small town with n - PowerPoint PPT Presentation

Stable Marriage Problem Stable Marriage Problem Small town with n boys and n girls. Stable Marriage Problem Small town with n boys and n girls. Each girl has a ranked preference list of boys. Stable Marriage Problem Small town


  1. Example. Boys Girls X A 1 2 3 1 C A B X X B 1 2 3 2 A B C X C 2 1 3 3 A C B Day 1 Day 2 Day 3 Day 4 Day 5 X X , C 1 A, B A A C C X X 2 C B, C B A,B A 3 B

  2. Termination.

  3. Termination. Every non-terminated day a boy crossed an item off the list.

  4. Termination. Every non-terminated day a boy crossed an item off the list. Total size of lists?

  5. Termination. Every non-terminated day a boy crossed an item off the list. Total size of lists? n boys, n length list.

  6. Termination. Every non-terminated day a boy crossed an item off the list. Total size of lists? n boys, n length list. n 2

  7. Termination. Every non-terminated day a boy crossed an item off the list. Total size of lists? n boys, n length list. n 2 Terminates in at most n 2 + 1 steps!

  8. It gets better every day for girls..

  9. It gets better every day for girls.. Improvement Lemma:

  10. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string,

  11. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b .

  12. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof:

  13. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.”

  14. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before.

  15. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before. Assume P ( k ) . Let b be boy on string on day k .

  16. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before. Assume P ( k ) . Let b be boy on string on day k . On day k + 1, boy b comes back.

  17. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before. Assume P ( k ) . Let b be boy on string on day k . On day k + 1, boy b comes back. Girl can choose b just as well,

  18. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before. Assume P ( k ) . Let b be boy on string on day k . On day k + 1, boy b comes back. Girl can choose b just as well, or do better.

  19. It gets better every day for girls.. Improvement Lemma: On any day, if girl has a boy b on a string, any future boy, b ′ , on string is at least as good as b . Proof: P ( k ) - - “every day before k girl had better boy.” P ( 0 ) – always true as there is no day before. Assume P ( k ) . Let b be boy on string on day k . On day k + 1, boy b comes back. Girl can choose b just as well, or do better. = ⇒ P ( k + 1 ) .

  20. Pairing when done. Lemma: Every boy is matched at end.

  21. Pairing when done. Lemma: Every boy is matched at end. Proof:

  22. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times.

  23. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b ,

  24. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma

  25. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string.

  26. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string.

  27. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string. n girls and n boys.

  28. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string. n girls and n boys. Same number of each.

  29. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string. n girls and n boys. Same number of each.

  30. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string. n girls and n boys. Same number of each. = ⇒ b must be on some girl’s string!

  31. Pairing when done. Lemma: Every boy is matched at end. Proof: If not, a boy b must have been rejected n times. Every girl has been proposed to by b , and Improvement lemma = ⇒ each girl has a boy on a string. and each boy on at most one string. n girls and n boys. Same number of each. = ⇒ b must be on some girl’s string! Contradiction.

  32. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm.

  33. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ )

  34. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) g ∗ b ∗ g b

  35. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) g ∗ b ∗ g b

  36. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b

  37. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b Boy b proposes to g ∗ before proposing to g .

  38. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b Boy b proposes to g ∗ before proposing to g . So g ∗ rejected b (since he moved on)

  39. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b Boy b proposes to g ∗ before proposing to g . So g ∗ rejected b (since he moved on) By improvement lemma, g ∗ likes b ∗ better than b .

  40. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b Boy b proposes to g ∗ before proposing to g . So g ∗ rejected b (since he moved on) By improvement lemma, g ∗ likes b ∗ better than b . Contradiction!

  41. Pairing is Stable. Lemma: There is no rogue couple for the pairing formed by traditional marriage algorithm. Proof: Assume there is a rogue couple; ( b , g ∗ ) b likes g ∗ more than g . g ∗ b ∗ g ∗ likes b more than b ∗ . g b Boy b proposes to g ∗ before proposing to g . So g ∗ rejected b (since he moved on) By improvement lemma, g ∗ likes b ∗ better than b . Contradiction!

  42. Good for boys? girls? Is the TMA better for boys?

  43. Good for boys? girls? Is the TMA better for boys? for girls?

  44. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing.

  45. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing. Definition: A pairing is x -pessimal if x ′ s partner is its worst partner in any stable pairing.

  46. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing. Definition: A pairing is x -pessimal if x ′ s partner is its worst partner in any stable pairing. Definition: A pairing is boy optimal if it is x -optimal for all boys x .

  47. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing. Definition: A pairing is x -pessimal if x ′ s partner is its worst partner in any stable pairing. Definition: A pairing is boy optimal if it is x -optimal for all boys x . ..and so on for boy pessimal, girl optimal, girl pessimal.

  48. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing. Definition: A pairing is x -pessimal if x ′ s partner is its worst partner in any stable pairing. Definition: A pairing is boy optimal if it is x -optimal for all boys x . ..and so on for boy pessimal, girl optimal, girl pessimal. Claim: The optimal partner for a boy must be first in his preference list.

  49. Good for boys? girls? Is the TMA better for boys? for girls? Definition: A pairing is x -optimal if x ′ s partner is its best partner in any stable pairing. Definition: A pairing is x -pessimal if x ′ s partner is its worst partner in any stable pairing. Definition: A pairing is boy optimal if it is x -optimal for all boys x . ..and so on for boy pessimal, girl optimal, girl pessimal. Claim: The optimal partner for a boy must be first in his preference list. True?

Recommend


More recommend