The Gale-Shapley algorithm is a deferred-acceptance algorithm that computes a stable matching between two equally sized sets of agents, such as job applicants and employers, where no unmatched pair would both prefer each other over their current assigned partners. Conceived by David Gale and Lloyd Shapley in 1962, it guarantees a pairwise stable solution, meaning it eliminates blocking pairs that could undermine the matching's integrity. The algorithm operates through iterative proposals from one set to the other, with agents tentatively accepting or rejecting offers based on their ranked preference lists.
