Math 2.0

Number theory Divisibility and primes Concept

Euclidean algorithm

Summary

The Euclidean algorithm computes the greatest common divisor of two natural numbers aa and bb. It uses two rules: gcd⁡(a,0)=a\gcd(a, 0) = a, and gcd⁡(a,b)=gcd⁡(b,a mod b)\gcd(a, b) = \gcd(b, a \bmod b) when b≠0b \neq 0. It applies the second rule until the second number is 00. Then the first number is the result. The algorithm stops, because the second number gets smaller at each step.

Remarks

The second rule is true because aa and bb have the same common divisors as bb and a mod ba \bmod b. The number of steps is at most a constant times the number of digits of the smaller input. Lamé's theorem gives this bound. The algorithm also works in each Euclidean domain, for example in the ring of polynomials over a field.

Where this leads

4 pages build on this one.

Further reading

  1. Web https://en.wikipedia.org/wiki/Euclidean_algorithm, Procedure
About this page
Tag0TRNT4X7J0
URIm2://0TRNT4X7J0
Kindconcept
WritingW1 stated
MSC11A05
SpecializesEuclidean algorithm in a Euclidean domain
Same as

Markdown · JSON · Edit on GitHub

What this page needs for W2

  • edge defines in: at least one definition (0 of 1)
  • edge instance_of in: at least two examples (0 of 2)
  • edge not_instance_of in: at least one non-example (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

Used by