Presentation is loading. Please wait.

Presentation is loading. Please wait.

Other Forms of Induction CS 270 Math Foundations of CS Jeremy Johnson.

Similar presentations


Presentation on theme: "Other Forms of Induction CS 270 Math Foundations of CS Jeremy Johnson."— Presentation transcript:

1 Other Forms of Induction CS 270 Math Foundations of CS Jeremy Johnson

2 Objective To introduce several variants of inductive proofs. These variants are convenient for many problems though they are no more powerful than the induction principle seen so far. Students should be able to carry out inductive proofs using these techniques.

3 Outline 1.Larger base case 2.Multiple subproblems 3.Full history induction

4 Induction Principle Let S(n) be a statement paramterized by a non-negative integer n If S(0) is true and S(n)  S(n+1) then S(n) holds for all non-negative integers. S(0), S(0)  S(1)  S(1) S(1), S(1)  S(2)  S(2) S(2), S(2)  S(3)  S(3) … This allows a proof of infinitely many cases

5 Inductive Proofs Let S(n) be a statement paramterized by n a nonnegative integer. To prove S(n) holds for all non-negative integers. 1.Prove S(0) [Base case] 2.Assume S(n) [inductive hypothesis] and prove S(n+1). This proves S(n)  S(n+1) Can start with a positive integer k and show S(n) holds for all integers  k.

6 Larger Base Case 4n < 2 n,  n ≥ 5 Base case n = 5 Assume 4n < 2 n IH Show 4(n+1) < 2 n+1 4(n+1) = 4n + 4 < 2 n + 4 [by IH] 2,4 < 2 n ] n4n2n2n 001 142 284 3128 416 52032 62464

7 Exercise Create a table of values for 2 n and n! Prove 2 n < n!,  n ≥ 4

8 Induction with Previous k Cases Let S(n) be a statement parameterized by a non-negative integer n. If S(0), S(1),…,S(k-1) [Base cases] S(n-k)  S(n-1)  S(n) Then S(n) holds for n  0. This follows from induction principle Let S’(n) = S(n)  S(n-k+1) S’(k-1)  S’(n-1)  S’(n) is equivalent to above

9 Example with 2 Previous Cases Define F n = F n-1 +F n-2 n > 1 F 0 = 1, F 1 = 1 F n 0 Need two base cases n=1 and n=2 Assume F n < 2 n [IH] and show F n+1 < 2 n+1 F n+1 = F n +F n-1 < 2 n + 2 n-1 < 2 n + 2 n = 2 n+1 nFnFn 2n2n 011 112 224 338 4516 5832 61364

10 Tighter Bound for F n Try 1.75 n How about 1.5 n ?

11 Tighter Bound for F n

12

13 Exercise Use induction to prove that any postage amount greater than 11 can be created using only 4 and 5 cent stamps. First determine which values upto 15 can be done with 4 and 5 cent stamps. How many base cases do you need?

14 Stamps

15

16 Full History Induction

17 N Operand And

18 Generalized Associativity

19 Proof of Generalized Associativity

20

21


Download ppt "Other Forms of Induction CS 270 Math Foundations of CS Jeremy Johnson."

Similar presentations


Ads by Google