Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU.

Similar presentations


Presentation on theme: "Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU."— Presentation transcript:

1 Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU

2 4.1. The well-ordered principle: mathematical induction Z + ={x  Z  x  1} but Q + ={x  Q  x>0} and R + ={x  R  x>0}. Z + is different from Q + and R + in the following property. –The well-ordering principle: Every nonempty subset of Z + contains a smallest element.

3 The principle of mathematical induction (a) If S(1) is true and (b) If S(k) is true, then S(k+1) is true, (c) then S(n) is true for all n  Z +. The condition (a) is referred to as basis step, while that in part (b) is called the inductive step. The basis step can begin with any integer number, even negative.

4 Ex 4.1 For all n  Z +, S(n)=1+2+…+n=n(n+1)/ 2 Basis: it is true for n=1 Hypothesis: it is true for S(n) Induction: Adding n+1 to S(n), we find S(n+1) is also true.

5 Ex 4.4 For all n  Z +, S(n)=1 2 +2 2 +…+n 2 =n (n+1) (2n+1)/6 Basis: it is true for n=1 Hypothesis: it is true for S(n)

6 Ex 4.6 S(n)=1+2+…+n=(n 2 +n+2)/2 Obviously, this formula is wrong. However, we find that S(k)  S(k+1). Although S(k)  S(k+1) but S(1) is not true, S(n) is not true either. This example indicates the need to establish the basis step.

7 Ex 4.8 For all n  6, 4n<(n 2 -7) Basis: it is true for n=6 Hypothesis: it is true for n=k Induction: it is also true n=k+1.

8 Ex 4.9 Harmonic number H n =1+(1/2)+…+(1/n) For all n  Z +, Basis: it is true for n=1 Hypothesis: it is true for n=k

9 Ex 4.10 binary search principle For all A n  R with  A n  =2 n and the elements of A n are listed in ascending order. To determine if r exist in A n or not, we must compare r with no more than n+1 elements in A n. Basis: it is true for A 0 and A 1. Hypothesis: it is true for A n. Induction: it is also true A n+1.

10 Ex 4.12 For all k  1, S(k): k has 2 k-1 compositions. Basis: S(1) is true. Given the composition of k, we can produce the composition of k+1 by: –the last summand of k is added by 1. –We append a new summand “1” after the last summand of k. Therefore, the number of composition of k+1 is twice the number of k.

11

12 Ex 4.13 for all n  14, S(n): n can be written as a sum of 3’s and/or 8’s Basis: 14=3+3+8 Hypothesis: S(k) is true. Induction: Let us consider k. –If there is one 8 in the sum that equals k, then we can replace this as 3+3+3. –If there is no 8, then since k  14, there are at least five 3’s as summands, which can be replaced by two 8’s.

13 Alternative form of mathematical induction (a) If S(n 0 ), S(n 0 +1), S(n 0 +2),…, S(n 1 -1), S(n 1 ) are true, and (b) If S(n 0 ), S(n 0 +1), …, S(k-1), S(k) are true for some k  n 1, then S(k+1) is also true, (c) then S(n) is true for all n  n 0.

14 Ex 4.15 a 0 =1, a 1 =2, a 2 =3, a n =a n-1 +a n-2 +a n-3 for n  3. S(n): a n  3 n for all n  N. Basis: it is true for n=0, n=1 and n=2. Hypothesis: S(n) is true for n  k.

15 4.2. Recursive definition In example 4.15, we have a recursive definition

16 Ex 4.16 Given the definition that (1) the conjunction of p 1, p 2 by p 1  p 2, (2) p 1  p 2  …  p n  p n+1  (p 1  p 2  …  p n )  p n+1. Show that (p 1  p 2  …  p r )  (p r+1  p r+2  …  p k ) = (p 1  p 2  …  p r+1  p r+2  …  p k ).

17 Ex 1.47 Given the definition that (1) the union of A 1, A 2 by A 1  A 2, (2) A 1  A 2  …  A n  A n+1  (A 1  A 2  …  A n )  A n+1. Show (A 1  A 2  …  A r )  (A r+1  A r+2  …  A k ) = (A 1  A 2  …  A r+1  A r+2  …  A k ).

18 Ex 4.18 (A 1  A 2  …  A k+1 ) c =A 1 c  A 2 c  …  A k+1 c Basis: it is true for n=2 Hypothesis: it is true for n=k (A 1  A 2  …  A k ) c =A 1 c  A 2 c  …  A k c

19 Ex 4.19 The Fibonacci numbers are defined as –F 0 =0, F 1 =1 and –F n =F n-1 +F n-2 for n  2. Show that

20 Ex 4.20 Lucas numbers: (1) L 0 =2, L 1 =1; and (2) L n =L n-1 +L n-2 for n  2. Then L n =F n-1 +F n+1.

21 Ex 4.21 Eulerian numbers a m, k are defined: (1) a m, k = (m- k)a m-1, k-1 +(k+1)a m-1, k for 0  k  m-1. (2) a 0,0 =1, a m, k =0 for k  m, a m, k =0 for k<0.

22

23 4.3. The division algorithm: prime number Definition 4.1. b  a if and only if a=bn Theorem 4.3.

