Download Induction

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Operations research wikipedia , lookup

Plateau principle wikipedia , lookup

Cryptanalysis wikipedia , lookup

Theoretical computer science wikipedia , lookup

Mathematical economics wikipedia , lookup

Mathematical physics wikipedia , lookup

Transcript
Mathematical Induction
2
Principle of Mathematical Induction
Induction
Mathematical induction proves a predicate is true for all integers greater than
some number.
Every program has at least one bug and can be shortened by
at least one instruction—from which, by induction, it is
evident that every program can be reduced to one instruction
that does not work. (Ken Arnold)
The Principle of Mathematical Induction: To prove n ≥ b implies P (n), do the
following steps:
1. Basis Step: Prove P (b) is true.
2. Induction Step:
Prove k ≥ b ∧ P (k) implies P (k + 1).
In combination, the basis and induction steps prove ∀n(n ≥ b → P (n)), or in
other words, n ≥ b implies P (n).
Mathematical Induction
Principle of Mathematical Induction
Template for Proofs . . . . . . . . . . .
Example 1. . . . . . . . . . . . . . . . . .
Example 1, Slide 2 . . . . . . . . . . . .
Example 2. . . . . . . . . . . . . . . . . .
Example 3. . . . . . . . . . . . . . . . . .
Example 4. . . . . . . . . . . . . . . . . .
Strong Induction
Strong Induction . . .
Example 1. . . . . . . .
Example 2. . . . . . . .
Example 3. . . . . . . .
Example 3 Continued
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2
2
3
4
5
6
7
8
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9
. 9
10
11
12
13
Throughout, the domain is the integers.
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 2
Template for Proofs
1. Write statement to prove: n ≥ b implies P (n)
substituting for b and P (n).
2. Show basis step. Prove that P (b) is true.
3. Show induction step by direct proof.
(a) Write inductive hypothesis.
Assume k ≥ b and P (k).
(b) Write intended conclusion P (k + 1).
Substitute n with (k + 1).
(c) Prove P (k + 1).
A key part of the proof is using P (k).
You may also need to use k ≥ b.
CS 2233 Discrete Mathematical Structures
1
Mathematical Induction – 3
2
Example 1
Example 2
n
n ≥ 1 implies n < 2n
n ≥ 1 implies Σ (2i − 1) = n2
i=1
Basis (n = 1): 1 < 21 = 2
Basis (n = 1): Σ1i=1(2i − 1) = 1 = 12
Induction (n > 1):
Induction (n > 1):
Assume k ≥ 1 and k < 2k
Assume k ≥ 1 and Σki=1(2i − 1) = k 2
Want to show k + 1 < 2k+1
k+1
(2i − 1) = (k + 1)2
Want to show Σi=1
Proof: We know (k + 1)2 = k 2 + 2k + 1 and
Σk+1
i=1 (2i − 1) = last term + rest of terms
= 2(k + 1) − 1 + Σki=1(2i − 1)
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 4
Proof: We know 2k+1 = 2k + 2k .
k < 2k implies 2k+1 = 2k + 2k > k + k
k ≥ 1 implies k + k ≥ k + 1
k + 1 ≤ k + k and k + k < 2k+1 imply k + 1 < 2k+1
CS 2233 Discrete Mathematical Structures
Example 1, Slide 2
Mathematical Induction – 6
Example 3
Σki=1(2i − 1) = k 2 implies
2(k + 1) − 1 + Σki=1(2i − 1) = 2k + 1 + k 2
n
n ≥ 1 implies Σ i > n2/2
i=1
Basis (n = 1): Σ1i=1 i = 1 > 12/2 = 1/2
k
Σk+1
i=1 (2i − 1) = 2(k + 1) − 1 + Σi=1(2i − 1)
and 2(k + 1) − 1 + Σki=1(2i − 1) = k 2 + 2k + 1
and k 2 + 2k + 1 = (k + 1)2 imply
2
Σk+1
i=1 (2i − 1) = (k + 1)
Induction (n > 1):
Assume k ≥ 1 and Σki=1 i > k 2 /2
2
Want to show Σk+1
i=1 i > (k + 1) /2
Short Proof: k ≥ 1 ∧ Σki=1(2i − 1) = k 2 implies
k
Σk+1
i=1 (2i − 1) = 2(k + 1) − 1 + Σi=1(2i − 1)
= 2(k + 1) − 1 + k 2 = (k + 1)2
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 5
3
Proof Parts: (k + 1)2/2 = (k 2 + 2k + 1)/2
k
and Σk+1
i=1 i = k + 1 + Σi=1 i
How to use inductive hypothesis?
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 7
4
Example 4
Example 1
2
n ≥ 5 implies n < 2
n
Let Fi be the ith Fibonacci number.
Why 5?
Basis (n = 5): 52 = 25 < 25 = 32
n ≥ 0 implies Fn < 2n
Induction (n > 5):
Basis (n ∈ {0, 1}): F0 = 0 < 20 = 1 and F1 = 1 < 21 = 2
Assume k ≥ 5 and k 2 < 2k
Induction (n > 1):
Want to show (k + 1)2 < 2k+1
Assume k ≥ 1 and F0 < 20, . . . , Fk < 2k
Proof Parts: (k + 1)2 = k 2 + 2k + 1
and 2k+1 = 2k + 2k
How to use inductive hypothesis?
Want to show Fk+1 < 2k+1
CS 2233 Discrete Mathematical Structures
Prove this using Fk+1 = Fk + Fk−1 and 2k+1 = 2k + 2k and Fk < 2k and
Fk−1 < 2k−1.
Mathematical Induction – 8
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 10
Example 2
Strong Induction
9
n ≥ 12 implies there exists i ∈ N and j ∈ N such that 4i + 5j = n
Strong Induction
Basis (n ∈ {12, 13, 14, 15}): How?
Strong induction is a more general form of mathematical induction. It also
proves a predicate is true for all integers greater than some number.
Induction (n > 15):
Strong Induction has two steps.
Want to show there is a combination for k + 1
1. Basis: Prove P (b) is true.
2. Induction: Prove k ≥ b ∧ P (b) ∧ . . . ∧ P (k) imply P (k + 1).
Proof Sketch: Add one more 4 to k − 3 combo.
Because k ≥ 15 then k − 3 ≥ 12 has a combination by the inductive hypothesis.
As with mathematical induction, the basis and induction steps prove n ≥ b
implies P (n).
Assume k ≥ 15 and there are combinations for 12, 13, 14, 15, . . . , k
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 11
The basis often includes more than one base case.
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 9
5
6
Example 3
Example 3 Continued
n
Proof Parts:
Harmonic Numbers: Let Hn = Σ 1/i
i=1
Also, let lg n = log2 n
The first half (or more) of the terms of Hk+1 is greater than
lg k+1
lg(k + 1) 1
2
=
− .
3
3
3
n ≥ 1 implies Hn > (lg n)/3
Basis (n = 1): H1 = 1 > (lg 1)/3 = 0
Induction (n > 1):
The last third (or more) of the terms of Hk+1 is greater than or equal to 1/3.
(k + 1)/3 terms are each ≥ 1/(k + 1).
Assume k ≥ 1 and
H1 > (lg 1)/3, . . . , Hk > (lg k)/3
k+1
k+1
+
≤k+1
2
3
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 13
Want to show Hk+1 > (lg(k + 1))/3
CS 2233 Discrete Mathematical Structures
Mathematical Induction – 12
7
8