Gale-Shapley Algorithm

 

Title: Gale-Shapley Algorithm
Author: Tobias Nipkow
Submission date: 2021-12-29
Abstract: This is a stepwise refinement and proof of the Gale-Shapley stable matching (or marriage) algorithm down to executable code. Both a purely functional implementation based on lists and a functional implementation based on efficient arrays (provided by the Collections Framework in the AFP) are developed. The latter implementation runs in time O(n2) where n is the cardinality of the two sets to be matched.
BibTeX:
@article{Gale_Shapley-AFP,
  author  = {Tobias Nipkow},
  title   = {Gale-Shapley Algorithm},
  journal = {Archive of Formal Proofs},
  month   = dec,
  year    = 2021,
  note    = {\url{https://isa-afp.org/entries/Gale_Shapley.html},
            Formal proof development},
  ISSN    = {2150-914x},
}
License: BSD License
Depends on: Collections, List-Index