0% found this document useful (0 votes)
34 views

Euclidean Algorithm

The document summarizes the Euclidean algorithm, which can be used to find the greatest common divisor (GCD) of two integers. It provides definitions of key terms like division algorithm and relatively prime. The Euclidean algorithm procedure is then described as repeatedly using the division algorithm to divide the remainder of the previous step by the original numbers until a remainder of zero is reached, with the last nonzero remainder being the GCD. Examples are given finding the GCD of 105,81 (which is 3) and 343,210 (which is 7) by following the Euclidean algorithm steps.

Uploaded by

ace dy
Copyright
© © All Rights Reserved
0% found this document useful (0 votes)
34 views

Euclidean Algorithm

The document summarizes the Euclidean algorithm, which can be used to find the greatest common divisor (GCD) of two integers. It provides definitions of key terms like division algorithm and relatively prime. The Euclidean algorithm procedure is then described as repeatedly using the division algorithm to divide the remainder of the previous step by the original numbers until a remainder of zero is reached, with the last nonzero remainder being the GCD. Examples are given finding the GCD of 105,81 (which is 3) and 343,210 (which is 7) by following the Euclidean algorithm steps.

Uploaded by

ace dy
Copyright
© © All Rights Reserved
You are on page 1/ 2

The Euclidean Algorithm

Math 31 - Topics in Algebra

This is a summary of the important definitions and results associated to the Euclidean algorithm,
along with examples of the algorithm in action.

Theorem 1 (Division algorithm). Let n and m be integers, with m > 0. Then there exist integers
q and r, with 0 ≤ r ≤ n − 1, such that
n = qm + r.

Definition 1. • We say that an integer m divides an integer n if there exists c ∈ Z such that
n = cm.

• The greatest common divisor of a and b, gcd(a, b), is the largest positive integer which
divides both a and b.

• We say that a and b are relatively prime if gcd(a, b) = 1.

Euclidean algorithm: Given integers n and m (suppose that m < n), gcd(n, m) can be com-
puted as follows:

1. Use the Division Algorithm to write

n = q0 m + r0 .

2. Apply the Division Algorithm again to write

m = q1 r0 + r1 ,

i.e., to obtain a new quotient and remainder.

3. Continue this process until you obtain a remainder of zero. The previous (nonzero) remain-
der is gcd(n, m).

Theorem 2. Let n, m ∈ Z. There exist integers x and y such that

gcd(n, m) = nx + my.

1
Example 2. Find gcd(105, 81).

Solution. We divide each remainder into the previous divisor:

105 = 1 · 81 + 24
81 = 3 · 24 + 9
24 = 2 · 9 + 6
9=1·6+3
6=2·3+0

We’ve reached a remainder of 0, so we stop. The last nonzero remainder is 3, so

gcd(105, 81) = 3.

Example 3. Finding gcd(343, 210).

Solution. Run through the Euclidean algorithm until we hit 0:

343 = 1 · 210 + 133


210 = 1 · 133 + 77
133 = 1 · 77 + 56
77 = 1 · 56 + 21
56 = 2 · 21 + 14
21 = 1 · 14 + 7
14 = 2 · 7 + 0

Then we see that gcd(343, 210) = 7.

You might also like