0% found this document useful (0 votes)
2K views4 pages

GCD

This document contains worked solutions to several problems involving greatest common divisors (gcd) and linear Diophantine equations: 1) It calculates the gcd of several pairs of numbers using the Euclidean algorithm. 2) For each pair of numbers, it finds integers x and y that satisfy the equation gcd(a,b) = ax + by using properties of the Euclidean algorithm. 3) It proves a theorem about the relationship between the gcd of two numbers and the gcd of their quotients. 4) It proves two results about the gcd of linear combinations of relatively prime numbers a and b.

Uploaded by

Zain Ul Abideen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views4 pages

GCD

This document contains worked solutions to several problems involving greatest common divisors (gcd) and linear Diophantine equations: 1) It calculates the gcd of several pairs of numbers using the Euclidean algorithm. 2) For each pair of numbers, it finds integers x and y that satisfy the equation gcd(a,b) = ax + by using properties of the Euclidean algorithm. 3) It proves a theorem about the relationship between the gcd of two numbers and the gcd of their quotients. 4) It proves two results about the gcd of linear combinations of relatively prime numbers a and b.

Uploaded by

Zain Ul Abideen
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Problem Set 2.

3
Fall. 2004
Pat Rossi

Name

1. Find gcd (143, 227) , gcd (306, 657) and gcd (272, 1479)
(a) gcd (143, 227) :
227 = 1 143 + 84
143 = 1 84 + 59
84 = 1 59 + 25
59 = 2 25 + 9
25 = 2 9 + 7
9=17+2
7 = 3 2 + 1 gcd (143, 227) = last non-zero remainder = 1
2=21+0

(b) gcd (306, 657) :


657 = 2 306 + 45
306 = 6 45 + 36
45 = 1 36 + 9 gcd (306, 657) = last non-zero remainder = 9
36 = 4 9 + 0

(c) gcd (272, 1479) :


1479 = 5 272 + 119
272 = 2 119 + 34
119 = 3 34 + 17 gcd (272, 1479) = last non-zero remainder = 17
34 = 2 17 + 0

2. Use the Euclidean Algorithm to obtain integers, x and y satisfying the following:
(a) gcd (56, 72) = 56x + 72y
72 = 1 56 + 16
56 = 3 16 + 8 gcd (56, 72) = last non-zero remainder = 8
16 = 2 8 + 0
We want integers x and y such that 8 = 56x + 72y
Observe:
8 = 56 3 16
8 = 56 3 (72 56)
8 = 4 56 3 72
x = 4; y = 3

(b) gcd (24, 138) = 24x + 138y


138 = 5 24 + 18
24 = 1 18 + 6 gcd (24, 138) = last non-zero remainder = 6
18 = 3 6 + 0
We want integers x and y such that 6 = 24x + 138y
Observe:
6 = 24 18
6 = 24 (138 5 24)
6 = 6 24 138
x = 6; y = 1

(c) gcd (119, 272) = 119x + 272y


272 = 2 119 + 34
119 = 3 34 + 17 gcd (119, 272) = last non-zero remainder = 17
34 = 2 17 + 0
We want integers x and y such that 17 = 119x + 272y
Observe:
17 = 119 3 34
17 = 119 3 (272 2 119)
17 = 7 119 3 272
x = 7; y = 3

(d) gcd (1769, 2378) = 1769x + 2378y


2378 = 1 1769 + 609
1769 = 2 609 + 551
609 = 1 551 + 58
551 = 9 58 + 29 gcd (1769, 2378) = last non-zero remainder = 29
58 = 2 29 + 0
We want integers x and y such that 29 = 1769x + 2378y
Observe:
29 = 551 9 58
29 = 551 9 (609 551)
29 = 10 551 9 609
29 = 10 (1769 2 609) 9 609
29 = 10 1769 29 609
29 = 10 1769 29 (2378 1 1769)
29 = 39 1769 29 2378

3. Prove
a that
if d is a common divisor of a and b, then d = gcd (a, b) if and only if
b
gcd d , d = 1.

By Corollary 1 (p. 23), if gcd (a, b) = d, then gcd ad , db = 1.

It remains to show that if gcd ad , db = 1, then gcd (a, b) = d.

So. let gcd ad , db = 1.

b
a
a b
,
= gcd d , d
= gcd (a, b)
Observe: d = d 1 = d gcd
d d
d
d
{z
}
|
by Thm 2.7

i.e., gcd (a, b) = d

4. Assuming that gcd (a, b) = 1, prove the following:


(a) gcd (a + b, a b) = 1 or 2
Let d = gcd (a + b, a b) .
Then there exist integers r and s such that a + b = dr and a b = ds.
Observe: d|2a
To see this, note that 2a = (a + b) + (a b) = dr + ds = d (r + s)
i.e. 2a = d (r + s) , and hence, d|2a
Similarly, d|2b.
To see this, note that 2b = (a + b) (a b) = dr ds = d (r s) .
i.e. 2b = d (r s) , and hence, d|2b.
Since d|2a and d|2b, it follows that d gcd (2a, 2b) = 2 gcd (a, b) = 2 1.
{z
}
|
By Thm 2.7

i.e., d 2 d = gcd (a + b, a b) = 1 or 2

(b) gcd (2a + b, a + 2b) = 1 or 3.


Let d = gcd (2a + b, a + 2b) .
Then there exist integers r and s such that 2a + b = dr and a + 2b = ds.
Observe: 3a = 2 (2a + b) (a + 2b) = 2 (dr) ds = d (2r s)
i.e., d|3a
Also, d|3b
To see this, note that 3b = 2 (a + 2b) (2a + b) = 2ds dr = d (2s r)
i.e., d|3b
Since d|3a and d|3b, it follows that d gcd (3a, 3b) = 3 gcd (a, b) = 3 1.
{z
}
|
By Thm 2.7

i.e., d 3
So, at this point, we can say that either d = 1, 2, or 3.

But note that d cannot be equal to 2.


To see this, suppose that d WAS equal to 2. Then since d| (2a + b) , it must be
true that 2| (2a + b) .
2a + b = 2n, for some integer, n.
b = 2n 2a = 2 (n a) (i.e., 2|b)
Similarly, since d| (a + 2b) , it must be the case that 2| (a + 2b) .
a + 2b = 2m, for some integer, m.
a = 2m 2b = 2 (m b) . (i.e., 2|a)
Since 2|a and 2|b, this contradicts our original assumption that a and b are relatively prime.
Hence, d = 1, or 3.

You might also like