1 Student-Project Allocation with Preferences over Projects David Manlove University of Glasgow Department of Computing Science Joint work with Gregg OMalley

  • View
    213

  • Download
    0

Embed Size (px)

Text of 1 Student-Project Allocation with Preferences over Projects David Manlove University of Glasgow...

  • Slide 1

1 Student-Project Allocation with Preferences over Projects David Manlove University of Glasgow Department of Computing Science Joint work with Gregg OMalley Supported by EPSRC grant GR/R84597/01, RSE / Scottish Exec Personal Research Fellowship Slide 2 2 Background and motivation Students may undertake project work during degree course Set of students, projects and lecturers Typically a wide range of projects exceeding number of students Students may rank projects in preference order Lecturers may have preferences over students / projects Projects / lecturers may have capacities Slide 3 3 Related work (1) Growing interest in automating the allocation process Efficient algorithms are important Formalise the matching problem The Student-Project Allocation problem (SPA) No explicit lecturer preferences University of Southampton Proll (1972), bottleneck assignment problem Teo and Ho (1998), greedy approach Anwar and Bahaj (2003), integer programming Harper et al (2005), genetic algorithm Slide 4 4 Related work (2) Lecturer preferences over students 1. Project and lecturer capacities equal to 1 University of York, Department of Computer Science Constraint programming for stable marriage variants Dye (2001), Kazakov (2002), Thorn (2003) 2. Arbitrary project and lecturer capacities Linear-time combinatorial algorithms Abraham, Irving and DFM, The student-project allocation problem, Proc. ISAAC 2003, LNCS Abraham, Irving and DFM, Two algorithms for the student- project allocation problem, 2004, submitted Slide 5 5 Lecturer preferences over projects Lecturer preferences over students Defaults to academic merit order? Weaker students obtain less preferable projects Lecturer preferences over projects Ranking could reflect research interests, for example Lecturer implicitly indifferent among all students who find a given project acceptable Student-Project Allocation problem with Project preferences (SPA-P) DFM and OMalley, Student-Project Allocation with Preferences over Projects, Proc. ACID 2005, to appear Seek a stable matching as a solution Roth (1984) Slide 6 6 Formal definition of SPA-P Set of students S={s 1, s 2, , s n } Set of projects P={p 1, p 2, , p m } Set of lecturers L={l 1, l 2, , l q } Each student s i finds acceptable a set of projects A i P s i ranks A i in strict order of preference Each project p j has a capacity c j Each lecturer l k has a capacity d k Each lecturer l k offers a set of projects P k P l k ranks P k in strict order of preference assume that P 1, P 2, , P q partitions P Slide 7 7 Example SPA-P instance Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 3 s 2 : p 5 p 1 Project capacities: 1 2 1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2 s 5 : p 5 p 2 Project capacities: 1 2 Lecturer capacities: d 1 = 3, d 2 = 2 Project capacities: c 1 = 1 ; c 2 = 2 ; c 3 = 1 ; c 4 = 2 ; c 5 = 1 Slide 8 8 An assignment M is a subset of S P such that if (s i, p j ) M then s i finds p j acceptable Definition of a matching Slide 9 9 An assignment M is a subset of S P such that if (s i, p j ) M then s i finds p j acceptable If (s i, p j ) M, where l k offers p j, we say that s i is assigned to p j s i is assigned to l k p j is assigned s i l k is assigned s i Definition of a matching Slide 10 10 An assignment M is a subset of S P such that if (s i, p j ) M then s i finds p j acceptable If (s i, p j ) M, where l k offers p j, we say that s i is assigned to p j s i is assigned to l k p j is assigned s i l k is assigned s i For any student s i, M ( s i ) denotes the set of projects that s i is assigned to For any project p j, M ( p j ) denotes the set of students assigned to p j For any lecturer l k, M ( l k ) denotes the set of students assigned to (projects offered by) l k Definition of a matching Slide 11 11 Definition of a matching An assignment M is a subset of S P such that if (s i, p j ) M then s i finds p j acceptable If (s i, p j ) M, where l k offers p j, we say that s i is assigned to p j s i is assigned to l k p j is assigned s i l k is assigned s i For any student s i, M ( s i ) denotes the set of projects that s i is assigned to For any project p j, M ( p j ) denotes the set of students assigned to p j For any lecturer l k, M ( l k ) denotes the set of students assigned to (projects offered by) l k A matching M is an assignment such that | M ( s i )| 1, |M(p j )| c j and |M(l k )| d k Slide 12 12 Example matching Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 2/3 s 2 : p 5 p 1 Project capacities: 0/1 1/2 1/1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2/2 s 5 : p 5 p 2 Project capacities: 0/1 2/2 Lecturer capacities: d 1 = 3, d 2 = 2 Project capacities: c 1 = 1 ; c 2 = 2 ; c 3 = 1 ; c 4 = 1 ; c 5 = 2 Slide 13 13 Stable matchings (s i, p j ) is a blocking pair of a matching M if: 1. p j A i 2. Either s i is unmatched in M, or s i prefers p j to M(s i ) 3. p j is under-subscribed and either a) s i M(l k ) and l k prefers p j to M(s i ) b) s i M(l k ) and l k is under-subscribed c) s i M(l k ) and l k prefers p j to his worst non-empty project where l k is the lecturer who offers p j A matching M is stable if it admits no blocking pair Slide 14 14 Example blocking pair (1) Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 2/3 s 2 : p 5 p 1 Project capacities: 0/1 1/2 1/1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2/2 s 5 : p 5 p 2 Project capacities: 0/1 2/2 (s 1, p 1 ) is a blocking pair, since 3. p 1 is under-subscribed and a) s 1 M(l 1 ) and l 1 prefers p 1 to M(s 1 )=p 3 Slide 15 15 Example blocking pair (2) Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 2/3 s 2 : p 5 p 1 Project capacities: 0/1 1/2 1/1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2/2 s 5 : p 5 p 2 Project capacities: 0/1 2/2 (s 2, p 1 ) is a blocking pair, since 3. p 1 is under-subscribed and b) s 2 M(l 1 ) and l 1 is under-subscribed Slide 16 16 Example blocking pair (3) Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 2/3 s 2 : p 5 p 1 Project capacities: 0/1 1/2 1/1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2/2 s 5 : p 5 p 2 Project capacities: 0/1 2/2 (s 4, p 4 ) is a blocking pair, since 3. p 4 is under-subscribed and c) s 4 M(l 2 ) and l 2 prefers p 4 to his worst non-empty project Slide 17 17 Example stable matching Student preferencesLecturer preferencesLecturer capacities s 1 : p 1 p 4 p 3 l 1 : p 1 p 2 p 3 2/3 s 2 : p 5 p 1 Project capacities: 1/1 1/2 0/1 s 3 : p 2 p 5 s 4 : p 4 p 2 l 2 : p 4 p 5 2/2 s 5 : p 5 p 2 Project capacities: 1/1 1/2 Slide 18 18 Sizes of stable matchings Every instance of SPA-P admits at least one stable matching Slide 19 19 Sizes of stable matchings Every instance of SPA-P admits at least one stable matching But, stable matchings can have different sizes, e.g. Student preferencesLecturer preferences s 1 : p 1 p 2 l 1 : p 1 s 2 : p 1 l 2 : p 2 (each project and lecturer has capacity 1) Slide 20 20 Sizes of stable matchings Every instance of SPA-P admits at least one stable matching But, stable matchings can have different sizes, e.g. Student preferencesLecturer preferences s 1 : p 1 p 2 l 1 : p 1 s 2 : p 1 l 2 : p 2 (each project and lecturer has capacity 1) M 1 ={(s 1, p 1 )} Slide 21 21 Sizes of stable matchings Every instance of SPA-P admits at least one stable matching But, stable matchings can have different sizes, e.g. Student preferencesLecturer preferences s 1 : p 1 p 2 l 1 : p 1 s 2 : p 1 l 2 : p 2 (each project and lecturer has capacity 1) M 1 ={(s 1, p 1 )} Student preferencesLecturer preferences s 1 : p 1 p 2 l 1 : p 1 s 2 : p 1 l 2 : p 2 (each project and lecturer has capacity 1) M 2 ={(s 1, p 2 ), (s 2, p 1 )} Slide 22 22 Maximisation problem MAX-SPA-P denotes the problem of finding a maximum cardinality stable matching, given an instance of SPA-P ALL-SPA-P denotes the problem of deciding whether an instance of SPA-P admits a stable matching in which every student is matched We show that ALL-SPA-P is NP-complete Immediate corollary is that MAX-SPA-P is NP-hard Result holds even if each project and lecturer has capacity 1 Slide 23 23 Exact Maximal Matching A matching M in a graph G is maximal if M { e } is not a matching for any edge e M u1u1 u2u2 w1w1 w2w2 u3u3 w3w3 u1u1 u2u2 w1w1 w2w2 u3u3 w3w3 The following problem is NP-complete: EXACT-MM Input: Bipartite graph G and integer K Question: does G contain a maximal matching of size (exactly) K ? Slide 24 24 Overview of the reduction uiui wjwj must ensure that u i or w j matched EXACT-MM instance assume n 1 LH vertices assume n 2 RH vertices Slide 25 25 Overview of the reduction uiui wjwj must ensure that u i or w j matched s i : p j y 1 y n 1 -K q j : p j z j ALL-SPA-P instance EXACT-MM instance Student preferences t i : z 1 z n 2 assume n 1 LH vertices assume n 2 RH vertices Lecturer preferences (1 i n 1 ) (1 j n 2 ) (1 i n 2 -K) r j : y j (1 j n 1 -K) Each project and lecturer has capacity 1 Slide 26 26 Overview of the reduction uiui wjwj must ensure that u i or w j matched s i : p j y 1 y n 1 -K q j : p j z j ALL-SPA-P instance EXACT-MM instance Student preferences Each project and lecturer has capacity 1 t i : z 1 z n 2 assume n 1 LH vertices assume n 2 RH vertices Lecturer preferences (1 i n 1 ) (1 j n 2 ) (1 i n 2 -K) r j : y j (1 j n 1 -K) Slide 27 27 Approximation algorithm M = M {(s i, p j )} ; /* s i is provisionally assigned to p j and to l k */ if (l k is full) { p z = l k s worst non-empty project ; for (each successor p t of p z on l k s list) for (each student s r such that s r A t ) delete p t from s r s list ; } M = ; while (some student s i is free and s i has a nonempty list) { p j = first project on s i s list ; l k = lecturer who offers p j ; /* s i applies to p j */ if (p j is full) delete p j from s i s list ; else if (l k is