COT3100C01, Fall 2002
S. Lang
Key to Assignment #5 (40 pts.)
11/14/2002
1.
(10 pts.) Compute GCD(1027, 373) using Euclid’s algorithm, and find two integers
t
and
u
such that 1027
⋅
t
+ 373
⋅
u
= GCD(1027, 373).
The following steps show how the extended Euclid’s GCD algorithm is applied:
1027 = 373
⋅
2 + 281  (1)
373 = 281
⋅
1 + 92
 (2)
281 = 92
⋅
3 + 5
 (3)
92 = 5
⋅
18 + 2
 (4)
5 = 2
⋅
2 + 1
 (5)
2 = 1
⋅
2 + 0
Thus, GCD(1027, 373) = 1 = 5 – 2
⋅
2 , using (5)
= 5 – (92 – 5
⋅
18)
⋅
2, using (4)
= 92
⋅
(–2) + 5
⋅
(1+36)
= 92
⋅
(–2) + 5
⋅
37
= 92
⋅
(–2) + (281 – 92
⋅
3)
⋅
37, using (3)
= 281
⋅
37 + 92
⋅
(–2 – 3
⋅
37) = 281
⋅
37 + 92
⋅
(–113)
= 281
⋅
37 + (373 – 281
⋅
1)
⋅
(–113), using (2)
= 373
⋅
(–113) + 281
⋅
(37 + 113) = 373
⋅
(–113) + 281
⋅
150
= 373
⋅
(–113) + (1027 – 373
⋅
2)
⋅
150, using (1)
= 1027
⋅
150 + 373
⋅
(–113 – 2
⋅
150)
= 1027
⋅
150 + 373
⋅
(–413)
Therefore,
t
= 150, and
u
= –413, and 1027
⋅
t
+ 373
⋅
u
= GCD(1027, 373) = 1.
2.
(10 pts.) Suppose
a
,
b
, and
c
are positive integers.
Prove that if GCD(
a
,
b
) = GCD(
a
,
c
) = 1,
then GCD(
a
,
bc
) = 1.
Proof:
We use proof by contradiction.
That is, suppose GCD(
a
,
bc
) =
n
> 1  (1).
We want to
prove this leads to a contradiction.
From (1),
n
must have a prime factor
p
according to the
fundamental theorem of arithmetic.
Thus,
p

a
 (2) and
p

bc
 (3) because
p

n
and
n
=
GCD(
a
,
bc
).
Note that (3) implies