Not even if you are the last man on earth!\" Suppose we make a variation to the
ID: 3910788 • Letter: N
Question
Not even if you are the last man on earth!"
Suppose we make a variation to the stable marriage problem with n men and n women,
but now each man and woman is able to rank a subset of the other group, i.e. each preference
list contains [0; n] people.
If ma does not appear in wb's preference list, it means that wb prefers being single rather
than marrying ma, and likewise mc prefers being single rather than marrying wd if wd does
not appear on mc's preference list.
a) Describe a reduction to transform an instance of this problem into a standard
SMP instance which we can then attempt to solve using Gale-Shapley. You must describe
the process of creating the SMP instance, the worst-case running time of this transformation,
how you may potentially retrieve the solution to the original problem instance from the G-S
solution, and the worst-case running time of the solution transformation.
b) Create an interesting" instance of this matching problem with n = 4 (don't make it
just a standard SMP instance). Show your original instance, your transformed SMP instance,
and the solution you obtain for the original instance using this reduction. NOTE: an instance
of this problem is a set of agents and their preference lists.
c) Will this reduction always work to produce a stable result? If not, give a small
counterexample instance. If yes, then give a short proof of the major properties of the
reduction that demonstrate its correctness, using the proofs shown in class as guidelines for
your approach.
Explanation / Answer
a) A SMP(Simultaneous Multiprocessing) instance in which various processes work together simultaneously sharing a same memory space and using a common operating system.
If you think of the smallest possible instances, it usually guides you towards trivial instances. In SMP, the smallest possible instance has one man and one woman, but we can still reduce. Degenerate cases like zero men and zero women can be used which is also trivial.There's exactly one solution, in which no one is matched with anyone else. Regardless of their preferences which must be simply for each other, the only solution is for the one man to marry the one woman. So, zero men/women and one man/woman are the trivial instances.
Representation of solution :
The solution for a problem with n = 0 is the empty set of pairings {}.
So, in the worst case it runs in O(n^2 ) time
c) The Stable Marriage Problem states that given n men and n women, where each person has ranked all members of the opposite sex in order of preference, marry the men and women together such that there are no two people of opposite sex who would both rather have each other than their current partners. If there are no such people, all the marriages are stable.
Consider the below example :
Let there be two men m1 and m2 and two women w1 and w2.
Let m1‘s list of preferences be {w1, w2}
Let m2‘s list of preferences be {w1, w2}
Let w1‘s list of preferences be {m1, m2}
Let w2‘s list of preferences be {m1, m2}
The matching { {m1, w2}, {w1, m2} } is not stable because m1 and w1 would prefer each other over their assigned partners. The matching {m1, w1} and {m2, w2} is stable because there are no two people of opposite sex that would prefer each other over their assigned partners.
It is always possible to form stable marriages from lists of preferences.
Below given is the Gale–Shapley algorithm to find a stable matching:
The method is to iterate through all free men while there is any free man available. Every free man goes to all women in his preference list according to the order. For every woman he goes to, he checks if the woman is free, if yes, they both become engaged. If the woman is not free, then the woman chooses either says no to him or dumps her current engagement according to her preference list. So an engagement done once can be broken if a woman gets better option. Time Complexity of Gale-Shapley Algorithm is O(n2).
The algorithm is given below :
Input & Output: Input is a 2D matrix of size (2*N)*N where N is number of women or men. Rows from 0 to N-1 represent preference lists of men and rows from N to 2*N – 1 represent preference lists of women. So men are numbered from 0 to N-1 and women are numbered from N to 2*N – 1. The output is list of married pairs.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.