24 Ex 4.23 Do there exists an integer x, y, z such that 6x+9y+15z=107 Since 3  6, 3  9 and 3  15, 3 is a divisor of 107. But since 3 is not a divisor of 107, there does not exist such x, y, z.

25 Ex 4.24 If 17  2a+3b, then 17  9a+5b 17  2a+3b  17  (-4)(2a+3b). 17  17  17  17a+17b 17  (-4)(2a+3b) +17a+17b  17  9a+5b

26 Prime Prime: integers that have exactly two divisors. Composite number: integers that are not primes. for any composite n, there is a prime p such that p  n. (Why?) There are infinitely many primes. (Theorem 4.4)

27 Proof of Theorem 4.4 Let p 1, p 2,…,p k be the set of all primes. Let B= p 1  p 2  …  p k +1 and B is a composite. There exists p j such that p j  B and p j  p 1  p 2  …  p k. By Theorem 4.3(e), p j  1 ; so, this is a contradiction.

28 Theorem 4.5. The division algorithm in Fig 4.10 If a, b  Z, then there exist unique q, r  Z with a=qb+r, 0  r<b. Here q is called quotient, r remainder, b divisor and a dividend.

29 4.4. The greatest common divisor: the Euclidean algorithm Common divisor, Definition 4.2 Greatest common divisor c, Definition 4.3 (a) c  a and c  b, (b) For any common divisor d of a and b, d  c Theorem 4.6. gcd(a, b) is unique (Why?) –Let S={a  s+b  t  s,t  Z, a  s+b  t>0}. The least element in S is the greatest common divisor of a, b.

30 Proof of Theorem 4.6 Since c=ax+by, if d  a and d  b, then d  c=ax+by. Def 4.3(b) if c can not divide a, then a=qc+r where 0<r<c. So, we have r=a-qc=a-q(ax+by)=(1-qx)a+(-qy)b, meaning r  S. This is a contradiction to the fact that c is the smallest one in S. Hence, c  a and c  b. Def 4.3(a) If c 1 and c 2 both satisfy the above two conditions, let us designate c 1 as the gcd(a, b), then we have c 2  c 1. By reversing the role, we have c 1  c 2. So, we conclude that c 1 =c 2.

31 Properties gcd(a, b) is the smallest positive integer we can write as a linear combination of a and b. gcd(a, b)= gcd(b, a); gcd(a, b)= gcd(a, - b)= gcd(-a, b)= gcd(-a, -b); gcd(a, 0) =  a  gcd(0, 0) not defined. We call a and b relatively prime if gcd(a, b)=1.

32 Theorem 4.7. Euclidean algorithm.

33 Proof If d  r 0 and d  r 1  d  r 2 d  r 1 and d  r 2  d  r 3 d  r n-2 and d  r n-1  d  r n This satisfies Def 4.3(b) From the last equation, r n  r n-1. So, r n  r n-2 because r n-2 =q n-1 r n-1 +r n r n  r n-1 and r n  r n-2  r n  r n-3 r n  r n-2 and r n  r n-3  r n  r n-4 r n  r 2 and r n  r 1  r n  r 0 This satisfies Def 4.3(a)

34 Examples Ex 4.34. Find the gcd of 250 and 111. Ex 4.35. Show that 8n+3 and 5n+2 are relatively prime. Ex 4.36. How can we measure exactly one ounce by two containers with capacities 17 ounces and 55 ounces respectively.

35 Least common multiple Definition 4.4. lcm(a, b) the least common multiple lcm(1, n)=lcm(n, 1)=n lcm(c, n  a)=n  a If n  m, lcm(a m, a n )=a n. If c=lcm(a,b) and d is a common multiple of a, b, then c  d. a  b=lcm(a,b)  gcd(a, b)

36 4.5. The fundamental theorem of arithmetic Lemma 4.2. If p is prime and p  ab, then p  a or p  b. –If p  a, we are finished. –If not, then gcd(p, a)=1. px+ay=1 b=p(bx)+(ab)y Since p  ab and p  p, we have p  b. Lemma 4.3. If p is prime and p  a 1 a 2 …a n, then p  a i for some i. (Why)

37 is irrational If not, then we have =a/b, where a and b are relatively prime, gcd(a, b)=1. 2=a 2 /b 2  2b 2 =a 2  2  a 2  2  a 2  a  a=2c 2b 2 =a 2 =(2c) 2 =4c 2  b 2 =2c 2 b 2 =2c 2  2  b 2  2  b Since 2  a and 2  b, gcd(a, b)  2

38 Theorem 4.11. Every integer can be written as a product of primes uniquely. (1) the existence of a prime factorization. (2)The factorization is uniqueness. The first part is proved by contradiction. Consider the smallest integer m that can not be factorized. The second part is proved by induction. It is true for 2 and for n-1. Now we prove it holds for n.

39 Examples Ex 4.42. The prime factorization for 980220. Ex 4.44. How to count the number of divisors of n? Ex 4.45. Determine the gcd(a, b) and lcm(a, b) by factorization.


Download ppt "Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU."

Similar presentations


Ads by Google