Question: slove it using java language. Assume that there are n men and n women that wish to be paired, that is, to marry. The algorithm

slove it using java language.
Assume that there are n men and n women that wish to be paired, that is, to marry. The algorithm will be placed in the role of a metaphorical matchmaker. First, the traditional notion of marriage is used, i.e., the outcome of the process will be a full pairing, one man to one woman and vice versa. Second, assume that there is some notion of preference involved. This will be modeled by assuming that each man provides a rank ordering of the women according to decreasing preference level and vice versa. Consider the following example. There are three men in the system: Brad Pitt (B), Robin Williams (W), and Leonardo DiCaprio (D). There are three women: Angelina Jolie (A), Kate Winslet (K), and Sunny Leone (L). Here are their rank orderings (from most to least desired). Man Brad (B) Williams (W) DiCaprio (D) K K L A L K L A A Woman Kate (K) Angelina (A) Leone (L) D D B B W W W B D
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
