GaleShapley's Algorithm

In mathematics, economics, and computer science, the Gale–Shapley algorithm (also known as the deferred acceptance algorithm, propose-and-reject algorithm, or Boston Pool algorithm) is an algorithm for finding a solution to the stable matching problem.

Gale–Shapley algorithm - Wikipedia

Python 実装は下記が充実してる.

GitHub - daffidwilde/matching: A package for solving matching games

ドキュメントも良い.The stable marriage problem, The hospital-resident assignment problem, The stable roommates problem, The student-allocation problem, などの説明

matching - Welcome to the matching documentation!

これとは別に,割と新しいレポジトリを見つけた

GitHub - oedokumaci/gale-shapley: Python implementation of the Gale-Shapley Algorithm.