Problem 10.2 Greedy Algorithms (7 points) (a) (2 points) Show that a greedy algorithm for the activity-selection problem that makes the greedy choice of selecting the activity with shortest duration may fail at producing a glob- ally optimal solution.
(b) Bonus (5 points) Assuming an unsorted sequence of activities, derive a greedy algorithm for the activity-selection problem that selects the activity with the latest starting time. Your solution should not simply sort the activities and then select the activity.