Devise a greedy algorithm that determines the fewest


Question: a) Devise a greedy algorithm that determines the fewest lecture halls needed to accommodate n talks given the starting and ending time for each talk.

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.

Solution Preview :

Prepared by a verified Expert
Mathematics: Devise a greedy algorithm that determines the fewest
Reference No:- TGS02363925

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)