Student-project allocation with preferences over projects: Algorithmic and experimental results

We study the Student-Project Allocation problem with lecturer preferences over Projects ( spa-p ). In this context it is known that stable matchings can have different sizes and the problem of finding a maximum size stable matching is NP-hard. There are two known approximation algorithms for max-spa-p , with performance guarantees 2 and 32 . We show that max-spa-p is polynomial-time solvable if there is only one lecturer involved, and NP-hard to approximate within some constant c > 1 if there are two lecturers involved. We also show that this problem remains NP-hard if each preference list is of length at most 3, with an arbitrary number of lecturers. We then describe an Integer Programming (IP) model to enable max-spa-p to be solved optimally in the general case. Following this, we present results arising from an empirical evaluation that investigates how the solutions produced by the approximation algorithms compare to optimal solutions obtained from the IP model, with respect to the size of the stable matchings constructed, on instances that are both randomly-generated and derived from real datasets. © 2020TheAuthor(s).PublishedbyElsevierB.V.ThisisanopenaccessarticleundertheCC BYlicense(http://creativecommons.org/licenses/by/4.0/).


Introduction
Matching problems, which generally involve the assignment of a set of agents to another set of agents based on preferences, have wide applications in many real-world settings. One such application can be seen in an educational context, e.g., the allocation of pupils to schools, school-leavers to universities and students to projects. In the context of allocating students to projects, university lecturers propose a range of projects, and each student is required to provide a preference over the available projects that she finds acceptable. Lecturers may also have preferences over the students that find their project acceptable and/or the projects that they offer. There may also be upper bounds on the number of students that can be assigned to a particular project, and the number of students that a given lecturer is willing to supervise. The problem then is to allocate students to projects based on these preferences and capacity constraints -the so-called Student-Project Allocation problem (spa) [5,15].
Two major models of spa exist in the literature: one permits preferences only from the students [2,10,14,18], while the other permits preferences from the students and lecturers [1,12]. Given the large number of students that are typically involved in such an allocation process, many university departments seek to automate the allocation of students to projects. Examples include the School of Computing Science, University of Glasgow [14], the Faculty of Science, University of Southern Denmark [5], the Department of Computing Science, University of York [12], and elsewhere [2,4,10,20].
In general we seek a matching, which is a set of agent pairs who find one another acceptable that satisfies the capacities of the agents involved. For matching problems where preferences exist from the two sets of agents involved (e.g., junior doctors and hospitals in the classical Hospitals-Residents problem (hr) [7], or students and lecturers in the context of spa), it has been argued that the desired property for a matching one should seek is that of stability [19]. Informally, a stable matching ensures that no acceptable pair of agents who are not matched together would rather be assigned to each other than remain with their current assignees.
Abraham et al. [1] described two linear-time algorithms to find a stable matching in a variant of spa where students have preferences over projects whilst lecturers have preferences over students. The first algorithm finds the studentoptimal stable matching, in the sense that each assigned student is allocated to the best project that she could obtain in any stable matching; while the second algorithm outputs the lecturer-optimal stable matching, in the sense that each assigned lecturer is allocated the best set of students that she could obtain in any stable matching.
Manlove and O'Malley [17] proposed another variant of spa where both students and lecturers have preferences over projects, referred to as spa-p. A motivation for this variant is that a lecturer might prefer to supervise projects that are closely related to or in-line with her research interests, while the remaining projects that she proposed, perhaps to ensure that the students have some sense of choice, are of lesser priority to her. In their paper, they formulated an appropriate stability definition for spa-p, and they showed that stable matchings in this context can have different sizes. Moreover, in addition to stability, a very important requirement in practice is to match as many students to projects as possible.
Consequently, Manlove and O'Malley [17] proved that max-spa-p, the problem of finding a maximum size stable matching given an instance of spa-p, is NP-hard. Further, they showed that max-spa-p is not approximable within δ 1 , for some δ 1 > 1, unless P = NP. Moreover, the result holds even if each project and lecturer has capacity 1, and all preference lists are of length at most 4. In addition, they gave a polynomial-time 2-approximation algorithm for max-spa-p. Subsequently, Iwama et al. [11] described an improved approximation algorithm with an upper bound of 3 2 , which builds on Manlove and O'Malley's algorithm [17] and uses ideas from Király's approximation algorithm for the problem of finding a maximum size stable matching in a variant of the Stable Marriage problem [13]. In addition, Iwama et al. [11] showed that max-spa-p is not approximable within 21 19 − ε, for any ε > 0, unless P = NP.
Considering the fact that the existing algorithms for max-spa-p are only guaranteed to produce an approximate solution, we seek another technique to enable max-spa-p to be solved optimally. Integer Programming (IP) is a powerful technique for producing optimal solutions to a range of NP-hard optimisation problems, with the aid of commercial optimisation solvers, e.g., Gurobi [9], GLPK [8] and CPLEX [6]. These solvers can allow IP models to be solved in a reasonable amount of time, even with respect to problem instances that occur in practical applications.
Our contribution. We present new algorithmic and experimental results for spa-p. On the algorithmic side, first we explore the complexity of max-spa-p under the following separate restrictions: if (i) the instance involves r lecturers, denoted max-spa-p-lr, where r is a constant; and (ii) each preference list is of length at most 3, denoted (3, 3)-max-spap. For the first restriction, if there is only one lecturer involved, we show that max-spa-p is polynomial-time solvable. In contrast to this, if there are two lecturers involved, we show that the problem remains NP-hard and is not approximable within some constant c > 1 unless P = NP. For the second restriction, we show that max-spa-p remains NP-hard. We then move on to describe an IP model to enable max-spa-p to be solved optimally, in the general case where there are no restrictions on the problem instance. We remark that this IP model, excluding its correctness result, first appeared in [16].
On the experimental side, we present results arising from an empirical evaluation that investigates how the solutions produced by the existing approximation algorithms for max-spa-p [11,17] compare to optimal solutions obtained from our IP model, with respect to the size of the stable matchings constructed, on instances that are both randomly-generated and derived from real datasets. These real datasets are based on actual student preference data and manufactured lecturer preference data from previous runs of student-project allocation processes at the School of Computing Science, University of Glasgow. We also present results showing the time taken by the IP model to solve the problem instances optimally. Our main finding is that the 3 2 -approximation algorithm finds stable matchings that are very close to having maximum cardinality over the tested instances.
The remainder of this paper is organised as follows. We give preliminary definitions and results in Section 2. In Section 3, we focus on max-spa-p-lr, with r ∈ {1, 2}; we describe a polynomial-time algorithm for max-spa-p-l1 in Section 3.1, and we give an inapproximability result for max-spa-p-l2 in Section 3.2. In Section 4 we show that (3, 3)-max-spa-p is NP-hard. In Section 5, we describe our IP model for max-spa-p. We present our empirical evaluation in Section 6, along with some discussions regarding results obtained from the experiments. Finally, in Section 7 we give some conclusions and open problems.

Preliminary definitions and results
We give a formal definition for spa-p as described in the literature [17]. An instance I of spa-p involves a set S = {s 1 , s 2 , . . . , s n 1 } of students, a set P = {p 1 , p 2 , . . . , p n 2 } of projects and a set L = {l 1 , l 2 , . . . , l n 3 } of lecturers. Each lecturer l k ∈ L offers a non-empty subset of projects, denoted by P k . We assume that P 1 , P 2 , . . . , P n 3 partitions P (i.e., each project is offered by one lecturer). Also, each student s i ∈ S has an acceptable set of projects A i ⊆ P. We call a pair (s i , p j ) ∈ S × P an acceptable pair if p j ∈ A i . Moreover s i ranks A i in strict order of preference. Similarly, each lecturer l k ranks P k in strict order of preference. Finally, each project p j ∈ P and lecturer l k ∈ L has a positive capacity denoted by c j and d k respectively.
An assignment M is a subset of S × P where (s i , p j ) ∈ M implies that s i finds p j acceptable (i.e., p j ∈ A i ). We define the size of M as the number of (student, project) pairs in M, denoted |M|. If (s i , p j ) ∈ M, we say that s i is assigned to p j and p j is assigned s i . Furthermore, we denote the set of projects assigned to student s i in M as M(s i ). Similarly, we denote the set of students assigned to project p j in M as M(p j ). For ease of exposition, if s i is assigned to a project p j offered by lecturer l k , we may also say that s i is assigned to l k , and l k is assigned s i . Thus we denote the set of students assigned to l k in M as M(l k ).
A project p j ∈ P is full, undersubscribed or oversubscribed in M if |M(p j )| is equal to, less than or greater than c j , respectively. The corresponding terms apply to each lecturer l k with respect to d k . We say that a project p j ∈ P is non-empty if |M(p j )| > 0. Similarly we say that a lecturer l k ∈ L is non-empty if |M(l k )| > 0.
A matching M is an assignment such that |M(s i )| ≤ 1 for each s i ∈ S, |M(p j )| ≤ c j for each p j ∈ P, and |M(l k )| ≤ d k for each l k ∈ L (i.e., each student is assigned to at most one project, and no project or lecturer is oversubscribed). In what follows, l k is the lecturer who offers p j . Given a matching M, an acceptable pair (s i , p j ) ∈ (S × P) \ M is a blocking pair for M if (1) and (2) holds as follows: (1) either s i is unassigned in M or s i prefers p j to M(s i ); (2) p j is undersubscribed, and either (a), (b), or (c) holds as follows: (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 undersubscribed; (c) s i / ∈ M(l k ) and l k prefers p j to her worst non-empty project.
If such a pair were to occur in practice, s i and l k will have an incentive to form a private arrangement outside the matching in order to improve on their current allocation via p j (see [17,Section 2] for an intuition for this definition).
Henceforth, if (s i , p j ) forms a blocking pair for M then we refer to (s i , p j ) as a blocking pair of type (a), type (b), or type (c), according as (s i , p j ) satisfies conditions 2(a), 2(b), or 2(c), respectively.
With respect to the spa-p instance given in Fig. 1, , (s 2 , p 1 )} is clearly a matching. It is obvious that each of students s 1 and s 2 is matched to her first ranked project in M 1 . Although s 3 is unassigned in M 1 , the lecturer offering p 3 (the only project that s 3 finds acceptable) is assumed to be indifferent among those students who find p 3 acceptable. Also p 3 is full in M 1 . Thus, we say that M 1 admits no blocking pair. Another way in which a matching could be undermined is through a group of students acting together. Given a matching M, a coalition is a set of students C = ⟨s i 0 , . . . , s i r−1 ⟩, for some r ≥ 2 such that each student s i j (0 ≤ j ≤ r − 1) is assigned in M and prefers M(s i j+1 ) to M(s i j ), where addition is performed modulo r. With respect to Fig. 1, the matching M 2 = {(s 1 , p 1 ), (s 2 , p 2 ), (s 3 , p 3 )} admits a coalition {s 1 , s 2 }, as students s 1 and s 2 would rather permute their assigned projects in M 2 so as to be better off. We note that the number of students assigned to each project and lecturer involved in any such swap remains the same after such a permutation. Moreover, the lecturers involved would have no incentive to prevent the switch from occurring since they are assumed to be indifferent between the students assigned to the projects they are offering. If a matching admits no coalition, we define such matching to be coalition-free.
Given an instance I of spa-p, we define a matching M in I to be stable if M admits no blocking pair and is coalition-free. It turns out that with respect to this definition, stable matchings in I can have different sizes. Clearly, each of the matchings } is stable in the spa-p instance I 1 shown in Fig. 1. The varying sizes of the stable matchings produced naturally leads to the problem of finding a maximum cardinality stable matching given an instance of spa-p, which we denote by max-spa-p.

Algorithm 1 Algorithm MAX-SPA-P-L1
Input: an instance I of spa-p-l1 Output: a maximum size stable matching in I 1: M ← a greedy maximum matching in I 2: while there exist a type (c) blocking pair do 3: s i ← a student involved in such blocking pair 4: (s i , p j ) ← best blocking pair for s i 5: p q ← worst non-empty project offered by l 6: s r ← any student assigned to p q in M 7: : while M admits a coalition C do 10: satisfy C 11: return M

spa-p with constant number of lecturers
As mentioned in Section 1, max-spa-p is not approximable within δ 1 , for some δ 1 > 1 unless P = NP [17]. Moreover, the result holds even if each project and lecturer has capacity 1, and each preference list is of length at most 4. We wished to answer the following question: what is the complexity of finding a maximum size stable matching if a constant number of lecturers are involved in an arbitrary spa-p instance I? As it turns out, the problem is polynomial-time solvable if there is only one lecturer involved in I and hard to approximate if there are two lecturers involved in I. We present the proof of these results in the next two sections.
We denote by spa-p-lr an instance of spa-p involving r lecturers, where r is a constant, and we denote by max-spa-p-lr the problem of finding a maximum size stable matching given an instance of spa-p-lr.

Introduction
Let I be an instance of spa-p-l1 where l is the lecturer involved in I; assume all notation and terminology from the general spa-p case. Given an acceptable pair (s i , p j ), we define rank(s i , p j ) as 1 plus the number of projects that s i prefers to p j . Let R be the maximum rank of a project in any student's preference list. We remark that each of rank(s i , p j ) and R is calculated from the problem instance.
We define the profile of a matching M in I, ρ(M), as an R-tuple (x 1 , x 2 , . . . , x R ), such that for each r (1 ≤ r ≤ R), x r is the number of students, say s i , assigned in M to a project, say p j , such that rank(s i , p j ) = r. For example, the matching M 3 = {(s 1 , p 2 ), (s 2 , p 1 ), (s 3 , p 3 )} in the instance I 1 given in Fig. 1 has the profile ρ(M 3 ) = (2, 1, 0), since two students (i.e., s 2 and s 3 ) are assigned to their first choice project, one student (i.e., s 1 ) is assigned to her second choice project, and no student is assigned to her third choice project. A greedy maximum matching in I is a matching of maximum cardinality that has lexicographically maximum profile. Clearly, M 3 is a greedy maximum matching in I 1 .

