Strong Stability in the Hospitals/Residents Problem Robert W. Irving, David F. Manlove and Sandy Scott University of Glasgow Department of Computing Science.

Slides:



Advertisements
Similar presentations
Strong Stability in the Hospitals/Residents Problem Robert W. Irving, David F. Manlove and Sandy Scott University of Glasgow Department of Computing Science.
Advertisements

1 Almost stable matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University Péter Biró Department of Computer.
Modelling and Solving the Stable Marriage problem using Constraint Programming David Manlove and Gregg OMalley University Of Glasgow Department of Computing.
1 Approximability Results for Induced Matchings in Graphs David Manlove University of Glasgow Joint work with Billy Duckworth Michele Zito Macquarie University.
Stable Matching Problems with Constant Length Preference Lists Rob Irving, David Manlove, Gregg OMalley University Of Glasgow Department of Computing Science.
1 Student-Project Allocation with Preferences over Projects David Manlove Gregg OMalley University of Glasgow Department of Computing Science Supported.
1 Almost stable matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of Computer.
1 Student-Project Allocation with Preferences over Projects David Manlove University of Glasgow Department of Computing Science Joint work with Gregg OMalley.
Strong Stability in the Hospitals/Residents Problem
LAW February A 5/3 approximation algorithm for a hard case of stable marriage Rob Irving Computing Science Department University of Glasgow (joint.
Piyush Kumar (Lecture 3: Stable Marriage) Welcome to COT5405.
Prof. Swarat Chaudhuri COMP 482: Design and Analysis of Algorithms Spring 2013 Lecture 2.
1 NP-completeness Lecture 2: Jan P The class of problems that can be solved in polynomial time. e.g. gcd, shortest path, prime, etc. There are many.
Label Placement and graph drawing Imo Lieberwerth.
Specialised N-ary Constraint for the Stable Marriage Problem By Chris Unsworth and Patrick Prosser.
Joint work with Rob Irving
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
Properties of SLUR Formulae Ondřej Čepek, Petr Kučera, Václav Vlček Charles University in Prague SOFSEM 2012 January 23, 2012.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
CS21 Decidability and Tractability
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
Computability and Complexity 15-1 Computability and Complexity Andrei Bulatov NP-Completeness.
Complexity and Approximation of the Minimum Recombinant Haplotype Configuration Problem Authors: Lan Liu, Xi Chen, Jing Xiao & Tao Jiang.
Reduction Techniques Restriction Local Replacement Component Design Examples.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
Lecture 4 CSE 331 Sep 9, Blog posts for lectures Starts from today See Sep 8 post on the blog.
The Theory of NP-Completeness
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
Computational Complexity, Physical Mapping III + Perl CIS 667 March 4, 2004.
NP-complete examples CSC3130 Tutorial 11 Xiao Linfu Department of Computer Science & Engineering Fall 2009.
CSE 421 Algorithms Richard Anderson Lecture 27 NP Completeness.
Clique Cover Cook’s Theorem 3SAT and Independent Set
1 Joint work with Shmuel Safra. 2 Motivation 3 Motivation.
L3 #1 The Hospitals / Residents Problem and Some Extensions David Manlove University of Glasgow Department of Computing Science Supported by EPSRC grant.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Pareto Optimality in House Allocation Problems David Manlove Department of Computing Science University of Glasgow David Abraham Computer Science Department.
Theory of Computation, Feodor F. Dragan, Kent State University 1 NP-Completeness P: is the set of decision problems (or languages) that are solvable in.
INHERENT LIMITATIONS OF COMPUTER PROGRAMS CSci 4011.
Pareto Optimality in House Allocation Problems David Manlove Department of Computing Science University of Glasgow David Abraham Computer Science Department.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
Complexity 25-1 Complexity Andrei Bulatov Counting Problems.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
Techniques for Proving NP-Completeness Show that a special case of the problem you are interested in is NP- complete. For example: The problem of finding.
Specialised Binary Constraint for the Stable Marriage Problem with Ties and incomplete preference lists By Chris Unsworth and Patrick Prosser.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Complexity of Determining Nonemptiness of the Core Vincent Conitzer, Tuomas Sandholm Computer Science Department Carnegie Mellon University.
A Constraint Programming Approach to the Hospitals / Residents Problem By David Manlove, Gregg O’Malley, Patrick Prosser and Chris Unsworth.
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
NP-COMPLETE PROBLEMS. Admin  Two more assignments…  No office hours on tomorrow.
Algorithms for Student-Project Allocation
The Stable Marriage Problem
1 “Almost stable” matchings in the Roommates problem David Abraham Computer Science Department Carnegie-Mellon University, USA Péter Biró Department of.
Strings Basic data type in computational biology A string is an ordered succession of characters or symbols from a finite set called an alphabet Sequence.
NP-completeness NP-complete problems. Homework Vertex Cover Instance. A graph G and an integer k. Question. Is there a vertex cover of cardinality k?
NPC.
Pareto Optimality in House Allocation Problems David Manlove Department of Computing Science University of Glasgow David Abraham Computer Science Department.
CS623: Introduction to Computing with Neural Nets (lecture-7) Pushpak Bhattacharyya Computer Science and Engineering Department IIT Bombay.
Complexity 24-1 Complexity Andrei Bulatov Counting Problems.
1 The Theory of NP-Completeness 2 Review: Finding lower bound by problem transformation Problem X reduces to problem Y (X  Y ) iff X can be solved by.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Pareto Optimality in House Allocation Problems David Manlove Department of Computing Science University of Glasgow David Abraham Computer Science Department.
Centralised matching schemes
Stable Marriage Problem
Chapter 10 Iterative Improvement
CS21 Decidability and Tractability
“Almost stable” matchings in the Roommates problem
A Grand Tour of Stable Matching Problems
Lecture 7 CSE 331 Sep 11, 2013.
Presentation transcript:

Strong Stability in the Hospitals/Residents Problem Robert W. Irving, David F. Manlove and Sandy Scott University of Glasgow Department of Computing Science Supported by EPSRC grant GR/R84597/01 and Nuffield Foundation Award NUF-NAL-02

2 Hospitals/Residents problem (HR): Motivation Graduating medical students or residents seek hospital appointments Centralised matching schemes are in operation Schemes produce stable matchings of residents to hospitals – National Resident Matching Program (US) – other large-scale matching schemes, both educational and vocational

3 Hospitals/Residents problem (HR): Definition a set H of hospitals, a set R of residents each resident r ranks a subset of H in strict order of preference each hospital h has p h posts, and ranks in strict order those residents who have ranked it a matching M is a subset of the acceptable pairs of R  H such that |{h: (r,h)  M}|  1 for all r and |{r: (r,h)  M}|  p h for all h

4 An instance of HR r 1 : h 2 h 3 h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 h 1 h 3 r 6 : h 3 h 1 :3: r 2 r 1 r 3 r 5 h 2 :2: r 3 r 2 r 1 r 4 r 5 h 3 :1: r 4 r 5 r 1 r 3 r 6

5 A matching in HR r 1 : h 2 h 3 h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 h 1 h 3 r 6 : h 3 h 1 :3: r 2 r 1 r 3 r 5 h 2 :2: r 3 r 2 r 1 r 4 r 5 h 3 :1: r 4 r 5 r 1 r 3 r 6

6 Indifference in the ranking ties: h 1 : r 7 (r 1 r 3 ) r 5 version of HR with ties is HRT more general form of indifference involves partial orders version of HR with partial orders is HRP

7 An instance of HRT r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

8 A matching in HRT r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

9 A blocking pair r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6 r 4 and h 2 form a blocking pair

10 Stability a matching M is stable unless there is an acceptable pair (r,h)  M such that, if they joined together both would be better off (weak stability) neither would be worse off (super-stability) one would be better off and the other no worse off (strong stability) such a pair constitutes a blocking pair hereafter consider only strong stability

11 Another blocking pair r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6 r 1 and h 3 form a blocking pair

12 A strongly stable matching r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

13 State of the art weak stability: –weakly stable matching always exists –efficient algorithm (Gale and Shapley (AMM, 1962), Gusfield and Irving (MIT Press, 1989)) –matchings may vary in size (Manlove et al. (TCS, 2002)) –many NP-hard problems, including finding largest weakly stable matching (Iwama et al. (ICALP, 1999), Manlove et al. (TCS, 2002))

14 State of the art super-stability –super-stable matching may or may not exist –efficient algorithm (Irving, Manlove and Scott (SWAT, 2000)) strong stability –strongly stable matching may or may not exist –here we present an efficient algorithm for HRT –in contrast, show problem is NP-complete in HRP –(Irving, Manlove and Scott (STACS, 2003))

15 The algorithm in brief repeat provisionally assign all free residents to hospitals at head of list form reduced provisional assignment graph find critical set of residents and make corresponding deletions until critical set is empty form a feasible matching check if feasible matching is strongly stable

16 An instance of HRT r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

17 A provisional assignment and a dominated resident r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

18 A deletion r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 )

