Fibonacci Upper Bound

But the Fibonacci sequence also gives us an upper bound on the worst case.

Theorem: If EUCLID(a,b) takes tex2html_wrap_inline260 recursive calls, then tex2html_wrap_inline262 and tex2html_wrap_inline264 .

Therefore, we can't take any more than k recursive calls to compute the GCD unless a is bigger than F(k+2). That means that tex2html_wrap_inline256 is also an upper bound on the number of iterations needed.


next up previous
Next: Summary Up: EUCLID'S ALGORITHM Previous: Fibonacci Meets Euclid