Answered step by step
Verified Expert Solution
Question
1 Approved Answer
We consider an extended version of the activity selection problem discussed during the lecture in week 3. We have a set of lectures {a_1, a_2,
We consider an extended version of the activity selection problem discussed during the lecture in week 3. We have a set of lectures {a_1, a_2, ..., a_n} and more than n lecture halls. Each lecture has a start and finish time and we cannot schedule lectures that overlap in the same lecture hall. We want to schedule all the lectures using as few lecture halls as possible. A set X of lectures is compatible in S if X Subsetequalto S and no two lectures in X overlap. As a starting point, the lecturer of COMP333 proposes the following recursive solution: range over the set of compatible subsets of lectures and for each such set compute an optimal for the remaining set of lectures. Formally: OptSchedule(S) = min_X compatible in S (1 + OptSchedule(S \ X)) We want to prove optimal sub-structure for this solution. Prove that an optimal solution for S includes optimal solutions for X (a compatible set of lectures)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started