[Paper Review] A Collection of Constraint Programming Models for the Three-Dimensional Stable Matching Problem with Cyclic Preferences
This paper introduces an efficient n-ary constraint, SM2N, for the stable marriage problem that enforces stability and avoids bigamy using only one constraint per instance. It achieves optimal O(n²) time complexity for arc-consistency and outperforms Boolean encodings in both speed and space efficiency, enabling scalable solution of large instances (up to n=2000) and supporting integration into larger optimization problems like the sex-equal stable marriage problem.
We introduce five constraint models for the 3-dimensional stable matching problem with cyclic preferences and study their relative performances under diverse configurations. While several constraint models have been proposed for variants of the two-dimensional stable matching problem, we are the first to present constraint models for a higher number of dimensions. We show for all five models how to capture two different stability notions, namely weak and strong stability. Additionally, we translate some well-known fairness notions (i.e. sex-equal, minimum regret, egalitarian) into 3-dimensional matchings, and present how to capture them in each model. Our tests cover dozens of problem sizes and four different instance generation methods. We explore two levels of commitment in our models: one where we have an individual variable for each agent (individual commitment), and another one where the determination of a variable involves pairing the three agents at once (group commitment). Our experiments show that the suitability of the commitment depends on the type of stability we are dealing with. Our experiments not only led us to discover dependencies between the type of stability and the instance generation method, but also brought light to the role that learning and restarts can play in solving this kind of problems.
Motivation & Objective
- To develop a more efficient and practical constraint encoding for the stable marriage problem than existing Boolean encodings.
- To enable the use of stable marriage constraints within larger, richer constraint satisfaction problems.
- To support the first constraint-based study of the sex-equal stable marriage problem (SESMP).
- To achieve optimal time complexity while significantly reducing space and computation time compared to prior encodings.
Proposed method
- Propose a specialized n-ary constraint, SM2N, that enforces stability and non-bigamy between n men and n women using preference lists.
- Use inverse preference lists (mPw, wPm) to enable O(1) access to preference rankings during constraint propagation.
- Implement the constraint using standard constraint programming primitives: getMin, getMax, setMax, setVal, remVal, and arc-consistency propagation via AC5 or AC3.
- Leverage the call stack mechanism to trigger constraint propagation only when domain changes occur, ensuring efficiency.
- Extend the minimal encoding to support search and embedding in larger problems by adding minimal code to maintain both male- and female-oriented Gale-Shapley lists.
- Apply the constraint to solve the sex-equal stable marriage problem by minimizing the absolute difference between men's and women's total match scores.
Experimental results
Research questions
- RQ1Can a single n-ary constraint achieve optimal O(n²) time complexity for arc-consistency in the stable marriage problem?
- RQ2How does the SM2N constraint compare in performance and space efficiency to the Boolean encoding in [3]?
- RQ3Can the SM2N constraint be effectively used in search and embedded within larger, richer constraint problems?
- RQ4Is the SM2N constraint capable of solving large-scale stable marriage instances (e.g., n=2000) efficiently?
- RQ5Can the SM2N constraint be used to model and solve the sex-equal stable marriage problem (SESMP) effectively?
Key findings
- The SM2N constraint achieves O(n²) time complexity for arc-consistency, matching the theoretical optimum of the Boolean encoding in [3], but with significantly better practical performance.
- For n=2000, the SM2N model solved all solutions in an average of 20.19 seconds for the standard stable marriage problem, while the Boolean encoding failed at n=300.
- The SM2N model required only O(n) variables and O(n²) constraints, whereas the Boolean model required O(n²) variables and O(n²) constraints, making SM2N far more space-efficient.
- The SM2N constraint solved the sex-equal stable marriage problem (SESMP) for n=2000 in an average of 22.44 seconds, demonstrating its viability for complex optimization extensions.
- The SM2N constraint outperformed the SM2 model by over 15 times at n=1000, confirming its superiority in both time and space efficiency.
- The constraint is natively compatible with major constraint programming toolkits (e.g., Choco, JSolver, Koalog), enabling broad applicability.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.