Professional Documents
Culture Documents
Lecture Induction1 6up PDF
Lecture Induction1 6up PDF
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 1/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 2/26
I Suppose we have an infinite ladder, and we I Used to prove statements of the form ∀x ∈ Z+ . P (x )
know two things:
I An inductive proof has two steps:
1. We can reach the first rung of the ladder
1. Base case: Prove that P (1) is true
2. If we reach a particular rung, then we can
also reach the next rung
2. Inductive step: Prove ∀n ∈ Z+ . P (n) → P (n + 1)
I From these two facts, can we conclude we
I Induction says if you can prove (1) and (2), you can conclude:
can reach every step of the infinite ladder?
∀x ∈ Z+ . P (x )
I Answer is yes, and mathematical induction
allows us to make arguments like this
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 3/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 4/26
P1 (1)(1+1)
∀n ∈ Z+ . P (n) → P (n + 1) I Base case: n = 1. In this case, i = 1 and = 1; thus,
i=1 2
the base case holds.
I To prove this, we assume P (n) holds, and based on this
I Inductive step: By the inductive hypothesis, we assume P (k ):
assumption, prove P (n + 1)
k
X (k )(k + 1)
I The assumption that P (n) holds is called the inductive i=
i=1
2
hypothesis
I Now, we want to show P (k + 1):
k
X +1
(k + 1)(k + 2)
i=
i=1
2
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 5/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 6/26
1
Example 1, cont. Example 2
I First, observe:
k
X +1 k
X I Prove the following statement for all non-negative integers n:
i = i + (k + 1)
i=1 i=1 n
X
2i = 2n+1 − 1
Pk (k )(k +1)
I By the inductive hypothesis, i= ; thus: i=0
i=1 2
k
X +1 I Since need to show for all n ≥ 0 , base case is P (0), not P (1)!
(k )(k + 1)
i = + (k + 1)
2
i=1 I Base case (n = 0): 20 = 1 = 21 − 1
I Rewrite left hand side as: I Inductive step:
k +1 k +1
X k
X
X 2
k + 3k + 2 (k + 1)(k + 2)
i = = 2i = 2i + 2k +1
2 2
i=1 i=0 i=0
I Since we proved both base case and inductive step, property holds.
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 7/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 8/26
I Therefore:
k +1 I
X
2i = 2k +1 − 1 + 2k +1
i=0 I
I Rewrite as:
k +1
X
2i = 2 · 2k +1 − 1+ = 2k +2 − 1
i=0
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 9/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 10/26
I Prove that 3 | (n 3 − n) for all positive integers n. I Easy to make subtle errors when trying to prove things by
induction – pay attention to details!
I
I Consider the statement: All horses have the same color
I
I What is wrong with the following bogus proof of this
I statement?
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 11/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 12/26
2
Bogus Proof, cont. Strengthening the Inductive Hypothesis
I By IH, h1 , h2 , . . . , hk have the same color; let this color be c I Common trick: Prove a stronger property Q(x )
I By IH, h2 , . . . , hk +1 have same color; call this color c 0 I If ∀x ∈ Z+ .Q(x ) → P (x ) and ∀x ∈ Z+ .Q(x ) is provable, this
implies ∀x ∈ Z+ .P (x )
I Since h2 has color c and c 0 , we have c = c 0
I In many situations, strengthening inductive hypothesis allows
I Thus, h1 , h2 , . . . , hk +1 also have same color proof to go through!
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 13/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 14/26
I Prove the following theorem: “For all n ≥ 1, the sum of the I Let’s use a stronger predicate:
first n odd numbers is a perfect square.”
n
X
I We want to prove ∀x ∈ Z+ .P (x ) where: Q(n) = 2i − 1 = n 2
i=1
n
X
P (n) = 2i − 1 = k 2 for some integer k
i=1 I Clearly Q(n) → P (n)
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 15/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 16/26
I Strong induction can be viewed as standard induction with I But this doesn’t really help us prove the property about k + 1!
strengthened inductive hypothesis!
I Claim is proven much easier using strong induction!
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 17/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 18/26
3
Proof Using Strong Induction Proof, cont.
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 19/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 20/26
I i.e., only proved the base case for one integer I Proof by strong induction on n and consider 4 base cases
I In some inductive proofs, there may be multiple base cases I Base case 1 (n=12): 12 = 3 · 4 + 0 · 5
I i.e., prove base case for the first k numbers I Base case 2 (n=13): 13 = 2 · 4 + 1 · 5
I In the latter case, inductive step only needs to consider I Base case 3 (n=14): 14 = 1 · 4 + 2 · 5
numbers greater than k
I Base case 4 (n=15): 15 = 0 · 4 + 3 · 5
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 21/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 22/26
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 23/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 24/26
4
Matchstick Proof Matchstick Proof, cont.
Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 25/26 Instructor: Işıl Dillig, CS311H: Discrete Mathematics Mathematical Induction 26/26