Description of the algorithm
Our algorithm, which we denote by Algorithm MAX-SPA-P-L1, begins by first constructing a greedy maximum matching M in I using the polynomial-time algorithm given in [14]. As we will prove later, at this point in the algorithm, M is coalition-free and does not admit a blocking pair of type (a) or type (b). If M admits a type (c) blocking pair then the first while loop of the algorithm is executed. In this loop we identify a student, say s i , involved in a type (c) blocking pair, say (s i , p j ), such that (s i , p j ) is the best blocking pair for s i . Next, we identify l's worst non-empty project in M, say p q ; we identify any student assigned to p q in M, say s r , and we remove the pair (s r , p q ) from M. Finally, we promote s i by adding the pair (s i , p j ) to M. As we will prove later, M does not admit a blocking pair at the termination of this loop.
If M admits a coalition C = ⟨s i 0 , s i 1 , . . . , s i r−1 ⟩ at this point, for some r ≥ 2, then we satisfy the coalition in the second while loop, by letting the students in C swap their projects, i.e., for each j (0 ≤ j ≤ r − 1), s i j moves project from M(s i j ) to M(s i j+1 ), where addition is taken modulo r. At the termination of this loop, M is output as a maximum size stable matching in I. We describe our algorithm in pseudocode form in Algorithm 1.

Correctness of the algorithm
We present the following theorem concerning the correctness of our algorithm.

Theorem 1.
Given an instance I of spa-p-l1, Algorithm MAX-SPA-P-L1 terminates with a maximum size stable matching in O(n 2 Proof. Let E be an arbitrary execution of Algorithm MAX-SPA-P-L1, and let M be the matching at the termination of E. Let M 0 be the greedy maximum matching in I found at line 1 during E; clearly M 0 is of maximum cardinality. In what follows, we show that just before the first while loop was initiated during E, M 0 admits no blocking pair of type (a) or type (b), and is coalition-free.
Suppose that (s i , p j ) is a blocking pair of type (a), i.e., s i ∈ M 0 (l) and s i prefers p j to M 0 (s i ); p j is undersubscribed in M 0 and l prefers p j to M 0 (s i ).
Then |M ′ 0 | = |M 0 | and ρ(M ′ 0 ) > ρ(M 0 ) (according to lexicographic order), contradicting the fact that M 0 is a greedy maximum matching. Suppose that (s i , p j ) is a blocking pair of type (b), i.e., s i is unassigned in M 0 and each of p j and l is undersubscribed in M 0 . Now, p j undersubscribed and l undersubscribed implies that M 0 ∪ {(s i , p j )} is a matching in I, contradicting the maximality of M 0 . Next, we show that M 0 is coalition-free. Suppose M 0 admits a coalition of students C = ⟨s i 0 , s i 1 , . . . , s i r−1 ⟩ for some r ≥ 2. Suppose M ′ 0 is the matching that results from satisfying C . Then |M ′ 0 | = |M 0 | and ρ(M ′ 0 ) > ρ(M 0 ), since each student in C will prefer her assigned project in M ′ 0 to her assigned project in M 0 . This is a contradiction to the fact that M 0 has a lexicographically maximum profile.
We note that the first while loop is bound to terminate since (i) the number of students involved in I is finite, and (ii) for each student involved in a type (c) blocking pair that gets promoted, the lecturer obtains one more student assigned to a project that is better than her previous worst non-empty project. Let M 1 be the matching at the termination of the first loop. Clearly, M 1 cannot admit a type (c) blocking pair. Moreover, M 1 cannot admit a type (b) blocking pair either, since for each student that becomes unassigned from a project within the loop, another student becomes promoted to a project in the same while loop iteration. Thus the cardinality of M 1 remains unchanged, and the proof follows as in the previous paragraph.
Next, we show that M 1 cannot admit a blocking pair of type (a). Suppose that (s i , p j ) is a blocking pair of type (a). This implies that s i ∈ M 1 (l), p j is undersubscribed in M 1 , and l prefers p j to M 1 (s i ). Let M 1 (s i ) = p k . First, we note that (s i , p k ) must have been added to M 1 as a result of a type (c) blocking pair being satisfied within the first while loop. For, suppose otherwise, we have already established that M 0 admits no blocking pair of type (a). Hence p j must have been full in M 0 and became undersubscribed during the first while loop. This is only possible if l's worst non-empty project in M 1 is p j or better. Hence (s i , p j ) cannot be a type (a) blocking pair for M 1 in this case. Thus (s i , p k ) must have been added to M 1 within the first while loop.
Moreover, when (s i , p k ) was added to the matching during the first while loop, p j must be full, since we satisfy the best blocking pair for each student within a loop iteration. However, for (s i , p j ) to form a type (a) blocking pair for M 1 , p j must be undersubscribed in M 1 . Now, the only way p j can end up becoming undersubscribed in M 1 , having been full in M 0 , is if p j was l's worst non-empty project at a point where a type (c) blocking pair was identified during the first while loop. Thus in M 1 , either p j is l's worst non-empty project, or l's worst non-empty project is better than p j . Hence (s i , p j ) cannot be a type (a) blocking pair for M 1 .
We have proved in the last two paragraphs that the first while loop terminates with a maximum matching M 1 in I, which admits no blocking pair. The second while loop is also bound to terminate, since (i) each student has a finite number of projects in their preference list, and (ii) for any coalition C of students that exists, each student involved in C obtains a better project after the swap takes place. Clearly M cannot admit any new blocking pair at the end of the second while loop. Hence, at the termination of the algorithm, M is a maximum size stable matching in I.
Analysis of the algorithm. Algorithm MAX-SPA-P-L1 finds a maximum size stable matching in I in three phases. In the first phase, the algorithm finds a greedy maximum matching M in I. This can be obtained in O(n 2 1 Rm) time using the GREEDY-MAX-SPA algorithm described in [14], and this complexity dominates the overall runtime of the algorithm. In the second phase, the algorithm eliminates potential type (c) blocking pairs in M. This phase is bounded by the total length of the students' preference lists. Thus the complexity is O(m).
In the third phase, the algorithm eliminates potential coalitions that might have been introduced in the second phase. We remark that coalitions in M correspond to cycles in the envy graph G(M), which contains a vertex for each student who is assigned in M and a directed edge from student s i j to s iq if s i j prefers M(s iq ) to M(s i j ). Clearly M is coalition-free if and only if G(M) is acyclic (see Section 5.1 for further discussions on this). Further, we remark that cyclic coalitions can be eliminated in O(m) time (see [15, p. 308] for a detailed explanation on how to achieve this). Hence, the overall complexity of Algorithm MAX-SPA-P-L1 is O(n 2 1 Rm).

max-spa-p-l2 is hard to approximate
We define max-spa-p-l2 to be the problem of finding a maximum size stable matching, given an instance of spa-p-l2.
In this section we show that it is NP-hard to approximate max-spa-p-l2 within a factor of δ, for some δ > 1. First, we define a problem relating to matchings in graphs. A matching M in a graph G is said to be maximal if no proper superset of M is a matching in G.
Define min-mm to be the problem of computing the minimum size of a maximal matching, given a graph G (where G is a subdivision graph of some cubic graph G ′ ). Then G = (U, W , E) is a bipartite graph, where, without loss of generality, each vertex in U has degree 2 and each vertex in W has degree 3. Let U = {u 1 , u 2 , . . . , u n 1 } and W = {w 1 , w 2 , . . . , w n 2 }. For each u i ∈ U, let w j i and w k i be the two neighbours of u i in G, where j i < k i . Manlove and O'Malley [17] showed that  it is NP-hard to approximate max-spa-p within δ, for some constant δ > 1, using a reduction from min-mm, creating a spa-p instance I as shown in Fig. 2.
The instance in Fig. 2 consists of 2n 1 + n 2 students in the set . . , y n 1 }. In addition, each project and lecturer has capacity 1; thus, the total lecturer capacity is 2n 1 + n 2 . We will show that their reduction holds even if instead we create a spa-p-l2 instance I ′ involving two lecturers with a total lecturer capacity of 2n 1 + n 2 , where the number of students and projects remains the same. We illustrate our constructed spa-p-l2 instance in Fig. 3, which consists of the set of students S ′ . . , s ′ n 2 }, the set of projects P ∪ Q ∪ R ∪ T and the set of lecturers {w, x}. Each project has capacity 1, whilst lecturers w and x have capacity n 2 and 2n 1 respectively.
Let I and I ′ be the spa-p and spa-p-l2 instances as defined above, respectively. The next two propositions demonstrate that the size of a maximum stable matching in I is equal to that in I ′ .

