GREATEST COMMON DIVISOR



Similar documents
Kevin James. MTHSC 412 Section 2.4 Prime Factors and Greatest Comm

1. MATHEMATICAL INDUCTION

COMMUTATIVE RINGS. Definition: A domain is a commutative ring R that satisfies the cancellation law for multiplication:

Today s Topics. Primes & Greatest Common Divisors

GCDs and Relatively Prime Numbers! CSCI 2824, Fall 2014!

MATH 289 PROBLEM SET 4: NUMBER THEORY

CHAPTER 5. Number Theory. 1. Integers and Division. Discussion

Section 4.2: The Division Algorithm and Greatest Common Divisors

MATH10040 Chapter 2: Prime and relatively prime numbers

CS 103X: Discrete Structures Homework Assignment 3 Solutions

Elementary Number Theory and Methods of Proof. CSE 215, Foundations of Computer Science Stony Brook University

CONTINUED FRACTIONS AND PELL S EQUATION. Contents 1. Continued Fractions 1 2. Solution to Pell s Equation 9 References 12

MATH 22. THE FUNDAMENTAL THEOREM of ARITHMETIC. Lecture R: 10/30/2003

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

6.2 Permutations continued

8 Divisibility and prime numbers

z 0 and y even had the form

I. GROUPS: BASIC DEFINITIONS AND EXAMPLES

8 Primes and Modular Arithmetic

Applications of Fermat s Little Theorem and Congruences

Discrete Mathematics, Chapter 4: Number Theory and Cryptography

Continued Fractions and the Euclidean Algorithm

The Division Algorithm for Polynomials Handout Monday March 5, 2012

DIVISIBILITY AND GREATEST COMMON DIVISORS

MATHEMATICAL INDUCTION. Mathematical Induction. This is a powerful method to prove properties of positive integers.

Number Theory. Proof. Suppose otherwise. Then there would be a finite number n of primes, which we may

Homework until Test #2

The last three chapters introduced three major proof techniques: direct,

mod 10 = mod 10 = 49 mod 10 = 9.

Elementary Number Theory

Some Polynomial Theorems. John Kennedy Mathematics Department Santa Monica College 1900 Pico Blvd. Santa Monica, CA

Factoring Algorithms

The Euclidean Algorithm

PROBLEM SET 6: POLYNOMIALS

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

Integer roots of quadratic and cubic polynomials with integer coefficients

H/wk 13, Solutions to selected problems

Handout NUMBER THEORY

Chapter 3. if 2 a i then location: = i. Page 40

Breaking The Code. Ryan Lowe. Ryan Lowe is currently a Ball State senior with a double major in Computer Science and Mathematics and

POLYNOMIAL RINGS AND UNIQUE FACTORIZATION DOMAINS

The Fundamental Theorem of Arithmetic

SOLUTIONS FOR PROBLEM SET 2

15 Prime and Composite Numbers

Chapter 4, Arithmetic in F [x] Polynomial arithmetic and the division algorithm.

Factoring Polynomials

it is easy to see that α = a

Page 331, 38.4 Suppose a is a positive integer and p is a prime. Prove that p a if and only if the prime factorization of a contains p.

Math 319 Problem Set #3 Solution 21 February 2002

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

How To Know If A Domain Is Unique In An Octempo (Euclidean) Or Not (Ecl)

Number Theory Hungarian Style. Cameron Byerley s interpretation of Csaba Szabó s lectures

U.C. Berkeley CS276: Cryptography Handout 0.1 Luca Trevisan January, Notes on Algebra

Intermediate Math Circles March 7, 2012 Linear Diophantine Equations II

11 Ideals Revisiting Z

THE DIMENSION OF A VECTOR SPACE

9. POLYNOMIALS. Example 1: The expression a(x) = x 3 4x 2 + 7x 11 is a polynomial in x. The coefficients of a(x) are the numbers 1, 4, 7, 11.

Lecture 3: Finding integer solutions to systems of linear equations

Primality - Factorization

ALGEBRAIC APPROACH TO COMPOSITE INTEGER FACTORIZATION

