GetWiki
greatest common divisor
ARTICLE SUBJECTS
being →
database →
ethics →
fiction →
history →
internet →
language →
linux →
logic →
method →
news →
policy →
purpose →
religion →
science →
software →
truth →
unix →
wiki →
ARTICLE TYPES
essay →
feed →
help →
system →
wiki →
ARTICLE ORIGINS
critical →
forked →
imported →
original →
greatest common divisor
please note:
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
{{Use American English|date = March 2019}}{{short description|Largest positive integer that divides two or more integers}}In mathematics, the greatest common divisor (gcd) of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For example, the gcd of 8 and 12 is 4.{{harvtxt|Long|1972|p=33}}{{harvtxt|Pettofrezzo|Byrkit|1970|p=34}}The greatest common divisor is also known as the greatest common factor (gcf),{{citation
- the content below is remote from Wikipedia
- it has been imported raw for GetWiki
| last = Kelley | first = W. Michael
| isbn = 9781592571611
| page = 142
| publisher = Penguin
| title = The Complete Idiot's Guide to Algebra
| url =weblink
| year = 2004}}. highest common factor (hcf),{{citation
| last = Jones | first = Allyn
| isbn = 9781864413786
| page = 16
| publisher = Pascal Press
| title = Whole Numbers, Decimals, Percentages and Fractions Year 7
| url =weblink
| year = 1999}}. greatest common measure (gcm),{{citation
| last1 = Barlow | first1 = Peter | author1-link = Peter Barlow (mathematician)
| last2 = Peacock | first2 = George | author2-link = George Peacock
| last3 = Lardner | first3 = Dionysius | author3-link = Dionysius Lardner
| last4 = Airy | first4 = Sir George Biddell | author4-link = George Biddell Airy
| last5 = Hamilton | first5 = H. P. | author5-link = Henry Hamilton (priest)
| last6 = Levy | first6 = A.
| last7 = De Morgan | first7 = Augustus | author7-link = Augustus De Morgan
| last8 = Mosley | first8 = Henry
| page = 589
| publisher = R. Griffin and Co.
| title = Encyclopaedia of Pure Mathematics
| url =weblink
| year = 1847}}. or highest common divisor.
This notion can be extended to polynomials (see Polynomial greatest common divisor) and other commutative rings (see below).| isbn = 9781592571611
| page = 142
| publisher = Penguin
| title = The Complete Idiot's Guide to Algebra
| url =weblink
| year = 2004}}. highest common factor (hcf),{{citation
| last = Jones | first = Allyn
| isbn = 9781864413786
| page = 16
| publisher = Pascal Press
| title = Whole Numbers, Decimals, Percentages and Fractions Year 7
| url =weblink
| year = 1999}}. greatest common measure (gcm),{{citation
| last1 = Barlow | first1 = Peter | author1-link = Peter Barlow (mathematician)
| last2 = Peacock | first2 = George | author2-link = George Peacock
| last3 = Lardner | first3 = Dionysius | author3-link = Dionysius Lardner
| last4 = Airy | first4 = Sir George Biddell | author4-link = George Biddell Airy
| last5 = Hamilton | first5 = H. P. | author5-link = Henry Hamilton (priest)
| last6 = Levy | first6 = A.
| last7 = De Morgan | first7 = Augustus | author7-link = Augustus De Morgan
| last8 = Mosley | first8 = Henry
| page = 589
| publisher = R. Griffin and Co.
| title = Encyclopaedia of Pure Mathematics
| url =weblink
| year = 1847}}. or highest common divisor.
Overview
Notation
In this article we will denote the greatest common divisor of two integers a and b as gcd(a,b). Some authors use (a,b).{{harvtxt|Andrews|1994|p=16}} explains his choice of notation: "Many authors write (a,b) for {{nowrap|g.c.d.(a,b)}}. We do not, because we shall often use (a,b) to represent a point in the Euclidean plane."Example
What is the greatest common divisor of 54 and 24? The number 54 can be expressed as a product of two integers in several different ways:
54 times 1 = 27 times 2 = 18 times 3 = 9 times 6. ,
Thus the divisors of 54 are: 1, 2, 3, 6, 9, 18, 27, 54. , Similarly, the divisors of 24 are: 1, 2, 3, 4, 6, 8, 12, 24. , The numbers that these two lists share in common are the common divisors of 54 and 24:
1, 2, 3, 6. ,
The greatest of these is 6. That is, the greatest common divisor of 54 and 24. One writes:
gcd(54,24) = 6. ,
Coprime numbers
Two numbers are called relatively prime, or coprime, if their greatest common divisor equals 1. For example, 9 and 28 are relatively prime.A geometric view
(File:24x60.svg|thumb|upright|alt="Tall, slender rectangle divided into a grid of squares. The rectangle is two squares wide and five squares tall."|A 24-by-60 rectangle is covered with ten 12-by-12 square tiles, where 12 is the GCD of 24 and 60. More generally, an a-by-b rectangle can be covered with square tiles of side length c only if c is a common divisor of a and b.)For example, a 24-by-60 rectangular area can be divided into a grid of: 1-by-1 squares, 2-by-2 squares, 3-by-3 squares, 4-by-4 squares, 6-by-6 squares or 12-by-12 squares. Therefore, 12 is the greatest common divisor of 24 and 60. A 24-by-60 rectangular area can be divided into a grid of 12-by-12 squares, with two squares along one edge (24/12 = 2) and five squares along the other (60/12 = 5).Applications
Reducing fractions
{{further|Irreducible fraction}}The greatest common divisor is useful for reducing fractions to be in lowest terms. For example, gcd(42, 56) = 14, therefore,
frac{42}{56}=frac{3 cdot 14 }{ 4 cdot 14}=frac{3 }{ 4}.
Least common multiple
{{Further|Least common multiple}}The greatest common divisor can be used to find the least common multiple of two numbers when the greatest common divisor is known, using the relation,
operatorname{lcm}(a,b)=frac{|acdot b|}{operatorname{gcd}(a,b)}.
Calculation
Using prime factorizations
Greatest common divisors can in principle be computed by determining the prime factorizations of the two numbers and comparing factors, as in the following example: to compute gcd(18, 84), we find the prime factorizations 18 = 2 Â· 32 and 84 = 22 Â· 3 Â· 7 and notice that the "overlap" of the two expressions is 2 Â· 3; so gcd(18, 84) = 6. In practice, this method is only feasible for small numbers; computing prime factorizations in general takes far too long.Here is another concrete example, illustrated by a Venn diagram. Suppose it is desired to find the greatest common divisor of 48 and 180. First, find the prime factorizations of the two numbers:
48 = 2 Ã— 2 Ã— 2 Ã— 2 Ã— 3,
180 = 2 Ã— 2 Ã— 3 Ã— 3 Ã— 5.
What they share in common is two "2"s and a "3":
(File:least common multiple.svg|300px)Gustavo Delfino, "Understanding the Least Common Multiple and Greatest Common Divisor", Wolfram Demonstrations Project], Published: February 1, 2013. ]
Least common multiple = 2 Ã— 2 Ã— ( 2 Ã— 2 Ã— 3 ) Ã— 3 Ã— 5 = 720
Greatest common divisor = 2 Ã— 2 Ã— 3 = 12.
Euclid's algorithm
A much more efficient method is the Euclidean algorithm, which uses a division algorithm such as long division in combination with the observation that the gcd of two numbers also divides their difference. To compute gcd(48,18), divide 48 by 18 to get a quotient of 2 and a remainder of 12. Then divide 18 by 12 to get a quotient of 1 and a remainder of 6. Then divide 12 by 6 to get a remainder of 0, which means that 6 is the gcd. Note that we ignored the quotient in each step except to notice when the remainder reached 0, signalling that we had arrived at the answer. Formally the algorithm can be described as:
gcd(a,0) = a
gcd(a,b) = gcd(b, a ,mathrm{mod}, b),
where
a ,mathrm{mod}, b = a - b leftlfloor {a over b} rightrfloor .
If the arguments are both greater than zero then the algorithm can be written in more elementary terms as follows:
gcd(a,a) = a,
gcd(a,b) = gcd(a - b,b)quad, if a > b
gcd(a,b) = gcd(a, b-a)quad, if b > a
(File:The Great Common Divisor of 62 and 36 is 2.ogv|thumb|Animation showing an application of the Euclidean algorithm to find the greatest common divisor of 62 and 36, which is 2.)Lehmer's GCD algorithm
Lehmer's algorithm is based on the observation that the initial quotients produced by Euclid's algorithm can be determined based on only the first few digits; this is useful for numbers that are larger than a computer word. In essence, one extracts initial digits, typically forming one or two computer words, and runs Euclid's algorithms on these smaller numbers, as long as it is guaranteed that the quotients are the same with those that would be obtained with the original numbers. Those quotients are collected into a small 2-by-2 transformation matrix (that is a matrix of single-word integers), for using them all at once for reducing the original numbers. This process is repeated until numbers have a size for which the binary algorithm (see below) is more efficient. This algorithm improves speed, because it reduces the number of operations on very large numbers and can use the speed of hardware arithmetic for most operations. In fact, most of the quotients are very small, so a fair number of steps of the Euclidean algorithm can be collected in a 2-by-2 matrix of single-word integers. When Lehmer's algorithm encounters a too large quotient, it must fall back to one iteration of Euclidean algorithm, with a Euclidean division of large numbers.Binary GCD algorithm
An alternative method of computing the gcd is the binary GCD algorithm which uses only subtraction and division by 2.In outline the method is as follows: Let a and b be the two non negative integers. Also set the integer d to 0. There are five possibilities:- a = b.
- Both a and b are even.
- a is even and b is odd.
- a is odd and b is even.
- Both a and b are odd.
Input: a, b positive integers
Output: g and d such that g is odd and gcd(a, b) = g Ã— 2d
d := 0
while a and b are both even
a := a/2
b := b/2
d := d + 1
while a â‰ b
if a is even then a := a/2
else if b is even then b := b/2
else if a > b then a := (a â€“ b)/2
else b := (b â€“ a)/2
g := a
output g, d
Example: (a, b, d) = (48, 18, 0) â†’ (24, 9, 1) â†’ (12, 9, 1) â†’ (6, 9, 1) â†’ (3, 9, 1) â†’ (3, 6, 1) â†’ (3, 3, 1) ; the original gcd is thus the product 6 of 2d = 21 and a= b= 3.The binary GCD algorithm is particularly easy to implement on binary computers. The test for whether a number is divisible by two can be performed by testing the lowest bit in the number. Division by two can be achieved by shifting the input number by one bit. Each step of the algorithm makes at least one such shift. Subtracting two numbers smaller than a and b costs O(log a+log b) bit operations. Each step makes at most one such subtraction. The total number of steps is at most the sum of the numbers of bits of a and b, hence the computational complexity is
Output: g and d such that g is odd and gcd(a, b) = g Ã— 2d
d := 0
while a and b are both even
a := a/2
b := b/2
d := d + 1
while a â‰ b
if a is even then a := a/2
else if b is even then b := b/2
else if a > b then a := (a â€“ b)/2
else b := (b â€“ a)/2
g := a
output g, d
O((log a + log b)^2)
The computational complexity is usually given in terms of the length {{mvar|n}} of the input. Here, this length is n=log a + log b, and the complexity is thus
O(n^2).
Other methods
missing image!
- Greatest common divisor.png -
gcd(1,x) = y, or Thomae's function. Hatching at bottom indicates ellipses.
If a and b are both nonzero, the greatest common divisor of a and b can be computed by using least common multiple (lcm) of a and b:
- Greatest common divisor.png -
gcd(1,x) = y, or Thomae's function. Hatching at bottom indicates ellipses.
gcd(a,b)=frac{|acdot b|}{operatorname{lcm}(a,b)},
but more commonly the lcm is computed from the gcd.Using Thomae's function f,
gcd(a,b) = a fleft(frac b aright),
which generalizes to a and b rational numbers or commensurable real numbers.Keith Slavin has shown that for odd a â‰¥ 1:
gcd(a,b)=log_2prod_{k=0}^{a-1} (1+e^{-2ipi k b/a})
which is a function that can be evaluated for complex b.JOURNAL, Slavin, Keith R., Q-Binomials and the Greatest Common Divisor, Integers Electronic Journal of Combinatorial Number Theory, 8, A5, University of West Georgia, Charles University in Prague, 2008,weblink 2008-05-26, Wolfgang Schramm has shown that
gcd(a,b)=sumlimits_{k=1}^a exp (2pi ikb/a) cdot sumlimits_{dleft| aright.} frac{c_d (k)}{d}
is an entire function in the variable b for all positive integers a where cd(k) is Ramanujan's sum.JOURNAL, Schramm, Wolfgang, The Fourier transform of functions of the greatest common divisor, Integers Electronic Journal of Combinatorial Number Theory, 8, A50, University of West Georgia, Charles University in Prague, 2008,weblink 2008-11-25, Complexity
The computational complexity of the computation of greatest common divisors has been widely studied.BOOK, Donald E., Knuth, Donald Knuth, The Art of Computer Programming, 2: Seminumerical Algorithms, 3rd, 1997, Addison-Wesley Professional, 0-201-89684-2, If one uses the Euclidean algorithm and the elementary algorithms for multiplication and division, the computation of the greatest common divisor of two integers of at most {{mvar|n}} bits is O(n^2). This means that the computation of greatest common divisor has, up to a constant factor, the same complexity as the multiplication.However, if a fast multiplication algorithm is used, one may modify the Euclidean algorithm for improving the complexity, but the computation of a greatest common divisor becomes slower than the multiplication. More precisely, if the multiplication of two integers of {{mvar|n}} bits takes a time of {{math|T(n)}}, then the fastest known algorithm for greatest common divisor has a complexity Oleft(T(n)log nright). This implies that the fastest known algorithm has a complexity of Oleft(n,(log n)^2loglog nright).Previous complexities are valid for the usual models of computation, specifically multitape Turing machines and random-access machines.The computation of the greatest common divisors belongs thus to the class of problems solvable in quasilinear time. A fortiori, the corresponding decision problem belongs to the class P of problems solvable in polynomial time. The GCD problem is not known to be in NC, and so there is no known way to parallelize it efficiently; nor is it known to be P-complete, which would imply that it is unlikely to be possible to efficiently parallelize GCD computation. Shallcross et al. showed that a related problem (EUGCD, determining the remainder sequence arising during the Euclidean algorithm) is NC-equivalent to the problem of integer linear programming with two variables; if either problem is in NC or is P-complete, the other is as well.BOOK, D., Shallcross, V., Pan, Y., Lin-Kriz, The NC equivalence of planar integer linear programming and Euclidean GCD, 34th IEEE Symp. Foundations of Computer Science, 1993, 557â€“564,weblink Since NC contains NL, it is also unknown whether a space-efficient algorithm for computing the GCD exists, even for nondeterministic Turing machines.Although the problem is not known to be in NC, parallel algorithms asymptotically faster than the Euclidean algorithm exist; the fastest known deterministic algorithm is by Chor and Goldreich, which (in the CRCW-PRAM model) can solve the problem in {{math|O(n/log n)}} time with {{math|n1+Îµ}} processors.JOURNAL, B., Chor, O., Goldreich, An improved parallel algorithm for integer GCD, Algorithmica, 5, 1â€“4, 1â€“10, 1990, 10.1007/BF01840374, Randomized algorithms can solve the problem in {{math|O((log n)2)}} time on expleft(Oleft(sqrt{n log n}right)right) processors {{clarify|reason=with O notation in exponent, the complexity is not changed if the sqrt and the log are omitted|date=April 2018}} (note this is superpolynomial).BOOK, L. M., Adleman, K., Kompella, Using smoothness to achieve parallelism, 20th Annual ACM Symposium on Theory of Computing, 528â€“538, 1988, 0-89791-264-0, New York, 10.1145/62212.62264,Properties
- Every common divisor of a and b is a divisor of {{nowrap|gcd(a, b)}}.
- {{nowrap|gcd(a, b)}}, where a and b are not both zero, may be defined alternatively and equivalently as the smallest positive integer d which can be written in the form {{nowrap|1=d = aâ‹…p + bâ‹…q}}, where p and q are integers. This expression is called BÃ©zout's identity. Numbers p and q like this can be computed with the extended Euclidean algorithm.
- {{nowrap|1=gcd(a, 0) = {{abs|a}}}}, for {{nowrap|a â‰ 0}}, since any number is a divisor of 0, and the greatest divisor of a is {{abs|a}}.{{harvtxt|Hardy|Wright|1979|p=20}} This is usually used as the base case in the Euclidean algorithm.
- If a divides the product bâ‹…c, and {{nowrap|1=gcd(a, b) = d}}, then a/d divides c.
- If m is a non-negative integer, then {{nowrap|1=gcd(mâ‹…a, mâ‹…b) = mâ‹…gcd(a, b)}}.
- If m is any integer, then {{nowrap|1=gcd(a + mâ‹…b, b) = gcd(a, b)}}.
- If m is a positive common divisor of a and b, then {{nowrap|1=gcd(a/m, b/m) = gcd(a, b)/m}}.
- The gcd is a multiplicative function in the following sense: if a1 and a2 are relatively prime, then {{nowrap|1=gcd(a1â‹…a2, b) = gcd(a1, b)â‹…gcd(a2, b)}}. In particular, recalling that gcd is a positive integer valued function (that is, gets natural values only) we obtain that {{nowrap|1=gcd(a, bâ‹…c) = 1}} if and only if {{nowrap|1=gcd(a, b) = 1}} and {{nowrap|1=gcd(a, c) = 1}}.
- The gcd is a commutative function: {{nowrap|1=gcd(a, b) = gcd(b, a)}}.
- The gcd is an associative function: {{nowrap|1=gcd(a, gcd(b, c)) = gcd(gcd(a, b), c)}}.
- If none of a1, a2, . . . , a'r is zero, then gcd( a1, a2, . . . , a'r ) = gcd( gcd( a1, a2, . . . , a'r-1 ), a'r ).{{harvtxt|Long|1972|p=40}}{{harvtxt|Pettofrezzo|Byrkit|1970|p=41}}
- {{nowrap|gcd(a, b)}} is closely related to the least common multiple {{nowrap|lcm(a, b)}}: we have
- :{{nowrap|1=gcd(a, b)â‹…lcm(a, b) = {{abs|aâ‹…b}}}}.
This formula is often used to compute least common multiples: one first computes the gcd with Euclid's algorithm and then divides the product of the given numbers by their gcd.
- The following versions of distributivity hold true:
- :{{nowrap|1=gcd(a, lcm(b, c)) = lcm(gcd(a, b), gcd(a, c))}}
- :{{nowrap|1=lcm(a, gcd(b, c)) = gcd(lcm(a, b), lcm(a, c))}}.
- If we have the unique prime factorizations of {{nowrap|1=a = p1e1 p2e2 â‹…â‹…â‹… p'm'e'm}} and {{nowrap|1=b = p1f1 p2f2 â‹…â‹…â‹… p'm'f'm}} where {{nowrap|1=ei â‰¥ 0}} and {{nowrap|1=fi â‰¥ 0}}, then the gcd of a and b is
- :{{nowrap|1=gcd(a,b) = p1min(e1,f1) p2min(e2,f2) â‹…â‹…â‹… p'mmin(e'm,fm)}}.
- It is sometimes useful to define {{nowrap|1=gcd(0, 0) = 0}} and {{nowrap|1=lcm(0, 0) = 0}} because then the natural numbers become a complete distributive lattice with gcd as meet and lcm as join operation.{hide}citation
| last1 = MÃ¼ller-Hoissen | first1 = Folkert
| last2 = Walther | first2 = Hans-Otto
| editor1-last = MÃ¼ller-Hoissen | editor1-first = Folkert
| editor2-last = Pallo | editor2-first = Jean Marcel
| editor3-last = Stasheff | editor3-first = Jim | editor3-link = Jim Stasheff
| contribution = Dov Tamari (formerly Bernhard Teitler)
| isbn = 9783034804059
| pages = 1â€“40
| publisher = BirkhÃ¤user
| series = Progress in Mathematics
| title = Associahedra, Tamari Lattices and Related Structures: Tamari Memorial Festschrift
| volume = 299
| year = 2012{edih}. Footnote 27, p. 9: "For example, the natural numbers with gcd (greatest common divisor) as meet and lcm (least common multiple) as join operation determine a (complete distributive) lattice." Including these definitions for 0 is necessary for this result: if one instead omits 0 from the set of natural numbers, the resulting lattice is not complete. This extension of the definition is also compatible with the generalization for commutative rings given below.
| last2 = Walther | first2 = Hans-Otto
| editor1-last = MÃ¼ller-Hoissen | editor1-first = Folkert
| editor2-last = Pallo | editor2-first = Jean Marcel
| editor3-last = Stasheff | editor3-first = Jim | editor3-link = Jim Stasheff
| contribution = Dov Tamari (formerly Bernhard Teitler)
| isbn = 9783034804059
| pages = 1â€“40
| publisher = BirkhÃ¤user
| series = Progress in Mathematics
| title = Associahedra, Tamari Lattices and Related Structures: Tamari Memorial Festschrift
| volume = 299
| year = 2012{edih}. Footnote 27, p. 9: "For example, the natural numbers with gcd (greatest common divisor) as meet and lcm (least common multiple) as join operation determine a (complete distributive) lattice." Including these definitions for 0 is necessary for this result: if one instead omits 0 from the set of natural numbers, the resulting lattice is not complete. This extension of the definition is also compatible with the generalization for commutative rings given below.
- In a Cartesian coordinate system, {{nowrap|gcd(a, b)}} can be interpreted as the number of segments between points with integral coordinates on the straight line segment joining the points {{nowrap|(0, 0)}} and {{nowrap|(a, b)}}.
- For non-negative integers a and b, where a and b are not both zero, provable by considering the Euclidean algorithm in base n:BOOK, Donald E., Knuth, Donald Knuth, Graham, R. L., Patashnik, O., (Concrete Mathematics: A Foundation for Computer Science), March 1994, Addison-Wesley, 0-201-55802-5,
- :{{nowrap|1=gcd(n'a âˆ’ 1, n'b âˆ’ 1) = ngcd(a,b) âˆ’ 1}}.
- An identity involving Euler's totient function:
- : gcd(a,b) = sum_{k|a text{ and }k|b} varphi(k) .
Probabilities and expected value
In 1972, James E. Nymann showed that k integers, chosen independently and uniformly from {1,...,n}, are coprime with probability 1/Î¶(k) as n goes to infinity, where Î¶ refers to the Riemann zeta function.JOURNAL, J. E., Nymann, On the probability that k positive integers are relatively prime, Journal of Number Theory, 4, 5, 469â€“473, 1972, 10.1016/0022-314X(72)90038-8, (See coprime for a derivation.) This result was extended in 1987 to show that the probability that k random integers have greatest common divisor d is dâˆ’k/Î¶(k).JOURNAL, J., Chidambaraswamy, R., Sitarmachandrarao, On the probability that the values of m polynomials have a given g.c.d., Journal of Number Theory, 26, 3, 237â€“245, 1987, 10.1016/0022-314X(87)90081-3, Using this information, the expected value of the greatest common divisor function can be seen (informally) to not exist when k = 2. In this case the probability that the gcd equals d is dâˆ’2/Î¶(2), and since Î¶(2) = Ï€2/6 we have
mathrm{E}( mathrm{2} ) = sum_{d=1}^infty d frac{6}{pi^2 d^2} = frac{6}{pi^2} sum_{d=1}^infty frac{1}{d}.
This last summation is the harmonic series, which diverges. However, when k â‰¥ 3, the expected value is well-defined, and by the above argument, it is
mathrm{E}(k) = sum_{d=1}^infty d^{1-k} zeta(k)^{-1} = frac{zeta(k-1)}{zeta(k)}.
For k = 3, this is approximately equal to 1.3684. For k = 4, it is approximately 1.1106.In commutative rings
{{see also|divisor (ring theory)}}{{unreferenced section|date=October 2014}}The notion of greatest common divisor can more generally be defined for elements of an arbitrary commutative ring, although in general there need not exist one for every pair of elements.If {{mvar|R}} is a commutative ring, and {{mvar|a}} and {{mvar|b}} are in {{mvar|R}}, then an element {{mvar|d}} of {{mvar|R}} is called a common divisor of {{mvar|a}} and {{mvar|b}} if it divides both {{mvar|a}} and {{mvar|b}} (that is, if there are elements {{mvar|x}} and {{mvar|y}} in {{mvar|R}} such that dÂ·x = a and dÂ·y = b).If {{mvar|d}} is a common divisor of {{mvar|a}} and {{mvar|b}}, and every common divisor of {{mvar|a}} and {{mvar|b}} divides {{mvar|d}}, then {{mvar|d}} is called a greatest common divisor of {{mvar|a}} and b.Note that with this definition, two elements {{mvar|a}} and {{mvar|b}} may very well have several greatest common divisors, or none at all. If {{mvar|R}} is an integral domain then any two gcd's of {{mvar|a}} and {{mvar|b}} must be associate elements, since by definition either one must divide the other; indeed if a gcd exists, any one of its associates is a gcd as well. Existence of a gcd is not assured in arbitrary integral domains. However if {{mvar|R}} is a unique factorization domain, then any two elements have a gcd, and more generally this is true in gcd domains.If {{mvar|R}} is a Euclidean domain in which euclidean division is given algorithmically (as is the case for instance when R = F[X] where {{mvar|F}} is a field, or when {{mvar|R}} is the ring of Gaussian integers), then greatest common divisors can be computed using a form of the Euclidean algorithm based on the division procedure.The following is an example of an integral domain with two elements that do not have a gcd:
R = mathbb{Z}left[sqrt{-3},,right],quad a = 4 = 2cdot 2 = left(1+sqrt{-3},,right)left(1-sqrt{-3},,right),quad b = left(1+sqrt{-3},,right)cdot 2.
The elements 2 and 1 + {{sqrt|âˆ’3}} are two maximal common divisors (that is, any common divisor which is a multiple of 2 is associated to 2, the same holds for 1 + {{sqrt|âˆ’3}}, but they are not associated, so there is no greatest common divisor of {{mvar|a}} and b.Corresponding to the BÃ©zout property we may, in any commutative ring, consider the collection of elements of the form pa + qb, where {{mvar|p}} and {{mvar|q}} range over the ring. This is the ideal generated by {{mvar|a}} and {{mvar|b}}, and is denoted simply (a, b). In a ring all of whose ideals are principal (a principal ideal domain or PID), this ideal will be identical with the set of multiples of some ring element d; then this {{mvar|d}} is a greatest common divisor of {{mvar|a}} and b. But the ideal (a, b) can be useful even when there is no greatest common divisor of {{mvar|a}} and b. (Indeed, Ernst Kummer used this ideal as a replacement for a gcd in his treatment of Fermat's Last Theorem, although he envisioned it as the set of multiples of some hypothetical, or ideal, ring element {{mvar|d}}, whence the ring-theoretic term.)See also
Notes
{{reflist}}References
- {{Citation |last=Andrews |first=George E. |author-link=George Andrews (mathematician) |year=1994 |origyear=1971 |title=Number Theory |publisher=Dover |publication-place= |page= |isbn=9780486682525 |url=https://books.google.com/books?id=eVwvvwZeBf4C |accessdate= }}
- {{citation
| last1 = Hardy | first1 = G. H. | author1-link = G. H. Hardy
| last2 = Wright | first2 = E. M. | author2-link = E. M. Wright
| title = An Introduction to the Theory of Numbers
| edition = Fifth
| publisher = Oxford University Press
| location = Oxford
| year = 1979
| isbn = 978-0-19-853171-5}}
| last2 = Wright | first2 = E. M. | author2-link = E. M. Wright
| title = An Introduction to the Theory of Numbers
| edition = Fifth
| publisher = Oxford University Press
| location = Oxford
| year = 1979
| isbn = 978-0-19-853171-5}}
- {{citation | first = Calvin T. | last = Long | year = 1972 | title = Elementary Introduction to Number Theory | edition = 2nd | publisher = D. C. Heath and Company | location = Lexington | lccn = 77171950 }}
- {{citation | first1 = Anthony J. | last1 = Pettofrezzo | first2 = Donald R. | last2 = Byrkit | year = 1970 | title = Elements of Number Theory | publisher = Prentice Hall | location = Englewood Cliffs | lccn = 71081766}}
Further reading
- Donald Knuth. The Art of Computer Programming, Volume 2: Seminumerical Algorithms, Third Edition. Addison-Wesley, 1997. {{ISBN|0-201-89684-2}}. Section 4.5.2: The Greatest Common Divisor, pp. 333â€“356.
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. {{ISBN|0-262-03293-7}}. Section 31.2: Greatest common divisor, pp. 856â€“862.
- Saunders MacLane and Garrett Birkhoff. A Survey of Modern Algebra, Fourth Edition. MacMillan Publishing Co., 1977. {{ISBN|0-02-310070-2}}. 1â€“7: "The Euclidean Algorithm."
External links
{{Number-theoretic algorithms}}- content above as imported from Wikipedia
- "greatest common divisor" does not exist on GetWiki (yet)
- time: 1:19pm EDT - Thu, Jun 20 2019
- "greatest common divisor" does not exist on GetWiki (yet)
- time: 1:19pm EDT - Thu, Jun 20 2019
[ this remote article is provided by Wikipedia ]
LATEST EDITS [ see all ]
GETWIKI 09 MAY 2016
GetMeta:About
GetWiki
GetWiki
GETWIKI 18 OCT 2015
M.R.M. Parrott
Biographies
Biographies
GETWIKI 20 AUG 2014
GetMeta:News
GetWiki
GetWiki
GETWIKI 19 AUG 2014
GETWIKI 18 AUG 2014
Wikinfo
Culture
Culture
© 2019 M.R.M. PARROTT | ALL RIGHTS RESERVED