Pls write the entire solution
1. Consider a set S of n classes, where each class i has a start time s, and a finish time f We want to broadcast an announcement that will be heard by all classes; if the announcement is broadcast at time t, then all classes i such that stsf, will hear the announcement. We are wlling to broadcast the announcement multiple times, so we can hit all classes, but we want to minimize the uber of broadcasts. (a) Consider a greedy approach that repeatedly picks the midpoint of the shortest remaining class, and then removes all classes that are hit by that broadcast time Give and demonstrate a counterexample to show that this approach does not always find the minimber of broadcast times. (b) Design and write a greedy algorithm that, given the start times s, and finish times fi for each class, will find a minimum size set of times when the announcements can be broadcast in order to hit all classes. c) Prove that your algorithm from (b) is correct 1. Consider a set S of n classes, where each class i has a start time s, and a finish time f We want to broadcast an announcement that will be heard by all classes; if the announcement is broadcast at time t, then all classes i such that stsf, will hear the announcement. We are wlling to broadcast the announcement multiple times, so we can hit all classes, but we want to minimize the uber of broadcasts. (a) Consider a greedy approach that repeatedly picks the midpoint of the shortest remaining class, and then removes all classes that are hit by that broadcast time Give and demonstrate a counterexample to show that this approach does not always find the minimber of broadcast times. (b) Design and write a greedy algorithm that, given the start times s, and finish times fi for each class, will find a minimum size set of times when the announcements can be broadcast in order to hit all classes. c) Prove that your algorithm from (b) is correct