Lectures on Number Theory. Lars-Åke Lindahl

3 Factorisation into irreducibles

WOLLONGONG COLLEGE AUSTRALIA. Diploma in Information Technology

CHAPTER SIX IRREDUCIBILITY AND FACTORIZATION 1. BASIC DIVISIBILITY THEORY

TEXAS A&M UNIVERSITY. Prime Factorization. A History and Discussion. Jason R. Prince. April 4, 2011

An Introduction to the RSA Encryption Method

SUM OF TWO SQUARES JAHNAVI BHASKAR

March 29, S4.4 Theorems about Zeros of Polynomial Functions

PYTHAGOREAN TRIPLES KEITH CONRAD

Math Workshop October 2010 Fractions and Repeating Decimals

Some facts about polynomials modulo m (Full proof of the Fingerprinting Theorem)

PROPERTIES OF ELLIPTIC CURVES AND THEIR USE IN FACTORING LARGE NUMBERS

Winter Camp 2011 Polynomials Alexander Remorov. Polynomials. Alexander Remorov

Systems of Linear Equations

The Chinese Remainder Theorem

(a) Write each of p and q as a polynomial in x with coefficients in Z[y, z]. deg(p) = 7 deg(q) = 9

Solving Linear Systems, Continued and The Inverse of a Matrix

Unique Factorization

Introduction to Finite Fields (cont.)

Lecture Notes on Discrete Mathematics

ABSTRACT ALGEBRA: A STUDY GUIDE FOR BEGINNERS

Section 1.1 Real Numbers

Math Abstract Algebra I Questions for Section 23: Factoring Polynomials over a Field

On the generation of elliptic curves with 16 rational torsion points by Pythagorean triples

17 Greatest Common Factors and Least Common Multiples

Handout #1: Mathematical Reasoning

Math 115A HW4 Solutions University of California, Los Angeles. 5 2i 6 + 4i. (5 2i)7i (6 + 4i)( 3 + i) = 35i + 14 ( 22 6i) = i.

Number Theory: A Mathemythical Approach. Student Resources. Printed Version

minimal polyonomial Example

Lecture 13: Factoring Integers

An Introductory Course in Elementary Number Theory. Wissam Raji

God created the integers and the rest is the work of man. (Leopold Kronecker, in an after-dinner speech at a conference, Berlin, 1886)

α = u v. In other words, Orthogonal Projection

Factorization in Polynomial Rings

Notes on Factoring. MA 206 Kurt Bryan

Higher Order Equations

Notes from February 11

1. Prove that the empty set is a subset of every set.

SOLVING POLYNOMIAL EQUATIONS

k, then n = p2α 1 1 pα k

Transcription:

DEFINITION: GREATEST COMMON DIVISOR The greatest common divisor (gcd) of a and b, denoted by (a, b), is the largest common divisor of integers a and b. THEOREM: If a and b are nonzero integers, then their gcd is a linear combination of a and b, that is there exist integer numbers s and t such that sa + tb = (a, b). Proof: Let d be the least positive integer that is a linear combination of a and b. We write where s and t are integers. We first show that d a. By the Division Algorithm we have From this and (1) it follows that d = sa + tb, (1) a = dq + r, where 0 r < d. r = a dq = a q(sa + tb) = a qsa qtb = (1 qs)a + ( qt)b. This shows that r is a linear combination of a and b. Since 0 r < d, and d is the least positive linear combination of a and b, we conclude that r = 0, and hence d a. In a similar manner, we can show that d b. We have shown that d is a common divisor of a and b. We now show that d is the greatest common divisor of a and b. Assume to the contrary that (a, b) = d and d > d. Since d a, d b, and d = sa + tb, it follows that d d, therefore d d. We obtain a contradiction. So, d is the greatest common divisor of a and b and this concludes the proof. EUCLID S LEMMA THEOREM (Euclid s Lemma): If p is a prime and p ab, then p a or p b. More generally, if a prime p divides a product a 1 a 2... a n, then it must divide at least one of the factors a i. Proof: Assume that p a. We must show that p b. By the theorem above, there are integers s and t with sp + ta = (p, a). Since p is prime and p a, we have (p, a) = 1, and so Multiplying both sides by b, we get sp + ta = 1. spb + tab = b. (2) Since p ab and p spb, it follows that p (spb + tab). This and (2) give p b. This completes the proof of the first part of the theorem. The second part (generalization) easily follows by induction on n 2. 1

