Sie sind auf Seite 1von 38

GREATEST COMMON DIVISOR

Euclidean Algorithm Relatively Prime Integers Least Common Multiple

3.1 EUCLIDEAN ALGORITHM Definition 3.1. A positive integer f is said to be a common divisor of a and b iff f a and f b . The greatest common divisor of a and b is the positive integer d denoted by d=(a,b) satisfying i) d a, d b and ii) if f a and f b, then f d.

Theorem 3.1. If d=(a,b), then d is the least element of the set S = { ax + by ax + by > 0 and x, y Z } Moreover, there exist integers x 0 and y 0 such that ax 0 + by 0 = d Proof. We need to show that S 0 and contains the least element which leads to the greatest common divisor of the given integers a and b.

If a > O, then a(1) + b(O) = a S. If a < O, then a > O and a > O and a(1) + b (O) = -a S. So S 0 and by the Well-Ordering Principle, S contains the least element, say f. Since for every element of S, we can find integers x and y, then, choose x0 and y0 such that ax0 + by0 = f. Next we shall show that this integer f is the greatest common divisor of a and b, or f = d. For f = (a,b), we need to show first that f is a common factor of a and b. We then establish that fa, and the other condition fb will follow the same pattern of reasoning.

We give an indirect proof i.e., suppose fa. Then applying the division algorithm to a and f, we can find integers q and r such that a = fq + r, where O < r < f. Then we write r in the form r = a fq = a (axo + byo)q = a(1-xo q) + b(-qyo).

If r O, this indicates that r S . But then r < f and this contradicts our assumption that f is the smallest chosen positive element of S. The only way of the contradiction is to claim that r = O and so, a = f q, or f a . Similar reasoning goes for f b. Hence, f is a common divisor of a and b. But d=(a,b) gives d f. Also, since d = (a,b), then by Theorem 2.5 d ax + by or d f for some integers x and y. But by Theorem 2.4, d f .So we are forced to conclude that d = f and thus, f = d = ax o + by o.

We note that the converse of this statement is not true. This means to say that if d = ax + by, it does not follow that d = (a,b). this is because if we multiply the equation by k, we have dk = a(kx) + b(ky). This gives a linear combination of a and b for every integer k, but not all these values can equal d = (a,b).

Corollary 3.1. The set defined by S = { ax + by ax + by > 0 and x, y Z } consists precisely of a fixed positive integer d = (a,b) i.e. S = { nd nd = in ax the + by, n of Proof. As given proof Z }. Theorem 3.1, we can write d = ax o + by o for some suitable choice of x o and y o. Then nd = a(nx o) + b(ny o). Taking x = nx o and y = ny o and since n runs over all integers, then nd gives the set of all multiples of d.

Theorem 3.2. The positive integer d = (a,b) if i) d a and d b ; ii) whenever f a and f b, then f d. Proof ( ) . Suppose that d = (a,b). Then d a and d b and by Theorem 3.1, d = ax + by for some suitable choice of x and y. Suppose there is an integer f such that f a and f b. Then by Theorem 2.5 f ax + by equivalently, f d. So condition ii) holds.

( ). For the converse, we need to show that d = (a,b). The condition i) implies that d is a common factor of a and b, and ii) asserts that for any other factor f of a and b and f d , then by Theorem 2.4, f d . Thus, by definition 3.1, d = (a,b).

Theorem 3.3. If a 1, a 2 , ..., a k are nozero integers, then (a 1, a 2, ..., a k) = ( (a 1, a 2, ..., a k), a k). 1 Proof.Let d = (a 1, a 2, ..., a k) and
f = ( (a 1, a 2 , ..., a k-1), a k). By Corollary 2.2, it suffices to show that d = f,
i.e. d f and f d . Since d =

(a 1, a 2, ..., a k) , then d a i for each i = 1, 2,...,k. Thus, d a k and d (a 1, ..., a k-1) . So by Theorem 3.2, dr. Also since fak and f (a 1 , ..., a k-1 ), then this produces f a j for each i = 1, 2,...,k, and so, f d . Thus, f = d.

ALGORITHM

Given to integers a and b where a > O. Repeating the application of Division Algorithm, we obtain a series of equations b = a q1 + r1 O < , r1 < a a = r1 q2 + r2 O < , r2 < r1 r1 = r2 q3 + r3 ,O < r3 < r2
. . .

r k-2 = r k-1 q k + r k ,O < r k < r k-1 r r q

Then the last nonzero remainder r k in the division process is the greatest common divisor of a and b, i.e. (a,b) = r k. The values of x o and y o such that d = ax o + by o can be obtained by eliminating the remainders beginning from r k-1, then r k-2, going up to r 1. Proof.To show that r k = (a,b), we need i) r k a and r k b ii) if there exists other factor f, then f r

