1 Inductive Proofs Rosen 6 th ed., §
2 Mathematical Induction A powerful, rigorous technique for proving that a predicate P(n) is true for every natural number n, no matter how large.A powerful, rigorous technique for proving that a predicate P(n) is true for every natural number n, no matter how large. Based on a predicate-logic inference rule:Based on a predicate-logic inference rule: P(0) n 0 (P(n) P(n+1)) n 0 P(n)P(0) n 0 (P(n) P(n+1)) n 0 P(n)
3 Outline of an Inductive Proof Want to prove n P(n) …Want to prove n P(n) … Base case (or basis step): Prove P(0).Base case (or basis step): Prove P(0). Inductive step: Prove n P(n) P(n+1).Inductive step: Prove n P(n) P(n+1). –e.g. use a direct proof: Let n N, assume P(n). (inductive hypothesis)Let n N, assume P(n). (inductive hypothesis) Under this assumption, prove P(n+1).Under this assumption, prove P(n+1). Inductive inference rule then gives n P(n).Inductive inference rule then gives n P(n).
4 Induction Example Prove thatProve that
5 Another Induction Example Prove that , n<2 n. Let P(n)=(n<2 n )Prove that , n<2 n. Let P(n)=(n<2 n ) –Base case: P(0)=(0<2 0 )=(0<1)=T. –Inductive step: For prove P(n) P(n+1). Assuming n<2 n, prove n+1 < 2 n+1.Assuming n<2 n, prove n+1 < 2 n+1. Note n + 1 < 2 n + 1 (by inductive hypothesis) < 2 n + 2 n (because 1<2=2 2 2 2 n-1 = 2 n ) = 2 n+1Note n + 1 < 2 n + 1 (by inductive hypothesis) < 2 n + 2 n (because 1<2=2 2 2 2 n-1 = 2 n ) = 2 n+1 So n + 1 < 2 n+1, and we’re done.So n + 1 < 2 n+1, and we’re done.
6 Validity of Induction Prove: if n 0 (P(n) P(n+1)), then k 0 P(k) Prove: if n 0 (P(n) P(n+1)), then k 0 P(k) (a) Given any k 0, n 0 (P(n) P(n+1)) implies (P(0) P(1)) (P(1) P(2)) … (P(k 1) P(k)) (P(0) P(1)) (P(1) P(2)) … (P(k 1) P(k)) Using hypothetical syllogism k-1 times we have (b) Using hypothetical syllogism k-1 times we have P(0) P(k) P(0) P(k) (c) P(0) and modus ponens gives P(k). Thus k 0 P(k). Thus k 0 P(k).
7 The Well-Ordering Property The validity of the inductive inference rule can also be proved using the well-ordering property, which says:The validity of the inductive inference rule can also be proved using the well-ordering property, which says: –Every non-empty set of non-negative integers has a minimum (smallest) element. – S N : m S : n S : m n
8 Use Well-Ordering Property and Proof by Contradiction Suppose P(0) is true and that P(k) P(k+1) is true for all positive k.Suppose P(0) is true and that P(k) P(k+1) is true for all positive k..Assume P(n) is false for some positive n. Implies S={n| P(n)} is non-empty and has a minimum element m (i.e., P(m)=false)Implies S={n| P(n)} is non-empty and has a minimum element m (i.e., P(m)=false) But then, P(m-1) P((m-1)+1)=P(m) which is a contradiction!But then, P(m-1) P((m-1)+1)=P(m) which is a contradiction!
9 Generalizing Induction Can also be used to prove n c P(n) for a given constant c Z, where maybe c 0, then:Can also be used to prove n c P(n) for a given constant c Z, where maybe c 0, then: –Base case: prove P(c) rather than P(0) –The inductive step is to prove: n c (P(n) P(n+1)). n c (P(n) P(n+1)).
10 Induction Example Prove that the sum of the first n odd positive integers is n 2. That is, prove:Prove that the sum of the first n odd positive integers is n 2. That is, prove: Proof by induction.Proof by induction. –Base case: Let n=1. The sum of the first 1 odd positive integer is 1 which equals 1 2. (Cont…) P(n)P(n)
11 Example cont. Inductive step: Prove n 1: P(n) P(n+1).Inductive step: Prove n 1: P(n) P(n+1). –Let n 1, assume P(n), and prove P(n+1). By inductive hypothesis P(n)
12 Strong Induction Characterized by another inference rule: P(0) n 0: ( 0 k n P(k)) P(n+1) n 0: P(n)Characterized by another inference rule: P(0) n 0: ( 0 k n P(k)) P(n+1) n 0: P(n) Difference with previous version is that the inductive step uses the fact that P(k) is true for all smaller, not just for k=n.Difference with previous version is that the inductive step uses the fact that P(k) is true for all smaller, not just for k=n. P is true in all previous cases
13 Example 1 Show that every n>1 can be written as a product p 1 p 2 …p s of some series of s prime numbers. Let P(n)=“n has that property”Show that every n>1 can be written as a product p 1 p 2 …p s of some series of s prime numbers. Let P(n)=“n has that property” Base case: n=2, let s=1, p 1 =2.Base case: n=2, let s=1, p 1 =2. Inductive step: Let n 2. Assume 2 k n: P(k). Consider n+1. If prime, let s=1, p 1 =n+1. Else n+1=ab, where 1 a n and 1 b n. Then a=p 1 p 2 …p t and b=q 1 q 2 …q u. Then n+1= p 1 p 2 …p t q 1 q 2 …q u, a product of s=t+u primes.Inductive step: Let n 2. Assume 2 k n: P(k). Consider n+1. If prime, let s=1, p 1 =n+1. Else n+1=ab, where 1 a n and 1 b n. Then a=p 1 p 2 …p t and b=q 1 q 2 …q u. Then n+1= p 1 p 2 …p t q 1 q 2 …q u, a product of s=t+u primes.
14 Example 2 Prove that every amount of postage of 12 cents or more can be formed using just 4- cent and 5-cent stamps.Prove that every amount of postage of 12 cents or more can be formed using just 4- cent and 5-cent stamps. Base case: 12=3 4), 13=2 4)+1(5), 14=1(4)+2(5), 15=3(5), so 12 n 15, P(n).Base case: 12=3 4), 13=2 4)+1(5), 14=1(4)+2(5), 15=3(5), so 12 n 15, P(n). Inductive step: Let n 15, assume 12 k n P(k). Note 12 n 3 n, so P(n 3), so add a 4-cent stamp to get postage for n+1.Inductive step: Let n 15, assume 12 k n P(k). Note 12 n 3 n, so P(n 3), so add a 4-cent stamp to get postage for n+1.
15 Example 3 Suppose a 0, a 1, a 2, … is defined as follows: a 0 =1, a 1 =2, a 2 =3, a 0 =1, a 1 =2, a 2 =3, a k = a k-1 +a k-2 +a k-3 for all integers k≥3. a k = a k-1 +a k-2 +a k-3 for all integers k≥3. Then a n ≤ 2 n for all integers n≥0.P(n) Proof (by strong induction): 1) Basis step: The statement is true for n=0: a 0 =1 ≤1=2 0 P(0) for n=1: a 1 =2 ≤2=2 1 P(1) for n=1: a 1 =2 ≤2=2 1 P(1) for n=2: a 2 =3 ≤4=2 2 P(2) for n=2: a 2 =3 ≤4=2 2 P(2)
16 Example 3 (cont’d) 2) Inductive hypothesis: For any k>2, Assume P(i) is true for all i with 0≤i<k: a i ≤ 2 i for all 0≤i<k. a i ≤ 2 i for all 0≤i<k. 3) Inductive step: Show that P(k) is true: a k ≤ 2 k a k = a k-1 +a k-2 +a k-3 ≤ 2 k-1 +2 k-2 +2 k-3 (using inductive hypothesis) ≤ 2 k-1 +2 k-2 +2 k-3 (using inductive hypothesis) ≤ …+2 k-3 +2 k-2 +2 k-1 ≤ …+2 k-3 +2 k-2 +2 k-1 = 2 k -1 (as a sum of geometric sequence) = 2 k -1 (as a sum of geometric sequence) ≤ 2 k ≤ 2 k Thus, P(n) is true by strong induction.