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

1

Student-Project Allocation with

Preferences over Projects

David Manlove

University of GlasgowDepartment of Computing Science

Joint work with Gregg O’Malley

Supported by EPSRC grant GR/R84597/01,RSE / Scottish Exec Personal Research Fellowship

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

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

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

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

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

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

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

5

Lecturer preferencesover 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 O’Malley, “Student-Project Allocation with

Preferences over Projects”, Proc. ACID 2005, to appear Seek a stable matching as a solution

Roth (1984)

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

6

Formal definition of SPA-P

Set of students S={s1, s2, …, sn} Set of projects P={p1, p2, …, pm} Set of lecturers L={l1, l2, …, lq}

Each student si finds acceptable a set of projects Ai P si ranks Ai in strict order of preference

Each project pj has a capacity cj

Each lecturer lk has a capacity dk

Each lecturer lk offers a set of projects Pk P lk ranks Pk in strict order of preference assume that P1, P2, …, Pq partitions P

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

7

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 3

s2 : p5 p1 Project capacities: 1 2 1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2

s5 : p5 p2 Project capacities: 1 2

Lecturer capacities: d1 = 3, d2 = 2

Project capacities: c1 = 1; c2 = 2; c3 = 1; c4 = 2; c5 = 1

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

8

An assignment M is a subset of S×P such that if (si, pj)M then si finds pj acceptable

Definition of a matching

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

9

An assignment M is a subset of S×P such that if (si, pj)M then si finds pj acceptable

If (si, pj)M , where lk offers pj , we say that si is assigned to pj si is assigned to lk pj is assigned si lk is assigned si

Definition of a matching

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

10

An assignment M is a subset of S×P such that if (si, pj)M then si finds pj acceptable

If (si, pj)M , where lk offers pj , we say that si is assigned to pj si is assigned to lk pj is assigned si lk is assigned si

For any student si , M(si) denotes the set of projects that si is assigned to

For any project pj , M(pj) denotes the set of students assigned to pj

For any lecturer lk , M(lk) denotes the set of students assigned to (projects offered by) lk

Definition of a matching

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

11

Definition of a matching

An assignment M is a subset of S×P such that if (si, pj)M then si finds pj acceptable

If (si, pj)M , where lk offers pj , we say that si is assigned to pj si is assigned to lk pj is assigned si lk is assigned si

For any student si , M(si) denotes the set of projects that si is assigned to

For any project pj , M(pj) denotes the set of students assigned to pj

For any lecturer lk , M(lk) denotes the set of students assigned to (projects offered by) lk

A matching M is an assignment such that |M(si)|1, |M(pj)|cj and |M(lk)|dk

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

12

Example matching

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 2/3

s2 : p5 p1 Project capacities: 0/1 1/2 1/1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2/2

s5 : p5 p2 Project capacities: 0/1 2/2

Lecturer capacities: d1 = 3, d2 = 2

Project capacities: c1 = 1; c2 = 2; c3 = 1; c4 = 1; c5 = 2

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

13

Stable matchings

(si, pj) is a blocking pair of a matching M if:

1. pj Ai

2. Either si is unmatched in M, or si prefers pj to M(si)

3. pj is under-subscribed and eithera) si M(lk) and lk prefers pj to M(si)

b) si M(lk) and lk is under-subscribed

c) si M(lk) and lk prefers pj to his worst non-empty project

where lk is the lecturer who offers pj

A matching M is stable if it admits no blocking pair

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

14

Example blocking pair (1)

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 2/3

s2 : p5 p1 Project capacities: 0/1 1/2 1/1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2/2

s5 : p5 p2 Project capacities: 0/1 2/2

(s1, p1) is a blocking pair, since

3. p1 is under-subscribed and

a) s1 M(l1) and l1 prefers p1 to M(s1)=p3

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

15

Example blocking pair (2)

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 2/3

s2 : p5 p1 Project capacities: 0/1 1/2 1/1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2/2

s5 : p5 p2 Project capacities: 0/1 2/2

(s2, p1) is a blocking pair, since

3. p1 is under-subscribed and

b) s2 M(l1) and l1 is under-subscribed

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

16

Example blocking pair (3)

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 2/3

s2 : p5 p1 Project capacities: 0/1 1/2 1/1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2/2

s5 : p5 p2 Project capacities: 0/1 2/2

(s4, p4) is a blocking pair, since

3. p4 is under-subscribed and

c) s4 M(l2) and l2 prefers p4 to his worst non-empty project

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

17

Example stable matching

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p4 p3 l1 : p1 p2 p3 2/3

s2 : p5 p1 Project capacities: 1/1 1/2 0/1

s3 : p2 p5

s4 : p4 p2 l2 : p4 p5 2/2

s5 : p5 p2 Project capacities: 1/1 1/2

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

18

Sizes of stable matchings

Every instance of SPA-P admits at least one stable matching

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

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 preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2 (each project and lecturer has capacity 1)

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

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 preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2 (each project and lecturer has capacity 1)

M1={(s1, p1)}

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

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 preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2 (each project and lecturer has capacity 1)

M1={(s1, p1)}

Student preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2 (each project and lecturer has capacity 1)

M2={(s1, p2), (s2, p1)}

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

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

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

23

Exact Maximal Matching

A matching M in a graph G is maximal if M{e} is not a matching for any edge eM

u1

u2

w1

w2

u3 w3

u1

u2

w1

w2

u3 w3

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?

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

24

Overview of the reduction

ui

wj

must ensure that ui or wj matched

EXACT-MMinstance

assume n1

LH vertices

assume n2

RH vertices

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

25

Overview of the reduction

ui

wj

must ensure that ui or wj matched

si : pj … y1…yn1-K qj : pj zj

ALL-SPA-Pinstance

EXACT-MMinstance

Student preferences

ti : z1…zn2

assume n1

LH vertices

assume n2

RH vertices

Lecturer preferences

(1 i n1) (1 j n2)

(1 i n2-K) rj : yj (1 j n1-K)

Each project and lecturer has capacity 1

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

26

Overview of the reduction

ui

wj

must ensure that ui or wj matched

si : pj … y1…yn1-K qj : pj zj

ALL-SPA-Pinstance

EXACT-MMinstance

Student preferences

Each project and lecturer has capacity 1

ti : z1…zn2

assume n1

LH vertices

assume n2

RH vertices

Lecturer preferences

(1 i n1) (1 j n2)

(1 i n2-K) rj : yj (1 j n1-K)

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

27

Approximation algorithm

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; }}

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

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

28

Approximation algorithm

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; }}

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

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

29

Approximation algorithm

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; }}

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

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

30

Approximation algorithm

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; }}

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

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

31

Approximation algorithm

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; } } } }

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

32

Approximation algorithm

M = ;while (some student si is free and si has a nonempty list) { pj = first project on si’s list ; lk = lecturer who offers pj ; /* si applies to pj */ if (pj is full) delete pj from si’s list ; else if (lk is full) { pz = lk’s worst non-empty project ; if (pz = pj ) delete pj from si’s list ; else { sr = some student in M(pz); M = M \ {(sr , pz)} ; delete pz from sr’s list ;

M = M {(si, pj)} ; /* si is provisionally assigned to pj and to lk */ if (lk is full) { pz = lk’s worst non-empty project ; for (each successor pt of pz on lk’s list) for (each student sr such that srAt) delete pt from sr’s list ; } } } }

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

33

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3

s2 : p1 p4 Project capacities: 1 2 2 1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 3

s5 : p3 p5 Project capacities: 1 2

s6 : p5 p3 p6

Lecturer capacities: d1 = 3, d2 = 3

Project capacities: c1 = 2; c2 = 2; c3 = 1; c4 = 1; c5 = 1; c6 = 2

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

34

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 1/3

s2 : p1 p4 Project capacities: 0/1 1/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s1 applies to p1

p1 remains under-subscribed ; l1 remains under-subscribed

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

35

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 2/3

s2 : p1 p4 Project capacities: 0/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s2 applies to p1

p1 becomes full ; l1 remains under-subscribed

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

36

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 2/3

s2 : p1 p4 Project capacities: 0/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s3 applies to p1

p1 is already full

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

37

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 2/3

s2 : p1 p4 Project capacities: 0/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s3 applies to p1

p1 is already full ; p1 is deleted from s3’s list

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

38

Example SPA-P instance

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 0/1 2/2 1/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s3 applies to p2

p2 remains under-subscribed ; l1 becomes full

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

39

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 0/1 2/2 1/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s3 applies to p2

p2 remains under-subscribed ; l1 becomes full ; p4 is deleted from s2’s list

Example SPA-P instance

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

