Course Computational Mathematics
Euclidean Algorithm
In this lesson, we'll talk about the Euclidean Algorithm.
Before learning the algorithm, we need to understand what it does. Basically, given two numbers
But what is the greatest common divisor of two numbers? Greatest common divisor of
Now, let's talk about the algorithm. It will use two gcd properties:
Proofs
Since every number is a divisor of
, we just have to find the greatest divisor of , which is itself Take
and . By the definition of gcd, and and and . It means that must be a divisor of and and all divisors of and are valid. As is maximal, .