Gale Shapley Stable Marriage Algorithm

Implementation of the Gale-Shapley stable matching algorithm.
1,6K téléchargements
Mise à jour 11 nov. 2013

Afficher la licence

Given N men and N women, and the preferences of each of them over the members of the opposite gender, a stable matching is a matching between the N men and women such that there is no man and woman who prefer each other over their respectively matched partners.

The Gale-Shapley algorithm determines such a stable matching. Depending on the formulation, it provides either a men-optimal or a women-optimal stable matching. The given function determines the men-optimal stable matching. One can determine the women-optimal stable matching by switching the preferences in the input. An example is provided.

Citation pour cette source

Sanjith Gopalakrishnan (2024). Gale Shapley Stable Marriage Algorithm (https://www.mathworks.com/matlabcentral/fileexchange/44262-gale-shapley-stable-marriage-algorithm), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2009b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Remerciements

Inspiré par : stable matching

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0