Gale-Shapley Algorithm Demonstration (source)

Gale-Shapley provides a solution to the stable marriage problem. It can be used to pair items from two sets. In the stable marriage problem, boys are to be matched with girls, but obviously Gale-Shapley can be (and is) used in many different scenarios.


Once the problem is setup, by clicking the Setup button, there will be a number of rows created.

  1. Type in a new name (or leave the default) for each row.
  2. Select preferences for each item, highest first to lowest last.

Thanks to Bart van Houte for finding a rather major bug in the original version of this.