20 Induction
20 Induction
ICS141:
Discrete Mathematics for
Computer Science I
Dept. Information & Computer Sci., University of Hawaii
Jan Stelovsky
based on slides by Dr. Baek and Dr. Still
Originals by Dr. M. P. Frank and Dr. J.L. Gross
Provided by McGraw-Hill
Lecture 20
Chapter 4. Induction and Recursion
4.1 Mathematical Induction
4.2 Strong Induction
P(1)
“The First Principle
∀k≥1 [P(k)→P(k+1)] of Mathematical
Induction”
∴∀n≥1 P(n)
1 k k+1
1 2 3 4 5
Note: this works even if there are infinitely many dominoes!
ICS 141: Discrete Mathematics I – Fall 2011 13-4
Mathematical Induction Recap.
University of Hawaii
Prove P(1).
n Do the inductive step:
∀n∈Z+ P(n).
ICS 141: Discrete Mathematics I – Fall 2011 13-7
Induction Example
University of Hawaii
k (k + 1)
1+ 2 ++ k =
2
n Let k≥1, assume P(k), and prove P(k+1), i.e.
(k + 1)[(k + 1) + 1]
1 + 2 + + k + (k + 1) =
This is what 2
you have to
(k + 1)(k + 2)
prove =
2
ICS 141: Discrete Mathematics I – Fall 2011
P(k+1) 13-9
Example (cont.)
University of Hawaii
By inductive
n Inductive step continues… hypothesis P(k)
k (k + 1)
1 + 2 + + k + (k + 1) = + (k + 1)
2
k (k + 1) 2(k + 1)
= +
2 2
k 2 + 3k + 2
=
P(k+1) 2
(k + 1)(k + 2)
=
2
n Therefore, by the principle of mathematical
induction P(n) is true for all integers n with n≥1
ICS 141: Discrete Mathematics I – Fall 2011 13-10
Induction Example 2
University of Hawaii
P(n)
n Proof by induction.
n Basis step: Let n = 1. The sum of the first
k +1
⎛ k ⎞
∑ (2i − 1) = ⎜ ∑ (2i − 1) ⎟ + (2(k + 1) − 1)
i =1 ⎝ i =1 ⎠
2 By inductive
= k + (2k + 1) hypothesis P(k)
2
= (k + 1)
ICS 141: Discrete Mathematics I – Fall 2011 13-14
Induction Example 3
University of Hawaii
n In this circumstance,
the basis step is to prove P(c) rather than P(1),
and the inductive step is to prove
∀k≥c (P(k)→P(k+1)).
n 12 = 3⋅4
n 13 = 2⋅4 + 1⋅5
n 14 = 1⋅4 + 2⋅5
n 15 = 3⋅5
n Inductive step:
n Let k ≥15, assume ∀12 ≤ i ≤ k, P(i).
for P(k)
n k + 1 = k – 4 + 5 (i.e. replace the 4-cent