Presentation is loading. Please wait.

Presentation is loading. Please wait.

Other Forms of Induction

Similar presentations


Presentation on theme: "Other Forms of Induction"— 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 Larger base case Multiple subproblems 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. Prove S(0) [Base case] 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 < 2n ,  n ≥ 5 Base case n = 5
1 4 2 8 3 12 16 5 20 32 6 24 64 4n < 2n ,  n ≥ 5 Base case n = 5 Assume 4n < 2n IH Show 4(n+1) < 2n+1 4(n+1) = 4n + 4 < 2n + 4 [by IH] < 2n + 2n = 22n=2n+1 [by prop of exponents and since n > 2,4 < 2n]

7 Exercise Create a table of values for 2n and n!
Prove 2n < 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
n Fn 2n 1 2 4 3 8 5 16 32 6 13 64 Define Fn = Fn-1+Fn-2 n > 1 F0 = 1, F1 = 1 Fn < 2n, n > 0 Need two base cases n=1 and n=2 Assume Fn < 2n [IH] and show Fn+1 < 2n+1 Fn+1 = Fn+Fn-1 < 2n + 2n-1 < 2n + 2n = 2n+1

10 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?

11 Full History Induction
Let S(n) be a statement parameterized by a non-negative integer n. If S(0) 𝑖=1 𝑛−1 𝑆(𝑖)  S(n) Then S(n) holds for n  0.

12 N Operand And Define 𝐴 1 ∧…∧ 𝐴 𝑛 = 𝑖=1 𝑛 𝐴 𝑖
𝑖=1 𝑛 𝐴 𝑖 = 𝑖=1 𝑛−1 𝐴 𝑖 ∧ 𝐴 𝑛 𝑛>1 𝐴 1 𝑛=1 This definition uses one particular parenthesization [left to right] Since ∧ is associative it should not matter which parenthesization is used

13 Generalized Associativity
The conjunction of n operands (A1    An) is equivalent to 𝑖=1 𝑛 𝐴 𝑖 independent of which way parentheses are put in. Example. The following are all equivalent (A1  A2)  (A3  A4 ) ((A1  A2)  A3)  A4 (A1  (A2  A3))  A4 A1  (A2  (A3  A4 )) A1  ((A2  A3)  A4 ))

14 Proof of Generalized Associativity
We show that an arbitrary parenthesization is equivalent to 𝑖=1 𝑛 𝐴 𝑖 . The proof uses full history induction. The base case with one operand is trivially true. Assume the theorem is true for a conjunction of k operands for k < n

15 Proof of Generalized Associativity
A conjuction of n operands computes the and of a conjunction of the first k operands and a conjunction of the last n-k operands for 1 ≤ k < n. (A1    Ak)  (Ak+1    An) By IH (Ak+1    An)  𝑖=𝑘+1 𝑛 𝐴 𝑖  𝑖=𝑘+1 𝑛−1 𝐴 𝑖  𝐴 𝑛 (A1    Ak)  (Ak+1    An)  (A1    Ak)  𝑖=𝑘+1 𝑛−1 𝐴 𝑖  𝐴 𝑛 , which again by IH on the first n- 1 operands  𝑖=1 𝑛−1 𝐴 𝑖  𝐴 𝑛 = 𝑖=1 𝑛 𝐴 𝑖


Download ppt "Other Forms of Induction"

Similar presentations


Ads by Google