1 / 20

Definition. Let a , b Z. A positive integer d is called a common divisor of a and b if d | a and d

From the last lecture:. Definition. Let a , b Z. A positive integer d is called a common divisor of a and b if d | a and d | b . For any two integers a and b the greatest common divisor is always defined (except the case a = b =0) and is denoted

mili
Download Presentation

Definition. Let a , b Z. A positive integer d is called a common divisor of a and b if d | a and d

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. From the last lecture: Definition. Let a, b Z. A positive integer d is called a common divisor of a and b if d | a and d | b . For any two integers a and b the greatest common divisor is always defined (except the case a = b =0) and is denoted by gcd (a, b). Note, that gcd (a, b) 1. • if gcd (a, b) =1, integers a and b are called relatively prime. • gcd (a, b) = gcd (b, a) = gcd (a, b) = gcd (a, b) = gcd (a, b) Theorem 1. The gcd(a, b) is the least positive value of ax+by, where x and y range over all integers.

  2. Some consequences of the Theorem 1: • If an integer c is expressiblein the form c =ax+by , it is not • necessary that c is the gcd(a, b). But it does follow from such • an equation that gcd(a, b) is a divisor of c. Why? • From the fact that ax+by=1 for some integers x and y • we can implythat a and b are relatively prime. Why? Because ax+by=1 is divisible by gcd(a, b), that means that gcd(a, b)=1. • If d is any common divisor of two integers, i. e. d | a and d | b , • then d | gcd(a, b). Why? • gcd(na, nb)=n gcd(a, b) for any integers a, b, n .

  3. gcd(10, 24)=2 How to find gcd of two integers? a =10, divisors: 1, 2, 5, 10 b =24, divisors: 1, 2, 3, 4, 6, 8, 12, 24 By the last Theorem 1, there are some integers x and y , such that 10x +24y =2. 10  5+24 (2) = 2 (found by inspection). So, we found an integer solution of equation 10x +24y =2. Is it unique? 10(5+12k)+24(2+5k) = 2 What if we consider equation 10x +24y =4? 5x +12y =1? 10x +24y =1?

  4. x y Theorem 2. An integer solution (x , y) of equation ax + by =c exists if and only if c is divisible by gcd(a, b). Proof. Let d = gcd(a, b). We need to prove: 1). d | c  x, y Z such that ax + by =c 2) x, y Z such that ax + by =c  d | c  c = nd, n Z 1) Assume d | c  c = n(ax0+by0 ) = a (nx0)+b (ny0) 2) Assume ax + by =c d | a and d | b  d | ax + by  d | c

  5. Given two integers a and b how can we find gcd (a, b)? Euclidian Algorithm. Consider an example:a=963, b = 637. We have 963 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 a=b q1+r1 b=r1q2+r2 r1=r2q3+r3 r2=r3q4+r4 r3=r4q5 0< r1<b 0< r2< r1 0< r3 < r2 0< r4 < r3 We are going to show that the last nonzero remainder (r4=9) is the gcd(963, 657). Let d is any common divisor of a and b: d |963 and d | 657  d | 306 d |657 and d | 306  d | 45 d |306 and d | 45  d | 36 d |45 and d | 36  d | 9 gcd(963, 657) | 9 What can be implied from here?

  6. On the other hand 9 is a divisor of both 963 and 657. Let’s go backward: 9|306 and 9|45  9|657 963 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 9|306 and 9|45  9|657 9|45 and 9|36  9|306 9|36 and 9|9  9| 45 By the Theorem 1: gcd (963, 657) = 963 x0 +657y0 , so 9| 657 and 9| 963  9| gcd (963, 657) gcd(963, 657) | 9 and 9| gcd(963, 657)  9 = gcd(963, 657) by the property a|b and b|a (a, b>0)  a=b

  7. Euclidian Algorithms can be used to find the integers x0and y0 that give gcd (a, b)=ax0+by0. 9 = 45  36 = 45 (306  645) = 306 + 745 = 306 + 7(657  2306) = 7657  15306 = 7657  15(963 657) = 22657  15963 963 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 So we can express the last nonzero remainder 9 as the linear combination of 657 and 963: 9 = gcd (657, 963) = 657 x0+963 y0 x0=22, y0 =  15

  8. Theorem (Euclidian Algorithm). Given integers a and b>0, we make a repeated application of the division algorithm to obtain a series of equations: a=b q1+r1 b=r1q2+r2 r1=r2q3+r3 … rj2= rj1qj+rj rj1= rjqj+1 0< r1<b 0< r2< r1 0< r3 < r2 … 0< rj<rj1 Proof. First show d =gcd(a, b)is a divisor of rj. d | a and d | b imply d | r1 because r1=a b q1.. At the next step d | b and d | r1 imply d | r2, and so on. Finally, d |rj . From the other hand rj | a and rj | b imply gcd(a, b) = ax0+by0 is divisible by rj , i. e. rj | d . d | rj and rj | d imply rj. =d = gcd(a, b).

  9. To find integer solution of an equation ax+by=c, • we need to check first, that gcd(a, b) divides c. For example, to find integer solution for 85x +34y = 51, find the gcd(85, 34) using Euclid Algorithm: 85=342+17; 34= 172 So, gcd(85, 34)=17. Since 17|51 a solution exists. • Find the integers u, v in gcd(a, b)=au+bv. • 17 = 85  342,  u = 1, v = 2. • By multiplying by 3 we find: • 51=853+34 (6), i. e. x =3, y = 6 is a solution.

  10. 1=5(u2k) +2(v+5k) where k is any integer. • Other integer solutions 51= 85x+34y 51 = 85(x 6k) +34(y+15k) 17= 85(u2k)+34(v+5k) 17 = 85u +34v 1= 5u +2v

  11. Consider now positive integers Z+ = {1, 2, 3, …}. • Any positive integer n >1 has at least two dividers, 1 and n . • An integer p >1, that does not have any other dividers except • 1 and itself, is called a prime. • An integers n >1, that is not a prime, is composite. • Any composite integer n Z+ has a prime factor. Proof by contradiction. Assume there exists some positive integer, that has no prime factors. Then the set of such integers S  and we can find the smallest element n S  Z+. Since n is composite, n = k m, with 1< k, m < n, so k, m S , so they are eitherprimes or have prime factors. In either case n has a prime factor.

  12. The first primes: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, … • Does this sequence has an end? This question is not as trivial as it seems! • (Euclid) There are infinitely many primes. Proof. Suppose there were only a finite number of primes p1, p2, …pk. Then form a number n = p1p2  … pk +1=2357…  pk +1. n is not divisible by 2, for then both n and 2357…  pk would be divisible by 2, and therefore their difference would be divisible by 2. This difference is 1, and is not divisible by 2. In the same way, n is not divisible by 3 or by 5 or … or pk. But n is either a prime or has a prime factor. In any case it is divisible by some prime p that is not among the list 2, 3, 5,…pk. It implies that there is a prime distinct from 2, 3, 5…pk, and so greater then pk. Consequently, the list of primes can never end.

  13. Fundamental Theorem of Arithmetic. Any integern > 1 can be written as a product of prime numbers. Further, this product is unique except for rearrangement of factors. For example, take number 666. It is not a prime, because it has a factor 2, so we get 666=2333. Now 333 has an obvious factor 3, so 333=2111. Again 111 has a factor 3, and 111=337, hence: 666=23337 is a representation of the composite number 666 as a product of primes. Other examples: 12=223=223; 120 = 22235=23 3 5; But is there any another representation of 666 as a product of primes (we don’t distinguish different orders of factors)?

  14. Proof that a prime factorization exists for any integer n >1. Prove by strong induction on n >1. Basis.n =2 is prime itself, so the proposition is true. Inductive Hypothesis. Assume that for some k >1 there exists prime factorization for all integers 1<nk. Inductive Step Consider n=k+1. We can have two cases: either n is a prime, or n is composite. In the first case we have nothing to prove. In the second case n = m1 m2 and 1< m1, m2 <n. By IH both m1, m2 have prime factorization, so n has a prime factorization as well.

  15. If p | a we are done, so consider the case p | a / Lemma 1. If a prime p divides the product of two numbers, p | ab, it must divide at least one of them. Proof. Assume p | ab to prove that p | a or p | b. What can be implied about gcd(p, a)? Then the only common factor of p and a is 1. It implies that there exist integers x0and y0 such that p x0+ay0=1 Then b =b(p x0+ay0) = p (b x0)+(ba) y0 is divisible by p because bothp(b x0) and (ba) y0 are divisible by p. Suppose now that some number c divides the product ab, c | ab . Can we imply that c divides either a or b ?

  16. Proof of the uniqueness of the prime factorization Prove it by contradiction. For this assume that there exist some integer that has non-unique prime factorization. By Well-Ordering Principle we can find the smallest such integer, let it be n. So we have n =p1 p2…pk = q1 q2… qs , where all pi, qj are primes. Note that p1 divides q1(q2… qs), so it either divides q1 or (q2… qs). If p1| q1 then p1= q1 , both are primes. If p1| (q2… qs), we repeat the Argument, and ultimately reach the conclusion, that p1 equals one of the primes q1,q2,… qs . Then we can cancel the common prime from the two representations and find another integer n/p1 <n that has non-unique prime factorization in contradiction with assumption, that n is the smallest one.

  17. Suppose that the prime factorizations of the integers a and b are: (ai, bi 0 ) where all primes occurring in either factorization are included in both factorizations with zero exponent if necessary. Then The least common multiple of two integers: Now we can find another form for gcd(a, b). • This integer does divide both a and b. • No larger integer can divide both a and b.

  18. The same value can be found from Euclid Algorithm as follows: 500 = 1204 + 20 120 =206 So, the last nonzero remainder is 20. Example. Find gcd(120, 500) using prime factorization. We have 120=23 3 5 and 500=22 53 , then gcd(120, 500)= 2min(3, 2) 3min(1, 0) 5min(1, 3) =22 30 51=20.

  19. Theorem. If n is a composite integer, it has a prime factor less than or equal to Proof.If n is composite, it has a factor a with 0<a<n. Hence, n = ab, where both a and b are positive integers greater then 1. So, either a or b , since otherwise ab > Hence, n has a divisor less or equal . It may be either prime or composite, but in any case n has a prime factor less or equal . The contrapositive of this theorem: If an integer n does not have a prime factor less or equal to , then n is prime. Given an integer n how can we decide is it a prime or not? How many factors we need to check? Obviously we don’t need to check factors above n. But there exists better restriction.

  20. The only primes not exceeding are : 2, 3, 5, 7. So we check that 101 is not divisible by 2, not divisible by 3, by 5 and by 7. So, 101 is prime. Example. Show that 101 is a prime.

More Related