Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth.

Similar presentations


Presentation on theme: "A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth."— Presentation transcript:

1 A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth

2 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

3 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

4 The Hospital/Residents Problem This is a real world problem The National Resident Matching Program (NRMP) in the US 31,000 residents matched to 2,300 hospitals The Canadian Resident Matching Service (CaRMS) The Scottish PRHO Allocation scheme (SPA)

5 The Hospital/Residents Problem Residents Hospitals R1 R2 R3 : R2 R3 R1 : R2 R1 R3 : H1 H2 H1 H2 We have n residentsand m hospitals Each resident ranks the m hospitals And each hospital ranks the n residents Objective : To find a matching of residents to hospitals Such that the matching is Stable (2) (1) Each hospital has a capacity c And the hospital capacities not exceeded

6 The Hospital/Residents Problem Residents Hospitals R1 R2 R3 : R2 R3 R1 : R2 R1 R3 : H1 H2 H1 H2 A matching R3 and H1 would both be better off if they were matched to each other (2) (1) But not a stable one  A matching is only stable iff it contains no Blocking pairs In this matching R3 and H1 are a Blocking pair

7 The Hospital/Residents Problem Residents Hospitals R1 R2 R3 : R2 R3 R1 : R2 R1 R3 : H1 H2 H1 H2 A stable matching (2) (1)

8 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

9 The Algorithms Two Algorithms Resident-Oriented (RGS) Hospital-Oriented (HGS) Both reach a fixed point RGS-lists HGS-lists Union of these is GS-lists Both run in O(L) time and require O(nm) space

10 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

11 Cloned Solution Residents Hospitals R1 R2 R3 : R2 R3 R1 : R2 R1 R3 : H1 H2 H1 H2 If a hospital has capacity > 1 (2) (1) H1a H1b H2 (1) : R2 R3 R1 : R2 R1 R3 : H1a H1b H2 It can be cloned into c hospitals with capacity 1 We then expand the residents preference lists This is now a stable marriage instance Which can be solved by any stable marriage solution

12 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

13 Constraint Based Model (CBM) a variable for each of the n Residents each with a domain (1.. m) C variables for each of the m Hospitals each with a domain (1.. n) O(Lc) standard “toolbox” constraints Takes O(Lc(n+m)) time to enforce AC Takes O(Lc) space

14 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

15 Specialised Binary Constraint (HR2) a variable for each of the n Residents each with a domain (1.. m) a variables for each of the m Hospitals each with a domain (1.. n) O(L) Specialised Binary constraints Details are in the paper Takes O(Lc(n+m)) time to enforce AC Takes O(nm) space

16 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

17 Specialised N-ary Constraint (HRN) a variable for each of the n Residents each with a domain (1.. m) a variables for each of the m Hospitals each with a domain (1.. n) 1 Specialised n-ary constraints Details are in the paper Takes O(Lc) time to enforce AC Takes O(nm) space

18 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

19 Computational Comparison 50/13/4100/20/51k/100/105k/250/2020k/550/3750k/1.2k/42 Cloned5.84----- CBM0.240.364.75--- HR20.150.180.889.91112- HRN0.120.150.220.531.424.2

20 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

21 Conclusion We have proposed three new constraint solutions to the Hospital/Residents problem A model that uses toolbox constraints A specialised binary constraint A specialised n-ary constraint

22 Contents The Hospital/Residents Problem The Algorithms Cloned Solution Constraint Based Model (CBM) Specialised Binary Constraint (HR2) Specialised N-ary Constraint (HRN) Computational Comparison Conclusion Questions

23 Any Questions?


Download ppt "A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth."

Similar presentations


Ads by Google