This repository contains Python code to compute assignments for school choice problems Abdulkadiroglu and Sönmez (2003) according to different assignment procedures. It uses and modifies code from Jeremy Kun, stable-marriage, (2014), GitHub repository, https://github.com/j2kun/stable-marriages, described in one of Jeremy's blog posts at http://jeremykun.com/2014/04/02/stable-marriages-and-designing-markets/.
The main scripts in this repository are
DASolver.py
: an almost exact copy ofstablemarriage.py
fromhttps://github.com/j2kun/stable-marriages
allowing to compute the outcome of a school choice problem in which schools have many seats available following the Deferred-Acceptance procedure. The only difference withstablemarriage.py
lies in the naming of the classes, which has been altered to fit with the school choice context (classesSuitor
andSuited
becomeStudent
andSchool
).IASolver.py
: a variation onstablemarriage.py
allowing to compute the outcome of a school choice problem using the Immediate Acceptance procedure, also know as Boston Mechanism. Another difference withstablemarriage.py
is the addition of averbose
option to the main function inIASolver.py
which prints a description of the steps followed by the Immediate Acceptance procedure as the procedure unfolds.Extensions.md
: describes how to useDASolver.py
andIASolver.py
in settings where- The total number of seats in all the schools is smaller than the total number of students, and some students end up unassigned.
- The school choice procedure are constrained in the sense that students can only rank a subset of schools.
- Some schools are not acceptable to some students.
- Abdulkadiroglu, Atila, and Tayfun Sönmez. "School choice: A mechanism design approach." The American Economic Review 93.3 (2003): 729-747.
- Haeringer, Guillaume, and Flip Klijn. "Constrained school choice." Journal of Economic Theory 144.5 (2009): 1921-1947.