19 Another provisional assignment r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 )

20 Several provisional assignments r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 )

21 The provisional assignment graph with one bound resident r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(3) h 2 :(2) h 3 :(1)

22 Removing a bound resident r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(3) h 2 :(1) h 3 :(1)

23 The reduced provisional assignment graph r3r3 r4r4 r5r5 r1r1 h 2 :(1) h 3 :(1)

24 The critical set r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 )

25 Deletions from the critical set, end of loop iteration r 1 : h 1 r 2 : h 2 h 1 r 3 : h 2 h 1 r 4 : h 3 r 5 : (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 h 3 :1: (r 4 r 5 )

26 Second loop iteration, starting with a provisional assignment r 1 : h 1 r 2 : h 2 h 1 r 3 : h 2 h 1 r 4 : h 3 r 5 : (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 h 3 :1: (r 4 r 5 )

27 Several provisional assignments r 1 : h 1 r 2 : h 2 h 1 r 3 : h 2 h 1 r 4 : h 3 r 5 : (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 h 3 :1: (r 4 r 5 )

28 The final provisional assignment graph with four bound residents r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(3) h 2 :(2) h 3 :(1)

29 Removing a bound resident r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(2) h 2 :(2) h 3 :(1)

30 Removing another bound resident r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(2) h 2 :(1) h 3 :(1)

31 Removing a third bound resident r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(2) h 2 :(0) h 3 :(1)

32 Removing a bound resident with an additional provisional assignment r2r2 r3r3 r4r4 r5r5 r1r1 h 1 :(1) h 2 :(0) h 3 :(1)

33 The reduced final provisional assignment graph r4r4 h 3 :(1)

34 A cancelled assignment r 1 : h 1 r 2 : h 2 h 1 r 3 : h 2 h 1 r 4 : h 3 r 5 : (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 h 3 :1: (r 4 r 5 )

35 A feasible matching r 1 : h 1 r 2 : h 2 h 1 r 3 : h 2 h 1 r 4 : h 3 r 5 : (h 1 h 3 ) r 6 : h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 h 3 :1: (r 4 r 5 )

36 A strongly stable matching r 1 : (h 2 h 3 ) h 1 r 2 : h 2 h 1 r 3 : h 3 h 2 h 1 r 4 : h 2 h 3 r 5 : h 2 (h 1 h 3 ) r 6 : h 3 h 1 :3: r 2 (r 1 r 3 ) r 5 h 2 :2: r 3 r 2 (r 1 r 4 r 5 ) h 3 :1: (r 4 r 5 ) (r 1 r 3 ) r 6

37 repeat { while some resident r is free and has a non-empty list for each hospital h at the head of r’s list { provisionally assign r to h; if h is fully-subscribed or over-subscribed { for each resident r' dominated on h’s list delete the pair (r',h); } } form the reduced assignment graph; find the critical set Z of residents; for each hospital h  N(Z) for each resident r in the tail of h’s list delete the pair (r,h); }until Z =  ;

38 let G be the final provisional assignment graph; let M be a feasible matching in G; if M is strongly stable output M; else no strongly stable matching exists;

39 Properties of the algorithm algorithm has complexity O(a 2 ), where a is the number of acceptable pairs bounded below by complexity of finding a perfect matching in a bipartite graph matching produced by the algorithm is resident-optimal same set of residents matched and posts filled in every strongly stable matching

40 Strong Stability in HRP HRP is NP-complete –even if all hospitals have just one post, and every pair is acceptable reduction from RESTRICTED 3-SAT: –Boolean formula B in CNF where each variable v occurs in exactly two clauses as variable v, and exactly two clauses as ~v

41 Open problems find a weakly stable matching with minimum number of strongly stable blocking pairs size of strongly stable matchings relative to possible sizes of weakly stable matchings hospital-oriented algorithm