GaleShapley
Gale-Shapley algorithm, or the Deferred Acceptance algorithm, is a solution to the stable matching problem introduced by David Gale and Lloyd Shapley in 1962. It finds a stable matching between two disjoint sets of agents, typically men and women, each with a ranked preference list over members of the other set. A matching is stable if there is no pair of agents who would both prefer to be with each other rather than with their assigned partners.
In the standard version, one side (the proposers) repeatedly proposes in order of their preferences to the
When finished, the resulting matching is stable: no two agents would prefer each other over their current
Extensions include many-to-one versions (hospital-residents), incomplete preference lists, ties, and variants with randomized tie-breaking. It has