0% found this document useful (0 votes)
5 views

Lecture 4-Mathematical Induction

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture 4-Mathematical Induction

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Proof Techniques

Mathematical Induction
Recurrence Relations

UWE - Taylor's University


Learning Objective:
To apply the Principle of Mathematical Induction
To define a recurrence relation
To solve the Towers of Hanoi puzzle

UWE - Taylor's University


Mathematical Induction
 Suppose we have a mathematical proposition, P(n),
about some integers n.

 We want to know if P(n) is true for every integer n,


from a starting point onwards.

UWE - Taylor's University 3


Mathematical Induction
Example 1:
Is n! > 2n is true for all in positive integer n?
Is this sometimes true, never true, always true after a certain point, or
what?
Check some n! 2n
values:
n=0 1 1

n=1 1 2
How could we prove n! > 2n? The idea is to use
n=2 2 4 Proof by Induction.
n=3 6 8
At this stage, n! seems to be streaking ahead of
n=4 24 16 2n at a great rate.
n=5 120 32

UWE - Taylor's University 4


Proof by Induction: 3 Steps
1. Basis step: With a starting point a, Verify that P(a)
is true.

2. Inductive step: For k ≥ a, Suppose that P(k) is


true, Prove that P(k + 1) is also true.

3. Conclusion: Declare that P(n) is true for every


integer n ≥ a

UWE - Taylor's University 5


Example 1:
Prove by induction that n! > 2n for all n ≥ 4.
Proof
Base Step: Verify that P(4) is true.
𝑛=4
LHS = 4! = 24
RHS = 24 = 16
Since 24 > 16,

n! > 2n is true when 𝑛 = 4.

UWE - Taylor's University 6


Example 1:
Prove by induction that n! > 2n for all n ≥ 4.
❑ Inductive Step:
Suppose P(k) : k! > 2k is true.
Prove that P(k + 1): (k + 1)! > 2k+1 is true for all 𝑘 ≥ 4.
LHS
= 𝑘 + 1 !
= 𝑘 + 1 𝑘 !
RHS
= 2𝑘+1 Conclusion: n! > 2n for all n ≥ 4.
= 2 2𝑘
Note that 𝑘 ≥ 4, so 𝑘 + 1 ≥ 5, then 𝑘 + 1 > 2.
∴ P(k + 1): (k + 1)! > 2k+1 is true

UWE - Taylor's University 7


UWE - Taylor's University
Example 2:
1
Prove that 1 + 2 + 3 + … + 𝑛 = 𝑛(𝑛 + 1) for every positive
2
integer n.
Proof
Base step: Verifying P(1),
𝑛=1

𝐿𝐻𝑆
= 1

𝑅𝐻𝑆
1
= ×1×2
2
=1

∴ 𝑃 𝑛 𝑖𝑠 𝑡𝑟𝑢𝑒 𝑤ℎ𝑒𝑛 𝑛 = 1.

UWE - Taylor's University 9


Example 2:
1
Prove that 1 + 2 + 3 + … + 𝑛 = 𝑛(𝑛 + 1) for every positive
2
integer n.
Inductive step:
1
Suppose P(k): 1 + 2 + 3 + … + 𝑘 = 2 𝑘 𝑘 + 1 is true for all 𝑘 ≥ 1.
Prove that P(k + 1) is also true.
RHS
LHS 1
= 𝑘+1 𝑘+1 +1
= 1 + 2 + …+ 𝑘 + 𝑘 + 1 2
1 1
= 𝑘 𝑘 + 1 + 𝑘+1 = 𝑘+1 𝑘+2
2 2
1
= 𝑘+1 𝑘+1 LHS=RHS
2
𝑘+2 ∴ 𝑃 𝑘 + 1 𝑖𝑠 𝑡𝑟𝑢𝑒
= 𝑘+1
2
1
= 𝑘+1 𝑘+2
2

UWE - Taylor's University 10


Example 2:
1
Prove that 1 + 2 + 3 + … + 𝑛 = 𝑛(𝑛 + 1) for every positive
2
integer n.

Conclusion:
The statement
1
1 + 2 + 3 + …+ 𝑛 = 𝑛(𝑛 + 1)
2

is true for every positive integer n.

UWE - Taylor's University 11


Example 3:
2 𝑛 𝑎(𝑟 𝑛+1 −1)
Prove that a + 𝑎𝑟 + 𝑎𝑟 + … + 𝑎𝑟 = for every integer
𝑟−1
𝑛 = 0, 1, ….
Proof
Base step: Verifying P(0),
𝑛=0

𝐿𝐻𝑆
=𝑎

𝑅𝐻𝑆
𝑎(𝑟 0+1 − 1)
=
𝑟−1
𝑎 (𝑟−1)
= 𝑟−1

=𝑎