40

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 0/1 2/2 1/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s4 applies to p3

l1 is already full

Example SPA-P instance

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

41

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s4 applies to p3

l1 is already full ; s3 is rejected from p2 ; p3 becomes full

Example SPA-P instance

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

42

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 0/3

s5 : p3 p5 Project capacities: 0/1 0/2

s6 : p5 p3 p6

s4 applies to p3

l1 is already full ; s3 is rejected from p2 ; s3 is rejected from p2 ; p2 is deleted from s1’s list

Example SPA-P instance

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

43

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s3 applies to p5

p5 becomes full ; l2 remains under-subscribed

Example SPA-P instance

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

44

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s5 applies to p3

p3 is already full

Example SPA-P instance

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

45

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s5 applies to p3

p3 is already full ; p3 is deleted from s5’s list

Example SPA-P instance

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

46

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s5 applies to p5

p5 is already full

Example SPA-P instance

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

47

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s5 applies to p5

p5 is already full ; p5 is deleted from s5’s list

Example SPA-P instance

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

48

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s6 applies to p5

p5 is already full

Example SPA-P instance

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

49

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s6 applies to p5

p5 is already full ; p5 is deleted from s6’s list

Example SPA-P instance

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

50

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s6 applies to p3

p3 is already full

Example SPA-P instance

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

51

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 1/3

s5 : p3 p5 Project capacities: 1/1 0/2

s6 : p5 p3 p6

s6 applies to p3

p3 is already full ; p3 is deleted from s6’s list

Example SPA-P instance

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

52

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 2/3

s5 : p3 p5 Project capacities: 1/1 1/2

s6 : p5 p3 p6

s6 applies to p6

p6 remains under-subscribed ; l2 remains under-subscribed

Example SPA-P instance

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

53

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 2/3

s5 : p3 p5 Project capacities: 1/1 1/2

s6 : p5 p3 p6

Example SPA-P instance

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

54

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 2/3

s5 : p3 p5 Project capacities: 1/1 1/2

s6 : p5 p3 p6

Algorithm terminates with a stable matching of size 5

Example SPA-P instance

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

55

Student preferences Lecturer preferences Lecturer capacities

s1 : p1 p2 p6 l1 : p3 p1 p2 p4 3/3

s2 : p1 p4 Project capacities: 1/1 2/2 0/2 0/1

s3 : p1 p2 p5

s4 : p3 l2 : p5 p6 3/3

s5 : p3 p5 Project capacities: 1/1 2/2

s6 : p5 p3 p6

Stable matching of size 6

Example SPA-P instance

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

56

Theoretical results

Algorithm produces a stable matching, given an instance of SPA-P

So every instance of SPA-P admits a stable matching

Approximation algorithm has a performance guarantee of 2

Algorithm may be implemented to run in O(L) time, where L is total length of the students’ preference lists

The constructed matching admits no “exchange-blocking coalition”

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

57

A worst-case example

Student preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2

s3 : p3 p4 l3 : p3

s4 : p3 l4 : p4

…s2n-1 : p2n-1 p2n l2n-1 : p2n-1

s2n : p2n-1 l2n : p2n

Each project and lecturer has capacity 1

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

58

A worst-case example

Student preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2

s3 : p3 p4 l3 : p3

s4 : p3 l4 : p4

…s2n-1 : p2n-1 p2n l2n-1 : p2n-1

s2n : p2n-1 l2n : p2n

Each project and lecturer has capacity 1

Students apply to projects in increasing indicial order

M1={(s1, p1), (s3, p3), …, (s2n-1, p2n-1)}, |M1|=n

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

59

A worst-case example

Student preferences Lecturer preferencess1 : p1 p2 l1 : p1

s2 : p1 l2 : p2

s3 : p3 p4 l3 : p3

s4 : p3 l4 : p4

…s2n-1 : p2n-1 p2n l2n-1 : p2n-1

s2n : p2n-1 l2n : p2n

Each project and lecturer has capacity 1

Students apply to projects in decreasing indicial order

M2={(s1, p2), (s2, p1), …, (s2n-1, p2n), (s2n, p2n-1)}, |M2|=2n

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

60

Open problems

Improved approximation algorithm?

Extend to the case where lecturers have preferences over (student, project) pairs

E.g. l1: (s1, p2) (s2, p2) (s1, p3) …

Ties in the preference lists

Lower bounds on projects