Difference between revisions of "Euclidean algorithm"
(LaTeX) |
(Comment: Connexion with continued fractions) |
||
Line 1: | Line 1: | ||
− | A method for finding the greatest common divisor of two integers, two polynomials (and, in general, two elements of a [[ | + | A method for finding the [[greatest common divisor]] of two integers, two polynomials (and, in general, two elements of a [[Euclidean ring]]) or the common measure of two intervals. It was described in geometrical form in Euclid's Elements (3rd century B.C.). |
For two positive integers $a \ge b$, the method is as follows. Division with remainder of $a$ by $b$ always leads to the result $a = n b + b_1$, where the quotient $n$ is a positive integer and the remainder $b_1$ is either 0 or a positive integer less than $b$, $0 \le b_1 < b$. Successive divisions are performed: | For two positive integers $a \ge b$, the method is as follows. Division with remainder of $a$ by $b$ always leads to the result $a = n b + b_1$, where the quotient $n$ is a positive integer and the remainder $b_1$ is either 0 or a positive integer less than $b$, $0 \le b_1 < b$. Successive divisions are performed: | ||
Line 30: | Line 30: | ||
====References==== | ====References==== | ||
<table><TR><TD valign="top">[a1]</TD> <TD valign="top"> W.J. Leveque, "Topics in number theory" , '''1''' , Addison-Wesley (1956) pp. Chapt. 2</TD></TR></table> | <table><TR><TD valign="top">[a1]</TD> <TD valign="top"> W.J. Leveque, "Topics in number theory" , '''1''' , Addison-Wesley (1956) pp. Chapt. 2</TD></TR></table> | ||
+ | |||
+ | ====Comments==== | ||
+ | Euler observed that the Euclidean algorithm applied to a pair of natural numbers $(a,b)$ yields the [[continued fraction]] development of the [[rational number]] $a/b$. | ||
+ | |||
+ | ====References==== | ||
+ | <table><TR><TD valign="top">[b1]</TD> <TD valign="top"> John Stillwell. ''Mathematics and Its History'', 3rd revised and updated ed. Springer (2010). ISBN 978-1-4419-6052-8 Zbl 1207.01003</TD></TR></table> | ||
{{TEX|done}} | {{TEX|done}} |
Revision as of 08:23, 18 October 2014
A method for finding the greatest common divisor of two integers, two polynomials (and, in general, two elements of a Euclidean ring) or the common measure of two intervals. It was described in geometrical form in Euclid's Elements (3rd century B.C.).
For two positive integers $a \ge b$, the method is as follows. Division with remainder of $a$ by $b$ always leads to the result $a = n b + b_1$, where the quotient $n$ is a positive integer and the remainder $b_1$ is either 0 or a positive integer less than $b$, $0 \le b_1 < b$. Successive divisions are performed: $$ \begin{array}{rcl} a &=& n b + b_1 \\ b & = & n_1 b_1 + b_2 \\ b_1 & = & n_2 b_2 + b_3 \\ & \cdots & \end{array} \tag{*} $$ where the $n_i$ are positive integers and $0 \le b_i < b_{i-1}$, until a remainder 0 is obtained. The series of equations (*) finishes thus: $$ b_{k-2} = n_{k-1} b_{k-1} + b_k \,,\ \ \ b_{k-1} = n_k b_k \ . $$
The least positive remainder $b_k$ in this process is the greatest common divisor of $a$ and $b$.
The Euclidean algorithms for polynomials or for intervals are similar to the one for integers. In the case of incommensurable intervals the Euclidean algorithm leads to an infinite process.
Comments
The Euclidean algorithm to determine the greatest common divisor of two integers $a \ge b > 0$ is quite fast. It can be shown that the number of steps required is at most $$ \frac{\log a}{\log((1+\sqrt5)/2)} $$ A slight extension of the algorithm also yields a solution of $ax + by = \mathrm{gcd}(a,b)$ in $x,y \in \mathbb{Z}$.
References
[a1] | W.J. Leveque, "Topics in number theory" , 1 , Addison-Wesley (1956) pp. Chapt. 2 |
Comments
Euler observed that the Euclidean algorithm applied to a pair of natural numbers $(a,b)$ yields the continued fraction development of the rational number $a/b$.
References
[b1] | John Stillwell. Mathematics and Its History, 3rd revised and updated ed. Springer (2010). ISBN 978-1-4419-6052-8 Zbl 1207.01003 |
Euclidean algorithm. Encyclopedia of Mathematics. URL: http://encyclopediaofmath.org/index.php?title=Euclidean_algorithm&oldid=33780