Runtime analysis of the Euclidean Algorithm [00KE]
In [GCD1] GCD via factoring vs Euclidean algorithm (2 pts), you learned that the Euclidean Algorithm seems much more efficient than factoring; but how efficient is it, exactly? The problems in this section will walk you through a classic analysis of how long the Euclidean Algorithm takes to run on given inputs. However, the problems are independent; it is possible to do each problem without having done the previous ones.
Together, the problems in this section walk you through a proof of what is known as Lamé's Theorem, first proved by Gabriel Lamé in 1844. It was significant in being one of the first “practical” applications of the Fibonacci numbers, and one of the first results in what we would now call the theory of algorithms.
Throughout this section, when referring to the Euclidean
Algorithm, we will specifically work with the recursive
implementation \mathsf {GCDR} (GCDRecA from the POGIL activity).