Question: Programming Problenm Stable Marriage Using Backtracking The Problem: You have n men and n woman, and their preference rankings of each other, and you need




Programming Problenm Stable Marriage Using Backtracking The Problem: You have n men and n woman, and their preference rankings of each other, and you need to match them up so that the total matching is "stable." The preference rankings: You are given 2 n X n arrays, mp (men's preference) which gives the men's ranking of the women, and wp (women's preference) which gives the women's ranking of the men So mpii] gives man i's ranking of woman j and likewise for the women's ranking of the men in wp. For example in the following tables we have n-3 and the women and men are "named" 0, 1 or 2 and the raking are in the range 0 highest, 1 second highest and 2 lowest. Programming Problenm Stable Marriage Using Backtracking The Problem: You have n men and n woman, and their preference rankings of each other, and you need to match them up so that the total matching is "stable." The preference rankings: You are given 2 n X n arrays, mp (men's preference) which gives the men's ranking of the women, and wp (women's preference) which gives the women's ranking of the men So mpii] gives man i's ranking of woman j and likewise for the women's ranking of the men in wp. For example in the following tables we have n-3 and the women and men are "named" 0, 1 or 2 and the raking are in the range 0 highest, 1 second highest and 2 lowest
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
