Problem
The Problem
You have job applicants and positions. Each applicant has a strict ranking of positions (most to least preferred), and each position has a strict ranking of applicants.
Use the Gale-Shapley deferred acceptance algorithm to find a stable matching. Prove:
- The algorithm always terminates with a stable matching.
- The matching is applicant-optimal: among all stable matchings, every applicant gets the best position they could get in any stable matching.
- The matching is position-pessimal: among all stable matchings, every position gets the worst applicant they could get in any stable matching.
(Stability: no applicant-position pair where prefers to their current match AND prefers to their current match.)