next up previous
Next: Up: Previous:

Amortized Analysis

Though the worst case performance of an algorithm may be f(n), the average worst case over n runs may be asymptotically less than n*f(n).

We will study three methods for average worst case analysis:



1.
Aggregate Method. Show all n runs take a total worst case time T, thus the average worst case is T/n.

2.
Accounting Method. Performance costs assigned to some of the n runs are overestimates and are used as credit for underestimates of other runs.

3.
Potential Method. The overestimates add to the ``potential energy'' of the method.


next up previous
Next: Up: Previous: