{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# 31h - Discrete Mathematics Common Divisors 31-2 Previous...

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

Introduction Common Divisors Discrete Mathematics Andrei Bulatov Discrete Mathematics – Common Divisors 31-2 Previous Lecture Representation of numbers Prime and composite numbers 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) Discrete Mathematics – Common Divisors 31-4 The Greatest Common Divisor (cntd) Theorem For any positive integers a and b, there is a unique positive integer c such that c is the greatest common divisor of a and b First try: Take the largest common divisor, in the sense of usual order Does not work: Why every other common divisor divides it? 4 1 2 3 5 11 7 10 6 9 12 8 a b gcd(a,b) Discrete Mathematics – Common Divisors 31-5 The Greatest Common Divisor (cntd) Proof . Given a, b, let S = { as + bt | s,t Z , as + bt > 0 }. Since S ≠ ∅ , it has a least element c. We show that c = gcd(a,b) We have c = ax + by for some integers x and y. If d | a and d | b, then d | ax + by = c. If c | a, we can use the division algorithm to find a = qc + r, where q,r are integers and 0 < r < c.

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 3

31h - Discrete Mathematics Common Divisors 31-2 Previous...

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

View Full Document
Ask a homework question - tutors are online