🧩 Constraint Solving POTD:🤝 Constraint Problem of the Day: The Stable Marriage Problem #38832
Closed
Replies: 1 comment
-
|
This discussion has been marked as outdated by Constraint Solving — Problem of the Day. A newer discussion is available at Discussion #39071. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Constraint Problem of the Day: The Stable Marriage Problem
Problem Statement
The Stable Marriage Problem (SMP) asks: given
nmen andnwomen, each with a ranked preference list of all members of the opposite gender, find a stable matching where no man-woman pair would rather be with each other than their current partners.Concrete Instance (4×4)
Men's preferences:
Women's preferences:
Goal: Find a pairing such that no unmarried couple mutually prefer each other over their current spouses.
Input/Output Specification
M[i][j]andW[i][j]whereM[i][j]is mani's preference rank of womanj(1 = most preferred)πwhere womanπ(i)is matched to mani) that is stable (no blocking pairs)Why It Matters
Real-world applications:
Modeling Approaches
Approach 1: Constraint Programming (Declarative)
Model the problem using finite domain variables and global constraints:
Trade-offs:
Approach 2: Graph Theory / Matching Algorithm (Constructive)
Use the Gale-Shapley algorithm, a polynomial-time greedy procedure:
Trade-offs:
Key Techniques
1. Stability Checking via Blocking Pair Enumeration
After any proposed matching, verify stability by checking all
O(n2)potential blocking pairs. A pair(m, w)blocks the matching if both prefer each other to their current partners. This is the verification step in both algorithmic and CP-based approaches.2. Symmetry Breaking & Preference Reduction
wprefers womanw'to all men, we can prune proposals from men she ranks beloww'.3. Local Search & Randomization
For extensions (weighted SMP, many-to-one matching), use local search to escape local optima:
Challenge Corner
Open Questions for Readers:
Fairness & Optimality: The Gale-Shapley algorithm favors proposers (men). Can you design or prove existence of a fair stable matching that maximizes the minimum preference rank across all participants?
Weighted Extensions: Suppose each man-woman pair has a "happiness weight" reflecting mutual preference strength. How would you model finding the stable matching with maximum total happiness? (Hint: combine SMP stability constraints with MIP objectives.)
Many-to-One: How would you extend the model to allow women to accept multiple men (e.g., hospitals with multiple residency slots)? What new blocking pair definitions emerge?
References
Gale, D. & Shapley, L. S. (1962). "College Admissions and the Stability of Marriage." American Mathematical Monthly, 69(1), 9–15.
Roth, A. E. & Sotomayor, M. A. O. (1990). Two-Sided Matching: A Study in Game-Theoretic Modeling and Analysis. Cambridge University Press.
Irving, R. W. (1985). "An Efficient Algorithm for the 'Stable Roommates' Problem." Journal of Algorithms, 6(4), 577–595.
Constraint Programming for Operations Research tutorials (e.g., OR-Tools, MiniZinc docs)
Happy solving! Share your thoughts on fairness in matching or extensions you'd explore. 🤝
Beta Was this translation helpful? Give feedback.
All reactions