This project helps students find suitable matches with their preferred projects based on their preferences and the project requirements. The Flask web application that we built together is accessible at www.studentprojectmatching.com.
Load Data:
student_prefs
), project preferences (project_prefs
), project capacities (project_capacity
), and project availability (project_availability
).Setup Structures:
matches
dictionary to track which student is assigned to which project.project_assignments
to manage lists of students assigned to each project.Prepare Student Queue:
unassigned_students
for processing.Process Unassigned Students:
unassigned_students
:
Assignment Attempt:
matches
and project_assignments
.project_availability
.matches
and project_assignments
accordingly.Handle Reassignments and Requeued Students:
matches
dictionary showing the assignment of students to projects after all possible assignments and reevaluations are complete.See Abraham, David J., Robert W. Irving, and David F. Manlove. “Two Algorithms for the Student-Project Allocation Problem.” Journal of Discrete Algorithms 5, no. 1 (March 1, 2007): 73–90. https://doi.org/10.1016/j.jda.2006.03.006.
Given a set of n proposers (students) and recipients (projects), each with their own preferences, our goal following the Gale-Shapley algorithm was to to find an assignment such that: Each student ends up with exactly one project. In this case a project may allocate more than one student, but not vice versa. This is known as a stable matching. Its applications range from economics and networks to medical school assignments. The Gale-Shapley Algorithm proposes a greedy solution to this. We process students arbitrarily and go down each proposer's list of preferences for recipients. In each round, if a recipient is free, this (proposer, recipient) pair becomes temporarily "engaged". If the recipient is already engaged, it will leave (and thus free) its current partner only if it prefers this proposer more. This process continues until all n proposers and recipients are engaged with one other person. It is proven to produce a unique and optimal solution. It runs in quadratic time. For more information visit gale-shapley.com .