From the set of equations, consider the last one, r k-1 = r k q k+1 which gives r k r k-1. It follows by Theorem 2.1 that r k r k-1 q k, and Theorem 2.5 r k r k-1 q k+r k or r k r k-2. In the equation r k-3 = r k-2 q k-1 + r k-1, we have r k r k-2 q k-1 and rk rk-1 Then by Theorem 2.5. r k r k-3. We continue applying the process to the next equation and then going up through the set of equations till the first one is reached obtaining r k a and r k b. Therefore, condition

Suppose there is an integer f such that f a and f b . Then by Theorem 2.5, f b-aq 1, or f r 1. It follows that f r 1 q 2 and since f a , then by Theorem 2.5, f a-r 1 q 2 or f r 2. Continuing the process to the third equation till the last equation is reached, we get f r k, which is condition ii). Thus by Definition 3.1, r = (a,b).

If r 1 = O , then a b and (a,b) = a .If r 1 O, we divide a by r 1 and produce q r and r 2 such that a = q 2 r 1 + r 2. If r 2 = O , then we stop.Otherwise, we continue the division to obtain q 3 and r 3, and so on. The remainders is a set of decreasing sequence, of integers, i.e. r 1 > r 2 > r 3 >...> r k. Then this process must eventually terminate, say at the kth step, giving r k the last nonzero remainder.

To apply the algorithm, consider a = 68 and b = 328 . Then by performing repeated divisions, we get the following set of equations: 328 68 56 12 8 = 68 (4) + = 56 (1) + = 12 (4) + = 8 (1) + = 4 (2) 56 12 8 4

Thus, (68,328) = 4

To obtain the integral values of x O and y O such that ax O + by O = d , we consider the backward substitution eliminating the remainders. 4 = 12 -8 = 12 [56 (12)(4)] = 5(12) 56 = 5(68-56) 56 = 5(68) 6(56) = 5(68) 6[328 68(4)] = 29(68) 6(328)

The last equation produces x O = 29 and y O = -6 . It is worth noting that there may be other possible combinations for x O and y O and so such integral values for x O and y o need need not be unique. Theorem 3.5. If b = aq + r , then (a,b) = (a,r). Proof. Let d = (a,b) . Since d a and d b then by Theorem 2.1, d aq and by Theorem 2.5, d b aq or d r . Thus, d is a common factor of a and r . Also,if c is any other factor of a and r , then c aq and c r and so c aq+r or c b . This means that c is a common factor of a and b , so that by the definition of d, c d . Therefore d = (a,b) = (a,r).

The above theorem is very helpful in the series of equations of the Euclidean Algorithm in determining r k =(a,b) =(a 1, r 1) = (r 1, r 2) = ...=(r k-1, r k) =(r k,O)

Theorem 3.6. For any positive integer c, ( ac, bc ) = c(a,b) .

of equations given in Theorem 3.4 by c , we have


bc = (ac) q 1 + r 1c ac ac = (r 1c)q 2 + r 2c r 1c r 1c = (r 2c)q 3 + r 3c < r 2c
. . .

,O r 1c < ,O r 2c < , O r 3c

r k-2 = (r k-1)q k + r k r k-1c

,O r kc <

By Theorem 3.4, the last nonzero remainder gives the greatest common divisor of ac and bc , i.e. (ac,bc) = r k c = c(a,b) Corollary 3.2. For any integer c O . (ca, bc) = c (a,b).
Proof. For c > O , then we have the result given in Theorem 3.5. it suffices to consider c < O . But for this case, c = -c > O , and by Theorem 3.4, we have the following : (-ac, -bc) = c (a,b) (-ac, bc) = ( c a, c b) = c (a,b) (ac, -bc) = (ca, cb) = c(a,b).

3.2 RELATIVELY PRIME INTEGERS Definition 3.2. if p Z and p > 1, we say that p is prime if the only positive divisors of p are only 1 and itself. Two integers a and b are relatively prime if the greatest common divisor is 1; in symbol, (a,b) = 1. If (ai,aj) = 1 for i j for all 1 i n and 1 j n then the integers a1,a2, . . .,an are said to be pair wise relatively prime.

Theorem 3.7. Two integers a and b are relatively prime if there exist integers x and y such that ax + by = 1 . Proof. ( ). If (a,b) = 1 , then by theorem 3.1 with d = 1 it follows that ax + by = (1. ) . Let ax + by = 1 for some

integers x and y . Suppose d = (a,b). Since d a and d b , then by theorem 2.5, d ax + by or d 1. Since d 1 , it follows that d = 1 . Thus (a,b) = d = 1.

Corollary 3.4. If (a,b) = d and a = da and b = db , then (a,b) = 1 . Proof. If d = (a,b) , then by Theorem 3.1 we have ax + by = d . Let a = da and b = db , then ax + by = (da)x + (db)y = d . Dividing by d , we get ax + by = 1 . By Theorem 3.7, (a,b) = 1 .

Corollary 3.5.For integers a, b, and c , then (a,c) = (b,c) = 1 if (ab,c) = 1 .

