| CPSC 320: Analysis of Algorithms | Spring 2026 |
(a) If $S$ is a stable matching returned by the Gale–Shapley algorithm, then $S$ contains a pair $(a, b)$ of a computer science major $a$ and an engineering major $b$ such that $a$ and $b$ are the top-ranked choices of each other.
(b) Consider an instance of the stable matching problem in which there are a computer science major $a$ and an engineering major $b$ such that $a$ and $b$ are the top-ranked choices of each other. Then the Gale–Shapley algorithm returns a stable matching $S$ containing the pair $(a, b)$.
(a) Prove that there is always such a stable pairing of students, and give an efficient algorithm to find one.
(b) Give an instance under which there is no such stable pairing. Prove your claim.
Applicants $\alpha$ and $\beta$ are assigned to colleges $A$ and $B$, respectively, although $\beta$ prefers $A$ to $B$, and $A$ prefers to $\beta$ to $\alpha$.Prove that there is always such a stable assignment of applicants to colleges, and give an efficient algorithm to find one.
|
|
CPSC 320 home page |
|
|