400 likes | 778 Views
Chapter 4 Properties of the integers: mathematical induction . Yen-Liang Chen Dept of IM NCU. 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 .
E N D
Chapter 4 Properties of the integers: mathematical induction Yen-Liang Chen Dept of IM NCU
4.1. The well-ordered principle: mathematical induction • Z+={xZx1} but Q+={xQx>0} and R+={xRx>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.
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.
Ex 4.1 • For all nZ+, 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.
Ex 4.4 • For all nZ+, S(n)=12+22+…+n2=n (n+1) (2n+1)/6 • Basis: it is true for n=1 • Hypothesis: it is true for S(n)
Ex 4.6 • S(n)=1+2+…+n=(n2+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.
Ex 4.8 • For all n6, 4n<(n2-7) • Basis: it is true for n=6 • Hypothesis: it is true for n=k • Induction: it is also true n=k+1.
Ex 4.9 • Harmonic number Hn=1+(1/2)+…+(1/n) • For all n Z+, • Basis: it is true for n=1 • Hypothesis: it is true for n=k
Ex 4.10 • binary search principle • For all AnR with An=2n and the elements of An are listed in ascending order. To determine if r exist in An or not, we must compare r with no more than n+1 elements in An. • Basis: it is true for A0 and A1. • Hypothesis: it is true for An. • Induction: it is also true An+1.
Ex 4.12 • For all k1, S(k): k has 2k-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.
Ex 4.13 • for all n14, 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 k14, there are at least five 3’s as summands, which can be replaced by two 8’s.
Alternative form of mathematical induction (a) If S(n0), S(n0+1), S(n0+2),…, S(n1-1), S(n1) are true, and (b) If S(n0), S(n0+1), …, S(k-1), S(k) are true for some kn1, then S(k+1) is also true, (c) then S(n) is true for all n n0.
Ex 4.15 • a0=1, a1=2, a2=3, an=an-1+an-2+an-3 for n3. • S(n): an3n for all nN. • Basis: it is true for n=0, n=1 and n=2. • Hypothesis: S(n) is true for nk.
4.2. Recursive definition • In example 4.15, we have a recursive definition
Ex 4.16 • Given the definition that (1) the conjunction of p1, p2 by p1p2, (2) p1p2…pn pn+1 (p1p2… pn) pn+1. • Show that (p1p2… pr) (pr+1pr+2… pk) = (p1p2… pr+1pr+2… pk) .
Ex 1.47 • Given the definition that (1) the union of A1, A2 by A1A2, (2) A1A2…AnAn+1 (A1A2…An)An+1. • Show (A1A2… Ar) (Ar+1Ar+2… Ak) = (A1A2… Ar+1Ar+2… Ak) .
Ex 4.18 • (A1A2…Ak+1)c=A1c A2c… Ak+1c • Basis: it is true for n=2 • Hypothesis: it is true for n=k (A1A2…Ak)c=A1c A2c… Akc
Ex 4.19 • The Fibonacci numbers are defined as • F0=0, F1=1 and • Fn=Fn-1+Fn-2 for n2. • Show that
Ex 4.20 • Lucas numbers: (1) L0=2, L1=1; and (2) Ln=Ln-1+Ln-2 for n2. • Then Ln=Fn-1+Fn+1.
Ex 4.21 • Eulerian numbers am, k are defined: (1) am, k = (m-k)am-1, k-1 +(k+1)am-1, k for 0km-1. (2) a0,0=1, am, k=0 for km, am, k=0 for k<0.
4.3. The division algorithm: prime number • Definition 4.1. ba if and only if a=bn • Theorem 4.3.
Ex 4.23 • Do there exists an integer x, y, z such that 6x+9y+15z=107 • Since 36, 39 and 315, 3 is a divisor of 107. • But since 3 is not a divisor of 107, there does not exist such x, y, z.
Ex 4.24 • If 172a+3b, then 179a+5b • 172a+3b17(-4)(2a+3b). • 17171717a+17b • 17(-4)(2a+3b) +17a+17b179a+5b
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 pn. (Why?) • There are infinitely many primes. (Theorem 4.4)
Proof of Theorem 4.4 • Let p1, p2,…,pk be the set of all primes. • Let B= p1 p2…pk+1 and B is a composite. • There exists pj such that pjB and pj p1 p2…pk. • By Theorem 4.3(e), pj1 ; so, this is a contradiction.
Theorem 4.5. • The division algorithm in Fig 4.10 • If a, bZ, then there exist unique q, rZ with a=qb+r, 0r<b. • Here q is called quotient, r remainder, b divisor and a dividend.
4.4. The greatest common divisor: the Euclidean algorithm • Common divisor , Definition 4.2 • Greatest common divisor c, Definition 4.3 (a) ca and cb, (b) For any common divisor d of a and b, dc • Theorem 4.6. gcd(a, b) is unique (Why?) • Let S={as+bts,tZ, as+bt>0}. The least element in S is the greatest common divisor of a , b.
Proof of Theorem 4.6 • Since c=ax+by, if da and db, then dc=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 rS. This is a contradiction to the fact that c is the smallest one in S. Hence, ca and cb. Def 4.3(a) • If c1 and c2 both satisfy the above two conditions, let us designate c1 as the gcd(a, b), then we have c2c1. By reversing the role, we have c1c2. So, we conclude that c1=c2.
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.
If dr0 and dr1dr2 dr1 and dr2dr3 drn-2 and drn-1drn This satisfies Def 4.3(b) From the last equation, rnrn-1. So, rnrn-2 because rn-2=qn-1rn-1+rn rnrn-1 and rnrn-2 rnrn-3 rnrn-2 and rnrn-3 rnrn-4 rnr2 and rnr1 rnr0 This satisfies Def 4.3(a) Proof
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.
Least common multiple • Definition 4.4. lcm(a, b) the least common multiple • lcm(1, n)=lcm(n, 1)=n • lcm(c, na)=n a • If n m, lcm(am, an)=an. • If c=lcm(a,b) and d is a common multiple of a, b, then cd. • a b=lcm(a,b) gcd(a, b)
4.5. The fundamental theorem of arithmetic • Lemma 4.2. If p is prime and pab, then pa or pb. • If pa, we are finished. • If not, then gcd(p, a)=1. • px+ay=1 • b=p(bx)+(ab)y • Since pab and pp, we have pb. • Lemma 4.3. If p is prime and pa1a2…an, then pai for some i. (Why)
is irrational • If not, then we have =a/b, where a and b are relatively prime, gcd(a, b)=1. • 2=a2/b22b2=a22a22a • 2aa=2c • 2b2=a2 =(2c)2=4c2 b2=2c2 • b2=2c22b22b • Since 2a and 2b, gcd(a, b)2
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.
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.