Discrete mathematicsLesson 2 of 2 in the course Number theory and recurrences

Euclidean Algorithm: GCD, Bézout Coefficients, and Applications

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

This lesson introduces the greatest common divisor and the central idea behind the Euclidean algorithm.

The greatest common divisor of two integers is the largest positive integer that divides both of them without a remainder. It is written gcd(a,b)gcd(a,b) (read as “the GCD of aa and bb”). Other names include greatest common factor and highest common factor.

All flashcards

What is the greatest common divisor?
The greatest common divisor, or GCD, is the largest positive integer that divides each of two given integers without a remainder.
What does coprime mean?
Two integers are coprime when their GCD is 1. They may each be composite; they simply share no factor greater than 1.
What is the subtraction invariant?
For positive integers with a>ba>b, gcd(a,b)=gcd(b,a−b)gcd(a,b)=gcd(b,a-b). The common divisors are unchanged by replacing the larger number with its difference from the smaller.
How does the GCD relate to square tiles?
The GCD is the largest side length of a square tile that can cover an aa-by-bb rectangle exactly.
Why are 6 and 35 coprime?
Their prime factors are 2 and 3, and 5 and 7, respectively. They share no prime factor, so their only common positive divisor is 1.

Quiz questions

  1. For integers xx and yy with y>0y>0, which condition defines division with remainder x=qy+rx=qy+r?Answer: qq and rr are integers, and 0≤r<y0\le r<y.
  2. The Euclidean algorithm gives 1071=2⋅462+1471071=2\cdot462+147, 462=3⋅147+21462=3\cdot147+21, and 147=7⋅21+0147=7\cdot21+0. What is gcd(1071,462)gcd(1071,462)?Answer: 21
  3. Why must the division-based Euclidean algorithm terminate for positive integer inputs?Answer: Each remainder is a nonnegative integer smaller than the preceding divisor.
  4. For inputs a=1071a=1071 and b=462b=462, which Bézout coefficients satisfy gcd(a,b)=sa+tb=21gcd(a,b)=sa+tb=21?Answer: (s,t)=(−3,7)(s,t)=(-3,7)
  5. When does an integer aa have a multiplicative inverse modulo a positive integer mm?Answer: When gcd(a,m)=1gcd(a,m)=1.

Based on the Wikipedia article Euclidean algorithm, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Discrete mathematics lessons