https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Euclidean_algorithmEuclidean algorithm - Revision history2025-06-14T03:19:39ZRevision history for this page on the wikiMediaWiki 1.45.0-wmf.5https://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1288126959&oldid=prevCitation bot: Add: location, issue. | Use this bot. Report bugs. | Suggested by Dominic3203 | Linked from User:Mathbot/Most_linked_math_articles | #UCB_webform_linked 659/19132025-04-30T16:35:39Z<p>Add: location, issue. | <a href="/wiki/Wikipedia:UCB" class="mw-redirect" title="Wikipedia:UCB">Use this bot</a>. <a href="/wiki/Wikipedia:DBUG" class="mw-redirect" title="Wikipedia:DBUG">Report bugs</a>. | Suggested by Dominic3203 | Linked from User:Mathbot/Most_linked_math_articles | #UCB_webform_linked 659/1913</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 16:35, 30 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 471:</td>
<td colspan="2" class="diff-lineno">Line 471:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></math></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>There are ''φ''(''a'') coprime integers less than ''a'', where ''φ'' is [[Euler's totient function]]. This tau average grows smoothly with ''a''<ref>{{harvnb|Knuth|1997}}, p. 357</ref><ref>{{cite journal | last = Tonkov | first= T. | year = 1974 | title = On the average length of finite continued fractions | journal = Acta Arithmetica | volume = 26 | pages = 47–57| doi= 10.4064/aa-26-1-47-57 | doi-access = free }}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>There are ''φ''(''a'') coprime integers less than ''a'', where ''φ'' is [[Euler's totient function]]. This tau average grows smoothly with ''a''<ref>{{harvnb|Knuth|1997}}, p. 357</ref><ref>{{cite journal | last = Tonkov | first= T. | year = 1974 | title = On the average length of finite continued fractions | journal = Acta Arithmetica | volume = 26<ins style="font-weight: bold; text-decoration: none;"> | issue= 1</ins> | pages = 47–57| doi= 10.4064/aa-26-1-47-57 | doi-access = free }}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:<math>\tau(a) = \frac{12}{\pi^2}\ln 2 \ln a + C + O(a^{-1/6-\varepsilon})</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>:<math>\tau(a) = \frac{12}{\pi^2}\ln 2 \ln a + C + O(a^{-1/6-\varepsilon})</math></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 487:</td>
<td colspan="2" class="diff-lineno">Line 487:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</ref> and equals</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>}}</ref> and equals</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>C= -\frac 1 2 + \frac{6 \ln 2}{\pi^2}\left(4\gamma -\frac{24}{\pi^2}\zeta'(2) + 3\ln 2 - 2\right) \approx 1.467</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>C= -\frac 1 2 + \frac{6 \ln 2}{\pi^2}\left(4\gamma -\frac{24}{\pi^2}\zeta'(2) + 3\ln 2 - 2\right) \approx 1.467</math></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>where {{math|''γ''}} is the [[Euler–Mascheroni constant]] and {{math|''ζ''{{′}}}} is the [[derivative]] of the [[Riemann zeta function]].<ref>{{cite journal | last = Porter | first = J. W. | year = 1975 | title = On a Theorem of Heilbronn | journal = [[Mathematika]] | volume = 22 | pages = 20–28 | doi = 10.1112/S0025579300004459}}</ref><ref>{{cite journal | last = Knuth|first = D. E. | author-link = Donald Knuth | year = 1976 | title = Evaluation of Porter's Constant | journal = Computers and Mathematics with Applications | volume = 2 | pages = 137–139 | doi = 10.1016/0898-1221(76)90025-0 | issue = 2| doi-access = free }}</ref> The leading coefficient (12/π<sup>2</sup>) ln 2 was determined by two independent methods.<ref>{{cite journal | last = Dixon | first = J. D. | year = 1970 | title = The Number of Steps in the Euclidean Algorithm | journal = J. Number Theory | volume = 2 | pages = 414–422 | doi = 10.1016/0022-314X(70)90044-2 | issue = 4|bibcode = 1970JNT.....2..414D | doi-access = free }}</ref><ref>{{cite book | last = Heilbronn | first = H. A. | author-link = Hans Heilbronn | year = 1969 | chapter = On the Average Length of a Class of Finite Continued Fractions | title = Number Theory and Analysis | editor = Paul Turán | publisher = Plenum | location = New York | pages = 87–96 | lccn = 76016027}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>where {{math|''γ''}} is the [[Euler–Mascheroni constant]] and {{math|''ζ''{{′}}}} is the [[derivative]] of the [[Riemann zeta function]].<ref>{{cite journal | last = Porter | first = J. W. | year = 1975 | title = On a Theorem of Heilbronn | journal = [[Mathematika]] | volume = 22<ins style="font-weight: bold; text-decoration: none;"> | issue = 1</ins> | pages = 20–28 | doi = 10.1112/S0025579300004459}}</ref><ref>{{cite journal | last = Knuth|first = D. E. | author-link = Donald Knuth | year = 1976 | title = Evaluation of Porter's Constant | journal = Computers and Mathematics with Applications | volume = 2 | pages = 137–139 | doi = 10.1016/0898-1221(76)90025-0 | issue = 2| doi-access = free }}</ref> The leading coefficient (12/π<sup>2</sup>) ln 2 was determined by two independent methods.<ref>{{cite journal | last = Dixon | first = J. D. | year = 1970 | title = The Number of Steps in the Euclidean Algorithm | journal = J. Number Theory | volume = 2 | pages = 414–422 | doi = 10.1016/0022-314X(70)90044-2 | issue = 4|bibcode = 1970JNT.....2..414D | doi-access = free }}</ref><ref>{{cite book | last = Heilbronn | first = H. A. | author-link = Hans Heilbronn | year = 1969 | chapter = On the Average Length of a Class of Finite Continued Fractions | title = Number Theory and Analysis | editor = Paul Turán | publisher = Plenum | location = New York | pages = 87–96 | lccn = 76016027}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since the first average can be calculated from the tau average by summing over the divisors ''d'' of&nbsp;''a''<ref>{{harvnb|Knuth|1997}}, p. 354</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>Since the first average can be calculated from the tau average by summing over the divisors ''d'' of&nbsp;''a''<ref>{{harvnb|Knuth|1997}}, p. 354</ref></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 495:</td>
<td colspan="2" class="diff-lineno">Line 495:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math> T(a) = \frac 1 a \sum_{d \mid a} \varphi(d) \tau(d)</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math> T(a) = \frac 1 a \sum_{d \mid a} \varphi(d) \tau(d)</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div></math></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>it can be approximated by the formula<ref name="Norton_1990">{{cite journal | last = Norton | first = G. H. | year = 1990 | title = On the Asymptotic Analysis of the Euclidean Algorithm | journal = Journal of Symbolic Computation | volume = 10 | pages = 53–58 | doi = 10.1016/S0747-7171(08)80036-3| doi-access = free }}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>it can be approximated by the formula<ref name="Norton_1990">{{cite journal | last = Norton | first = G. H. | year = 1990 | title = On the Asymptotic Analysis of the Euclidean Algorithm | journal = Journal of Symbolic Computation | volume = 10<ins style="font-weight: bold; text-decoration: none;"> | issue = 1</ins> | pages = 53–58 | doi = 10.1016/S0747-7171(08)80036-3| doi-access = free }}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>T(a) \approx C + \frac{12}{\pi^2} \ln 2\, \biggl({\ln a} - \sum_{d \mid a} \frac{\Lambda(d)} d\biggr)</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>T(a) \approx C + \frac{12}{\pi^2} \ln 2\, \biggl({\ln a} - \sum_{d \mid a} \frac{\Lambda(d)} d\biggr)</math></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>where Λ(''d'') is the [[von Mangoldt function|Mangoldt function]].<ref>{{harvnb|Knuth|1997}}, p. 355</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>where Λ(''d'') is the [[von Mangoldt function|Mangoldt function]].<ref>{{harvnb|Knuth|1997}}, p. 355</ref></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 543:</td>
<td colspan="2" class="diff-lineno">Line 543:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>One inefficient approach to finding the GCD of two natural numbers ''a'' and ''b'' is to calculate all their common divisors; the GCD is then the largest common divisor. The common divisors can be found by dividing both numbers by successive integers from 2 to the smaller number ''b''. The number of steps of this approach grows linearly with ''b'', or exponentially in the number of digits. Another inefficient approach is to find the prime factors of one or both numbers. As noted [[#Greatest common divisor|above]], the GCD equals the product of the prime factors shared by the two numbers ''a'' and ''b''.<ref name="Schroeder_21" /> Present methods for [[integer factorization|prime factorization]] are also inefficient; many modern cryptography systems even rely on that inefficiency.<ref name="Schroeder_216" /></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>One inefficient approach to finding the GCD of two natural numbers ''a'' and ''b'' is to calculate all their common divisors; the GCD is then the largest common divisor. The common divisors can be found by dividing both numbers by successive integers from 2 to the smaller number ''b''. The number of steps of this approach grows linearly with ''b'', or exponentially in the number of digits. Another inefficient approach is to find the prime factors of one or both numbers. As noted [[#Greatest common divisor|above]], the GCD equals the product of the prime factors shared by the two numbers ''a'' and ''b''.<ref name="Schroeder_21" /> Present methods for [[integer factorization|prime factorization]] are also inefficient; many modern cryptography systems even rely on that inefficiency.<ref name="Schroeder_216" /></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The [[binary GCD algorithm]] is an efficient alternative that substitutes division with faster operations by exploiting the [[binary numeral system|binary]] representation used by computers.<ref>{{harvnb|Knuth|1997}}, pp. 321–323</ref><ref>{{cite journal | last = Stein | first = J. | year = 1967 | title = Computational problems associated with Racah algebra | journal = Journal of Computational Physics | volume = 1 | pages = 397–405 | doi = 10.1016/0021-9991(67)90047-2 | issue = 3| bibcode = 1967JCoPh...1..397S }}</ref> However, this alternative also scales like [[big-O notation|''O''(''h''²)]]. It is generally faster than the Euclidean algorithm on real computers, even though it scales in the same way.<ref name="Crandall_2001">{{harvnb|Crandall|Pomerance|2001}}, pp. 77–79, 81–85, 425–431</ref> Additional efficiency can be gleaned by examining only the leading digits of the two numbers ''a'' and ''b''.<ref>{{harvnb|Knuth|1997}}, p. 328</ref><ref>{{cite journal | last = Lehmer|first = D. H.|author-link=Derrick Henry Lehmer | year = 1938 | title = Euclid's Algorithm for Large Numbers | journal = The American Mathematical Monthly | volume = 45 | pages = 227–233 | doi = 10.2307/2302607 | jstor = 2302607 | issue = 4}}</ref> The binary algorithm can be extended to other bases (''k''-ary algorithms),<ref>{{cite journal | last = Sorenson |first=J. | year = 1994 | title = Two fast GCD algorithms | journal = J. Algorithms | volume = 16 | pages = 110–144 | doi = 10.1006/jagm.1994.1006}}</ref> with up to fivefold increases in speed.<ref>{{cite journal | last = Weber |first=K. | year = 1995 | title = The accelerated GCD algorithm | journal = ACM Trans. Math. Softw. | volume = 21 | pages = 111–122 | doi = 10.1145/200979.201042|s2cid=14934919 | doi-access = free }}</ref> [[Lehmer's GCD algorithm]] uses the same general principle as the binary algorithm to speed up GCD computations in arbitrary bases.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The [[binary GCD algorithm]] is an efficient alternative that substitutes division with faster operations by exploiting the [[binary numeral system|binary]] representation used by computers.<ref>{{harvnb|Knuth|1997}}, pp. 321–323</ref><ref>{{cite journal | last = Stein | first = J. | year = 1967 | title = Computational problems associated with Racah algebra | journal = Journal of Computational Physics | volume = 1 | pages = 397–405 | doi = 10.1016/0021-9991(67)90047-2 | issue = 3| bibcode = 1967JCoPh...1..397S }}</ref> However, this alternative also scales like [[big-O notation|''O''(''h''²)]]. It is generally faster than the Euclidean algorithm on real computers, even though it scales in the same way.<ref name="Crandall_2001">{{harvnb|Crandall|Pomerance|2001}}, pp. 77–79, 81–85, 425–431</ref> Additional efficiency can be gleaned by examining only the leading digits of the two numbers ''a'' and ''b''.<ref>{{harvnb|Knuth|1997}}, p. 328</ref><ref>{{cite journal | last = Lehmer|first = D. H.|author-link=Derrick Henry Lehmer | year = 1938 | title = Euclid's Algorithm for Large Numbers | journal = The American Mathematical Monthly | volume = 45 | pages = 227–233 | doi = 10.2307/2302607 | jstor = 2302607 | issue = 4}}</ref> The binary algorithm can be extended to other bases (''k''-ary algorithms),<ref>{{cite journal | last = Sorenson |first=J. | year = 1994 | title = Two fast GCD algorithms | journal = J. Algorithms | volume = 16<ins style="font-weight: bold; text-decoration: none;"> |issue=1</ins> | pages = 110–144 | doi = 10.1006/jagm.1994.1006}}</ref> with up to fivefold increases in speed.<ref>{{cite journal | last = Weber |first=K. | year = 1995 | title = The accelerated GCD algorithm | journal = ACM Trans. Math. Softw. | volume = 21<ins style="font-weight: bold; text-decoration: none;"> |issue=1</ins> | pages = 111–122 | doi = 10.1145/200979.201042|s2cid=14934919 | doi-access = free }}</ref> [[Lehmer's GCD algorithm]] uses the same general principle as the binary algorithm to speed up GCD computations in arbitrary bases.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A recursive approach for very large integers (with more than 25,000 digits) leads to [[quasilinear time|quasilinear]] integer GCD algorithms,<ref>{{cite book | last1 = Aho | first1 = A. | author1-link = Alfred Aho | last2 = Hopcroft | first2 = J. | author2-link = John Hopcroft | last3 = Ullman | first3 = J. | author3-link = Jeffrey Ullman | year = 1974 | title = The Design and Analysis of Computer Algorithms | publisher = Addison–Wesley | location = New York | pages = [https://archive.org/details/designanalysisof00ahoarich/page/300 300–310] | isbn = 0-201-00029-6 | url = https://archive.org/details/designanalysisof00ahoarich/page/300 }}</ref> such as those of Schönhage,<ref>{{cite journal | last = Schönhage|first= A. |author-link=Arnold Schönhage| title = Schnelle Berechnung von Kettenbruchentwicklungen |language=de | journal = Acta Informatica | volume = 1 | pages = 139–144 | doi = 10.1007/BF00289520 | year = 1971 | issue = 2|s2cid= 34561609 }}</ref><ref>{{cite book | last = Cesari|first= G. | year = 1998 | chapter = Parallel implementation of Schönhage's integer GCD algorithm | title = Algorithmic Number Theory: Proc. ANTS-III, Portland, OR | editor = G. Buhler | publisher = Springer-Verlag | location = New York | pages = 64–76|volume=1423|series=Lecture Notes in Computer Science}}</ref> and Stehlé and Zimmermann.<ref>{{cite book | last1 = Stehlé|first1=D.|last2=Zimmermann|first2=P. | year = 2005 | chapter = [[Gal's accurate tables]] method revisited | title = Proceedings of the 17th IEEE Symposium on Computer Arithmetic (ARITH-17) | publisher = [[IEEE Computer Society Press]] | location = Los Alamitos, CA}}</ref> These algorithms exploit the 2×2 matrix form of the Euclidean algorithm given [[#Matrix method|above]]. These quasilinear methods generally scale as {{math|''O''(''h'' log ''h''{{sup|2}} log log ''h'').}}<ref name="Crandall_2001" /><ref name="Moller08">{{cite journal | last = Möller|first= N. | title = On Schönhage's algorithm and subquadratic integer gcd computation | journal = Mathematics of Computation | volume = 77 | pages = 589–607 | doi = 10.1090/S0025-5718-07-02017-0 | year = 2008 | url=http://www.lysator.liu.se/~nisse/archive/sgcd.pdf | issue = 261| bibcode = 2008MaCom..77..589M | doi-access = free }}</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>A recursive approach for very large integers (with more than 25,000 digits) leads to [[quasilinear time|quasilinear]] integer GCD algorithms,<ref>{{cite book | last1 = Aho | first1 = A. | author1-link = Alfred Aho | last2 = Hopcroft | first2 = J. | author2-link = John Hopcroft | last3 = Ullman | first3 = J. | author3-link = Jeffrey Ullman | year = 1974 | title = The Design and Analysis of Computer Algorithms | publisher = Addison–Wesley | location = New York | pages = [https://archive.org/details/designanalysisof00ahoarich/page/300 300–310] | isbn = 0-201-00029-6 | url = https://archive.org/details/designanalysisof00ahoarich/page/300 }}</ref> such as those of Schönhage,<ref>{{cite journal | last = Schönhage|first= A. |author-link=Arnold Schönhage| title = Schnelle Berechnung von Kettenbruchentwicklungen |language=de | journal = Acta Informatica | volume = 1 | pages = 139–144 | doi = 10.1007/BF00289520 | year = 1971 | issue = 2|s2cid= 34561609 }}</ref><ref>{{cite book | last = Cesari|first= G. | year = 1998 | chapter = Parallel implementation of Schönhage's integer GCD algorithm | title = Algorithmic Number Theory: Proc. ANTS-III, Portland, OR | editor = G. Buhler | publisher = Springer-Verlag | location = New York | pages = 64–76|volume=1423|series=Lecture Notes in Computer Science}}</ref> and Stehlé and Zimmermann.<ref>{{cite book | last1 = Stehlé|first1=D.|last2=Zimmermann|first2=P. | year = 2005 | chapter = [[Gal's accurate tables]] method revisited | title = Proceedings of the 17th IEEE Symposium on Computer Arithmetic (ARITH-17) | publisher = [[IEEE Computer Society Press]] | location = Los Alamitos, CA}}</ref> These algorithms exploit the 2×2 matrix form of the Euclidean algorithm given [[#Matrix method|above]]. These quasilinear methods generally scale as {{math|''O''(''h'' log ''h''{{sup|2}} log log ''h'').}}<ref name="Crandall_2001" /><ref name="Moller08">{{cite journal | last = Möller|first= N. | title = On Schönhage's algorithm and subquadratic integer gcd computation | journal = Mathematics of Computation | volume = 77 | pages = 589–607 | doi = 10.1090/S0025-5718-07-02017-0 | year = 2008 | url=http://www.lysator.liu.se/~nisse/archive/sgcd.pdf | issue = 261| bibcode = 2008MaCom..77..589M | doi-access = free }}</ref></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 617:</td>
<td colspan="2" class="diff-lineno">Line 617:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If the function {{mvar|f}} corresponds to a [[field norm|norm]] function, such as that used to order the Gaussian integers [[#Gaussian integers|above]], then the domain is known as ''[[Norm-Euclidean field|norm-Euclidean]]''. The norm-Euclidean rings of quadratic integers are exactly those where {{mvar|D}} is one of the values −11, −7, −3, −2, −1, 2, 3, 5, 6, 7, 11, 13, 17, 19, 21, 29, 33, 37, 41, 57, or 73.<ref>{{Harvnb|Cohn|1980|pp=104–110}}</ref><ref>{{cite book | last = LeVeque | first = W. J. | author-link = William J. LeVeque | title = Topics in Number Theory, Volumes I and II | publisher = Dover Publications | location = New York | year = 2002 | orig-year = 1956 | isbn = 978-0-486-42539-9 | zbl = 1009.11001 | pages = II:57,81 | url = https://archive.org/details/topicsinnumberth0000leve }}</ref> The cases {{math|1=''D'' = −1}} and {{math|1=''D'' = −3}} yield the [[Gaussian integer]]s and [[Eisenstein integer]]s, respectively.</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If the function {{mvar|f}} corresponds to a [[field norm|norm]] function, such as that used to order the Gaussian integers [[#Gaussian integers|above]], then the domain is known as ''[[Norm-Euclidean field|norm-Euclidean]]''. The norm-Euclidean rings of quadratic integers are exactly those where {{mvar|D}} is one of the values −11, −7, −3, −2, −1, 2, 3, 5, 6, 7, 11, 13, 17, 19, 21, 29, 33, 37, 41, 57, or 73.<ref>{{Harvnb|Cohn|1980|pp=104–110}}</ref><ref>{{cite book | last = LeVeque | first = W. J. | author-link = William J. LeVeque | title = Topics in Number Theory, Volumes I and II | publisher = Dover Publications | location = New York | year = 2002 | orig-year = 1956 | isbn = 978-0-486-42539-9 | zbl = 1009.11001 | pages = II:57,81 | url = https://archive.org/details/topicsinnumberth0000leve }}</ref> The cases {{math|1=''D'' = −1}} and {{math|1=''D'' = −3}} yield the [[Gaussian integer]]s and [[Eisenstein integer]]s, respectively.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>If {{mvar|f}} is allowed to be any Euclidean function, then the list of possible values of {{mvar|D}} for which the domain is Euclidean is not yet known.<ref name="Clark_1994">{{cite journal | last=Clark | first=D. A. | year = 1994 | title = A quadratic field which is Euclidean but not norm-Euclidean | journal = Manuscripta Mathematica | volume = 83 | pages = 327–330 | doi = 10.1007/BF02567617 | doi-access=free | zbl=0817.11047 | s2cid=895185 }}</ref> The first example of a Euclidean domain that was not norm-Euclidean (with {{math|1=''D'' = 69}}) was published in 1994.<ref name="Clark_1994" /> In 1973, Weinberger proved that a quadratic integer ring with {{math|''D'' &gt; 0}} is Euclidean if, and only if, it is a [[principal ideal domain]], provided that the [[generalized Riemann hypothesis]] holds.<ref name="weinberger">{{cite journal | last = Weinberger | first = P. | title = On Euclidean rings of algebraic integers | journal = Proc. Sympos. Pure Math. | series = Proceedings of Symposia in Pure Mathematics | year = 1973 | volume = 24 | pages = 321–332| doi = 10.1090/pspum/024/0337902 | isbn = 9780821814246 }}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If {{mvar|f}} is allowed to be any Euclidean function, then the list of possible values of {{mvar|D}} for which the domain is Euclidean is not yet known.<ref name="Clark_1994">{{cite journal | last=Clark | first=D. A. | year = 1994 | title = A quadratic field which is Euclidean but not norm-Euclidean | journal = Manuscripta Mathematica | volume = 83<ins style="font-weight: bold; text-decoration: none;"> | issue=1</ins> | pages = 327–330 | doi = 10.1007/BF02567617 | doi-access=free | zbl=0817.11047 | s2cid=895185 }}</ref> The first example of a Euclidean domain that was not norm-Euclidean (with {{math|1=''D'' = 69}}) was published in 1994.<ref name="Clark_1994" /> In 1973, Weinberger proved that a quadratic integer ring with {{math|''D'' &gt; 0}} is Euclidean if, and only if, it is a [[principal ideal domain]], provided that the [[generalized Riemann hypothesis]] holds.<ref name="weinberger">{{cite journal | last = Weinberger | first = P. | title = On Euclidean rings of algebraic integers | journal = Proc. Sympos. Pure Math. | series = Proceedings of Symposia in Pure Mathematics | year = 1973 | volume = 24 | pages = 321–332<ins style="font-weight: bold; text-decoration: none;">| location = Providence, Rhode Island </ins>| doi = 10.1090/pspum/024/0337902 | isbn = 9780821814246 }}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Noncommutative rings ===</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Noncommutative rings ===</div></td>
</tr>
</table>Citation bothttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1286496105&oldid=prevDavid Eppstein: split off reprint isbn2025-04-20T07:11:06Z<p>split off reprint isbn</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 07:11, 20 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 551:</td>
<td colspan="2" class="diff-lineno">Line 551:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Rational and real numbers ===</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Rational and real numbers ===</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Euclid's algorithm can be applied to [[real number]]s, as described by Euclid in Book 10 of his ''[[Euclid's Elements|Elements]]''. The goal of the algorithm is to identify a real number {{mvar|g}} such that two given real numbers, {{mvar|a}} and {{mvar|b}}, are integer multiples of it: {{math|1=''a'' = ''mg''}} and {{math|1=''b'' = ''ng''}}, where {{mvar|m}} and {{mvar|n}} are [[integer]]s.<ref name="Weil_1983" /> This identification is equivalent to finding an [[integer relation algorithm|integer relation]] among the real numbers {{mvar|a}} and {{mvar|b}}; that is, it determines integers {{mvar|s}} and {{mvar|t}} such that {{math|1=''sa'' + ''tb'' = 0}}. If such an equation is possible, ''a'' and ''b'' are called commensurable lengths, otherwise they are [[Commensurability (mathematics)|incommensurable lengths]].<ref>{{cite book | last1 = Boyer | first1 = C. B. | last2 = Merzbach | first2 = U. C. | author2-link = Uta Merzbach | year = 1991 | title = A History of Mathematics | edition = 2nd | publisher = Wiley | location = New York | isbn = 0-471-54397-7 | pages = [https://archive.org/details/historyofmathema00boye/page/116 116–117] | url = https://archive.org/details/historyofmathema00boye/page/116 }}</ref><ref>{{cite book | author-link = Florian Cajori|last=Cajori|first= F | year = 1894 | title = A History of Mathematics | url = https://archive.org/details/in.ernet.dli.2015.73802| publisher = Macmillan | location = New York | page = [https://archive.org/details/in.ernet.dli.2015.73802/page/n78 70] <del style="font-weight: bold; text-decoration: none;">|</del> <del style="font-weight: bold; text-decoration: none;">isbn</del> <del style="font-weight: bold; text-decoration: none;">=</del> 0-486-43874-0}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Euclid's algorithm can be applied to [[real number]]s, as described by Euclid in Book 10 of his ''[[Euclid's Elements|Elements]]''. The goal of the algorithm is to identify a real number {{mvar|g}} such that two given real numbers, {{mvar|a}} and {{mvar|b}}, are integer multiples of it: {{math|1=''a'' = ''mg''}} and {{math|1=''b'' = ''ng''}}, where {{mvar|m}} and {{mvar|n}} are [[integer]]s.<ref name="Weil_1983" /> This identification is equivalent to finding an [[integer relation algorithm|integer relation]] among the real numbers {{mvar|a}} and {{mvar|b}}; that is, it determines integers {{mvar|s}} and {{mvar|t}} such that {{math|1=''sa'' + ''tb'' = 0}}. If such an equation is possible, ''a'' and ''b'' are called commensurable lengths, otherwise they are [[Commensurability (mathematics)|incommensurable lengths]].<ref>{{cite book | last1 = Boyer | first1 = C. B. | last2 = Merzbach | first2 = U. C. | author2-link = Uta Merzbach | year = 1991 | title = A History of Mathematics | edition = 2nd | publisher = Wiley | location = New York | isbn = 0-471-54397-7 | pages = [https://archive.org/details/historyofmathema00boye/page/116 116–117] | url = https://archive.org/details/historyofmathema00boye/page/116 }}</ref><ref>{{cite book | author-link = Florian Cajori|last=Cajori|first= F | year = 1894 | title = A History of Mathematics | url = https://archive.org/details/in.ernet.dli.2015.73802| publisher = Macmillan | location = New York | page = [https://archive.org/details/in.ernet.dli.2015.73802/page/n78 70]<ins style="font-weight: bold; text-decoration: none;">}}</ins> <ins style="font-weight: bold; text-decoration: none;">Reprinted,</ins> <ins style="font-weight: bold; text-decoration: none;">Dover</ins> <ins style="font-weight: bold; text-decoration: none;">Publications,</ins> <ins style="font-weight: bold; text-decoration: none;">2004, {{isbn|</ins>0-486-43874-0}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The real-number Euclidean algorithm differs from its integer counterpart in two respects. First, the remainders {{math|''r''<sub>''k''</sub>}} are real numbers, although the quotients {{math|''q''<sub>''k''</sub>}} are integers as before. Second, the algorithm is not guaranteed to end in a finite number {{mvar|N}} of steps. If it does, the fraction {{math|''a''/''b''}} is a rational number, i.e., the ratio of two integers</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The real-number Euclidean algorithm differs from its integer counterpart in two respects. First, the remainders {{math|''r''<sub>''k''</sub>}} are real numbers, although the quotients {{math|''q''<sub>''k''</sub>}} are integers as before. Second, the algorithm is not guaranteed to end in a finite number {{mvar|N}} of steps. If it does, the fraction {{math|''a''/''b''}} is a rational number, i.e., the ratio of two integers</div></td>
</tr>
</table>David Eppsteinhttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1286264821&oldid=prevDuncanHill: /* Bibliography */ Use archive.org instead of google books, for better access.2025-04-18T19:40:41Z<p><span class="autocomment">Bibliography: </span> Use archive.org instead of google books, for better access.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:40, 18 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 662:</td>
<td colspan="2" class="diff-lineno">Line 662:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | year = 2003}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | year = 2003}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohen |first=H. |author-link=Henri Cohen (number theorist) |year=1993 |title=A Course in Computational Algebraic Number Theory |url=https://books.google.com/books?id=hXGr-9l1DXcC |publisher=Springer-Verlag |location=New York |isbn=0-387-55640-0 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohen |first=H. |author-link=Henri Cohen (number theorist) |year=1993 |title=A Course in Computational Algebraic Number Theory |url=https://books.google.com/books?id=hXGr-9l1DXcC |publisher=Springer-Verlag |location=New York |isbn=0-387-55640-0 }}</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohn |first=H. |year=1980 |title=Advanced Number Theory |url=https://<del style="font-weight: bold; text-decoration: none;">books</del>.<del style="font-weight: bold; text-decoration: none;">google.com</del>/<del style="font-weight: bold; text-decoration: none;">books?id=yMGeElJ8M0wC</del> |publisher=Dover |location=New York |isbn=0-486-64023-X}}</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohn |first=H. |year=1980 |title=Advanced Number Theory |url=https://<ins style="font-weight: bold; text-decoration: none;">archive</ins>.<ins style="font-weight: bold; text-decoration: none;">org/details/Cohn_Harvey_-_Advanced_Number_Theory/mode</ins>/<ins style="font-weight: bold; text-decoration: none;">2up</ins> |publisher=Dover |location=New York |isbn=0-486-64023-X}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Cox |first1=D. |author-link1=David A. Cox |last2=Little |first2=J. |last3=O'Shea |first3=D. |author-link3=Donal O'Shea |year=1997 |title=Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra |url=https://books.google.com/books?id=7eLkq0wQytAC |edition=2nd |publisher = Springer-Verlag |isbn=0-387-94680-2 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Cox |first1=D. |author-link1=David A. Cox |last2=Little |first2=J. |last3=O'Shea |first3=D. |author-link3=Donal O'Shea |year=1997 |title=Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra |url=https://books.google.com/books?id=7eLkq0wQytAC |edition=2nd |publisher = Springer-Verlag |isbn=0-387-94680-2 }}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Crandall |first1=R. |author-link1=Richard Crandall |last2=Pomerance |first2=C. |author-link2=Carl Pomerance | year = 2001 | title = Prime Numbers: A Computational Perspective | edition = 1st | publisher = Springer-Verlag | location = New York | isbn = 0-387-94777-9 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Crandall |first1=R. |author-link1=Richard Crandall |last2=Pomerance |first2=C. |author-link2=Carl Pomerance | year = 2001 | title = Prime Numbers: A Computational Perspective | edition = 1st | publisher = Springer-Verlag | location = New York | isbn = 0-387-94777-9 }}</div></td>
</tr>
</table>DuncanHillhttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1286264749&oldid=prevDuncanHill: Fixing harv/sfn reference errors introduced by User:Someguy707. Please install User:Trappist the monk/HarvErrors.js and watchlist :Category:Harv and Sfn no-target errors to help you spot such errors when reading and editing.2025-04-18T19:39:56Z<p>Fixing <a href="/wiki/Category:Harv_and_Sfn_no-target_errors" title="Category:Harv and Sfn no-target errors">harv/sfn reference errors</a> introduced by <a href="/wiki/User:Someguy707" title="User:Someguy707">User:Someguy707</a>. Please install <a href="/wiki/User:Trappist_the_monk/HarvErrors.js" title="User:Trappist the monk/HarvErrors.js">User:Trappist the monk/HarvErrors.js</a> and watchlist <a href="/wiki/Category:Harv_and_Sfn_no-target_errors" title="Category:Harv and Sfn no-target errors">Category:Harv and Sfn no-target errors</a> to help you spot such errors when reading and editing.</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 19:39, 18 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 217:</td>
<td colspan="2" class="diff-lineno">Line 217:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Bézout's identity ===</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Bézout's identity ===</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{main|Bézout's identity}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{main|Bézout's identity}}</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Bézout's identity states that the greatest common divisor {{math|''g''}} of two integers {{math|''a''}} and {{math|''b''}} can be represented as a linear sum of the original two numbers {{math|''a''}} and {{math|''b''}}.<ref>{{cite book | last1 = Jones |first1=G. A. | last2 = Jones | first2 = J. M. | year = 1998 | chapter = Bezout's Identity | title = Elementary Number Theory | publisher = Springer-Verlag | location = New York | pages = 7–11}}</ref> In other words, it is always possible to find integers {{math|''s''}} and {{math|''t''}} such that {{math|1=''g'' = ''sa'' + ''tb''}}.<ref>{{Harvnb|Rosen|2000|p=81}}</ref><ref>{{Harvnb|Cohn|<del style="font-weight: bold; text-decoration: none;">1962</del>|p=104}}</ref></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Bézout's identity states that the greatest common divisor {{math|''g''}} of two integers {{math|''a''}} and {{math|''b''}} can be represented as a linear sum of the original two numbers {{math|''a''}} and {{math|''b''}}.<ref>{{cite book | last1 = Jones |first1=G. A. | last2 = Jones | first2 = J. M. | year = 1998 | chapter = Bezout's Identity | title = Elementary Number Theory | publisher = Springer-Verlag | location = New York | pages = 7–11}}</ref> In other words, it is always possible to find integers {{math|''s''}} and {{math|''t''}} such that {{math|1=''g'' = ''sa'' + ''tb''}}.<ref>{{Harvnb|Rosen|2000|p=81}}</ref><ref>{{Harvnb|Cohn|<ins style="font-weight: bold; text-decoration: none;">1980</ins>|p=104}}</ref></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The integers {{math|''s''}} and {{math|''t''}} can be calculated from the quotients {{math|''q''<sub>0</sub>}}, {{math|''q''<sub>1</sub>}}, etc. by reversing the order of equations in Euclid's algorithm.<ref>{{Harvnb|Rosen|2000|p=91}}</ref> Beginning with the next-to-last equation, {{math|''g''}} can be expressed in terms of the quotient {{math|''q''<sub>''N''−1</sub>}} and the two preceding remainders, {{math|''r''<sub>''N''−2</sub>}} and {{math|''r''<sub>''N''−3</sub>}}:</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The integers {{math|''s''}} and {{math|''t''}} can be calculated from the quotients {{math|''q''<sub>0</sub>}}, {{math|''q''<sub>1</sub>}}, etc. by reversing the order of equations in Euclid's algorithm.<ref>{{Harvnb|Rosen|2000|p=91}}</ref> Beginning with the next-to-last equation, {{math|''g''}} can be expressed in terms of the quotient {{math|''q''<sub>''N''−1</sub>}} and the two preceding remainders, {{math|''r''<sub>''N''−2</sub>}} and {{math|''r''<sub>''N''−3</sub>}}:</div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 597:</td>
<td colspan="2" class="diff-lineno">Line 597:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Euclidean domains ===</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>=== Euclidean domains ===</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>A set of elements under two [[binary operation]]s, denoted as addition and multiplication, is called a [[Euclidean domain]] if it forms a [[commutative ring]] {{mvar|R}} and, roughly speaking, if a generalized Euclidean algorithm can be performed on them.<ref>{{Harvnb|Stark|1978|p=290}}</ref><ref>{{Harvnb|Cohn|<del style="font-weight: bold; text-decoration: none;">1962</del>|pp=104–105}}</ref> The two operations of such a ring need not be the addition and multiplication of ordinary arithmetic; rather, they can be more general, such as the operations of a [[group (mathematics)|mathematical group]] or [[monoid]]. Nevertheless, these general operations should respect many of the laws governing ordinary arithmetic, such as [[commutative property|commutativity]], [[associative property|associativity]] and [[distributive property|distributivity]].</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>A set of elements under two [[binary operation]]s, denoted as addition and multiplication, is called a [[Euclidean domain]] if it forms a [[commutative ring]] {{mvar|R}} and, roughly speaking, if a generalized Euclidean algorithm can be performed on them.<ref>{{Harvnb|Stark|1978|p=290}}</ref><ref>{{Harvnb|Cohn|<ins style="font-weight: bold; text-decoration: none;">1980</ins>|pp=104–105}}</ref> The two operations of such a ring need not be the addition and multiplication of ordinary arithmetic; rather, they can be more general, such as the operations of a [[group (mathematics)|mathematical group]] or [[monoid]]. Nevertheless, these general operations should respect many of the laws governing ordinary arithmetic, such as [[commutative property|commutativity]], [[associative property|associativity]] and [[distributive property|distributivity]].</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The generalized Euclidean algorithm requires a ''Euclidean function'', i.e., a mapping {{mvar|f}} from {{mvar|R}} into the set of nonnegative integers such that, for any two nonzero elements {{mvar|a}} and {{mvar|b}} in {{mvar|R}}, there exist {{mvar|q}} and {{mvar|r}} in {{mvar|R}} such that {{math|1=''a'' = ''qb'' + ''r''}} and {{math|''f''(''r'') &lt; ''f''(''b'')}}.<ref>{{cite book|title=Concrete Abstract Algebra: From Numbers to Gröbner Bases|first=Niels|last=Lauritzen|publisher=Cambridge University Press|year=2003|isbn=9780521534109|page=130|url=https://books.google.com/books?id=BdAbcje-TZUC&pg=PA130}}</ref> Examples of such mappings are the absolute value for integers, the degree for [[univariate polynomial]]s, and the norm for Gaussian integers [[#Gaussian integers|above]].<ref>{{harvtxt|Lauritzen|2003}}, p.&nbsp;132</ref><ref>{{harvtxt|Lauritzen|2003}}, p.&nbsp;161</ref> The basic principle is that each step of the algorithm reduces ''f'' inexorably; hence, if {{mvar|f}} can be reduced only a finite number of times, the algorithm must stop in a finite number of steps. This principle relies on the [[well-order]]ing property of the non-negative integers, which asserts that every non-empty set of non-negative integers has a smallest member.<ref name="sharpe">{{cite book|title=Rings and Factorization|first=David|last=Sharpe|publisher=Cambridge University Press|year=1987|isbn=9780521337182|page=[https://archive.org/details/ringsfactorizati0000shar/page/55 55]|url=https://archive.org/details/ringsfactorizati0000shar|url-access=registration}}</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The generalized Euclidean algorithm requires a ''Euclidean function'', i.e., a mapping {{mvar|f}} from {{mvar|R}} into the set of nonnegative integers such that, for any two nonzero elements {{mvar|a}} and {{mvar|b}} in {{mvar|R}}, there exist {{mvar|q}} and {{mvar|r}} in {{mvar|R}} such that {{math|1=''a'' = ''qb'' + ''r''}} and {{math|''f''(''r'') &lt; ''f''(''b'')}}.<ref>{{cite book|title=Concrete Abstract Algebra: From Numbers to Gröbner Bases|first=Niels|last=Lauritzen|publisher=Cambridge University Press|year=2003|isbn=9780521534109|page=130|url=https://books.google.com/books?id=BdAbcje-TZUC&pg=PA130}}</ref> Examples of such mappings are the absolute value for integers, the degree for [[univariate polynomial]]s, and the norm for Gaussian integers [[#Gaussian integers|above]].<ref>{{harvtxt|Lauritzen|2003}}, p.&nbsp;132</ref><ref>{{harvtxt|Lauritzen|2003}}, p.&nbsp;161</ref> The basic principle is that each step of the algorithm reduces ''f'' inexorably; hence, if {{mvar|f}} can be reduced only a finite number of times, the algorithm must stop in a finite number of steps. This principle relies on the [[well-order]]ing property of the non-negative integers, which asserts that every non-empty set of non-negative integers has a smallest member.<ref name="sharpe">{{cite book|title=Rings and Factorization|first=David|last=Sharpe|publisher=Cambridge University Press|year=1987|isbn=9780521337182|page=[https://archive.org/details/ringsfactorizati0000shar/page/55 55]|url=https://archive.org/details/ringsfactorizati0000shar|url-access=registration}}</ref></div></td>
</tr>
<tr>
<td colspan="2" class="diff-lineno">Line 615:</td>
<td colspan="2" class="diff-lineno">Line 615:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\omega = \frac{1 + \sqrt{D}}{2} .</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\omega = \frac{1 + \sqrt{D}}{2} .</math></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>If the function {{mvar|f}} corresponds to a [[field norm|norm]] function, such as that used to order the Gaussian integers [[#Gaussian integers|above]], then the domain is known as ''[[Norm-Euclidean field|norm-Euclidean]]''. The norm-Euclidean rings of quadratic integers are exactly those where {{mvar|D}} is one of the values −11, −7, −3, −2, −1, 2, 3, 5, 6, 7, 11, 13, 17, 19, 21, 29, 33, 37, 41, 57, or 73.<ref>{{Harvnb|Cohn|<del style="font-weight: bold; text-decoration: none;">1962</del>|pp=104–110}}</ref><ref>{{cite book | last = LeVeque | first = W. J. | author-link = William J. LeVeque | title = Topics in Number Theory, Volumes I and II | publisher = Dover Publications | location = New York | year = 2002 | orig-year = 1956 | isbn = 978-0-486-42539-9 | zbl = 1009.11001 | pages = II:57,81 | url = https://archive.org/details/topicsinnumberth0000leve }}</ref> The cases {{math|1=''D'' = −1}} and {{math|1=''D'' = −3}} yield the [[Gaussian integer]]s and [[Eisenstein integer]]s, respectively.</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>If the function {{mvar|f}} corresponds to a [[field norm|norm]] function, such as that used to order the Gaussian integers [[#Gaussian integers|above]], then the domain is known as ''[[Norm-Euclidean field|norm-Euclidean]]''. The norm-Euclidean rings of quadratic integers are exactly those where {{mvar|D}} is one of the values −11, −7, −3, −2, −1, 2, 3, 5, 6, 7, 11, 13, 17, 19, 21, 29, 33, 37, 41, 57, or 73.<ref>{{Harvnb|Cohn|<ins style="font-weight: bold; text-decoration: none;">1980</ins>|pp=104–110}}</ref><ref>{{cite book | last = LeVeque | first = W. J. | author-link = William J. LeVeque | title = Topics in Number Theory, Volumes I and II | publisher = Dover Publications | location = New York | year = 2002 | orig-year = 1956 | isbn = 978-0-486-42539-9 | zbl = 1009.11001 | pages = II:57,81 | url = https://archive.org/details/topicsinnumberth0000leve }}</ref> The cases {{math|1=''D'' = −1}} and {{math|1=''D'' = −3}} yield the [[Gaussian integer]]s and [[Eisenstein integer]]s, respectively.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If {{mvar|f}} is allowed to be any Euclidean function, then the list of possible values of {{mvar|D}} for which the domain is Euclidean is not yet known.<ref name="Clark_1994">{{cite journal | last=Clark | first=D. A. | year = 1994 | title = A quadratic field which is Euclidean but not norm-Euclidean | journal = Manuscripta Mathematica | volume = 83 | pages = 327–330 | doi = 10.1007/BF02567617 | doi-access=free | zbl=0817.11047 | s2cid=895185 }}</ref> The first example of a Euclidean domain that was not norm-Euclidean (with {{math|1=''D'' = 69}}) was published in 1994.<ref name="Clark_1994" /> In 1973, Weinberger proved that a quadratic integer ring with {{math|''D'' &gt; 0}} is Euclidean if, and only if, it is a [[principal ideal domain]], provided that the [[generalized Riemann hypothesis]] holds.<ref name="weinberger">{{cite journal | last = Weinberger | first = P. | title = On Euclidean rings of algebraic integers | journal = Proc. Sympos. Pure Math. | series = Proceedings of Symposia in Pure Mathematics | year = 1973 | volume = 24 | pages = 321–332| doi = 10.1090/pspum/024/0337902 | isbn = 9780821814246 }}</ref></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>If {{mvar|f}} is allowed to be any Euclidean function, then the list of possible values of {{mvar|D}} for which the domain is Euclidean is not yet known.<ref name="Clark_1994">{{cite journal | last=Clark | first=D. A. | year = 1994 | title = A quadratic field which is Euclidean but not norm-Euclidean | journal = Manuscripta Mathematica | volume = 83 | pages = 327–330 | doi = 10.1007/BF02567617 | doi-access=free | zbl=0817.11047 | s2cid=895185 }}</ref> The first example of a Euclidean domain that was not norm-Euclidean (with {{math|1=''D'' = 69}}) was published in 1994.<ref name="Clark_1994" /> In 1973, Weinberger proved that a quadratic integer ring with {{math|''D'' &gt; 0}} is Euclidean if, and only if, it is a [[principal ideal domain]], provided that the [[generalized Riemann hypothesis]] holds.<ref name="weinberger">{{cite journal | last = Weinberger | first = P. | title = On Euclidean rings of algebraic integers | journal = Proc. Sympos. Pure Math. | series = Proceedings of Symposia in Pure Mathematics | year = 1973 | volume = 24 | pages = 321–332| doi = 10.1090/pspum/024/0337902 | isbn = 9780821814246 }}</ref></div></td>
</tr>
</table>DuncanHillhttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1286155938&oldid=prevSomeguy707: Fixed ISBN / Date incompatibility2025-04-18T02:15:50Z<p>Fixed ISBN / Date incompatibility</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 02:15, 18 April 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 662:</td>
<td colspan="2" class="diff-lineno">Line 662:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | year = 2003}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> | year = 2003}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohen |first=H. |author-link=Henri Cohen (number theorist) |year=1993 |title=A Course in Computational Algebraic Number Theory |url=https://books.google.com/books?id=hXGr-9l1DXcC |publisher=Springer-Verlag |location=New York |isbn=0-387-55640-0 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohen |first=H. |author-link=Henri Cohen (number theorist) |year=1993 |title=A Course in Computational Algebraic Number Theory |url=https://books.google.com/books?id=hXGr-9l1DXcC |publisher=Springer-Verlag |location=New York |isbn=0-387-55640-0 }}</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohn |first=H. |year=<del style="font-weight: bold; text-decoration: none;">1962</del> |title=Advanced Number Theory |url=https://books.google.com/books?id=yMGeElJ8M0wC |publisher=Dover |location<del style="font-weight: bold; text-decoration: none;"> </del>=<del style="font-weight: bold; text-decoration: none;"> </del>New York |isbn=0-486-64023-X<del style="font-weight: bold; text-decoration: none;"> </del>}}</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last=Cohn |first=H. |year=<ins style="font-weight: bold; text-decoration: none;">1980</ins> |title=Advanced Number Theory |url=https://books.google.com/books?id=yMGeElJ8M0wC |publisher=Dover |location=New York |isbn=0-486-64023-X}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Cox |first1=D. |author-link1=David A. Cox |last2=Little |first2=J. |last3=O'Shea |first3=D. |author-link3=Donal O'Shea |year=1997 |title=Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra |url=https://books.google.com/books?id=7eLkq0wQytAC |edition=2nd |publisher = Springer-Verlag |isbn=0-387-94680-2 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Cox |first1=D. |author-link1=David A. Cox |last2=Little |first2=J. |last3=O'Shea |first3=D. |author-link3=Donal O'Shea |year=1997 |title=Ideals, Varieties, and Algorithms: An Introduction to Computational Algebraic Geometry and Commutative Algebra |url=https://books.google.com/books?id=7eLkq0wQytAC |edition=2nd |publisher = Springer-Verlag |isbn=0-387-94680-2 }}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Crandall |first1=R. |author-link1=Richard Crandall |last2=Pomerance |first2=C. |author-link2=Carl Pomerance | year = 2001 | title = Prime Numbers: A Computational Perspective | edition = 1st | publisher = Springer-Verlag | location = New York | isbn = 0-387-94777-9 }}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* {{cite book |last1=Crandall |first1=R. |author-link1=Richard Crandall |last2=Pomerance |first2=C. |author-link2=Carl Pomerance | year = 2001 | title = Prime Numbers: A Computational Perspective | edition = 1st | publisher = Springer-Verlag | location = New York | isbn = 0-387-94777-9 }}</div></td>
</tr>
</table>Someguy707https://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1282949147&oldid=prevRemsense: Reverted 1 edit by 2600:100A:B051:BEF8:0:17:43A1:1F01 (talk) to last revision by Mr. X 2355282025-03-29T15:30:17Z<p>Reverted 1 edit by <a href="/wiki/Special:Contributions/2600:100A:B051:BEF8:0:17:43A1:1F01" title="Special:Contributions/2600:100A:B051:BEF8:0:17:43A1:1F01">2600:100A:B051:BEF8:0:17:43A1:1F01</a> (<a href="/wiki/User_talk:2600:100A:B051:BEF8:0:17:43A1:1F01" title="User talk:2600:100A:B051:BEF8:0:17:43A1:1F01">talk</a>) to last revision by Mr. X 235528</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:30, 29 March 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Short description|Algorithm for computing greatest common divisors}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Short description|Algorithm for computing greatest common divisors}}</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{About|an algorithm for the greatest common divisor|the mathematics of space|Euclidean geometry|other uses of "Euclidean"|Euclidean (disambiguation)}}</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Distinguish|Euclidean division}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Featured article}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Featured article}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- FOR REASONS OF ACCESSIBILITY TO VISUALLY-IMPAIRED READERS (see [[WP:ACCESS]]), THIS ARTICLE AVOIDS <math> (i.e. LaTeX) MODE, UNLESS IT IS NECESSARY. PLEASE DO NOT ADD <math>-MODE FORMULAE, UNLESS YOU ALSO ADD THE CORRESPONDING ALT TEXT AS WELL, E.G., <math alt="description">. EXAMPLES CAN BE FOUND BELOW, E.G., IN THE "Matrix method" SECTION. --><del style="font-weight: bold; text-decoration: none;">In mathematics, the '''Euclidean algorithm''', or '''Euclid's algorithm''', is an efficient method for computing the greatest common divisor (GCD) of two integers, the largest number that divides them both without a remainder. It is named after the ancient Greek mathematician Euclid, who first described it in his ''Elements'' ().</del></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><!-- FOR REASONS OF ACCESSIBILITY TO VISUALLY-IMPAIRED READERS (see [[WP:ACCESS]]), THIS ARTICLE AVOIDS <math> (i.e. LaTeX) MODE, UNLESS IT IS NECESSARY. PLEASE DO NOT ADD <math>-MODE FORMULAE, UNLESS YOU ALSO ADD THE CORRESPONDING ALT TEXT AS WELL, E.G., <math alt="description">. EXAMPLES CAN BE FOUND BELOW, E.G., IN THE "Matrix method" SECTION. --></div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>[[File: Euclid's algorithm Book VII Proposition 2 3.svg|upright=1.2|thumb|right|Euclid's method for finding the greatest common divisor (GCD) of two starting lengths BA and DC, both defined to be multiples of a common "unit" length. The length DC being shorter, it is used to "measure" BA, but only once because the remainder EA is less than DC. EA now measures (twice) the shorter length DC, with remainder FC shorter than EA. Then FC measures (three times) length EA. Because there is no remainder, the process ends with FC being the GCD. On the right [[Nicomachus]]'s example with numbers 49 and 21 resulting in their GCD of 7 (derived from Heath 1908:300).]]</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_10_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_5_0_lhs"></a>It is an example of an ''algorithm'', a step-by-step procedure for performing a calculation according to well-defined rules,</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_10_1_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_6_0_lhs"></a>and is one of the oldest algorithms in common use. It can be used to reduce <del style="font-weight: bold; text-decoration: none;">fractions</del> to their simplest form, and is a part of many other number-theoretic and cryptographic calculations.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>In [[mathematics]], the '''Euclidean algorithm''',<ref group=note>Some widely used textbooks, such as [[I. N. Herstein]]'s ''Topics in Algebra'' and [[Serge Lang]]'s ''Algebra'', use the term "Euclidean algorithm" to refer to [[Euclidean division]]</ref> or '''Euclid's algorithm''', is an efficient method for computing the [[greatest common divisor]] (GCD) of two [[integers]], the largest number that divides them both without a [[remainder]]. It is named after the ancient Greek [[mathematician]] [[Euclid]], who first described it in [[Euclid's Elements|his ''Elements'']] ({{circa|300 BC}}).</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_12_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_9_0_lhs"></a>The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, {{math|21}} is the GCD of and (as and , and the same number is also the GCD of and . Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until the two numbers become equal. When that occurs, that number is the GCD of the original two numbers. By reversing the steps or using the extended Euclidean algorithm, the GCD can be expressed as a linear combination of the two original numbers, that is the sum of the two numbers, each multiplied by an integer (for example, ). The fact that the GCD can always be expressed in this way is known as Bézout's identity.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_5_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_0_rhs"></a>It is an example of an ''<ins style="font-weight: bold; text-decoration: none;">[[</ins>algorithm<ins style="font-weight: bold; text-decoration: none;">]]</ins>'', a step-by-step procedure for performing a calculation according to well-defined rules,</div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_6_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_1_rhs"></a>and is one of the oldest algorithms in common use. It can be used to reduce <ins style="font-weight: bold; text-decoration: none;">[[Fraction (mathematics)|fraction]]s</ins> to their <ins style="font-weight: bold; text-decoration: none;">[[Irreducible fraction|</ins>simplest form<ins style="font-weight: bold; text-decoration: none;">]]</ins>, and is a part of many other number-theoretic and cryptographic calculations.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_9_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_12_0_rhs"></a>The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, {{math|21}} is the GCD of <ins style="font-weight: bold; text-decoration: none;">{{math|252}}</ins> and <ins style="font-weight: bold; text-decoration: none;">{{math|105}}</ins> (as <ins style="font-weight: bold; text-decoration: none;">{{math|252 {{=}} 21 × 12}}</ins> and <ins style="font-weight: bold; text-decoration: none;">{{math|105 {{=}} 21 × 5)}}</ins>, and the same number <ins style="font-weight: bold; text-decoration: none;">{{math|21}}</ins> is also the GCD of <ins style="font-weight: bold; text-decoration: none;">{{math|105}}</ins> and <ins style="font-weight: bold; text-decoration: none;">{{math|252 − 105 {{=}} 147}}</ins>. Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until the two numbers become equal. When that occurs, that number is the GCD of the original two numbers. By <ins style="font-weight: bold; text-decoration: none;">[[#Bézout's identity|</ins>reversing the steps<ins style="font-weight: bold; text-decoration: none;">]]</ins> or using the <ins style="font-weight: bold; text-decoration: none;">[[</ins>extended Euclidean algorithm<ins style="font-weight: bold; text-decoration: none;">]]</ins>, the GCD can be expressed as a <ins style="font-weight: bold; text-decoration: none;">[[</ins>linear combination<ins style="font-weight: bold; text-decoration: none;">]]</ins> of the two original numbers, that is the sum of the two numbers, each multiplied by an <ins style="font-weight: bold; text-decoration: none;">[[</ins>integer<ins style="font-weight: bold; text-decoration: none;">]]</ins> (for example, <ins style="font-weight: bold; text-decoration: none;">{{math|21 {{=}} 5 × 105 + (−2) × 252}}</ins>). The fact that the GCD can always be expressed in this way is known as <ins style="font-weight: bold; text-decoration: none;">[[</ins>Bézout's identity<ins style="font-weight: bold; text-decoration: none;">]]</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_15_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_13_0_lhs"></a>The version of the Euclidean algorithm described above—which follows Euclid's original presentation—may require many subtraction steps to find the GCD when one of the given numbers is much bigger than the other. A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder). With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer. This was proven by Gabriel Lamé in 1844 (Lamé's Theorem), and marks the beginning of computational complexity theory. Additional methods for improving the algorithm's efficiency were developed in the 20th century.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_13_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_15_0_rhs"></a>The version of the Euclidean algorithm described above—which follows Euclid's original presentation—may require many subtraction steps to find the GCD when one of the given numbers is much bigger than the other. A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder). With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer. This was proven by <ins style="font-weight: bold; text-decoration: none;">[[</ins>Gabriel Lamé<ins style="font-weight: bold; text-decoration: none;">]]</ins> in 1844 (<ins style="font-weight: bold; text-decoration: none;">[[Lamé’s Theorem|</ins>Lamé's Theorem<ins style="font-weight: bold; text-decoration: none;">]]</ins>),<ins style="font-weight: bold; text-decoration: none;"><ref>{{cite journal |last=Lamé |first=Gabriel |year=1844 |title=Note sur la limite du nombre des divisions dans la recherche du plus grand commun diviseur entre deux nombres entiers |journal=Comptes Rendus des Séances de l'Académie des Sciences |language=French |volume=19 |pages=867–870}}</ref><ref>{{cite journal |last=Shallit |first=Jeffrey |date=1994-11-01 |title=Origins of the analysis of the Euclidean algorithm |journal=Historia Mathematica |language=en |volume=21 |issue=4 |pages=401–419 |doi=10.1006/hmat.1994.1031 |issn=0315-0860|doi-access=free }}</ref></ins> and marks the beginning of <ins style="font-weight: bold; text-decoration: none;">[[</ins>computational complexity theory<ins style="font-weight: bold; text-decoration: none;">]]</ins>. Additional methods for improving the algorithm's efficiency were developed in the 20th century.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_18_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_16_0_lhs"></a>The Euclidean algorithm has many theoretical and practical applications. It is used for reducing <del style="font-weight: bold; text-decoration: none;">fractions</del> to their simplest form and for performing division in modular arithmetic. Computations using this algorithm form part of the cryptographic <del style="font-weight: bold; text-decoration: none;">protocols</del> that are used to secure internet communications, and in methods for breaking these cryptosystems by factoring large composite numbers. The Euclidean algorithm may be used to solve Diophantine <del style="font-weight: bold; text-decoration: none;">equations</del>, such as finding numbers that satisfy multiple congruences according to the Chinese remainder theorem, to construct continued <del style="font-weight: bold; text-decoration: none;">fractions</del>, and to find accurate rational approximations to real numbers. Finally, it can be used as a basic tool for proving theorems in number theory such as Lagrange's four-square theorem and the uniqueness of prime factorizations.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_16_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_18_0_rhs"></a>The Euclidean algorithm has many theoretical and practical applications. It is used for reducing <ins style="font-weight: bold; text-decoration: none;">[[Fraction (mathematics)|fraction]]s</ins> to their <ins style="font-weight: bold; text-decoration: none;">[[Irreducible fraction|</ins>simplest form<ins style="font-weight: bold; text-decoration: none;">]]</ins> and for performing <ins style="font-weight: bold; text-decoration: none;">[[Division (mathematics)|</ins>division<ins style="font-weight: bold; text-decoration: none;">]]</ins> in <ins style="font-weight: bold; text-decoration: none;">[[</ins>modular arithmetic<ins style="font-weight: bold; text-decoration: none;">]]</ins>. Computations using this algorithm form part of the <ins style="font-weight: bold; text-decoration: none;">[[</ins>cryptographic <ins style="font-weight: bold; text-decoration: none;">protocol]]s</ins> that are used to secure <ins style="font-weight: bold; text-decoration: none;">[[</ins>internet<ins style="font-weight: bold; text-decoration: none;">]]</ins> communications, and in methods for breaking these cryptosystems by <ins style="font-weight: bold; text-decoration: none;">[[integer factorization|</ins>factoring large composite numbers<ins style="font-weight: bold; text-decoration: none;">]]</ins>. The Euclidean algorithm may be used to solve <ins style="font-weight: bold; text-decoration: none;">[[</ins>Diophantine <ins style="font-weight: bold; text-decoration: none;">equation]]s</ins>, such as finding numbers that satisfy multiple congruences according to the <ins style="font-weight: bold; text-decoration: none;">[[</ins>Chinese remainder theorem<ins style="font-weight: bold; text-decoration: none;">]]</ins>, to construct<ins style="font-weight: bold; text-decoration: none;"> [[simple</ins> continued <ins style="font-weight: bold; text-decoration: none;">fraction|continued fraction]]s</ins>, and to find accurate <ins style="font-weight: bold; text-decoration: none;">[[Diophantine approximation|</ins>rational approximations<ins style="font-weight: bold; text-decoration: none;">]]</ins> to real numbers. Finally, it can be used as a basic tool for proving theorems in <ins style="font-weight: bold; text-decoration: none;">[[</ins>number theory<ins style="font-weight: bold; text-decoration: none;">]]</ins> such as <ins style="font-weight: bold; text-decoration: none;">[[</ins>Lagrange's four-square theorem<ins style="font-weight: bold; text-decoration: none;">]]</ins> and the <ins style="font-weight: bold; text-decoration: none;">[[fundamental theorem of arithmetic|</ins>uniqueness of prime factorizations<ins style="font-weight: bold; text-decoration: none;">]]</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_20_1_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_19_0_lhs"></a>The original algorithm was described only for natural numbers and geometric lengths (real numbers), but the algorithm was generalized in the 19th century to other types of numbers, such as Gaussian <del style="font-weight: bold; text-decoration: none;">integers</del> and <del style="font-weight: bold; text-decoration: none;">polynomials</del> of one variable. This led to modern abstract <del style="font-weight: bold; text-decoration: none;">algebraic</del> notions such as Euclidean <del style="font-weight: bold; text-decoration: none;">domains</del>.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_19_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_20_1_rhs"></a>The original algorithm was described only for natural numbers and geometric lengths (real numbers), but the algorithm was generalized in the 19th century to other types of numbers, such as <ins style="font-weight: bold; text-decoration: none;">[[</ins>Gaussian <ins style="font-weight: bold; text-decoration: none;">integer]]s</ins> and <ins style="font-weight: bold; text-decoration: none;">[[polynomial]]s</ins> of one variable. This led to modern <ins style="font-weight: bold; text-decoration: none;">[[</ins>abstract <ins style="font-weight: bold; text-decoration: none;">algebra]]ic</ins> notions such as <ins style="font-weight: bold; text-decoration: none;">[[</ins>Euclidean <ins style="font-weight: bold; text-decoration: none;">domain]]s</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Background: greatest common divisor ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Background: greatest common divisor ==</div></td>
</tr>
</table>Remsensehttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1282948489&oldid=prev2600:100A:B051:BEF8:0:17:43A1:1F01: Fixed all problems2025-03-29T15:26:12Z<p>Fixed all problems</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:26, 29 March 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Short description|Algorithm for computing greatest common divisors}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Short description|Algorithm for computing greatest common divisors}}</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{About|an algorithm for the greatest common divisor|the mathematics of space|Euclidean geometry|other uses of "Euclidean"|Euclidean (disambiguation)}}</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Distinguish|Euclidean division}}</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Featured article}}</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>{{Featured article}}</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><!-- FOR REASONS OF ACCESSIBILITY TO VISUALLY-IMPAIRED READERS (see [[WP:ACCESS]]), THIS ARTICLE AVOIDS <math> (i.e. LaTeX) MODE, UNLESS IT IS NECESSARY. PLEASE DO NOT ADD <math>-MODE FORMULAE, UNLESS YOU ALSO ADD THE CORRESPONDING ALT TEXT AS WELL, E.G., <math alt="description">. EXAMPLES CAN BE FOUND BELOW, E.G., IN THE "Matrix method" SECTION. --></div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><!-- FOR REASONS OF ACCESSIBILITY TO VISUALLY-IMPAIRED READERS (see [[WP:ACCESS]]), THIS ARTICLE AVOIDS <math> (i.e. LaTeX) MODE, UNLESS IT IS NECESSARY. PLEASE DO NOT ADD <math>-MODE FORMULAE, UNLESS YOU ALSO ADD THE CORRESPONDING ALT TEXT AS WELL, E.G., <math alt="description">. EXAMPLES CAN BE FOUND BELOW, E.G., IN THE "Matrix method" SECTION. --><ins style="font-weight: bold; text-decoration: none;">In mathematics, the '''Euclidean algorithm''', or '''Euclid's algorithm''', is an efficient method for computing the greatest common divisor (GCD) of two integers, the largest number that divides them both without a remainder. It is named after the ancient Greek mathematician Euclid, who first described it in his ''Elements'' ().</ins></div></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_10_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_4_0_rhs"></a>It is an example of an ''algorithm'', a step-by-step procedure for performing a calculation according to well-defined rules,</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>[[File: Euclid's algorithm Book VII Proposition 2 3.svg|upright=1.2|thumb|right|Euclid's method for finding the greatest common divisor (GCD) of two starting lengths BA and DC, both defined to be multiples of a common "unit" length. The length DC being shorter, it is used to "measure" BA, but only once because the remainder EA is less than DC. EA now measures (twice) the shorter length DC, with remainder FC shorter than EA. Then FC measures (three times) length EA. Because there is no remainder, the process ends with FC being the GCD. On the right [[Nicomachus]]'s example with numbers 49 and 21 resulting in their GCD of 7 (derived from Heath 1908:300).]]</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_10_1_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_6_0_rhs"></a>and is one of the oldest algorithms in common use. It can be used to reduce <ins style="font-weight: bold; text-decoration: none;">fractions</ins> to their simplest form, and is a part of many other number-theoretic and cryptographic calculations.</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_13_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_8_0_rhs"></a>The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, {{math|21}} is the GCD of and (as and , and the same number is also the GCD of and . Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until the two numbers become equal. When that occurs, that number is the GCD of the original two numbers. By reversing the steps or using the extended Euclidean algorithm, the GCD can be expressed as a linear combination of the two original numbers, that is the sum of the two numbers, each multiplied by an integer (for example, ). The fact that the GCD can always be expressed in this way is known as Bézout's identity.</div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>In [[mathematics]], the '''Euclidean algorithm''',<ref group=note>Some widely used textbooks, such as [[I. N. Herstein]]'s ''Topics in Algebra'' and [[Serge Lang]]'s ''Algebra'', use the term "Euclidean algorithm" to refer to [[Euclidean division]]</ref> or '''Euclid's algorithm''', is an efficient method for computing the [[greatest common divisor]] (GCD) of two [[integers]], the largest number that divides them both without a [[remainder]]. It is named after the ancient Greek [[mathematician]] [[Euclid]], who first described it in [[Euclid's Elements|his ''Elements'']] ({{circa|300 BC}}).</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_4_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_0_lhs"></a>It is an example of an ''<del style="font-weight: bold; text-decoration: none;">[[</del>algorithm<del style="font-weight: bold; text-decoration: none;">]]</del>'', a step-by-step procedure for performing a calculation according to well-defined rules,</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_6_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_10_1_lhs"></a>and is one of the oldest algorithms in common use. It can be used to reduce <del style="font-weight: bold; text-decoration: none;">[[Fraction (mathematics)|fraction]]s</del> to their <del style="font-weight: bold; text-decoration: none;">[[Irreducible fraction|</del>simplest form<del style="font-weight: bold; text-decoration: none;">]]</del>, and is a part of many other number-theoretic and cryptographic calculations.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_16_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_12_0_rhs"></a>The version of the Euclidean algorithm described above—which follows Euclid's original presentation—may require many subtraction steps to find the GCD when one of the given numbers is much bigger than the other. A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder). With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer. This was proven by Gabriel Lamé in 1844 (Lamé's Theorem), and marks the beginning of computational complexity theory. Additional methods for improving the algorithm's efficiency were developed in the 20th century.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_8_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_13_0_lhs"></a>The Euclidean algorithm is based on the principle that the greatest common divisor of two numbers does not change if the larger number is replaced by its difference with the smaller number. For example, {{math|21}} is the GCD of <del style="font-weight: bold; text-decoration: none;">{{math|252}}</del> and <del style="font-weight: bold; text-decoration: none;">{{math|105}}</del> (as <del style="font-weight: bold; text-decoration: none;">{{math|252 {{=}} 21 × 12}}</del> and <del style="font-weight: bold; text-decoration: none;">{{math|105 {{=}} 21 × 5)}}</del>, and the same number <del style="font-weight: bold; text-decoration: none;">{{math|21}}</del> is also the GCD of <del style="font-weight: bold; text-decoration: none;">{{math|105}}</del> and <del style="font-weight: bold; text-decoration: none;">{{math|252 − 105 {{=}} 147}}</del>. Since this replacement reduces the larger of the two numbers, repeating this process gives successively smaller pairs of numbers until the two numbers become equal. When that occurs, that number is the GCD of the original two numbers. By <del style="font-weight: bold; text-decoration: none;">[[#Bézout's identity|</del>reversing the steps<del style="font-weight: bold; text-decoration: none;">]]</del> or using the <del style="font-weight: bold; text-decoration: none;">[[</del>extended Euclidean algorithm<del style="font-weight: bold; text-decoration: none;">]]</del>, the GCD can be expressed as a <del style="font-weight: bold; text-decoration: none;">[[</del>linear combination<del style="font-weight: bold; text-decoration: none;">]]</del> of the two original numbers, that is the sum of the two numbers, each multiplied by an <del style="font-weight: bold; text-decoration: none;">[[</del>integer<del style="font-weight: bold; text-decoration: none;">]]</del> (for example, <del style="font-weight: bold; text-decoration: none;">{{math|21 {{=}} 5 × 105 + (−2) × 252}}</del>). The fact that the GCD can always be expressed in this way is known as <del style="font-weight: bold; text-decoration: none;">[[</del>Bézout's identity<del style="font-weight: bold; text-decoration: none;">]]</del>.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_19_0_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_15_0_rhs"></a>The Euclidean algorithm has many theoretical and practical applications. It is used for reducing <ins style="font-weight: bold; text-decoration: none;">fractions</ins> to their simplest form and for performing division in modular arithmetic. Computations using this algorithm form part of the cryptographic <ins style="font-weight: bold; text-decoration: none;">protocols</ins> that are used to secure internet communications, and in methods for breaking these cryptosystems by factoring large composite numbers. The Euclidean algorithm may be used to solve Diophantine <ins style="font-weight: bold; text-decoration: none;">equations</ins>, such as finding numbers that satisfy multiple congruences according to the Chinese remainder theorem, to construct continued <ins style="font-weight: bold; text-decoration: none;">fractions</ins>, and to find accurate rational approximations to real numbers. Finally, it can be used as a basic tool for proving theorems in number theory such as Lagrange's four-square theorem and the uniqueness of prime factorizations.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_12_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_16_0_lhs"></a>The version of the Euclidean algorithm described above—which follows Euclid's original presentation—may require many subtraction steps to find the GCD when one of the given numbers is much bigger than the other. A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder). With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer. This was proven by <del style="font-weight: bold; text-decoration: none;">[[</del>Gabriel Lamé<del style="font-weight: bold; text-decoration: none;">]]</del> in 1844 (<del style="font-weight: bold; text-decoration: none;">[[Lamé’s Theorem|</del>Lamé's Theorem<del style="font-weight: bold; text-decoration: none;">]]</del>),<del style="font-weight: bold; text-decoration: none;"><ref>{{cite journal |last=Lamé |first=Gabriel |year=1844 |title=Note sur la limite du nombre des divisions dans la recherche du plus grand commun diviseur entre deux nombres entiers |journal=Comptes Rendus des Séances de l'Académie des Sciences |language=French |volume=19 |pages=867–870}}</ref><ref>{{cite journal |last=Shallit |first=Jeffrey |date=1994-11-01 |title=Origins of the analysis of the Euclidean algorithm |journal=Historia Mathematica |language=en |volume=21 |issue=4 |pages=401–419 |doi=10.1006/hmat.1994.1031 |issn=0315-0860|doi-access=free }}</ref></del> and marks the beginning of <del style="font-weight: bold; text-decoration: none;">[[</del>computational complexity theory<del style="font-weight: bold; text-decoration: none;">]]</del>. Additional methods for improving the algorithm's efficiency were developed in the 20th century.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td colspan="2" class="diff-empty diff-side-deleted"></td>
<td class="diff-marker"><a class="mw-diff-movedpara-right" title="Paragraph was moved. Click to jump to old location." href="#movedpara_20_1_lhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_18_0_rhs"></a>The original algorithm was described only for natural numbers and geometric lengths (real numbers), but the algorithm was generalized in the 19th century to other types of numbers, such as Gaussian <ins style="font-weight: bold; text-decoration: none;">integers</ins> and <ins style="font-weight: bold; text-decoration: none;">polynomials</ins> of one variable. This led to modern abstract <ins style="font-weight: bold; text-decoration: none;">algebraic</ins> notions such as Euclidean <ins style="font-weight: bold; text-decoration: none;">domains</ins>.</div></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_15_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_19_0_lhs"></a>The Euclidean algorithm has many theoretical and practical applications. It is used for reducing <del style="font-weight: bold; text-decoration: none;">[[Fraction (mathematics)|fraction]]s</del> to their <del style="font-weight: bold; text-decoration: none;">[[Irreducible fraction|</del>simplest form<del style="font-weight: bold; text-decoration: none;">]]</del> and for performing <del style="font-weight: bold; text-decoration: none;">[[Division (mathematics)|</del>division<del style="font-weight: bold; text-decoration: none;">]]</del> in <del style="font-weight: bold; text-decoration: none;">[[</del>modular arithmetic<del style="font-weight: bold; text-decoration: none;">]]</del>. Computations using this algorithm form part of the <del style="font-weight: bold; text-decoration: none;">[[</del>cryptographic <del style="font-weight: bold; text-decoration: none;">protocol]]s</del> that are used to secure <del style="font-weight: bold; text-decoration: none;">[[</del>internet<del style="font-weight: bold; text-decoration: none;">]]</del> communications, and in methods for breaking these cryptosystems by <del style="font-weight: bold; text-decoration: none;">[[integer factorization|</del>factoring large composite numbers<del style="font-weight: bold; text-decoration: none;">]]</del>. The Euclidean algorithm may be used to solve <del style="font-weight: bold; text-decoration: none;">[[</del>Diophantine <del style="font-weight: bold; text-decoration: none;">equation]]s</del>, such as finding numbers that satisfy multiple congruences according to the <del style="font-weight: bold; text-decoration: none;">[[</del>Chinese remainder theorem<del style="font-weight: bold; text-decoration: none;">]]</del>, to construct<del style="font-weight: bold; text-decoration: none;"> [[simple</del> continued <del style="font-weight: bold; text-decoration: none;">fraction|continued fraction]]s</del>, and to find accurate <del style="font-weight: bold; text-decoration: none;">[[Diophantine approximation|</del>rational approximations<del style="font-weight: bold; text-decoration: none;">]]</del> to real numbers. Finally, it can be used as a basic tool for proving theorems in <del style="font-weight: bold; text-decoration: none;">[[</del>number theory<del style="font-weight: bold; text-decoration: none;">]]</del> such as <del style="font-weight: bold; text-decoration: none;">[[</del>Lagrange's four-square theorem<del style="font-weight: bold; text-decoration: none;">]]</del> and the <del style="font-weight: bold; text-decoration: none;">[[fundamental theorem of arithmetic|</del>uniqueness of prime factorizations<del style="font-weight: bold; text-decoration: none;">]]</del>.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"><a class="mw-diff-movedpara-left" title="Paragraph was moved. Click to jump to new location." href="#movedpara_18_0_rhs">⚫</a></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><a name="movedpara_20_1_lhs"></a>The original algorithm was described only for natural numbers and geometric lengths (real numbers), but the algorithm was generalized in the 19th century to other types of numbers, such as <del style="font-weight: bold; text-decoration: none;">[[</del>Gaussian <del style="font-weight: bold; text-decoration: none;">integer]]s</del> and <del style="font-weight: bold; text-decoration: none;">[[polynomial]]s</del> of one variable. This led to modern <del style="font-weight: bold; text-decoration: none;">[[</del>abstract <del style="font-weight: bold; text-decoration: none;">algebra]]ic</del> notions such as <del style="font-weight: bold; text-decoration: none;">[[</del>Euclidean <del style="font-weight: bold; text-decoration: none;">domain]]s</del>.</div></td>
<td colspan="2" class="diff-empty diff-side-added"></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Background: greatest common divisor ==</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>== Background: greatest common divisor ==</div></td>
</tr>
</table>2600:100A:B051:BEF8:0:17:43A1:1F01https://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1273747262&oldid=prevMr. X 235528: /* Noncommutative rings */2025-02-03T20:45:57Z<p><span class="autocomment">Noncommutative rings</span></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 20:45, 3 February 2025</td>
</tr><tr>
<td colspan="2" class="diff-lineno">Line 622:</td>
<td colspan="2" class="diff-lineno">Line 622:</td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The Euclidean algorithm may be applied to some noncommutative rings such as the set of [[Hurwitz quaternion]]s.<ref name="stillwell151-152">{{Harvnb|Stillwell|2003|pp=151–152}}</ref><ref name=bgv>{{harvtxt|Bueso|Gómez-Torrecillas|Verschoren|2003}}; see pp. 37-38 for non-commutative extensions of the Euclidean algorithm and Corollary 4.35, p. 40, for more examples of noncommutative rings to which they apply.</ref> Let {{mvar|α}} and {{mvar|β}} represent two elements from such a ring. They have a common right divisor {{mvar|δ}} if {{math|1=''α'' = ''ξδ''}} and {{math|1=''β'' = ''ηδ''}} for some choice of {{mvar|ξ}} and {{mvar|η}} in the ring. Similarly, they have a common left divisor if {{math|1=''α'' = ''dξ''}} and {{math|1=''β'' = ''dη''}} for some choice of {{mvar|ξ}} and {{mvar|η}} in the ring. Since multiplication is not commutative, there are two versions of the Euclidean algorithm, one for right divisors and one for left divisors.<ref name="stillwell151-152"/><ref name=bgv/> Choosing the right divisors, the first step in finding the {{math|gcd(''α'', ''β'')}} by the Euclidean algorithm can be written</div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The Euclidean algorithm may be applied to some noncommutative rings such as the set of [[Hurwitz quaternion]]s.<ref name="stillwell151-152">{{Harvnb|Stillwell|2003|pp=151–152}}</ref><ref name=bgv>{{harvtxt|Bueso|Gómez-Torrecillas|Verschoren|2003}}; see pp. 37-38 for non-commutative extensions of the Euclidean algorithm and Corollary 4.35, p. 40, for more examples of noncommutative rings to which they apply.</ref> Let {{mvar|α}} and {{mvar|β}} represent two elements from such a ring. They have a common right divisor {{mvar|δ}} if {{math|1=''α'' = ''ξδ''}} and {{math|1=''β'' = ''ηδ''}} for some choice of {{mvar|ξ}} and {{mvar|η}} in the ring. Similarly, they have a common left divisor if {{math|1=''α'' = ''dξ''}} and {{math|1=''β'' = ''dη''}} for some choice of {{mvar|ξ}} and {{mvar|η}} in the ring. Since multiplication is not commutative, there are two versions of the Euclidean algorithm, one for right divisors and one for left divisors.<ref name="stillwell151-152"/><ref name=bgv/> Choosing the right divisors, the first step in finding the {{math|gcd(''α'', ''β'')}} by the Euclidean algorithm can be written</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\rho_0 = \alpha - \psi_0\beta = (\xi - \psi_0\eta)\delta,</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\rho_0 = \alpha - \psi_0\beta = (\xi - \psi_0\eta)\delta,</math></div></td>
</tr>
<tr>
<td class="diff-marker" data-marker="−"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>where {{math|''ψ''<sub>0</sub>}} represents the quotient and {{math|''ρ''<sub>0</sub>}} the remainder. Here the <del style="font-weight: bold; text-decoration: none;">quotent</del> and remainder are chosen so that (if nonzero) the remainder has {{math|''N''(''ρ''<sub>0</sub>) < ''N''(''&beta;'')}} for a "Euclidean function" ''N'' defined analogously to the Euclidean functions of [[Euclidean domain]]s in the non-commutative case.<ref name=bgv/> This equation shows that any common right divisor of {{mvar|α}} and {{mvar|β}} is likewise a common divisor of the remainder {{math|''ρ''<sub>0</sub>}}. The analogous equation for the left divisors would be</div></td>
<td class="diff-marker" data-marker="+"></td>
<td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>where {{math|''ψ''<sub>0</sub>}} represents the quotient and {{math|''ρ''<sub>0</sub>}} the remainder. Here the <ins style="font-weight: bold; text-decoration: none;">quotient</ins> and remainder are chosen so that (if nonzero) the remainder has {{math|''N''(''ρ''<sub>0</sub>) < ''N''(''&beta;'')}} for a "Euclidean function" ''N'' defined analogously to the Euclidean functions of [[Euclidean domain]]s in the non-commutative case.<ref name=bgv/> This equation shows that any common right divisor of {{mvar|α}} and {{mvar|β}} is likewise a common divisor of the remainder {{math|''ρ''<sub>0</sub>}}. The analogous equation for the left divisors would be</div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\rho_0 = \alpha - \beta\psi_0 = \delta(\xi - \eta\psi_0).</math></div></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>: <math>\rho_0 = \alpha - \beta\psi_0 = \delta(\xi - \eta\psi_0).</math></div></td>
</tr>
<tr>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
<td class="diff-marker"></td>
<td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br /></td>
</tr>
</table>Mr. X 235528https://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1268895946&oldid=prevQuondum: further fmt2025-01-12T02:20:46Z<p>further fmt</p>
<a href="//en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1268895946&oldid=1268806596">Show changes</a>Quondumhttps://en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1268806596&oldid=prevQuondum: fmt (replacing nbsp inside {{math}} with sp, partially adding {{math}} to some plaintext formulae for more uniformity); IMO this article is way too big to qualify as a featured article2025-01-11T17:17:09Z<p>fmt (replacing nbsp inside {{math}} with sp, partially adding {{math}} to some plaintext formulae for more uniformity); IMO this article is way too big to qualify as a featured article</p>
<a href="//en.wikipedia.org/w/index.php?title=Euclidean_algorithm&diff=1268806596&oldid=1264374344">Show changes</a>Quondum