Proposition 2. A stable matching M in I corresponds to a stable matching M
Proof. Let M be a stable matching in I. We construct a matching M ′ in I ′ from M in the following way. First, all the pairs in M involving students in U 1 and some z (1 ≤ z ≤ 2). This implies that u z i is either unassigned in M ′ or prefers r i to her assigned project in M ′ . By the construction of M ′ from M, the same is true for u z i in M. Moreover, we have that r i is undersubscribed in M ′ , and thus r i is undersubscribed in M. This implies that the lecturer who offers This implies that p j is undersubscribed in M ′ , and thus p j is undersubscribed in M. Moreover, we have that the lecturer who offers p j in I, i.e., w j , is either undersubscribed in M or is full in M with its sole student assigned to q j . Further, u z i is either unassigned in M ′ or prefers p j to her assigned project in M ′ , and the same is true for Hence, no student in U 1 can be involved in a blocking pair of M ′ in I ′ .
Next, suppose (s ′ . This implies that s ′ i is unassigned in M ′ . By the construction of M ′ from M, we have that each of q i and w is undersubscribed in M ′ . Now since the capacity of w is n 2 , there exists some w j , for some j (1 ≤ j ≤ n 2 ), such that w j is undersubscribed in M. Hence (s j , q j ) is a blocking pair of M in I, a contradiction. Hence, no student in S ′ can be involved in a blocking pair of M ′ in I ′ .
We next verify that M ′ is coalition-free in I ′ . Clearly, no student in S ′ can be involved in a coalition, since any such student who is assigned in M ′ has her first choice project. Also, no student who is assigned in M ′ to a project in R can be in a coalition, since every such student is assigned to her first choice project. As a consequence, no student who is assigned in M ′ to her second choice project can be in a coalition, since each such student prefers only a project in R. Finally, no student in U 1 who is assigned to a project in T can be in a coalition, since no assigned student prefers a project in T to ∪ U 2 are added to M. Next, for each j (1 ≤ j ≤ n 2 ) such that p j is undersubscribed in M ′ , we add (s j , q j ) to M. Now, we show that M is a stable matching in I. Suppose (u z i , r i ) is a blocking pair of M in I, for some i (1 ≤ i ≤ n 1 ) and some z (1 ≤ z ≤ 2). This implies that u z i is either unassigned in M or prefers r i to her assigned project in M. By the construction of M from M ′ , the same is true for u z i in M ′ . Moreover, we have that r i is undersubscribed in M, and thus r i is undersubscribed in M ′ . This implies that the lecturer who offers r i in I ′ (i.e., x) is undersubscribed in M ′ (since the capacity of x is 2n 1 ). Hence (u z i , r i ) is a blocking pair of M ′ in I ′ , a contradiction.
This implies that p j is undersubscribed in M and thus p j is undersubscribed in M ′ . Moreover, we have that the lecturer who offers p j in I ′ (i.e., w) is either undersubscribed in M ′ or is full in M ′ with a student assigned to a project in Q . Further, NP-hard to approximate max-spa-p within δ, for some constant δ > 1, the following result is immediate.
Theorem 4. max-spa-p-l2 is NP-hard. Moreover, it is NP-hard to approximate max-spa-p-l2 within δ, for some constant δ > 1. The result holds even if each project has capacity 1.

NP-hardness of (3, 3)-max-spa-p
Recall that (3, 3)-max-spa-p is the restriction of max-spa-p in which each preference list is of length at most 3. In this section, we show that (3, 3)-max-spa-p is NP-hard. The result holds even if each project and lecturer has capacity 1. To achieve this, we will show that (3, 3)-com-spa-p is NP-complete (this is the problem of deciding, given an instance of spa-p in which all the preference lists are of length at most 3, whether a complete stable matching 3 exists). Clearly, the NP-completeness of (3, 3)-com-spa-p implies the NP-hardness of (3, 3)-max-spa-p.
In order to prove this result, we use a reduction from a restricted version of sat, which we define as follows. Let (2, 2)-e3-sat denote the problem of deciding, given a Boolean formula B in CNF in which each clause contains exactly 3 literals and, for each variable v i , each of literals v i and v i appears exactly twice in B, whether B is satisfiable. Berman et al. [3] showed that (2, 2)-e3-sat is NP-complete. We construct an instance I of (3, 3)-com-spa-p as follows. Let X ∪ D ∪ U be the set of students, where X = ⋃ n−1 i=0 X i ,  We next verify that M is coalition-free. Clearly, no student in U can be in a coalition, since no two assigned students in U find the same project acceptable. Also, no student in D who is assigned in M to a project in Z can be in a coalition, since every such student is assigned to her first choice project. As a consequence, no student in D who is assigned in M to a project in P can be in a coalition, since each such student prefers only a project in Z . For each i (0 ≤ i ≤ n − 1), no student in X i can be in a coalition; for if M ∩ (X i × Y i ) = T i then neither x 4i nor x 4i+1 can be involved in a coalition, since each one of them is assigned in M to her first choice project. As a consequence, x 4i+3 cannot be in a coalition, since the only student x 4i+3 can potentially form a coalition with is x 4 i ; and thus x 4i+2 cannot be in a coalition, since the only student x 4i+2 can potentially form a coalition with is x 4i+3 . A similar argument can be made if Conversely, suppose that M is a complete stable matching in I. Firstly, we claim that every project in C ′ is undersubscribed in M. To see this, observe that for each j (1 ≤ j ≤ m), u j is assigned in M to some q s j (1 ≤ s ≤ 3). As a consequence, the three members of D j can only be assigned to the three members of {z j } ∪ (P j \ {p s j }), since each lecturer in L has capacity 1. Hence, for each s (1 ≤ s ≤ 3), c s j is not assigned to any student. Next, for each i (0 ≤ i ≤ n − 1), we claim that M ∩ (X i × Y i ) is a perfect matching of X i ∪ Y i . For suppose otherwise, then either (i) some student x 4i+r ∈ X for r ∈ {0, 1, 2, 3} is unassigned in M, since every project in C ′ is undersubscribed in M, or (ii) some project y 4i+r ∈ Y for r ∈ {0, 1, 2, 3} is undersubscribed in M. If (i) holds, we arrive at a contradiction, since M is a complete stable matching.
If (ii) holds, we reach a contradiction following the argument from (i). We form a truth assignment f in B as follows. If

An IP model for MAX-SPA-P
Let I be an instance of spa-p involving a set S = {s 1 , s 2 , . . . , s n 1 } of students, a set P = {p 1 , p 2 , . . . , p n 2 } of projects and a set L = {l 1 , l 2 , . . . , l n 3 } of lecturers. We construct an IP model J of I as follows. Firstly, we create binary variables for each acceptable pair (s i , p j ) ∈ S × P such that x i,j indicates whether s i is assigned to p j in a solution or not. Henceforth, we denote by S a solution in the IP model J, and we denote by M the matching derived from S. If x i,j = 1 under S then intuitively s i is assigned to p j in M, otherwise s i is not assigned to p j in M.

Constraints
In this section, we give the set of constraints to ensure that the assignment obtained from a feasible solution in J is a matching, and that the matching admits no blocking pair and is coalition-free.
Matching constraints. The feasibility of a matching can be ensured with the following three set of constraints.
Note that Inequality (1) ensures that each student s i ∈ S is not assigned to more than one project, while Inequalities (2) and (3) ensure that the capacity of each project p j ∈ P and each lecturer l k ∈ L is not exceeded. Given an acceptable pair (s i , p j ), we define rank(s i , p j ), the rank of p j on s i 's preference list, to be r + 1 where r is the number of projects that s i prefers to p j . Given a lecturer l k ∈ L and a project p j ∈ P k , an analogous definition holds for rank(l k , p j ), the rank of p j on l k 's preference list. With respect to an acceptable pair (s i , p j ), we define S i,j = {p j ′ ∈ A i : rank(s i , p j ′ ) ≤ rank(s i , p j )}, the set of projects that s i likes as much as p j . For a project p j offered by lecturer l k ∈ L, we also define T k,j = {p q ∈ P k : rank(l k , p j ) < rank(l k , p q )}, the set of projects that are worse than p j on l k 's preference list.
In what follows, we fix an arbitrary acceptable pair (s i , p j ) and we impose constraints to ensure that (s i , p j ) is not a blocking pair for the matching M (i.e., (s i , p j ) is not a type (a), type (b) or type (c) blocking pair for M). Firstly, let l k be the lecturer who offers p j .
Blocking pair constraints. We define θ i, Intuitively, θ i,j = 1 if and only if s i is unassigned in M or prefers p j to M(s i ). Next we create a binary variable α j in J such that if p j is undersubscribed in M then α j = 1. We enforce this condition by imposing the following constraint.
If p j is undersubscribed in M then the RHS of Inequality (4) is at least 1, and this implies that α j = 1; otherwise, α j is not constrained. Now let γ i,j,k = ∑ p j ′ ∈T k,j x i,j ′ . Intuitively, if γ i,j,k = 1 in S then s i is assigned to a project p j ′ offered by l k in M, where l k prefers p j to p j ′ . The following constraint ensures that (s i , p j ) does not form a type (a) blocking pair for M.
Note that if the sum of the binary variables in the LHS of Inequality (5) is less than or equal to 2, this implies that at least one of the variables, say γ i,j,k , is 0. Thus the pair (s i , p j ) is not a type (a) blocking pair for M.
Next we define β i,k = ∑ p j ′ ∈P k x i,j ′ . Clearly, s i is assigned to a project offered by l k in M if and only if β i,k = 1 in S. We define D k,j = {p j ′ ∈ P k : rank(l k , p j ′ ) ≤ rank(l k , p j )}, the set of projects that l k likes as much as p j . Next, we create a binary variable η j,k in J such that η j,k = 1 if l k is undersubscribed or prefers p j to his worst non-empty project in M. We enforce this by imposing the following constraint.
x i ′ ,j ′ is the occupancy of l k involving projects that are at least as good as p j on l k 's preference list. Intuitively if l k is undersubscribed in M or if l k prefers p j to her worst non-empty project in M, then the RHS of Inequality (6) is at least 1. Finally, to avoid type (b) and type (c) blocking pairs, we impose the following constraint.
Next, we give the constraints to ensure that the matching obtained from a feasible solution in J is coalition-free.
Coalition constraints. First, we introduce some additional notation. Given an instance I ′ of spa-p and a matching M ′ in I ′ , we define the envy graph G(M ′ ) = (S, A), where the vertex set S is the set of students in I ′ , and the arc set It is clear that the matching M 2 = {(s 1 , p 1 ), (s 2 , p 2 ), (s 3 , p 3 )} admits a coalition {s 1 , s 2 } with respect to the instance given in Fig. 1. The resulting envy graph G(M 2 ) is illustrated in Fig. 5.
Clearly, G(M ′ ) contains a directed cycle if and only if M ′ admits a coalition. Moreover, G(M ′ ) is acyclic if and only if it admits a topological ordering. Now to ensure that the matching M obtained from a feasible solution S under J is coalition-free, we will enforce J to encode the envy graph G(M) and impose the condition that it must admit a topological ordering. In what follows, we build on our IP model J of I.
We create a binary variable e i,i ′ for each (s i , s i ′ ) ∈ S × S, s i ̸ = s i ′ , such that the e i,i ′ variables will correspond to the adjacency matrix of G(M). For each i and i ′ (1 ≤ i ≤ n 1 , 1 ≤ i ′ ≤ n 1 , i ̸ = i ′ ) and for each j and j ′ (1 ≤ j ≤ n 2 , 1 ≤ j ′ ≤ n 2 ) such that s i prefers p j ′ to p j , we impose the following constraint: If (s i , p j ) ∈ M and (s i ′ , p j ′ ) ∈ M and s i prefers p j ′ to p j , then e i,i ′ = 1 and we say s i envies s i ′ ; otherwise, e i,i ′ is not constrained. Next we enforce the condition that G(M) must have a topological ordering. To hold the label of each vertex in a topological ordering, we create an integer-valued variable v i corresponding to each student s i ∈ S (and intuitively to each vertex in G(M)). We wish to enforce the constraint that if e i,i ′ = 1 (i.e., (s i , s i ′ ) ∈ A), then v i < v i ′ (i.e., the label of vertex s i is smaller than the label of vertex s i ′ ). This is achieved by imposing the following constraint for all i and i ′ Note that the LHS of Inequality (9) is strictly less than the RHS of Inequality (9) for all i, i (i ̸ = i) if and only if G(M) does not admit a directed cycle, and this implies that M is coalition-free.

Variables
We define a collective notation for each integer variable involved in J as follows.

Objective function
The objective function given below is a summation of all the x i,j binary variables. It seeks to maximise the number of students assigned (i.e., the size of the matching).
Finally, we have constructed an IP model J of I comprising the set of integer-valued variables X , Λ, H, E and V , the set of Inequalities (1)-(9) and an objective function (10). Note that J can then be used to solve max-spa-p optimally. Moreover, if J admits a feasible solution S, then the objective value denoted obj(S) is equivalent to the number of students that are assigned in M, i.e., obj(S) = |M|.

Correctness of the IP model
Given an instance I of spa-p formulated as an IP model J using the above transformation, we establish the correctness of J via the following lemmas.
Lemma 6. A feasible solution S to J corresponds to a stable matching M in I, where obj(S) = |M|.
Proof. Assume firstly that J has a feasible solution S. Let M = {(s i , p j ) ∈ S × P : x i,j = 1} be the assignment in I generated from S. Clearly obj(S) = |M|. We note that Inequality (1) ensures that each student is assigned in M to at most one project.
Moreover, Inequalities (2) and (3) ensures that the capacity of each project and lecturer is not exceeded in M. Thus M is a matching. We will prove that Inequalities (4)-(7) guarantee that M admits no blocking pair.
Suppose for a contradiction that there exists some acceptable pair (s i , p j ) that forms a blocking pair for M, where l k is the lecturer who offers p j . This implies that s i is either unassigned in M or prefers p j to M(s i ). In either of these cases, ∑ p j ′ ∈S i,j x i,j ′ = 0, and thus θ i,j = 1. Moreover, as (s i , p j ) is a blocking pair for M, p j has to be undersubscribed in M, and thus ∑ n 1 i ′ =1 x i ′ ,j < c j . This implies that the RHS of Inequality (4) is strictly greater than 0, and since S is a feasible solution to J, α j = 1. Now suppose (s i , p j ) is a type (a) blocking pair, and suppose M(s i ) = p j ′′ for some p j ′′ ∈ P k . We have that l k prefers p j to p j ′′ , thus γ i,j,k = ∑ p j ′ ∈T k,j x i,j ′ = 1. Now, θ i,j = α j = γ i,j,k = 1 implies that the LHS of Inequality (5) is strictly greater than 2. Thus S is not a feasible solution, a contradiction.
Next suppose (s i , p j ) is a type (b) or type (c) blocking pair for M. This implies that s i / ∈ M(l k ) and thus 1 − Also, either l k is undersubscribed in M or l k prefers p j to p z , where p z is l k 's worst non-empty project in M. This implies that the RHS of Inequality (6) is strictly greater than 0, and thus η j,k = 1. Hence the LHS of Inequality (7) is strictly greater than 3. Thus S is not a feasible solution, a contradiction.
Finally, we show that Inequalities (8) and (9) ensure that M is coalition-free. Suppose for a contradiction that M admits a coalition ⟨s i 0 , . . . , s i r−1 ⟩, for some r ≥ 2. This implies that for each t (0 ≤ t ≤ r − 1), s it prefers M(s i t+1 ) to M(s it ), where addition is taken modulo r, and hence e it ,i t+1 = 1, by Inequality (8). It follows from Inequality (9) that Proof. Let M be a stable matching in I. First we set all the binary variables involved in J to 0. For all (s i , p j ) ∈ M, we set x i,j = 1. Now, since M is a matching, it is clear that Inequalities (1)-(3) are satisfied. For any acceptable pair (s i , p j ) ∈ (S × P) \ M such that s i is unassigned in M or prefers p j to M(s i ), we set θ i,j = 1. For any project p j ∈ P that is undersubscribed in M, we set α j = 1 and thus Inequality (4) is satisfied. For Inequality (5) not to be satisfied, its LHS must be strictly greater than 2. This would only happen if there exists (s i , p j ) ∈ (S × P) \ M, where l k is the lecturer who offers p j , such that θ i,j = 1, α j = 1 and γ i,j,k = 1. This implies that s i is assigned in M to a project p j ′ offered by l k such that s i prefers p j to p j ′ , p j is undersubscribed in M, and l k prefers p j to p j ′ . Thus (s i , p j ) is a type (a) blocking pair for M, a contradiction to the stability of M. Hence Inequality (5) is satisfied. Suppose l k is a lecturer in L and p j is any project on l k 's preference list. Let p z be l k 's worst non-empty project in M. If l k is undersubscribed in M or l k prefers p j to p z , we set η j,k = 1. Then Inequality (6) is satisfied. Now suppose Inequality (7) is not satisfied. This would only happen if there exists (s i , p j ) ∈ (S × P) \ M, where l k is the lecturer who offers p j , such that θ i,j = 1, α j = 1, β i,k = 0 and η j,k = 1. This implies that either s i is unassigned in M or prefers p j to M(s i ), s i / ∈ M(l k ), p j is undersubscribed in M and either l k is undersubscribed in M or l k prefers p j to his worst non-empty project in M.
Thus (s i , p j ) is either a type (b) or type (c) blocking pair for M, a contradiction to the stability of M. Hence Inequality (7) is satisfied.
We denote by G(M) = (S, A) the envy graph of M. Suppose s i and s i ′ are any two distinct students in S such that (s i , p j ) ∈ M, (s i ′ , p j ′ ) ∈ M and s i prefers p j ′ to p j (i.e., (s i , s i ′ ) ∈ A), we set e i,i ′ = 1. Thus Inequality (8) is satisfied. Since M is a stable matching, M is coalition-free. This implies that G(M) is acyclic and has a topological ordering σ : S → {1, 2, . . . , n 1 } .
For each i (1 ≤ i ≤ n 1 ), let v i = σ (s i ). Now suppose Inequality (9) is not satisfied. This implies that there exist vertices s i and s i ′ in G(M) such that v i + 1 > v i ′ + n 1 (1 − e i,i ′ ). This is only possible if e i,i ′ = 1 since 1 ≤ v i ≤ n 1 and 1 ≤ v i ′ ≤ n 1 .
Hence v i + 1 > v i ′ , a contradiction to the fact that σ is a topological ordering of G(M) (since (s i , s i ′ ) ∈ A implies that v i < v i ′ ). Hence S, comprising the above assignment of values to the variables in X ∪ Λ ∪ H ∪ ∆ ∪ E ∪ V , is a feasible solution to J; and clearly |M| = obj(S). □ Lemmas 6 and 7 immediately give rise to the following theorem regarding the correctness of J.

Theorem 8. A feasible solution to J is optimal if and only if the corresponding stable matching in I is of maximum cardinality.
Proof. Let S be an optimal solution to J. Then by Lemma 6, S corresponds to a stable matching M in I such that obj(S) = |M|. Suppose M is not of maximum cardinality. Then there exists a stable matching M ′ in I such that |M ′ | > |M|. By Lemma 7, M ′ corresponds to a feasible solution S ′ to J such that obj(S ′ ) = |M ′ | > |M| = obj(S). This is a contradiction, since S is an optimal solution to J. Hence M is a maximum size stable matching in I. Similarly, if M is a maximum size stable matching in I then M corresponds to an optimal solution S to J. □

Empirical evaluation
In this section we present results from an empirical evaluation that investigates how the sizes of the stable matchings produced by the approximation algorithms compares to those of the optimal solution obtained from our IP model, on spa-p instances that are both randomly generated and derived from real datasets.

Experimental setup
When generating spa-p instances, there are clearly several parameters that can be varied, such as the number of students, projects and lecturers; the length of the students' preference lists; as well as the total capacities of the projects and lecturers. For each range of values for the first two parameters, we generated a set of random spa-p instances. In each set, we recorded the average size of a stable matching obtained from running the approximation algorithms and the IP model. Further, we considered the average time taken for the IP model to find an optimal solution.
Very broadly, the approximation algorithms involve a sequence of applications and deletions. The students apply to projects that they find acceptable, and when a project and/or lecturer becomes full, certain (student, project) pairs are deleted. By design, the approximation algorithms were randomised with respect to the sequence in which students apply to projects, and the choice of students to reject when projects and/or lecturers become full. In the light of this, for each dataset, we also ran the approximation algorithms 100 times and record the size of the largest stable matching obtained over these runs. Our experiments therefore involved five algorithms: the optimal IP-based algorithm, the two approximation algorithms run once, and the two approximation algorithms run 100 times.
We performed our experiments on a machine with dual Intel Xeon CPU E5-2640 processors with 64GB of RAM, running Ubuntu 17.10. Each of the approximation algorithms was implemented in Java. 4 For our IP model, we carried out the implementation using the Gurobi optimisation solver in Java (see footnote 4). For correctness testing on these implementations, we designed a stability checker which verifies that the matching returned by the approximation algorithms and the IP model does not admit a blocking pair or a coalition.

Randomly-generated datasets
All the spa-p instances that we randomly generated involved n 1 students (n 1 is henceforth referred to as the size of the instance), 0.5n 1 projects, 0.2n 1 lecturers and 1.1n 1 total project capacity which was randomly distributed amongst the projects such that each project has capacity at least 1. The capacity for each lecturer l k was chosen uniformly at random to lie between the highest capacity of the projects offered by l k and the sum of the capacities of the projects that l k offers. In the first experiment, we present results obtained from comparing the performance of the IP model, with and without the coalition constraints in place. Experiment 0. We increased the number of students n 1 while maintaining a ratio of projects, lecturers, project capacities and lecturer capacities as described above. For various values of n 1 (100 ≤ n 1 ≤ 1000) in increments of 100, we created 100 randomly-generated instances. Each student's preference list contained a minimum of 2 and a maximum of 5 projects. With respect to each value of n 1 , we obtained the average time taken for the IP solver to output a solution, both with and without the coalition constraints being enforced. The results, displayed in Table 1 show that when we removed the coalition constraints, the average time for the IP solver to output a solution is significantly faster than when we enforced the coalition constraints.
In the remaining experiments, we thus remove the constraints that enforce the absence of a coalition in the solution. We are able to do this for the purposes of these experiments because the largest size of a stable matching is equal to the largest size of a matching that potentially admits a coalition but admits no blocking pair, 5 and we were primarily concerned with measuring stable matching cardinalities. However the absence of the coalition constraints should be borne in mind when interpreting the IP solver runtime data in what follows.
In the next two experiments, we discuss results obtained from running the five algorithms on randomly-generated datasets.  Table 2 Properties of the real datasets and the size of stable matchings obtained from the five algorithms, with respect to Experiment 3, where A, B, C , D and E denote the solution obtained from the IP model, 100 runs of the 3 2 -approximation algorithm, single run of the 3 2 -approximation algorithm, 100 runs of the 2-approximation algorithm, and single run of the 2-approximation algorithm, respectively.
Year n 1 n 2 n 3 l Random Most popular Least popular As in the previous experiment, we maintained the ratio of the number of students to projects, lecturers and total project capacity, as well as the length of the students' preference lists. For various values of n 1 (100 ≤ n 1 ≤ 2500) in increments of 100, we created 1000 randomly-generated instances. With respect to each value of n 1 , we obtained the average sizes of stable matchings constructed by the five algorithms run over the 1000 instances. The result displayed in Fig. 6(a) shows the ratio of the average size of the stable matching produced by the approximation algorithms with respect to the average size of the maximum cardinality stable matchings produced by the IP solver. Fig. 6(a) shows that each of the approximation algorithms produces stable matchings with a much higher cardinality from multiple runs, compared to running them only once. Also, the average time taken for the IP solver to find a maximum cardinality matching increases as the size of the instance increases, with a running time of less than one second for instance size 100, increasing roughly linearly to 13 seconds for instance size 2500 (see Fig. 6(b)). Perhaps not surprising, each of the approximation algorithms terminates in less than one second for all the datasets.

Experiment 2.
In this experiment, we varied the length of each student's preference list while maintaining a fixed number of students, projects, lecturers and total project capacity. For various values of x (2 ≤ x ≤ 10), we generated 1000 instances, each involving 1000 students, with each student's preference list containing exactly x projects. The result for all values of x is displayed in Fig. 7(a), which shows that as we increase the preference list length, the sizes of the stable matchings produced by each of the approximation algorithms approaches optimality. Fig. 7(a) also shows that with a preference list length greater than 5, the 3 2 -approximation algorithm produces an optimal solution, even on a single run. Moreover, the average time taken for the IP solver to find the size of a maximum size stable matching increases as the length of the students' preference lists increases, with a running time of two seconds when each student's preference list is of length 2, increasing roughly linearly to 17 seconds when each student's preference list is of length 10 (see Fig. 7(b)).

Real datasets
The real datasets in this chapter are based on actual student preference data and manufactured lecturer data from previous runs of student-project allocation processes at the School of Computing Science, University of Glasgow. Table 2 shows the properties of the real datasets, where n 1 , n 2 and n 3 denote the number of students, projects and lecturers respectively; and l denotes the length of each student's preference list. For all these datasets, each project has a capacity of 1 and the capacity of each lecturer was provided as part of the datasets. In the next experiment, we discuss how the lecturer preferences over their proposed projects were generated (which is the only information we manufactured). We also discuss the results obtained from running the five algorithms on the corresponding spa-p instances. Experiment 3. We derived the lecturer preference data from the real datasets as follows. For each lecturer l k , and for each project p j offered by l k , we obtained the number a j of students that find p j acceptable. Next, we generated a strictlyordered preference list for l k by arranging l k 's proposed projects in (i) a random manner, (ii) ascending order of a j , and (iii) descending order of a j , where (ii) and (iii) are taken over all projects that l k offers. Table 2 shows the size of stable matchings obtained from the five algorithms, and the results are essentially consistent with the findings in the previous experiments: i.e., the 3 2 -approximation algorithm produces stable matchings whose sizes are close to optimal.

Discussions
The results presented in this section suggest that even as we increase the number of students, projects, lecturers, and the length of the students' preference lists, each of the approximation algorithms finds stable matchings that are close to  having maximum cardinality, outperforming their approximation factor. Perhaps most interesting is the 3 2 -approximation algorithm, which finds stable matchings that are very close in size to optimal, even on a single run. These results also hold analogously for the instances derived from real datasets.
We remark that when we removed the coalition constraints, we were able to run the IP model on an instance size of 10 000, with the solver returning the size of a maximum matching in an average time of 100 seconds, over 100 randomly-generated instances. This shows that the IP model (without enforcing the coalition constraints), can be run on large instances that could potentially appear in practical applications of the spa-p model, to find maximum size stable matchings that potentially admits coalition of students. These coalitions should then be eliminated in polynomial time by repeatedly constructing an envy graph, similar to the one described in [15, p. 290], finding a directed cycle and letting the students in the cycle swap projects.

Conclusions and open problems
In this paper, we have presented algorithmic and experimental results for finding maximum size stable matchings in instances of spa-p. From an algorithmic perspective, we have shown that max-spa-p becomes polynomial-time solvable if there is only one lecturer, whilst the problem remains NP-hard to approximate even if there are two lecturers involved. We also proved that it is NP-hard to find a maximum size stable matching if each preference list is of length at most 3. It would be interesting to consider other polynomial-time solvable special cases, for example, what if each student's preference list is of length at most 2 and each lecturer's preference list is of unbounded length?
Moving away from hardness results, a particularly interesting direction would be to explore parameterisations that lead to FPTalgorithms for max-spa-p. Whilst our NP-hardness result shows that parameterising on the number of lecturers or the maximum length of a preference list is not a good choice, other suitable parameterisations that could be explored include the maximum capacity of a project or lecturer, which we might expect to be small in practice. On the other hand, a different direction is to establish W[1]-hardness results under various parameterisations.
To enable max-spa-p to be solved optimally in practice, we went on to describe an IP model for the problem. From our experimental results, we were able to deduce that the 3 2 -approximation algorithm of Iwama et al. [11] constructs stable matchings whose size is very close to optimal. Nevertheless, the question remains as to whether there exists an approximation algorithm for max-spa-p that has a performance guarantee better than 3 2 ?