a) Devise a greedy algorithm that determines the fewest lecture halls needed to accommodate n talks given
Question:
b) Prove that your algorithm is optimal. Suppose we have s men m1,m2, . . . , ms and s women w1,w2, . . . ,ws .We wish to match each person with a member of the opposite gender. Furthermore, suppose that each person ranks, in order of preference, with no ties, the people of the opposite gender.We say that a matching of people of opposite genders to form couples is stable if we cannot find a man m and a woman w who are not assigned to each other such that m prefers w over his assigned partner and w prefers m to her assigned partner.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Discrete Mathematics and Its Applications
ISBN: 978-0073383095
7th edition
Authors: Kenneth H. Rosen
Question Posted: