Question: 1. (25) (Interval partitioning: earliest finish time first) Consider the earliest-finish-time-first greedy strategy for the interval partitioning algorithm shown below, and prove or disprove if

1. (25) (Interval partitioning: earliest finish time first) Consider the earliest-finish-time-first greedy strategy for the interval partitioning algorithm shown below, and prove or disprove if this strategy is optimal. Hint: remember we used a structural bound called depth", which denotes the largest number of intervals overlapping at any time. IntvlPart(intervals): Sort intervals by finish time so f (1) = c.lastFin ) // c is compatible with j c. Lecs.insert(j) Q.increaseKey (c, f(j)). else cnew = new classroom ({j}, f(j))) // add a new classroom Q.insert (cnew) d = d + 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
