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 of
https://github.com/j2kun/stable-marriagesallowing to compute the outcome of a school choice problem in which schools have many seats available following the Deferred-Acceptance procedure. The only difference with
stablemarriage.pylies in the naming of the classes, which has been altered to fit with the school choice context (classes
IASolver.py: a variation on
stablemarriage.pyallowing to compute the outcome of a school choice problem using the Immediate Acceptance procedure, also know as Boston Mechanism. Another difference with
stablemarriage.pyis the addition of a
verboseoption to the main function in
IASolver.pywhich prints a description of the steps followed by the Immediate Acceptance procedure as the procedure unfolds.
Extensions.md: describes how to use
IASolver.pyin 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.