This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Exercise 15.5-2 Exercise 15.5-3 The asymptotic running time does not depend only on the computation of line 8, we will still need the three nested loops. So the running time is O ( n 3 ). Exercise 16.1-2 Select the last activity to start that is compatible with all previously selected activities is the mirror algorithm of selecting the first activity to finish. It is the same idea as the proposed algorithm in chapter 16. It is greedy algorithm as it looks for the local optimal solution Exercise 16.1-3 Use GREEDY-ACTIVITY-SELECTOR function which returns a maximum-size set of mutually compatible activities, and assign these activities to a lecture hall. Repeat these two steps until all activities are settled....
View Full Document
- Spring '10
- Algorithms, monotonically increasing subsequence, mir ror algorithm