SLIDE 1
Declara've Programming Project: Stable Matching Problems VUB - - PowerPoint PPT Presentation
Declara've Programming Project: Stable Matching Problems VUB - - PowerPoint PPT Presentation
Declara've Programming Project: Stable Matching Problems VUB // 21-11-2012 Nobel Prize in Economics 2012 Stable Marriage Problem (SMP) N men: {m 1 ,
SLIDE 2
SLIDE 3
Stable ¡Marriage ¡Problem ¡(SMP) ¡
- N ¡men: ¡{m1, ¡…, ¡mN}; ¡ ¡N ¡women: ¡{w1, ¡…, ¡wN} ¡ ¡ ¡
- Each ¡man ¡has ¡preferences ¡over ¡the ¡women. ¡ ¡
– ¡m1: ¡w1 ¡> ¡w2 ¡> ¡…. ¡> ¡wN ¡ ¡ ¡ – …. ¡
- Each ¡woman ¡has ¡preferences ¡over ¡the ¡men. ¡ ¡
– ¡w1: ¡mN ¡> ¡mN-‑1 ¡> ¡… ¡> ¡m1 ¡ ¡ – …. ¡
SLIDE 4
Stable ¡Marriage ¡ ¡
- Marry ¡the ¡men ¡and ¡women ¡so ¡that ¡there ¡are ¡
no ¡two ¡people ¡of ¡the ¡opposite ¡gender ¡who ¡ would ¡both ¡rather ¡have ¡each ¡other ¡than ¡their ¡ current ¡partner ¡(blocking ¡pair). ¡ ¡
- Example: ¡men ¡= ¡{m1, ¡m2}; ¡women ¡= ¡{w1, ¡w2} ¡ ¡
– m1: ¡w1 ¡> ¡w2; ¡ ¡ ¡ ¡m2: ¡w1 ¡> ¡w2 ¡ – w1: ¡m1 ¡> ¡m2; ¡ ¡ ¡w2: ¡m1 ¡> ¡m2 ¡ ¡ – Stable ¡marriage: ¡(m1, ¡w1), ¡(m2, ¡w2) ¡ ¡ ¡
SLIDE 5
Solu'ons ¡ ¡
- If ¡preference ¡lists ¡are ¡complete, ¡and ¡strictly ¡
- rdered, ¡there ¡always ¡exist ¡at ¡least ¡one ¡
solu'on. ¡ ¡
- There ¡may ¡exist ¡several ¡solu'ons. ¡
- Gale-‑Shapley ¡algorithm ¡to ¡find ¡female-‑ ¡and ¡
male-‑op'mal ¡solu'ons. ¡ ¡
– Every ¡woman ¡(man) ¡gets ¡her ¡(his) ¡best ¡possible ¡ partner ¡among ¡all ¡stable ¡matchings. ¡ ¡
SLIDE 6
Incomplete ¡list ¡of ¡preferences ¡ ¡
- A ¡person ¡can ¡exclude ¡some ¡members ¡whom ¡he/
she ¡does ¡not ¡want ¡to ¡marry. ¡ ¡
- With ¡solu'ons: ¡ ¡
– m1: ¡w1 ¡> ¡w2; ¡ ¡ ¡ ¡m2: ¡w1 ¡> ¡w2 ¡ – w1: ¡m1 ¡> ¡m2; ¡ ¡ ¡w2: ¡m1 ¡> ¡m2 ¡ ¡ – Stable ¡marriage: ¡(m1, ¡w2), ¡(m2, ¡w1) ¡ ¡ ¡
- Without ¡solu'ons: ¡ ¡
– m1: ¡w1 ¡> ¡w2; ¡ ¡ ¡ ¡m2: ¡w2 ¡> ¡w1 ¡ – w1: ¡m1 ¡> ¡m2; ¡ ¡ ¡w2: ¡m2 ¡> ¡m1 ¡ ¡
SLIDE 7
Ties ¡in ¡preferences ¡
- A ¡person ¡may ¡have ¡two ¡or ¡more ¡persons ¡with ¡
the ¡same ¡preference ¡in ¡a ¡'e. ¡ ¡
- m1: ¡{w1, ¡w2} ¡> ¡w3. ¡ ¡
– m1 ¡is ¡indifferent ¡between ¡w1 ¡and ¡w2, ¡but ¡prefers ¡ both ¡to ¡w3. ¡ ¡ ¡
- Several ¡no'ons ¡of ¡stability ¡
– Super, ¡Strong, ¡Weak ¡ ¡
SLIDE 8
Extensions ¡ ¡
- Student-‑Project ¡Alloca@on ¡problem ¡(SPA) ¡
– Lecturers ¡provide ¡projects. ¡ ¡ – Students ¡have ¡preferences ¡over ¡projects. ¡ ¡ – Each ¡project ¡has ¡its ¡own ¡quota. ¡ ¡ – Each ¡lecturer ¡has ¡his/her ¡own ¡quota. ¡ ¡ – Lecturers ¡have ¡preferences ¡over ¡students. ¡ ¡
- Assign ¡students ¡to ¡projects, ¡taking ¡into ¡
account ¡preferences ¡and ¡quotas. ¡ ¡
SLIDE 9
Basic ¡program ¡ ¡
- Preprocessing ¡data. ¡ ¡
- Find ¡stable ¡matchings. ¡ ¡
– Incomplete ¡lists ¡of ¡preferences. ¡ – Ties ¡in ¡preferences ¡(three ¡no'ons ¡of ¡stability). ¡ ¡
- Find ¡op'mal ¡stable ¡matchings. ¡ ¡
- Gale-‑Shapley ¡algorithm ¡(for ¡SMP ¡with ¡complete ¡
preference ¡lists ¡without ¡4es). ¡ ¡ ¡ ¡
SLIDE 10
Non-‑Func'onal ¡Requirements ¡ ¡
- Must ¡run ¡on ¡SWI-‑prolog ¡on ¡the ¡computers ¡at ¡
- Infogroep. ¡ ¡
- Unix ¡text ¡files. ¡ ¡
- Comment ¡your ¡source ¡code. ¡
- Write ¡a ¡report ¡about ¡your ¡project ¡(main ¡data ¡
structures, ¡algorithm, ¡etc.) ¡ ¡
SLIDE 11
- Deadline: ¡6 ¡January ¡2013, ¡at ¡midnight. ¡
– Source ¡code ¡ – Report ¡ ¡ – Brief ¡manual ¡& ¡Sample ¡run. ¡ ¡ – Mail ¡to: ¡h.anh@ai.vub.ac.be. ¡ ¡
- Project ¡webpage: ¡hdps://ai.vub.ac.be/node/1040 ¡ ¡
- Reference. ¡ ¡