Stable Matching Generator | Gale-Shapley Algorithm Visualizer

Home ยป Stable Matching Generator | Gale-Shapley Algorithm Visualizer

Stable Matching Generator

Calculate stable pairs using the Gale-Shapley Algorithm.

Recommended: 3โ€“10 for optimal display.

Rank 1 = Top Choice

Matches

0

Group A Satisfaction

0.0 (Avg Rank)
Match Results:

How to Use the Stable Matching Generator

This tool solves the Stable Marriage Problem. It guarantees that for two groups of equal size (N), everyone is matched in a way where no two people would prefer each other over their assigned partners.

The Process

  • Step 1: Define your groups (e.g., "Students" and "Colleges") and how many are in each group.
  • Step 2: Input preferences. Rank 1 is the highest preference. Rank N is the lowest.
  • Step 3: Click Calculate. The tool runs the Gale-Shapley Algorithm instantly.

Understanding the Results

The algorithm used here is Proposer-Optimal. This means if Group A makes the proposals, the algorithm finds the best possible stable outcome for Group A, but the least preferred stable outcome for Group B.

Common Applications

  • Residency Matching: Pairing medical graduates with hospitals.
  • Server Allocation: Assigning tasks to servers based on latency and load.
  • Education: Assigning students to electives or schools.

 

Read Also: