Module org.maxicp

Class StableMarriage

java.lang.Object
org.maxicp.cp.examples.modeling.StableMarriage

public class StableMarriage extends Object
Stable Marriage problem: Given n women and n men, where each woman (resp. man) has ranked each man (resp. woman) with a unique number between 1 and n in order of preference (the lower the number, the higher the preference), say for summer internships, match the women and men such that there is no pair of a woman and a man who would both prefer to be matched with each other than with their actually matched ones. If there are no such pairs, then the matching is said to be stable. Wikipedia.
  • Constructor Details

    • StableMarriage

      public StableMarriage()
  • Method Details

    • main

      public static void main(String[] args)