COROLLARY: If p is a prime and p a 2, then p a. Proof: Put a = b in Euclid s Lemma. THEOREM: Let p be a prime. Then p is irrational. Proof: Assume to the contrary that p is rational, that is p = a, where a and b are integers b and b 0. Moreover, let a and b have no common divisor > 1. Then p = a2 b 2 pb 2 = a 2. (3) Since pb 2 is divisible by p, it follows that a 2 is divisible by p. Then a is also divisible by p by the Corollary above. This means that there exists q Z such that a = pq. Substituting this into (3), we get pb 2 = (pq) 2 b 2 = pq 2. Since pq 2 is divisible by p, it follows that b 2 is divisible by p. Then b is also divisible by p by the Corollary above. This is a contradiction. FUNDAMENTAL THEOREM OF ARITHMETIC THEOREM (Fundamental Theorem of Arithmetic): Assume that an integer a 2 has factorizations a = p 1... p m and a = q 1... q n, where the p s and q s are primes. Then n = m and the q s may be reindexed so that q i = p i for all i. Proof: We prove by induction on l, the larger of m and n, i. e. l = max(m, n). Step 1. If l = 1, then the given equation in a = p 1 = q 1, and the result is obvious. Step 2. Suppose the theorem holds for some l = k 1. Step 3. We prove it for l = k + 1. Let where a = p 1... p m = q 1... q n, (4) max(m, n) = k + 1. (5) From (4) it follows that p m q 1... q n, therefore by Euclid s Lemma there is some q i such that p m q i. But q i, being a prime, has no positive divisors other than 1, therefore p m = q i. Reindexing, we may assume that q n = p m. Canceling, we have p 1... p m 1 = q 1... q n 1. Moreover, max(m 1, n 1) = k by (5). Therefore by step 2 q s may be reindexed so that q i = p i for all i; plus, m 1 = n 1, hence m = n. COROLLARY: If a 2 is an integer, then there are unique distinct primes p i and unique integers e i > 0 such that a = p e 1 1... p en n. Proof: Just collect like terms in a prime factorization. EXAMPLE: 120 = 2 3 3 5. PROBLEM: Prove that log 3 5 is irrational. 2

EUCLIDEAN ALGORITHM THEOREM (Euclidean Algorithm): Let a and b be positive integers. Then there is an algorithm that finds (a, b). LEMMA: If a, b, q, r are integers and a = bq + r, then (a, b) = (b, r). Proof: We have (a, b) = (bq + r, b) = (b, r). Proof of the Theorem: The idea is to keep repeating the division algorithm. We have: therefore a = bq 1 + r 1, (a, b) = (b, r 1 ) b = r 1 q 2 + r 2, (b, r 1 ) = (r 1, r 2 ) r 1 = r 2 q 3 + r 3, (r 1, r 2 ) = (r 2, r 3 ) r 2 = r 3 q 4 + r 4, (r 2, r 3 ) = (r 3, r 4 )... r n 2 = r n 1 q n + r n, (r n 2, r n 1 ) = (r n 1, r n ) r n 1 = r n q n+1, (r n 1, r n ) = r n, (a, b) = (b, r 1 ) = (r 1, r 2 ) = (r 2, r 3 ) = (r 3, r 4 ) =... = (r n 2, r n 1 ) = (r n 1, r n ) = r n. EXAMPLE: Find (252, 198). By the Euclidean Algorithm we have 252 = 198 1 + 54 198 = 54 3 + 36 54 = 36 1 + 18 36 = 18 2 therefore (252, 198) = 18. PROBLEM: Find (35, 55) and (326, 78). THEOREM: Let a = p e 1 1... p en n and b = p f 1 1... p fn n (a, b) = p min(e 1,f 1 ) 1... p min(en,fn) n. be positive integers. Then EXAMPLE: Since 720 = 2 4 3 2 5 and 2100 = 2 2 3 5 2 7, we have: (720, 2100) = 2 2 3 5 = 60. 3

