stable matching

Straightforward implementation of Gale-Shapley "stable marriage" algorithm.

You are now following this Submission

A matching is a mapping from the elements of one set to the elements of the other set.
A matching is stable whenever it is not the case that both:
a.some given element A of the first matched set prefers some given element B of the
second matched set over the element to which A is already matched, and
b. B also prefers A over the element to which B is already matched

The matching in this case is according to men's preferences, to change it according
to women's preferences some trivial changes need to be made.

Cite As

Hanan Kavitz (2026). stable matching (https://www.mathworks.com/matlabcentral/fileexchange/34014-stable-matching), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired: Gale Shapley Stable Marriage Algorithm

Categories

Find more on Graph and Network Algorithms in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0