{"id":28158269,"url":"https://github.com/kyosek/deferred_acceptance_school_choice","last_synced_at":"2025-10-12T02:13:52.672Z","repository":{"id":40365151,"uuid":"484574226","full_name":"kyosek/deferred_acceptance_school_choice","owner":"kyosek","description":"Python implementation of deferred acceptance algorithm for school choice problem","archived":false,"fork":false,"pushed_at":"2022-08-04T19:58:26.000Z","size":31,"stargazers_count":13,"open_issues_count":9,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-13T06:11:32.818Z","etag":null,"topics":["deferred-acceptance-algorithm","gale-shapley-algorithm","mechanism-design","school-choice-problem"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyosek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-22T21:18:08.000Z","updated_at":"2025-08-25T04:11:28.000Z","dependencies_parsed_at":"2022-07-27T16:18:41.497Z","dependency_job_id":null,"html_url":"https://github.com/kyosek/deferred_acceptance_school_choice","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyosek/deferred_acceptance_school_choice","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosek%2Fdeferred_acceptance_school_choice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosek%2Fdeferred_acceptance_school_choice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosek%2Fdeferred_acceptance_school_choice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosek%2Fdeferred_acceptance_school_choice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyosek","download_url":"https://codeload.github.com/kyosek/deferred_acceptance_school_choice/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyosek%2Fdeferred_acceptance_school_choice/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279009929,"owners_count":26084668,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deferred-acceptance-algorithm","gale-shapley-algorithm","mechanism-design","school-choice-problem"],"created_at":"2025-05-15T09:16:41.372Z","updated_at":"2025-10-12T02:13:52.640Z","avatar_url":"https://github.com/kyosek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deferred Acceptance algorithm for school choice\nPython implementation of Deferred Acceptance algorithm (Gale and Shapley, 1962) for school choice.\n\nThe medium blog about this repo can be found [here](https://medium.com/@kyosuke1029/the-deferred-acceptance-da-algorithm-utilised-in-school-choice-with-python-afc0fe892921).\n## Introduction\nThe study of matching investigates stable matchings among people, institutes and goods. Starting with Gale and Shapley (1962)’s deferred acceptance (DA) algorithm, this study has been successfully utilised in the real world, especially in school choice since the early 2000s.\nThis repo covers (so far):\n- DA algorithm for school choice (student optimal)\n- DA algorithm with random tie-break lotteries\n- Examples of above algorithms usage\n\n## Usage\n### [Simple DA algorithm](/examples/simple_school_choice.py)\nAfter input student and school's preference and schools' quota,\n```python\nfrom deferred_acceptance.deferred_acceptance import deferred_acceptance\nfrom deferred_acceptance.utils import create_dataframes\n\n\nstudents_df, schools_df = create_dataframes(\n        students_list=students_list,\n        students_preferences=students_preferences,\n        schools_list=schools_list,\n        schools_preferences=schools_preferences,\n    )\nmatches = deferred_acceptance(\n        students_df=students_df, schools_df=schools_df, schools_quota=schools_quota\n    )\n```\n\n### [DA algorithm with random tie-break lotteries](/examples/tie_break_school_choice.py)\n```python\nfrom deferred_acceptance.deferred_acceptance import deferred_acceptance\nfrom deferred_acceptance.utils import create_dataframes, tie_break\n\n\nstudents_df, schools_df = create_dataframes(\n        students_list=students_list,\n        students_preferences=students_preferences,\n        schools_list=schools_list,\n        schools_preferences=schools_preferences,\n    )\n\nstrict_school_df = tie_break(schools_df)\nmatches = deferred_acceptance(\n    students_df=students_df,\n    schools_df=strict_school_df,\n    schools_quota=schools_quota,\n)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyosek%2Fdeferred_acceptance_school_choice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyosek%2Fdeferred_acceptance_school_choice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyosek%2Fdeferred_acceptance_school_choice/lists"}