solutions to the marriage problems