260 likes | 776 Views
Introduction to Number Theory. Integers: Z={…-3, -2, -1, 0, 1, 2, 3, …}. Operations: addition, multiplication, subtraction. Given any two integers a , b Z we can define a + b Z a b Z a b Z . Integers Z are closed under operations ‘+’, ‘ ’, ‘’. .
E N D
Introduction to Number Theory Integers: Z={…-3, -2, -1, 0, 1, 2, 3, …} Operations: addition, multiplication, subtraction. Given any two integers a, bZ we can define a + b Z a b Z a b Z Integers Z are closed under operations ‘+’, ‘’, ‘’. Closure properties under +, , If a, b are integers, then a+b, a b, ab are integers.
Commutative Law If a, b are integers, thena+b=b+a; ab=ba Associative Law If a, b are integers, then a+(b+c) = (a+b)+c; a( bc ) = (ab)c Distributive Law If a, b are integers, then a(b+c) = ab+ ac Identity elements for addition and multiplication For all integer a, a+0=a; a 1= a Additive inverse For all integer a, a + (a) = (a)+a = 0
divisor of a multiple of b If a, b Z, b 0, then it may be that (a / b) Z, so integers are not closed under division. Example. If we divide 10 by 5, the result is an integer again. So, we say, that 10 is divisible by 5 because there exists an integer n (2 in this case) such that 10=5 n. But 10 is not divisible by 3 (within integer domain). Definition. Given two integers a, b Z, b 0, we say that a is divisible by b and denote it b | a,if there exists an integer n Z, such that a = b n .
… … d 3d 2d d 2d 3d 4d 0 Integers divisible by the positive integer d Divisors of 6 are: 1, 2, 3, 6.
Some properties of divisibility For any a Z: 1) a | 0 because 0= a0 2) 1 | a because a =1a For any a, b Z 3) If a | b and b | a, then a = b 4) If a | b and b>0and a>0, then a b 5) If mZ, m0, then a | b if and only if (ma)|(mb)
For any a, b, c 6) If a | b and b | c, then a | c. Proof. a | b b = ax for some xZ (by defn of divisibility) b | c c = by for some yZ (by defn of divisibility) By substitution we have c = (ax)y. By associative law, c = a(xy). xy=k is an integer by the closure property of integers under multiplication. c = ak means that a | c .
7) If a | b then a | bc. Proof. By the definition of divisibility a | b implies that there is some integer x such that b = ax. For any integer c, bc = (ax)c = a(xc) by associative property of multiplication. By the closure property integers under multiplication xc = k, an integer, so bc =ak, i. e. a | bc 8) If a | b and a | c then a | (bx + cy) for any x, y Z Proof is left as an exercise. Does the linear equation 21x + 3y= 133 has integer solution ? No, because for any integer x, y, 3| (21x + 3y), but 133 is not divisible by 3.
remainder dividend divisor quotient … … 11 33 22 11 22 33 44 0 What is the outcome when any integer b is divided by any positive integer a >0 in general case? For example, if 25 is divided by 7, the quotient is 3 and the remainderis 4. These numbers are related by 25=37+4. Division Algorithm. Given any integers a and b, with a>0, there existuniqueintegers q and r such that b = aq + r, with 0 r <a. Example. a =35, b =11. What are q and r ? 35 = 11 1+24 35 = 11 4 9 35 = 11 3 + 2 0 2<11
b 3a 4a 2a a 0 a 2a r Proof. Consider the multiples of a on the real line: … a+(b +a)= b=a+(b a)=2a+(b2a)= 3a+(b3a)=4a+(b4a)=… We can always find such a multiple aq, that the remainder r = b aq satisfies 0 r <a.
b 3a 4a 2a a 0 a 2a b 3a b 4a b 2a b a b b + a b +2a Consider set R ={… b + 2a,b+a,b, b a, b2a , … } Among nonnegative terms of R there exists the smallest element (by Well-Ordering Principle). Denote this smallest nonnegative r, then we have that for some q and r: r = b qa 0 and r a < 0 . If not (i. e. if r a 0), b = qa +r = (q+1)a +ra and r is not the smallest positive term (contradiction). So, 0 r <a .
To prove the uniqueness of q and r, suppose thereis another pair q1 and r1 satisfying the same conditions, i. e. we have b=aq+r and b=aq1+r1, with 0 r, r1 <a. Assume r < r1, so that 0 < r1 r <a. Then by subtracting we have r1 r = a(q q1), so a | (r1 r ) by definition of divisibility. Since r1 r >0 and a >0 it means that r1 r a in contradiction to 0 r, r1 <a. Hence r = r1 and q =q1, i.e. the quotient and remainder are unique.
Definition. Let a, b Z. An 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)
Proof. Consider set of integers {ax+by|x, y Z}. This set includes positive, negative values and 0. Choose x0and y0so that l =ax0+by0 is the least positive integer l in the set. Prove that l | a and l | b. Prove l | a by contradiction. Assume l | a , i. e. a = ql+r , where 0<r<l. Hence r = a ql = a q(ax0+by0 )= a(1 qx0)+b(qy0). So, r {ax+by|x, y Z}, but it is smaller than l (why?) in contradiction with assumption, that l is the least positive element in the set. l | b is proved analogously. / Theorem 1. The gcd(a, b) is the least positive value of ax+by, where x and y range over all integers. Let d =gcd(a, b). It means that a = d n and b = d m. Then, l = ax0+by0 = d(nx0+my0), thus d | l and so l d . But l > d is impossible, since d is the greatest common divisor. So, l =d.
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)=ngcd(a, b) for any integers a, b, n .
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 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?
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 = nd, n Z 1) Assume d | c c = n(ax0+by0 ) = a(nx0)+b (ny0) 2) Assume ax + by =c d | a and d | b d | ax + by d | c
Given two integers a and b how can we find gcd (a, b)? Lemma. Let a = bq + r, where a , b, q and r be integers. Then gcd(a, b)=gcd(b, r) Proof. It is sufficient to prove that common divisors of a and b are the same as common divisors of b and r. Let d be a common divisor of a and b. It means that d | a and d | b. Then d | (a bq ), i. e. d is also a divisor of r. Let f be a common divisor of b and r It means that f | b and f | r Then f | bq + r , i. e. f is also a divisor of a .
Euclidian Algorithm. Consider an example: a=963, b = 637. We have 963 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 a=b q1+r1 b=r1q2+r2 r1=r2q3+r3 r2=r3q4+r4 r3=r4q5 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?
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 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 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
Euclidian Algorithms can be used to find the integers x0and y0 that give gcd (a, b)=ax0+by0. 9 = 45 36 = 45 (306 645) = 306 + 745 = 306 + 7(657 2306) = 7657 15306 = 7657 15(963 657) = 22657 15963 963 = 1657+306 657 = 2306+45 306 = 645+36 45 = 36+9 36 = 49 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
Theorem 3 (Euclidian Algorithm). Given integers a and b>0, a > b, we apply repeatedly the division algorithm to obtain a series of equations: a=b q1+r1 b=r1q2+r2 r1=r2q3+r3 … rj 2= rj 1qj+rj rj 1= rjqj +1 0< r1<b 0< r2< r1 0< r3 < r2 … 0< rj<rj 1 Proof. By the Lemma gcd(a, b)=gcd(b, r1)= gcd(r1, r2)=… =gcd(rj 1, rj)= gcd(rj , 0)= rj
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=342+17; 34= 172 So, gcd(85, 34)=17. Since 17|51 a solution exists. • Find the integers u, v in gcd(a, b)=au+bv. • 17 = 85 342, u = 1, v = 2. • By multiplying by 3 we find: • 51=853+34 (6), i. e. x =3, y = 6 is a solution.
1=5(u2k) +2(v+5k) where k is any integer. • Other integer solutions 51= 85x+34y 51 = 85(x 6k) +34(y+15k) 17= 85(u2k)+34(v+5k) 17 = 85u +34v 1= 5u +2v