Question: Here is an algorithm that attempts to produce a stable matching between N hospitals and N students. 1. Let M be an arbitrary initial matching

Here is an algorithm that attempts to produce a stable matching between N hospitals and N students. 1. Let M be an arbitrary initial matching between hospitals and students; 2. Let (h,s) and (h', s') be arbitrary pairs in M such that (h, s') form an unstable pair with respect to M, i.e., an unmatched pair such that both parties prefer each other over their current match. If no such pair exists, halt with output M. 3. Modify M by swapping the assignments; remove the previous two pairs, and add two new pairs matching (h, s') and (h',s) 4. Goto line 2. We will show that this algorithm can run forever without producing a stable matching even for N=3. To accomplish this task, denote the hospitals as H = {h1, h2, h3}, and the students as S = {S1,S2,S3} Construct a counterexample by completing the following parts. (a) Fill in the blanks in the following preference lists for your counterexample. The leftmost entry is the most preferred; the rightmost is the least. Solution: hi: S1: h2 S2: 13: S3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