Let d be the least positive integer that is a linear combination of a and b. We write d = sa + tb, ( ) where s and t are integers. We first show that d a. By the Division Algorithm we have a = dq + r, where 0 r < d. From this and ( ) it follows that r = a dq = a q(sa + tb) = a qsa qtb = (1 qs)a + ( qt)b. This shows that r is a linear combination of a and b. Since 0 r < d, and d is the least positive linear combination of a and b, we conclude that r = 0, and hence d a. In a similar manner, we can show that d b.

We have shown that d is a common divisor of a and b. We now show that d is the greatest common divisor of a and b. Assume to the contrary that (a, b) = d and d > d. Since d a, d b, and d = sa + tb, it follows that d d, therefore d d. We obtain a contradiction. So, d is the greatest common divisor of a and b and this concludes the proof.

THEOREM (Euclid s Lemma): If p is a prime and p ab, then p a or p b. More generally, if a prime p divides a product a 1 a 2... a n, then it must divide at least one of the factors a i. Proof: Assume that p a. We must show that p b. By the theorem above, there are integers s and t with sp + ta = (p, a). Since p is prime and p a, we have (p, a) = 1, and so sp + ta = 1. Multiplying both sides by b, we get spb + tab = b. ( ) Since p ab and p spb, it follows that p (spb + tab). This and ( ) give p b. This completes the proof of the first part of the theorem. The second part (generalization) easily follows by induction on n 2.

THEOREM: Let p be a prime. p is irrational. Then Proof: Assume to the contrary that p is rational, that is p = a, where a and b b are integers and b 0. Moreover, let a and b have no common divisor > 1. Then p = a2 b 2 pb 2 = a 2. ( ) Since pb 2 is divisible by p, it follows that a 2 is divisible by p. Then a is also divisible by p by the Corollary. This means that there exists q Z such that a = pq. Substituting this into ( ), we get pb 2 = (pq) 2 b 2 = pq 2. Since pq 2 is divisible by p, it follows that b 2 is divisible by p. Then b is also divisible by p by the Corollary. This is a contradiction.

Step 1. If l = 1, then the given equation in a = p 1 = q 1, and the result is obvious. Step 2. Suppose the theorem holds for some l = k 1. Step 3. We prove it for l = k + 1. Let where a = p 1... p m = q 1... q n, max(m, n) = k + 1. ( ) ( ) From ( ) it follows that p m q 1... q n, therefore by Euclid s Lemma there is some q i such that p m q i. But q i, being a prime, has no positive divisors other than 1, therefore p m = q i. Reindexing, we may assume that q n = p m. Canceling, we have p 1... p m 1 = q 1... q n 1. Moreover, max(m 1, n 1) = k by ( ). Therefore by step 2 q s may be reindexed so that q i = p i for all i; plus, m 1 = n 1, hence m = n.

LEMMA: If a, b, q, r are integers and a = bq + r, then (a, b) = (b, r). Proof: We have (a, b) = (bq + r, b) = (b, r). Proof (Euclidean Algorithm): We have: a = bq 1 + r 1, (a, b) = (b, r 1 ) b = r 1 q 2 + r 2, (b, r 1 ) = (r 1, r 2 ) r 1 = r 2 q 3 + r 3, (r 1, r 2 ) = (r 2, r 3 ) r 2 = r 3 q 4 + r 4, (r 2, r 3 ) = (r 3, r 4 )... r n 2 = r n 1 q n + r n, (r n 2, r n 1 ) = (r n 1, r n ) r n 1 = r n q n+1, (r n 1, r n ) = r n, therefore (a, b) = (b, r 1 ) = (r 1, r 2 ) = (r 2, r 3 ) = (r 3, r 4 ) =... = (r n 2, r n 1 ) = (r n 1, r n ) = r n.