31a-Common-Divisors

# 31a-Common-Divisors - Common Introduction Divisors Discrete...

This preview shows pages 1–7. Sign up to view the full content.

Common Divisors Discrete Mathematics

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Discrete Mathematics – Common Divisors 31-2 Previous Lecture Representation of numbers Prime and composite numbers Common divisors The greatest common divisor
Discrete Mathematics – Common Divisors 31-3 The Greatest Common Divisor For integers a and b, a positive integer c is said to be a common divisor of a and b if c | a and c | b Let a, b be integers such that a 0 or b 0. Then a positive integer c is called the greatest common divisor of a, b if (a) c | a and c | b (that is c is a common divisor of a, b) (b) for any common divisor d of a and b, we have d | c The greatest common divisor of a and b is denoted by gcd(a,b)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Discrete Mathematics – Common Divisors 31-4 Euclidean Algorithm: Small Example To warm up, let us find the greatest common divisor of 287 and 91 287 = 91 3 + 14 Note that any common divisor of 287 and 91 is also a divisor of 14 = 287 – 91 3. Conversely, every common divisor of 91 and 14 is also a divisor of 287 = 91 3 + 14. Thus gcd(287,91) = gcd(91,14). Next 91 = 14 6 + 7. By the same argument gcd(91,14) = gcd(14,7). Finally, since 7 | 14, gcd(14,7) = 7. Thus, gcd(287,91) = 7.
Discrete Mathematics – Common Divisors 31-5 Euclidean Algorithm: Key Property Lemma . Let a = bq + r, where a, b, q, and r are integers. Then gcd(a,b) = gcd(b,r) Proof Let d be a common divisor of a and b. Then d also divides r = a – bq. Thus, d is a common divisor of b and r. Now, let d be a common divisor of b and r. Then d also divides a = bq + r. Therefore the pairs a,b and b,r have the same common divisors. Hence, gcd(a,b) = gcd(b,r).

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Discrete Mathematics – Common Divisors 31-6 Euclidean Algorithm: The Algorithm Let a and b be positive integers with a b. Set and Successively apply the division algorithm until the remainder is 0 Eventually, the remainder is zero, because the sequence of remainders cannot contain more than a elements.
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 12/12/2010 for the course MACM 201 taught by Professor Marnimishna during the Fall '09 term at Simon Fraser.

### Page1 / 22

31a-Common-Divisors - Common Introduction Divisors Discrete...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online