The euclidean algorithm computes the greatest common divisor of two integers by repeated division with remainder. Start with , , interchanging them if necessary, and repeatedly writeuntil a zero remainder occurs. The positive remainders strictly decrease, so the process terminates. At each step the common divisors of are exactly the common divisors of , because . HenceIf one input is zero, the answer is the absolute value of the other; the usual convention sets . Back-substitution also expresses the greatest common divisor as an integer linear combination of the inputs, as in Bézout's identity.
Let and . Applying polynomial long division gives the euclidean algorithmThus their polynomial greatest common divisor is , up to a nonzero constant factor. Their unique common root of a polynomial is therefore
Articles by others on the same topic
There are currently no matching articles.