1. Introduction
A critical operational issue that has attracted considerable research interest since 1976 is the assignment of tutors to academic modules in higher education institutions. The Teacher Assignment Problem (TAP), formerly known as the Faculty Assignment Problem, is a challenging task that requires balancing many competing factors such as institutional requirements, tutor qualifications and preferences, module rankings, and various operational constraints that affect the quality of education and administrative efficiency.
Traditional approaches to solving this problem have primarily focused on two major categories: integer programming, which has dominated the field since its beginning, and various heuristic methods including evolutionary techniques like genetic algorithms. These methods have provided useful frameworks, but they often cannot provide the necessary flexibility that has to be addressed by academic assignments as they lack a dynamic nature and a complex interaction between institutional needs and personal preferences. In that direction, these approaches can fail in cases where an immediate decision may not be the most appropriate, especially when many qualified candidates are competing for the same positions.
The aim of the present study is to introduce the preference adjustment matching algorithm (PAMA), a novel matching framework specifically designed to enhance the tutor–module assignment process in academic settings. It seeks to provide a solution for matching tutors to academic modules while balancing various preferences, rankings, and institutional constraints. PAMA relies on both maximal and stable matching principles through an innovative iterative approach. In order to fulfill the unique needs of institutions, PAMA algorithm is novel in the way it integrates the ideas of maximal and stable matching, pending status, and deadlock resolution into a single procedure for matching tutors to modules, and this offers a new contribution to the existing literature.
The main advantage of the algorithm is the dynamic processing of multiple rounds that allows for the adjustment of preferences and the introduction of a “pending” status. Unlike the traditional stable matching algorithms, which make immediate accept/reject decisions, PAMA temporarily holds promising matches while exploring other possibilities, resulting in assignments that satisfy both institutional and individual preferences. This leads to a fair result as PAMA manages both sides (rankings and preferences) equally, offering overall satisfaction. At the same time, deadlocks may occur due to the pursuit of fairness, but this also provides the institution with the flexibility to make decisions based on its needs.
To assess its efficiency, PAMA was applied to the Hellenic Open University (HOU), where it effectively handled, preserving the ranking of tutors and respecting their preferences, the complex problem of assigning 3982 tutors to 1906 positions across 620 modules. This real-world implementation achieved maximal matching in most cases, and in the few instances where deadlocks occurred (three specific cases), the algorithm successfully converged to stable solutions through policy-driven resolution approaches. This demonstrated the algorithm’s ability to handle both single-round and multi-round assignment processes in an academic environment.
The structure of the paper is the following: in
Section 2, a review of related work in the field is presented.
Section 3 outlines the HOU’s policy regarding tutor employment.
Section 4 and
Section 5 give a detailed description of the algorithm’s mathematical foundation, its operational mechanics, and some scenarios to demonstrate its behavior.
Section 6 describes the PAMA implementation in HOU’s context.
2. Matching Problems and the Teacher Assignment Problem (TAP): A Review of Related Work
The process of assigning teachers to courses has been a research topic since 1976, when Breslaw [
1] introduced the so-called Faculty Assignment Problem, later known as the TAP. According to the recent literature review of Moreira et al. [
2], the research has gained consistent attention since 2002, and the main approaches can generally be divided into two major categories: optimization-based methods, particularly integer programming, which has dominated the field since its inception, and a diverse range of heuristic approaches, including evolutionary algorithms such as genetic algorithms.
Pioneer work on such methods is attributed to Breslaw in 1976 using linear programming with constraints via the simplex algorithm. Later, Hultberg and Cardoso [
3], starting from a MIP formulation of the problem of minimizing the average number of different courses assigned to each teacher, have shown that their model can be transformed into a special case of the Fixed Charge Transportation Problem solvable by linear programming. Their approach was based on finding a maximally degenerate basic solution to the transportation problem. Following this direction, Domenech and Garcia [
4] also proposed a mixed integer linear programming (MILP) model that balances teacher workload while considering teacher preferences, based on academic ranks such as professor or lecturer, with the unique ability to parameterize optimization criteria through weights for different institutional needs. A more recent study conducted by Torres et al. [
5] has extended the integer programming approach a step further and developed a binary integer programming model for resolving the faculty–course assignment problem. The overall objective is the maximization of faculty satisfaction in accordance with preferences for teaching specific courses. Time, course assignment, qualification, workload, and time block constraints are incorporated into the model. Their implementation, tested on real data from a university department, successfully generated feasible schedules that respected all constraints while maximizing instructor preferences in a very short time, demonstrating the practical effectiveness of modern integer programming approaches to the TAP. An interesting approach has been suggested by Tejada and Martinez [
6], who have given a two-stage solution to the teacher–course assignments. In the first stage, rather than collecting teacher preferences directly (which can be time-consuming), they infer these preferences from the frequency of assignment in the past, performance scores, course description, and teacher specialization similarity, qualifications, and academic rank. In the second stage, they apply an integer linear programming model that maximizes satisfaction of these estimated preferences while reducing deviation from target teaching workloads. This approach significantly reduced the time taken for assignment generation from 5 weeks to a much smaller time, while also producing assignments with smaller deviation from workload targets than those generated manually.
In the domain of evolutionary techniques, genetic algorithms represent the other major approach to TAP. Wang [
7] demonstrated the application of genetic algorithms to solve the teaching assignment problem while considering teacher preferences. A novel quantum-inspired approach was presented by Tayarani-N [
8], in which he developed new operators for the quantum evolutionary algorithm (QEA) to solve timetabling issues. QEA combines the principles of quantum computing with evolutionary algorithms, using quantum bits and superposition of states as basic principles to search the problem space. The new operators include a reinitialization operator that monitors population convergence and reinitializes the population when diversity is lost and a diversity-preserving operator that identifies when several quantum individuals converge to the same local optimum and reinitializes some of them for exploration of other regions of the search space.
Matching theory and game theory principles provide another important methodology beyond these optimization-based approaches. Though originally designed for the college admission problem, the Gale–Shapley algorithm [
9] has been broadly adapted to a wide array of matching problems and is one of the most well-known techniques for solving one-to-one matching problems. It guarantees stability, which means that each element is matched to a single element and that there are no blocking pairs; that is, no two elements favor one another over their current matches. The understanding of stable matchings was further enhanced by Roth’s analysis [
10], which added ideas that have been used to solve a variety of issues, including matching in market design. In this direction, Cechlárová et al. [
11] addressed the teacher–school matching problem. They extended the definition of stability to cover special requirements such as different preferences for specialties and school capacity constraints. Their study proves that finding stable matching is NP-complete in some cases. Combe et al. [
12] continued in this research line by investigating how central placement mechanisms for teachers can be best designed such that teacher allocations among regions/schools would be improved. They developed new mechanisms eliminating strategic manipulation as well as complementing existing ones. Their approach balanced efficiency considerations with fairness properties, and empirical analysis showed significant improvements in reducing experience gaps between different regions while enhancing overall teacher satisfaction.
While stable matching algorithms have been more influential, there have also been several applications of non-stable matching algorithms for assignment problems. For instance, the Hungarian algorithm [
13] is an optimization algorithm introduced by Kuhn that solves the problem of assignment in polynomial time. Shortly afterward, James Munkres [
14] improved Kuhn’s original algorithm by simplifying its steps, giving it a stricter termination, and extending its application to the transfer problem, as opposed to 1-to-1 matching. The Hopcroft–Karp algorithm [
15] provided an efficient solution for maximum matchings in bipartite graphs. Furthermore, Edmonds’ blossom algorithm [
16] extended maximum matching solutions to general graphs, beyond just bipartite ones. Its novelty lies in the way it handles circles of odd length, called “blossoms”. His method shrinks these circles to single nodes, searches for augmenting paths in the simplified graph, and then regrows the circles to construct the final solution. Where stability is not the paramount issue, these algorithms provide ways to solve complex matching problems.
A different perspective on the TAP comes from Verykios et al. [
17], who developed a Shapley-value-based methodology for faculty assignments in higher education. In their approach, every faculty is viewed as a player in a cooperative game, with expertise over different cognitive subjects viewed as a contribution. Then, the Shapley value calculates a fair distribution of teaching assignments based on the individual contribution to possible teaching coalitions. This method turns out to be highly effective in dealing with multidimensional modules, where the faculty members need to be competent in many subjects. It also provides a mathematical framework for balancing individual competencies with collective teaching effectiveness.
The Teacher Assignment Problem remains a challenging area of research, especially when considering the stability of the assignments, which need to be sufficiently flexible to accommodate dynamic changes within an academic environment. There has been a continuing need for methods that can deal with complex problems such as teacher preference, conflict resolution, and alignment of assignments with institutional goals.
However, apart from the TAP field, the matching problem has been also studied in Internet fields. For example, online bipartite matching and its extensions have attracted a lot of attention due to the huge new uses of ad allocation in Internet advertising. Traditional offline strategies are not applicable in this scenario due to the massive volume of data and the need to manage the “long tail” of less frequent advertising requests. The bipartite graph in the basic online bipartite matching problem, proposed by Karp et al. [
18], has a bipartite graph with known vertices for one set (U) and gradually arriving vertices for the other set (V), exposing their connections. The competitive ratio of the algorithm’s matching size to the ideal offline matching is used to evaluate the performance of the primary algorithms, which are Greedy, Random, and Ranking. The three main solution approaches are Known IID (known distribution), Random Order (random arrival), and Adversarial Order (worst case). The choice of approach relies on the data, the process of arrival, and the need for guarantees. One of the most important generalizations of the online bipartite matching problem is the Adwords problem, where advertisers with budgets bid on keywords, and each assignment has the bid charged from the advertiser’s budget [
19].
3. HOU’s Policy Regarding Tutor Employment
The HOU’s main role is to provide open and distance education, both at undergraduate and postgraduate levels. At the same time, it promotes scientific research and develops technologies and methods for transmitting knowledge at a distance, utilizing appropriate educational material and teaching methods.
More specifically, studies at the HOU are organized around study programs (SP), which consist of modules. Each module includes three courses, with learning content corresponding to the content of courses that have three hours of weekly instruction at traditional universities. The University adopts the approach of online classes with a consistently small number of students. This approach ensures high-quality interaction and support between tutors and students. Therefore, a module in a study program needs more than one tutor. The exact number of tutors required always depends on the number of enrolled students. For example, in a postgraduate program with 250 enrolled students in a module, 10 tutors are needed since each class has a maximum of 25 students.
Distance education at HOU is facilitated by tutor-to-student, student-to-student, and student-to-content interactions in an environment framed by appropriate technologies [
20]. More specifically, the tutors at the HOU act as content facilitators, supporting students through regular communication and guidance and evaluating educational activities (e.g., written assignments). Additionally, they participate in the development and evaluation of educational material, provide feedback to students, assist students with academic and personal issues, and contribute to the organization of the final exams. At the same time, they take part in scientific committee meetings, engage in online student–tutor meetings, submit proposals for improving teaching materials, and ensure the smooth operation of the educational process.
The selection of tutors is carried out through a call for applications and a set of criteria for point-based evaluation. These criteria include, in summary: the relevance of the candidate’s field of expertise to the module, research and published work, experience in higher education teaching, student evaluations over the past six years, supervision of master’s theses at HOU, experience and specialization in distance education, and professional experience. Specifically, emphasis is placed on recent research activity, participation in scientific publications and conferences, and the development of teaching materials, as well as the alignment of these materials with the needs of distance education. These criteria aim to identify candidates who possess the necessary qualifications and experience to effectively support students. It is worth noting that in cases where two or more candidates achieve equal scores, the institution’s relevant department introduces a slight differentiation in their scores based on secondary criteria, such as previous teaching experience in the same module. This ensures strict ordering in the module ranking list, which is essential for the operation of the assignment algorithm. When applying, candidates can choose up to two modules in order of preference for taking on a class. However, since candidates can apply for more than one call when assignments are reviewed, some candidates appear to have applied for more than two modules to the entire set of calls.
When all candidate evaluations are completed, a list is created for each module, with candidates sorted by evaluation (from the best to the worst). At the same time, after finalizing the number of students in each module, the number of classes for each module is determined, along with the corresponding number of assignments. So, the goal is to assign the candidates to modules so that the following applies:
Each module receives as many candidates as it needs to be covered. If it cannot be filled due to a lack of candidates, it leaves vacant positions that are filled by human intervention after the completion of this process.
A candidate can be assigned to a module class once.
A candidate whose ranking order places them within a module’s capacity must be assigned to a module without exception.
If possible, during matching, priority is given to certain pairs (a module must have one candidate eligible, and the candidate has it first in her/his preference). If the latter is not possible, the HOU can define strategic decision making for candidate selection based on either a. the preferences of the candidates, b. the rankings of the module, or c. the module in which the candidate has worked in the past (if any) or based on other policies.
Due to the public nature of the University, the conditions for the selection of candidates must be fair and transparent. In this context, the university must describe the selection method and apply it respectfully so as to avoid legal friction with candidates in case they believe that the selection was made ad hoc or based on criteria that are not defined in advance.
4. The Preference Adjustment Matching Algorithm (PAMA)
Given graph G (V, E) with V vertices and E edges, a set of edges is called a matching (or correspondence) if and only if no two edges share a common vertex, namely, each edge of the matching connects a different pair of vertices, and there are no common vertices between the edges of the matching (also known as independence).
The assignment problem can be captured as a bipartite graph, where one set of vertices is the modules and another set is the tutors. In this initial graph, edges are only between vertices from different sets, showing the tutors’ preferences for modules and their rankings. A simple case of three tutors, three modules, and one assignment per module is depicted in
Figure 1.
PAMA adopts a maximal matching approach by bilaterally examining both preferences and rankings for a maximal matching such that no more edges can be added without violating independence (
Figure 1). Preferences refer to tutors’ ordered choices of modules (with
being the r-th choice in descending order preference for tutor j) and rankings represent the descending order of tutors for each module (with
being the r-th ranked tutor for module i). Maximal matching should be distinguished from maximum matching, which is the matching that contains the most edges. PAMA aims to obtain the maximal matching that satisfies all the module requirements. However, as the bilateral examination process of PAMA might lead to deadlock(s) (
Section 4.1), in those cases, PAMA cannot ensure the maintenance of maximal matching in those situations. Indeed, while PAMA loses maximality when deadlock(s) occur, these are resolvable, so PAMA converges to stability in such a case. Unlike the unilateral Gale–Shapley algorithm, which can introduce biases toward one set, PAMA is balanced and therefore has no disjunction toward either set.
It is worth referring to the greedy algorithms, where the difference with maximal ones is subtle. The matching produced by a greedy algorithm is always maximal, but not all maximal matchings can be produced by a greedy approach. Greedy algorithms make locally optimal choices without considering any future consequences, looking only at immediate gains; hence, they are also called “myopic” [
21]. PAMA differs from the greedy algorithms in that it includes pending slots as correction mechanisms instead of taking immediate decisions on every case.
PAMA takes into consideration the three rules below:
Each element in the first set has a list of ranked elements from the second set.
Each element in the first set has a maximum number of pairs that must be created if it is possible.
Each element in the second list has a preference list of elements from the first set.
This approach combines the advantages of stability with enhanced flexibility for institutions. In cases where stability might be lost, PAMA’s deadlock resolution mechanisms provide satisfaction particularly to the institution while still maintaining reasonable outcomes for tutors. This addresses a known limitation of traditional stable matching algorithms like Gale–Shapley, which inherently favor the proposing side. By employing an iterative process with pending slots and policy-driven deadlock resolution, PAMA achieves equitable outcomes that respect both institutional ranking priorities and individual tutor preferences.
An explanatory example of the algorithm invocation is the case of tutors’ assignment to modules based on a combination of module preferences (how the modules rank tutors) and tutor preferences (how tutors rank modules). The algorithm proceeds in rounds, during which each module, one by one, attempts to stable fill its available positions by reviewing its ranked list of tutors. It checks whether each tutor is eligible for assignment, prioritizing those who have the module as their first preference.
The PAMA objective in our case is to assign tutors to modules as follows:
Each module fills its available teaching positions based on its preference for tutors.
Each tutor may be assigned to only one module (if he/she is eligible) according to his/her preferences.
Tutors ranked highly but not yet assigned due to other preferences may cause a deadlock, leading to decisions based on university policy.
All tutors eligible for a module must be assigned to at least one module.
The input of the PAMA consists of the following:
tutor_prefs: A dictionary where each tutor is associated with an ordered list of modules they prefer to teach.
module_ranking: A dictionary where each module is associated with an ordered list of eligible tutors to assign based on the evaluation of their application form.
max_tutors_per_module: A dictionary specifying the maximum number of tutors that can be assigned to each module.
After the execution of the algorithm, the produced output will be a dictionary (module_assigments) where each module is associated with a list of assigned tutors ordered by the evaluation ranking score. In case of deadlock(s), the algorithm fills the empty assignments according to a predefined policy.
4.1. The PAMA Logic
The algorithm runs in rounds as long as assignments are being made. In each round, modules are examined sequentially, based on module rankings and tutors’ preferences (pseudocode is provided in
Scheme 1). The initial sequence of modules is randomly arranged, and during each turn, the algorithm examines each module one by one. If the module has available capacity, then it starts with its highest-ranked tutor, checking if he/she is eligible and if the module is his/her top choice. If both conditions are met, the tutor is assigned. If the tutor is eligible but the module is not in tutor’s highest preference, then the algorithm marks that position as pending and moves to the next ranked tutor. This approach allows modules to secure their preferred tutors who also prioritize them while keeping options open for tutors who might be assigned elsewhere. The module examination continues until all positions are filled or all ranked tutors have been considered, balancing the needs of both modules and tutors.
Once a tutor is assigned to a module, the algorithm removes him/her from the candidate rankings of all other modules and then cleans up the tutor’s preference list. It also removes the particular module from tutors’ preferences lists when a tutor becomes ineligible for a module. Ineligibility can occur if there are no free positions left or if all remaining positions are pended and reserved for potential higher-ranked tutors who prefer that module. When a module is removed from a tutor’s preference list, all subsequent preferences shift up. For example, if a tutor with four preferences becomes ineligible for his/her top two preferences, his/her third preference becomes his/her new first choice, and his/her fourth becomes second, leaving him/her with only two preferences.
When all modules are examined one-by-one, then the next round will reexamine the modules again. This first stage of the algorithm terminates if no assignments and no alterations in preference lists are made after cycling through all modules. However, a potential deadlock can occur when modules are left waiting for eligible tutors who do not have them as first preference. This creates a pending cycle where, for example, Module A waits for a tutor who prefers Module B, but Module B is waiting for a different tutor who prefers Module C (or A), and so on. This pending cycle can prevent assignments, leaving modules with unfilled pending positions. It is unlikely, in the practical application of the algorithm, that a module will end up with a zero list of contenders, since in most cases, the number of modules is always fewer than the available tutors. The algorithm prioritizes matching modules with their highest-ranked tutors, and a module losing all contenders would require all potential tutors to have better preferences or rankings elsewhere. Moreover, there is no specific maximum number of ‘reserved’ tutors for a module as this depends on the module’s capacity requirements. In the rare case where a module remains without contenders, the algorithm would flag this for human intervention, where vacant positions are filled manually after the automated process completes (
Section 3).
One important aspect regarding PAMA’s sequential process of module evaluation is that the order of modules affects the outcome only during the deadlock resolution and not when a maximal solution is achievable. The sequence of modules is generated randomly, with no specific ordering criteria applied. When the algorithm achieves a maximal matching, different module examination sequences can result in different pending states and assignments within a round, but the outcome is consistent because the algorithm carefully takes into account both modules’ rankings and tutors’ preferences to ensure mutual satisfaction for both tutors and candidates. However, under deadlock situations, examination order plays a significant role in determining final assignments. This feature allows institutions to prioritize modules that are difficult to staff, particularly those in specialized topic areas requiring relevant experience. The path-dependent character of PAMA then provides institutional administrators with beneficial slack, enabling them to make pivotal modules of necessary low-resource pools of good candidates a priority while maintaining the algorithm’s necessary fairness specifications.
The deadlock state, while it initially seems problematic, actually provides administrators with valuable flexibility in tutors’ assignments. It serves as an indicator of special situations requiring administrative decision making. Universities can choose from various strategies to automatically resolve deadlock(s) based on their priorities. Options may include (a) forcibly assigning pending tutors to prioritize module rankings, (b) giving absolute preference to tutors’ first choices even if it means assignment to different modules, (c) keeping current assignments for already contracted tutors if they remain eligible, and (d) other policies. This flexibility allows institutions to tailor their approach to deadlock(s) according to specific policies or circumstances, turning a potential problem into an opportunity for decision making in the assignment process.
4.2. Analyzing the Algorithm Time Complexity
The primary loop iterates while a condition remains true. This condition is related to the existence of unassigned modules or tutors with preferences. The loop continues until no more changes are made to the assignment’s list and the tutors’ preference list during two consecutive rounds.
To estimate the time complexity of the algorithm, we will break down the inner loops and operations:
Module Iteration: For each module, a linear scan of its rankings list is performed. Operations within this loop involve constant-time operations like checking module capacity, removing modules from tutor preferences, and marking slots as pending.
Tutor Iteration: For each tutor in a module’s rankings list, constant-time operations are performed, such as checking the tutor’s preference for the module, assigning the tutor to the module, and removing modules from the tutor’s preferences.
Deadlock Handling: Deadlock handling can involve complex algorithms, but it is typically a one-time operation or a rare event. We can consider it as a constant-time operation for simplicity.
The worst-case time complexity of the algorithm can be approximated as O(M ∗ T ∗ P), where
M is the number of modules.
T is the average number of tutors in a module’s rankings list.
P is the average number of modules in a tutor’s preferences list.
The actual performance can vary significantly based on the specific input data and the implementation details. By carefully considering the data structures, algorithms, and optimization techniques, it is possible to achieve practical and efficient solutions for this problem.
4.3. Mathematical Definition
To define the mathematical framework of the algorithm, we introduce the following preliminaries:
represents module i, where and is the total number of modules.
represents the ordered set of tutors ranked for potential assignment in module i, a list for module i, based on their suitability score, where with being the number of tutors ranked for module i. Tutors are ranked in descending order for each specific module.
The total set of tutors across all modules represents the unique set of tutors, defined as , where T is the set of all distinct tutors, and it holds that and .
represents the capacity (available slots) of module i, where
denotes the preference score of tutor j for module i, where .
denotes the total number of modules preferred by tutor j, where
is a binary variable indicating whether tutor j has a pending slot in module i, ( if pending, 0 otherwise).
is a binary variable indicating whether tutor j has been assigned to module i, ( if assigned, 0 otherwise).
denotes the algorithm iteration, where .
To ensure consistency, we impose the following constraints:
A tutor can either be assigned or remain pending for a module, but not both:
A tutor can be assigned to at most one module:
A tutor can hold a pending status across multiple modules:
Given these preliminaries, the mathematical framework of the PAMA algorithm is defined in the following stages:
Initialization
Set iteration counter r = 0
For each module i, set the initial capacity , where x is a positive integer indicating the available slots for module i (x )
For each module
If then proceed to the following steps.
Else (if slots in module i have been filled and if there are no other available ranked tutors for module i), terminate processing for module i and forward to next module.
Select tutors in order from the ordered ranking list
At each iteration, tutors with pending slots are the only ones available for new assignments (all non-pending and tutors that have been assigned are removed):
When all modules have completed processing in this round r, proceed to Step 7; otherwise, proceed to Step 1 for the next module l ∈ {i + 1, …, |M|}.
Given the recording changes in each module i as
and the overall change in a round as
If there exists an iteration r such that , then the algorithm converges and terminates at round r
Else proceed to the next iteration and return to Step 2 for the remaining open modules.
4.4. Some Scenarios of the PAMA Execution
4.4.1. One-Round Assignments Scenario
Assuming that two modules, named mA and mB, must choose 1 and 2 tutors correspondently from 4 candidate tutors named t1, t2, t3 and t4. The tutors’ rankings in the modules and the tutors’ preferences are presented in
Table 1In the first round, the PAMA will start the examination of mA: At first, mA will pick t2, who is the highest-ranked tutor for the module. t2 has mA on top of his/her preferences; hence, t2 will be assigned to mA. After the assignment, t2 preferences will be cleared, and t2 will be also removed from mB rankings as well. Next, according to the mA rankings, t1, t4, and t3 will be marked as ineligible since mA is now completed.
Next, the algorithm will examine mB: mB will first pick t3, who is the highest remaining ranked tutor for the module. t3 has mB on top of his/her preferences; hence, t3 will be assigned to mB. After the assignment, t3 will free all his/her preferences. In the same way, t1 will be also assigned and mB will be completed. Next, t4 will be marked as ineligible.
In the next round all modules will seem completed, hence the algorithm will bypass them and finish.
4.4.2. Two-Round Assignments Scenario
By explicitly changing the order of mA tutors’ rankings (
Table 2), the PAMA will be executed in two rounds.
As depicted in
Table 3, in the first round the PAMA will start the examination of mA: First, mA will pick t3, who is the highest-ranked tutor for the module. t3 does not have mA on top of his/her preferences; hence, the position will be assumed as pending and the algorithm will continue to the next tutor. According to the mA rankings, t1 will be examined next. Since t1 has mA on top of his/her preferences, the algorithm will keep t1 in the ranking list and, next, will mark t4 and t2 as ineligible as they cannot be assigned to mA (mA will assign either t3 or t1). Next, the algorithm will examine mB: mB will first pick t2, who is the highest-ranked tutor for the module. t2 has mB on top of his/her preferences (after the removal of mA during the former examination of mA). Therefore, t2 will be assigned to mB. Next, t3 will also be assigned. mB will then be completed, and the algorithm will remove it from all tutors’ preferences lists.
In the second round, PAMA will start again with the examination of mA: Now, mA will pick t1, who is the highest-ranked remaining tutor for the module. Now t1 has mA on top of his/her preferences; hence, t1 will be assigned to mA. The module will be completed, and PAMA will check the mB module, which is already completed, and then the 2nd round will finish.
In the next round, all modules will be completed; hence, the algorithm will bypass them and finish.
4.4.3. Deadlock Scenario
By explicitly changing the order of mB tutors’ rankings, the PAMA will be driven to a deadlock. In the paradigm of
Table 4, we can see that t3 and t1 preferences are opposite to mA and mB rankings. This will result in a deadlock in which each module will wait for the assignment of the first-ranked tutor to another module in order to complete its assignments and vice versa.
In the first round, the PAMA will start the examination of mA (see
Table 5): First, mA will pick t3, who is the highest-ranked tutor for the module. t3 does not have mA on top of his/her preferences; hence, the slot will be assumed as pending, and the algorithm will continue to the next tutor. According to the mA rankings, t1 will be examined next. Since t1 has mA as his/her 1st preference, the algorithm will keep t1 in the ranking list. Next, it will mark t4 and t2 as ineligible, as they cannot be assigned to mA (since mA will assign either t3 or t1). Next, the algorithm will examine mB: mB will first pick t2, who is the highest ranked tutor for the module. t2 has mB on top of his/her preferences (after the removal of mA during the former examination); hence, t2 will be assigned in mB. Next, t1 will be examined: t1 does not have mB as his/her highest preference; hence, the second slot of mB will be marked as pending, and the algorithm will proceed to the rest of the tutors. t3 has mB on the top of the preference list and will be bypassed; however, the next and final tutor, t4, will have to remove mB from his/her preferences, as it is sure that t4 cannot be assigned in mB.
In the second round, the PAMA will start again with the examination of mA: mA will again pick t3, who is the highest-ranked remaining tutor for the module. mA remains as not the highest preferred module of t3; hence, the slot will be assumed as pending, and the algorithm will continue to the next tutor. According to the mA rankings, t1 will be examined next. Since t1 has mA as his/her 1st preference, the algorithm will keep t1 in the ranking list. Next, the algorithm will examine mB: mB will first pick t1: t1 does not have mB on top of his/her preferences; hence, the second slot of mB will be marked as pending and the algorithm will proceed to the rest of the tutors. t3 has mB on top of the preference list and will be kept.
Obviously, in the second round, after the iteration of all modules, no change in rankings or preferences will occur. At this point, the algorithm will detect a deadlock, since there are modules with free slots and remaining candidates at the same time. Then, a deadlock handler according to the preferable policy will be invoked.
If, for example, we decide to give priority to rankings, then the execution of the handler will examine mA and will forcibly assign t3 to mA. Then, the iteration will break, and the algorithm will execute a next round in which mA will be already completed and mB will choose t1, as t1 will have now mB as his/her first preference.
On the other hand, if we decide to give priority to tutors’ preferences, then the execution of the handler will pick t3 for examination concerning mA but will not match them. t3 will be assigned to his/her first preference module (mB), and next, the iteration will break. The algorithm will execute the next round, in which mA will finally choose t1.
5. PAMA’s Real Case Implementation and Evaluation
The implementation and execution of the above algorithm took place in the environment of HOU University, where 3982 candidate tutors competed for 1906 positions across 620 modules. Each tutor indicated their preferences for up to six modules; however, most tutors selected an average of two modules. The algorithm was implemented in Python (see
Appendix A) and was invoked once for each different scenario concerning the deadlock policy of the institution.
The input dataset was two Excel sheets. The first sheet had 9768 rows. Each one records the teacher ID, the module name, the ranking of the particular teacher according to the module candidate’s evaluation, and the position of the module in the teacher’s preference list. The second sheet contained the module name and the total classes of the module, and it had 620 rows. This means that a total of 9768 requests were made by 3982 candidate tutors competing for 1906 positions across 620 modules.
After the execution of the algorithm, it was found that there were 3 times in which an internal deadlock was raised:
A case where two modules were waiting to fill a slot in which the highest ranked candidate had the module as a second preference (module M1 was waiting for tutor T1 that had M2 module as his/her first preference, while module M2 was waiting for tutor T2 that had M1 module as his/her first preference).
A case where three modules were waiting to fill a slot in which the highest ranked candidate did not have the module as his/her first preference (module M1 was waiting for tutor T1, who had the M2 module as first preference, while module M2 was waiting for tutor T2, who had the M3 module as first preference. Finally, module M3 was waiting for T3, who had M1 as first preference).
A case where more than three modules (four modules) were waiting for similar reasons.
The different policies that may be applied by the algorithm resulted in some noticeable differences in the final assignment list. In the case of two modules, it was noticed that if the Institute’s policy gives priority to tutors’ preferences, then M1 will match with T2 and M2 with T1 even if both are second in the modules rankings. On the other hand, if priority is given to module rankings, then M1 will match with T1 and M2 with T2, which means that the Institute wants to respect module candidates’ evaluation and pick the best tutor for each module regardless of the tutors’ preferences. A third option of the institute’s priority was to check if tutors are already in contract with the Institute at a particular module and then decide to give the tutor the opportunity to keep teaching in the same module. If not, the algorithm will apply to one of the two aforementioned policies.
In the remaining two cases, there were similar observations; however, it is worth mentioning that when a deadlock is addressed by applying the solution for the first teacher that is being examined, the next step is to re-execute the entire first stage of the algorithm. That means that the rest of the pending candidates that are related to a particular deadlock are most likely to be automatically assigned to a module according to the initial principles of the algorithm (commitment from both sides). In simple words, by handling only one of the pending candidates of a deadlock, the rest of the candidates involved in the same deadlock are likely to be automatically assigned to the next rounds of the algorithm.
In general, the appliance of the algorithm to the Institute teacher assignment problem was helpful in terms of time and errors. The 3 cases in which the algorithm detected no maximal matching were indicated, and the Institute was able to monitor the final assignments in any different available policy. In this assignment period, the institute decided to use the user preference priority since, firstly, it has been ensured that the modules will not lose any critical educational quality level by not picking up the first available candidate.
To evaluate the effectiveness of the algorithm and to control the time required for its execution, assignment data from previous years, in which the final assignment had been carried out manually, were used. In addition, to compare PAMA with other algorithms, a classic example of the deferred acceptance (DA) algorithm was chosen, the Gale–Shapley (GS), which seems to be the most suitable for solving the specific problem.
The execution results of the two algorithms are shown in
Table 6. Compared to the GS algorithm, PAMA produces almost the same assignments. In the last column, “Differences” are defined as the number of different matches between the two algorithms. The differences that arise in some academic periods are due to deadlock cases. In such cases, depending on HOU’s resolution policy, the outcome may be the exact same result (if candidate’s preferences are first considered) or a different one (if module rankings or the candidate’s current position, if they are already employed at the institution, are taken into account). These deadlocks in the GS algorithm are typically resolved by assigning candidates to their top preferences, not to the best-ranked tutors. The key difference between the two algorithms is that PAMA does not prioritize the proposing side (tutors’ preferences). For instance, in the academic year 2021–2022, the two differences between the two algorithms in GS refer to assignments made to tutors who had the module as their first choice. This illustrates that PAMA operates successfully and fulfills its intended purpose: making assignments and identifying special cases where the Hellenic Open University (HOU) may intervene in the assignment process.
The execution time of PAMA is very short for the datasets related to assignments at HOU but appears significantly longer compared to the execution time of the G-S algorithm. The choice of round-based execution, as well as the re-execution of the entire first phase after resolving each deadlock, seems to have a significant impact on execution time. Nevertheless, the application of the algorithm in this specific use case is considered to have a negligible execution time.
6. Conclusions
The PAMA algorithm offers a novel solution to the tutor–module assignment problem by integrating maximal and stable matching principles with pending status and deadlock resolution in a unified process. This approach reframes deadlocks from being mere obstacles to serving as strategic tools for enforcing institutional policies while maintaining fairness by honoring ranking orders and balancing preferences, ultimately enhancing satisfaction for both tutors and the institution.
While its successful application at the Hellenic Open University, PAMA does have limitations, the algorithm prioritizes the preferences of tutors, and in specific cases, when the available slots exceed the total number of tutors, it is possible for a module to be left without assigned tutors. In such cases, a future improvement could involve implementing a restriction that ensures modules are not left completely empty but instead have partial assignments, thus covering some slots in a proportional manner. Another limitation of the algorithm is its sensitivity to the way tutor preferences are formulated. The algorithm emphasizes satisfying these preferences, which, however, may be random or defined by the tutors without much consideration. Finally, the algorithm has a complexity of O(M ∗ T ∗ P), which is generally acceptable, but for very large-scale applications, it may become computationally expensive.
Future research efforts involve the utilization of multi-criteria optimization techniques to provide more balance in requirements and preferences, considering parameters such as prior teaching experience, minimizing changes in successful assignments from past years, student evaluation, and learning outcomes. Moreover, effort will also be made to support quota-based candidate allocations (for example, ensuring that 10% are early-career scientists).
Dynamic methods are another promising approach where adaptive mechanisms change algorithm parameters dynamically according to prior performance. Considering measures such as drop out and module completion rate, the algorithm would learn automatically to adjust the balance between tutor preferences and module rankings. This approach would create a feedback loop in which well-performing assignment patterns are reinforced, and poor-performing ones are updated, leading to continuous improvement within the matching process and improved academic performance from one academic term to the next.
Machine learning algorithms could address this automatically, predicting tutors’ preferences based on historical teaching assignments, academic backgrounds, and research interests, eliminating the need for explicit preference collection. Apart from that, standards of fairness would assist in dealing with equity problems by distributing the same percentage of introductory and advanced courses to every faculty member in a way that prevents the conditions where new tutors receive only large introductory classes and veteran faculty receive only small, advanced classes. These metrics would also monitor gender balance in high-profile course assignments to construct a more equitable learning climate supportive of faculty growth at all career stages.