Proof ( ) . Since (a,c) = 1 , and (b,c) = 1 , then by Theorem 3.7 we have ax O + cy O = 1 and bx 1 + cy 1 = 1 , for some integers x O, y O, X 1 and y 1 . Multiplying the two equations gives ab(x O x 1) + c(bx 1 y O + ax O y 1 + cy O y 1 ) = 1 But by Theorem 3.7, it follows that ( ab,c) = 1 ( ) .Let d = (a,c) , then by Theorem 2.1, d ab for some integer b . Since d ab and d c , and since by hypothesis (ab,c) = 1 ,then we are forced to Conclude that d = 1 . Therefore, (a,c) = 1 . Next, we let d = (b,c) . it follows that d ab and d c and so (ab,c) = d = 1 . Thus, (a,c) = (b,c) = 1 .

Theorem 3.8. if a bc and (a,b) = 1 , then a c .


Proof. Since (a,b) = 1 , then by Theorem 3.7 we have ax + by = 1 . Multiplying this equation by c we have acx + bcy = c . Since a acx and a bcy , then by Corollary 2.3 a acx + bcy or a c . Note that it is important for a and b to be relatively prime; otherwise, the theorem 6 will notbut hold. For example 8(9) 6 8 and 6 9.

Theorem 3.9 If a c, b c , and (a,b) = 1 , then ab c . Proof. If a c and b c , then aq 1 = c bq 2 for some integers q 1 and q 2. Since (a,b) = 1 , then by Theorem 3.7 ax + by = 1 cax + cby = c (bq 2)ax + (aq 1)by = c ab(q 2 x + q 1 y) = c Since q 2 x + q 1 y Z , then ab c .

Example 3.1. Show that if (a,b) = 1 , then ( a + b, a b ) = 1 or 2 . Solution. Let (a + b, a b) = d . By Definition 3.1, d a+b and d a-b . Using the Corollary 2.3, d (a+b) + (a-b) = 2a , and d (a+b) - (a-b) = 2b . It follows that by Definition 3.1, that d (2a,2b) . But by Corollary 3.2, we write (2a,2b) = 2(a,b) . Since (a,b) = 1 then d 2 . But d is a positive integer and d = 1 or 2 .

3.3 LEAST COMMON MULTIPLE


Another equally important concept, like the greatest common divisor, is the least common multiple of the given integers. For example, given 12 and 18, then the multiples of 12 = { 12, 24, 36, 48, 60, 72,...} multiples of 18 = { 18, 36, 54, 72, ...} Then the set of common multiples of 12 and 18 is { 36, 72, ...}. But the least common multiples 12 and 18 is 36.

Definition 3.3 Given two integers a and b . Then the least common multiple of a and b is the positive integer m , denoted by m = [a,b] , satisfying the following conditions: i)a m and b m , ii) a n and b n , then m n.

The following are some immediate consequences of the definition.


a)(a,b) [a,b] ; b) [a,b] = [-a,b] = [a,-b] = [a,-b]

Theorem 3.10. for any integer a and b , then [a,b] = m > O if the following are satisfied i) a m and b m , ii) if a n and b n , then mn.

Proof ( ). Given [a,b] = m , then a m and b m . Suppose there is another common multiple of a and b , call it n . We need to show that m n . But by hypothesis, m n . If m = n , then we are through. If m < n , then by Division Algorithm we can find integers q and r such that n = mq + r , where O r < m . Since r = n - mq with r > O then r serves also as a common multiple of a and b . But this is impossible since O < r < m , and m is the smallest common multiple of a and b . Then the only way out of the contradiction is to claim that r = O , or n = mq .

( ) . Conditions i) and ii) asserts that m and n are both common multiple of a and b . But since m n then by Theorem 2.4 m n . And by Definition 3.3, [a,b] = m .

Theorem 3.11. For positive integers a and b ,

[a,b] =
Proof. Let d = (a,b) and m = [a,b] . Then we write a = ad and b = bd , and by Corollary 3.4 (a,b) = 1 . If
m = ab / d, then m = adb / d = ab, and m= abd /d = ab.

Suppose the positive integer n is a common multiple of a and b , i.e. n = ar = bs , for some integers r and s . We shall show that m = [a,b] i.e. whenever m and n are common multiples of a and b , then m n . Substituting ad and bd for a and b in n = ar = bs , we get adr = bds or ar = bs . Since r Z , then a bs . But (a,b) = 1 and so a b or a s . This would imply that aq = s , for some integer q . But then n = bs = baq = mq . This implies that m n . But by Theorem 2.4 m n and thus, by Definition 3.3 m = [a,b] .

Corollary 3.6. For any two given integers a and b , [a,b] = ab if (a,b) = 1

Theorem 3.12. If a 1, a 2,..., a n are nonzero integers, then [ a 1, a 2,..., a n ] = [ [ a 1,..., a n-1 ], a n ].

Thank you!!! Dios Mabalos po! Arlene B.

Das könnte Ihnen auch gefallen