∴ 𝑃 0 𝑖𝑠 𝑡𝑟𝑢𝑒 𝑤ℎ𝑒𝑛 𝑛 = 0.
UWE - Taylor's University
Example 3:
𝑎(𝑟 𝑛+1 −1)
Prove that a + 𝑎𝑟 + 𝑎𝑟 2 + …+ 𝑎𝑟 𝑛 = for every integer
𝑟−1
𝑛 = 0, 1, ….

Inductive step:
𝑎(𝑟 𝑘+1 −1)
Suppose P(k): a + 𝑎𝑟 + 𝑎𝑟 2 + … + 𝑎𝑟 𝑘 = is true for all 𝑘 ≥ 0.
𝑟−1
Prove that P(k + 1) is also true.

LHS
= 𝑎 + 𝑎𝑟 + 𝑎𝑟 2 + 𝑎𝑟 3 + ⋯ + 𝑎𝑟 𝑘 + 𝑎𝑟 𝑘+1
𝑎(𝑟 𝑘+1 −1) 𝑘+1
= 𝑟−1
+ 𝑎𝑟
𝑎(𝑟 𝑘+1 − 1) 𝑎𝑟 𝑘+1 (𝑟
− 1)
= +
𝑟−1 𝑟−1
𝑘+1 𝑘+2
𝑎𝑟 − 𝑎 𝑎𝑟 − 𝑎𝑟 𝑘+1
= +
𝑟−1 𝑟−1
𝑎𝑟 𝑘+2 −𝑎
=
𝑟−1

UWE - Taylor's University


Example 3:
𝑎(𝑟 𝑛+1 −1)
Prove that a + 𝑎𝑟 + 𝑎𝑟 2 + …+ 𝑎𝑟 𝑛 = for every integer
𝑟−1
𝑛 = 0, 1, ….
RHS
𝑎(𝑟 𝑘+1 +1 − 1)
=
𝑟−1 Conclusion:
The statement
𝑎(𝑟 𝑘+2 − 1) 2 𝑛
𝑎(𝑟 𝑛+1 − 1)
= a + 𝑎𝑟 + 𝑎𝑟 + … + 𝑎𝑟 =
𝑟−1 𝑟−1

is true for every integer n.


𝑎𝑟 𝑘+2 − 𝑎
=
𝑟−1

LHS=RHS
∴ 𝑃 𝑘 + 1 𝑖𝑠 𝑡𝑟𝑢𝑒

UWE - Taylor's University


UWE - Taylor's University
Example 1:
Solve the recurrence relation 𝑎𝑛 = 𝑎𝑛−1 + 3 subject to the initial
condition 𝑎1 = 2.
Solution
𝑎𝑛 = 𝑎𝑛−1 + 3
𝑎𝑛 = (𝑎𝑛−2 +3) + 3
𝑎𝑛 = 𝑎𝑛−2 + 2 3
𝑎𝑛 = (𝑎𝑛−3 +3) + 2(3)
𝑎𝑛 = 𝑎𝑛−3 + 3(3)
𝑎𝑛 = 𝑎𝑛−𝑘 + 𝑘 3
𝑎𝑛 = 𝑎𝑛−(𝑛−1) + (𝑛 − 1)3
𝑎𝑛 = 𝑎1 + 3(𝑛 − 1)
𝑎𝑛 = 2 + 3(𝑛 − 1)

UWE - Taylor's University


UWE - Taylor's University
Example 2:
Solve the recurrence relation 𝑆𝑛 = 2𝑆𝑛−1 subject to the initial
condition 𝑆0 = 1.

Solution
𝑆𝑛 = 2𝑆𝑛−1
𝑆𝑛 = 2(2𝑆𝑛−2 )
𝑆𝑛 = 22 𝑆𝑛−2
𝑆𝑛 = 22 (2𝑆𝑛−3 )
𝑆𝑛 = 23 (𝑆𝑛−3 )
𝑆𝑛 = 23 (2𝑆𝑛−4 )
𝑆𝑛 = 24 (𝑆𝑛−4 )
𝑆𝑛 = 2𝑛 𝑆𝑛−𝑛
𝑆𝑛 = 2𝑛 𝑆0
𝑆𝑛 = 2𝑛 (1)
𝑆𝑛 = 2𝑛 UWE - Taylor's University
UWE - Taylor's University
Example 3:
Solve the recurrence relation 𝐶𝑛 = 2𝐶𝑛−1 + 1 subject to the
initial condition 𝐶1 = 1.

