csci 570
Stable Matching Problem
Context: Originated from medical residency pairings; involves matching two equal-sized sets (e.g., men and women) where each person has strict preferences over the opposite set.
Goal: Find a perfect matching (everyone is paired) that is stable, meaning no unmatched pair prefers each other over their current partners.
Key Terminology:
Matching: A set of disjoint pairs.
Perfect matching: Every individual in both sets is paired.
Bipartite graph: Two disjoint sets (e.g., men and women).
Stability: A perfect matching with no blocking pair.
Blocking pair (instability): An unmatched pair where $M prefers $W to his current partner, and $W prefers $M to her current partner.
Complete preference order: Each individual ranks all opposite-sex members without ties.
Core Concepts and Definitions
A stable matching is a perfect matching without instability.
Existence: At least one stable matching always exists (proven by Gale-Shapley).
Uniqueness: Stable matchings are not always unique; multiple can exist.
Real-world alignment: Stability prevents blocking coalitions, ensuring the matching holds.
Problem Setup
Examples include students and internships.
Key assumptions: equal numbers of individuals on both sides for a perfect matching, and strict preferences without ties.
The Gale–Shapley Algorithm
Core idea: An iterative process where one side (e.g., men) proposes to the other (women) based on their preference lists.
Procedure:
Free men propose to their highest-ranked available women.
Women either accept (if free or if the proposer is preferred to current fiancé, freeing the old fiancé) or reject.
This continues until all men are engaged.
Engagement behavior: Women's partners only improve; men's proposals move down their lists.
Termination: Guaranteed within iterations because each rejected proposal is unique and not repeated.
Result: The algorithm always produces a perfect and stable matching by ensuring no free men remain and no blocking pairs can exist due to the proposal/acceptance logic.
Key Empirical Observations
Proposer's advantage: The proposing side generally achieves their best possible stable matching, while the other side gets their worst.
Non-uniqueness: Multiple stable matchings can exist; Gale-Shapley finds one, not necessarily all.
Complexity and Practical Notes
Time complexity: . Space complexity: .
Focus is on algorithmic structure, often via pseudocode.
Counterpoints and Fairness Considerations
The algorithm isn't inherently 'fair'; the choice of proposer impacts outcomes, raising ethical considerations for real-world applications where other objectives like general utility might be prioritized.
Worked Examples
Illustrations with 2x2 cases show that stable matchings prioritize structural stability over universal satisfaction, and multiple stable outcomes are possible.
Variations and Extensions
Extensions include scenarios like multiple openings per company (treated as separate slots) and handling ties in preferences (requires algorithm modification or relaxed stability definitions).
Proof Techniques Overview
Common proof techniques include direct proofs, proofs by cases, induction, indirect proofs (contradiction), and contrapositive proofs.
Direct Proofs
Structure: Assume the hypothesis and logically derive the conclusion.
Example: If and , then , which is even. Also, if and are even, then is even.
Proofs by Cases
Structure: Break a statement into exhaustive cases and prove each case. Often used with parity (even/odd) arguments.
Induction (Mathematical Induction)
Structure: Proves statements for natural numbers (base case for , Inductive Hypothesis for , Inductive Step for ).
Example: Sum of first natural numbers is . For : .
Indirect Proofs and Proof by Contradiction
Structure: Assume the hypothesis AND the negation of the conclusion, then derive a contradiction.
Example: To prove infinitely many primes, assume a finite list . Consider ; it must have a prime factor not in the list, a contradiction.
Contrapositive Proofs
Idea: Proving 'If A then B' by proving 'If not B then not A'.