P - UAB

Lecture 3.1: Mathematical Induction
CS 250, Discrete Structures, Fall 2015
Nitesh Saxena
Adopted from previous lectures by Cinda Heeren, Zeph Grunschlag
Course Admin

Mid-Term 1





Hope it went well!
Thanks for your cooperation running it smoothly
We are grading them now, and should have the
results by next class
Solution was provided (emailed)
Questions?
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Course Admin

HW2




Was due just now
Will provide solution soon
Will start grading soon
Any questions?
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Outline



Mathematical Induction Principle
Examples
Why it all works
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
Suppose we have a sequence of propositions which we
would like to prove:
P (0), P (1), P (2), P (3), P (4), … P (n), …
EG: P (n) =
“The sum of the first n positive odd numbers is
equal to n2”
We can picture each proposition as a domino:
P (n)
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
So sequence of propositions is a sequence of
dominos.
P (0)
P (1)
P (2)
P (n)
…
7/13/2017
Lecture 3.1 -- Mathematical
Induction
P (n+1)
…
Mathematical Induction
When the domino falls, the corresponding
proposition is considered true:
P (n)
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
When the domino falls (to right), the
corresponding proposition is considered
true:
P (n)
true
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
Suppose that the dominos satisfy two constraints.
1)
Well-positioned: If any domino falls (to right),
next domino (to right) must fall also.
P (n)
2)
P (n+1)
First domino has fallen to right
P (0)
true
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
Suppose that the dominos satisfy two
constraints.
1)
Well-positioned: If any domino falls to
right, the next domino to right must fall
also.
P (n)
2)
P (n+1)
First domino has fallen to right
P (0)
true
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
Suppose that the dominos satisfy two
constraints.
1)
Well-positioned: If any domino falls to
right, the next domino to right must fall
also.
P (n)
true
2)
P (n+1)
true
First domino has fallen to right
P (0)
true
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction
Then can conclude that all the dominos fall!
P (0)
P (1)
P (2)
P (n)
…
7/13/2017
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (0)
P (1)
P (2)
P (n)
…
7/13/2017
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (1)
P (0)
true
7/13/2017
P (2)
P (n)
…
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (2)
P (0)
true
7/13/2017
P (1)
true
P (n)
…
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (n)
P (0)
true
7/13/2017
P (1)
true
P (2)
true
…
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (n)
P (0)
true
7/13/2017
P (1)
true
P (2)
true
…
Lecture 3.1 -- Mathematical
Induction
P (n+1)
Mathematical Induction
Then can conclude that all the dominos fall!
P (n+1)
P (0)
true
7/13/2017
P (1)
true
P (2)
true
…
Lecture 3.1 -- Mathematical
Induction
P (n)
true
Mathematical Induction
Then can conclude that all the dominos fall!
P (0)
true
7/13/2017
P (1)
true
P (2)
true
…
Lecture 3.1 -- Mathematical
Induction
P (n)
true
P (n+1)
true
Mathematical Induction
Principle of Mathematical Induction:
If:
1)
[basis] P (0) is true
2)
[induction] k P(k)P(k+1) is true
P (0)
true
P (1)
true
P (2)
true
…
P (n)
true
Then: n P(n) is true
This formalizes what occurred to dominos.
7/13/2017
Lecture 3.1 -- Mathematical
Induction
P (n+1)
true
Exercise 1
Use induction to prove that the sum of the first n
odd integers is n2. Prove a base case (n=1)
Prove P(k)P(k+1)
Base case (n=1): the sum of the first 1 odd integer
is 12. Yup, 1 = 12.
Assume P(k): the sum of the first k odd ints is k2.
1 + 3 + … + (2k - 1) = k2
Prove that 1 + 3 + … + (2k - 1) + (2k + 1) = (k+1)2
1 + 3 + … + (2k-1) + (2k+1) = k2 + (2k + 1)
By arithmetic
= (k+1)2
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Exercise 2
Prove that 11! + 22! + … + nn! = (n+1)! - 1, n
Base case (n=1): 11! = (1+1)! - 1?
Yup, 11! = 1, 2! - 1 = 1
Assume P(k): 11! + 22! + … + kk! = (k+1)! - 1
Prove that 11! + … + kk! + (k+1)(k+1)! = (k+2)! - 1
11! + … + kk! + (k+1)(k+1)! = (k+1)! - 1 + (k+1)(k+1)!
= (1 + (k+1))(k+1)! - 1
= (k+2)(k+1)! - 1
= (k+2)! - 1
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Exercises 3 and 4 (have seen
before?)
Recall sum of arithmetic sequence:
1.
n(n  1)
i

2
i 1
n
Recall sum of geometric sequence:
2.
n 1
a
(
r
 1)
i
2
n
ar  a  ar  ar  ...  ar 

r 1
i 0
n
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Mathematical Induction -
why does it
work?
Proof of Mathematical Induction:
We prove that
(P(0)  (k P(k)  P(k+1)))  (n P(n))
Assume
1. P(0)
2. k P(k)  P(k+1)
3. n P(n)
n P(n)
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Proof by
contradiction.
Mathematical Induction -
why does it
work?
Assume
1. P(0)
2. k P(k)  P(k+1)
n P(n)
3. n P(n)
Since N is well ordered, S has a least
Let S = { n : P(n) }
element. Call it k.
What do we know?
But by (2), P(k-1)  P(k). Contradicts
 P(k) is false because it’s in S.
P(k-1) true, P(k) false.
 k  0 because P(0) is true.
 P(k-1) is true because P(k) is the least
element in S.
Done.
7/13/2017
Lecture 3.1 -- Mathematical
Induction
Today’s Reading

Rosen 5.1
7/13/2017
Lecture 3.1 -- Mathematical
Induction