Worst-Case Analysis

Theoreticians have settled on a reasonable way of dealing with this problem. Instead of reporting exact iteration counts, we will compute a bound on the number of iterations.

What's the bound here? Well, a is an upper bound. It can never take more than a iterations.

Is a a lower bound (on the worst case)? Can it actually take a iterations for some input?

Can we also determine tight bounds for the best case?


next up previous
Next: Euclid's Algorithm Up: GREATEST COMMON DIVISOR Previous: Analysis of Naive