Solution
𝐶𝑛 = 2𝐶𝑛−1 + 1
𝐶𝑛 = 2 2𝐶𝑛−2 + 1 + 1
𝐶𝑛 = 22 𝐶𝑛−2 + 2 + 1
𝐶𝑛 = 22 2𝐶𝑛−3 + 1 + 2 + 1
𝐶𝑛 = 23 𝐶𝑛−3 + 22 + 2 + 1
𝐶𝑛 = 2𝑛−1 𝐶𝑛−(𝑛−1) + 2𝑛−2 + 2𝑛−3 + ⋯ + 22 + 2 + 1
𝐶𝑛 = 2𝑛−1 𝐶1 + 2𝑛−2 + 2𝑛−3 + ⋯ + 22 + 2 + 1
𝐶𝑛 = 2𝑛−1 + 2𝑛−2 + 2𝑛−3 + ⋯ + 22 + 2 + 1
𝑎(𝑟 𝑛 − 1)
𝐶𝑛 =
𝑟−1
1(2𝑛 − 1)
𝐶𝑛 =
2−1
𝐶𝑛 = 2𝑛 − 1

UWE - Taylor's University


UWE - Taylor's University
The Towers of Hanoi

 We need to move all n discs to Pole C. But we can only move 1 disc at a
time, and a disc must never be placed on a smaller disc.
 Prove that this can be done for all any value of 𝑛.

UWE - Taylor's University 22


The Towers of Hanoi: Proof
 Base step
 Suppose we have 1 disc. Pick it up and put it on Pole C

UWE - Taylor's University 23



The Towers
Inductive step
of Hanoi: Proof
❑ Suppose we can move (k – 1) discs. -- (*)

❑ We want to show we can move k discs.

❑ Given k discs, leave the big one at the


bottom. Move the other (k – 1) to Pole B
instead of Pole C. (We know this can be
done, by the inductive hypothesis (*))

❑ Move the big disc to Pole C.

❑ Move the other stack from Pole B to


Pole C (Again, we know this can be
done, by (*).)

❑ We’ve moved the stack of k discs! UWE - Taylor's University 24


The Towers of Hanoi: Proof
 Conclusion
 For all n, the problem can be solved.

UWE - Taylor's University 25


The Towers of Hanoi
 How many moves (1 disc at a time) are needed to get the stack of n discs from
Pole A to Pole C? Let this number be fn.

 So f1 = 1. (That is, if we only have 1 disc then a single move takes it to Pole C.)

 Let’s look at the inductive proof that the puzzle can always be solved. When
n = k-1, f k-1 moves are needed.

 So what happens when n = k ? The number of moves needed is f k, but this can
be expressed in terms of f k-1.

UWE - Taylor's University 26


The Towers of Hanoi
 It takes f k moves to get the top k discs to Pole B, then 1 move to get the bottom
disc to Pole C, and then f k moves to get the stack of k discs from Pole B and put it
on top of the biggest disc which is now on Pole C.

f k-1 1 f k-1

f k = f k-1 + 1 + f k-1

UWE - Taylor's University 27


The Towers of Hanoi
 So f k = f k-1 + 1 + f k-1, i.e. f k = 2f k-1 + 1

 This equation is an example of a recurrence relation, where


each value of a function can be determined from previous
values (assuming that we know some initial values).

 Using n instead of k, we have fn = 2fn-1 + 1 with initial


condition f1 = 1.

UWE - Taylor's University 28


The Towers of Hanoi
We can then construct the following partial table.

n fn
1 1
2 3 f2 = 2f1 + 1 = 2 + 1 =3
3 7 f3 = 2f2 + 1 = 6 + 1 = 7
4 15
5 31
6 63

UWE - Taylor's University 29


The Towers of Hanoi
 But suppose we want to know how many moves are needed to shift
100 discs. We would need to compute all the values from f7 up to f99,
and then use
f100 = 2f99 + 1
to get the value of f100.
 Clearly it would be better if we had a formula for fn which only
depended on n, rather than on earlier values of the function.
 Such a formula is called a solution to the recurrence relation.
 We won’t give a general method for solving recurrence relations, but
rather we’ll look at how to obtain a solution for this particular
example.

UWE - Taylor's University 30


The Towers of Hanoi
 Do the values in the second column of the table look familiar?
 If not, let’s add 1 to every value and also put in some more rows.
n fn fn + 1
1 1 2 =21 Now it should be clear that the new last column consists
2 3 4=22 of all the powers of 2 with positive exponent.

3 7 8=23
4 15 16 Specifically, fn + 1 = 2n.
5 31 32
6 63 64 Subtracting 1 from both sides gives fn = 2n – 1.
7 127 128
8 255 256 It can be formally proved that this formula gives the
9 511 512 correct answer. (We omit the details.)
10 1023 1024

UWE - Taylor's University 31


The Towers of Hanoi
 Our reasoning here is an example of inductive reasoning,
where we study enough examples to be able to hypothesize
a general result.

 Note that f100 = 2100 – 1, which is a rather big number!

UWE - Taylor's University 32


The End

UWE - Taylor's University

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy