MyVIPWebTools logo

Stable Marriage Problem Solver — Find a Stable Matching Between Two Groups

Our Stable Marriage Problem Solver finds a matching between two equal-sized groups — proposers and reviewers — such that no pair would both prefer each other over their assigned match, using the Gale-Shapley deferred-acceptance algorithm, given each participant's ranked preference list over the other group.

Quick Answer

Enter ranked preference lists for two equal-sized groups to instantly find a stable matching via the Gale-Shapley algorithm.

One line per proposer: Name: pref1, pref2, ... ranking every reviewer, e.g. A1: B2, B1, B3.

One line per reviewer: Name: pref1, pref2, ... ranking every proposer, e.g. B1: A3, A1, A2.

How to Use the Stable Marriage Problem Solver — Gale-Shapley Algorithm Online

  1. 1

    Enter each proposer's preferences as one line: Name: pref1, pref2, pref3, ... (ranked from most to least preferred).

  2. 2

    Enter each reviewer's preferences the same way, ranking every proposer.

  3. 3

    Click 'Calculate' to find a stable matching via the Gale-Shapley algorithm.

Why Use Stable Marriage Problem Solver — Gale-Shapley Algorithm Online?

A matching between two groups is 'stable' if there's no pair who would both rather be matched to each other than to their current assigned partners — such a pair would have an incentive to break their existing matches, making the pairing unstable. The Gale-Shapley algorithm always finds a stable matching (a foundational result that earned the 2012 Nobel Prize in Economics): each unmatched proposer proposes to their top remaining choice, each reviewer tentatively accepts their best offer so far and rejects the rest (even bumping a previous match if a better offer arrives), and this repeats until everyone is matched. The result is not just stable but proposer-optimal — every proposer gets the best partner they could possibly have in any stable matching.

Frequently Asked Questions

Related Tools

Stable Marriage Problem Solver — Gale-Shapley Algorithm Online | MyVIPWebTools