1 CPSC 320: Intermediate Algorithm Design and Analysis August 6, 2014
2 Schedule Monday: BC Day, no classes Wednesday: Quiz 5 (NP and NP completeness) Review: Amortized Analysis Friday: Survey (bonus marks) Review: probably Graph Theory and Dynamic Programming
3 Amortized Analysis
4 Amortized cost
5 Aggregate Method Evaluate a sequence of calls, and calculate the total cost Usually changes in data structure are considered instead of operations
6 Potential Method
7 Garbage Collection
8
9 Garbage Collection – Potential Method
10 More examples
11 More examples
12 Exercise
13 Good view – Aggregate Analysis
14 Good view – Potential Method