Mathematical Induction
Mathematical Induction
Michael Levin
Computer Science Department, Higher School of Economics
Mathematical Induction
• A very powerful proof
method
wikipedia.org
Mathematical Induction
• A very powerful proof
method
• Falling dominos
wikipedia.org
Mathematical Induction
• A very powerful proof
method
• Falling dominos
• Check for
1, 2, 5, 100, 1000
dominos
wikipedia.org
Mathematical Induction
• A very powerful proof
method
• Falling dominos
• Check for
1, 2, 5, 100, 1000
dominos
• How to prove for any
number of dominos? wikipedia.org
Mathematical Induction
• A very powerful proof
method
• Falling dominos
• Check for
1, 2, 5, 100, 1000
dominos
• How to prove for any
number of dominos? wikipedia.org
• Many computer science
algorithms are proven
using induction
Outline
Lines and Triangles
Connecting Points
Sums of Numbers
Bernoulli’s Inequality
Coins
Cutting a Triangle
Flawed Induction Proofs
Alternating Sum
Problem
Several straight lines (at least three) cut a plane
into pieces. Each line intersects with every other
line, and all the intersection points are different.
Prove that there is at least one triangular piece.
Problem
Several straight lines (at least three) cut a plane
into pieces. Each line intersects with every other
line, and all the intersection points are different.
Prove that there is at least one triangular piece.
Problem
Several straight lines (at least three) cut a plane
into pieces. Each line intersects with every other
line, and all the intersection points are different.
Prove that there is at least one triangular piece.
Proof Idea
There is a triangle
Adding a Line in General
There is a triangle
Adding a Line in General
There is a triangle
Adding a Line in General
Theorem
For any 𝑛 ≥ 3 and any 𝑛 straight lines on a plane, if
every two lines intersect, and all the intersection
points are different, there is a triangular piece
among the pieces into which these lines cut the
plane.
Proof Structure
Number of lines
3 4 5 6 𝑛
Proof Structure
Number of lines
3 4 5 6 𝑛
Proof Structure
Number of lines
3 4 5 6 𝑛
Proof Structure
Number of lines
3 4 5 6 𝑛
Proof Structure
Number of lines
3 4 5 6 𝑛
Proof Structure
Number of lines
3 4 5 6 𝑛
𝑘 𝑘+1
Proof Structure
Number of lines
3 4 5 6 𝑛
𝑘 𝑘+1
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
• Prove that if theorem is true for 𝑛 = 4, then it
is true for 𝑛 = 5
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
• Prove that if theorem is true for 𝑛 = 4, then it
is true for 𝑛 = 5
• ...
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
• Prove that if theorem is true for 𝑛 = 4, then it
is true for 𝑛 = 5
• ...
• Prove induction step from 𝑛 to 𝑛 + 1 —
adding one more line in the general case
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
• Prove that if theorem is true for 𝑛 = 4, then it
is true for 𝑛 = 5
• ...
• Prove induction step from 𝑛 to 𝑛 + 1 —
adding one more line in the general case
• ...
Mathematical Induction
• Prove induction base — 𝑛 = 3, three lines
• Prove that if theorem is true for 𝑛 = 3, then it
is true for 𝑛 = 4
• Prove that if theorem is true for 𝑛 = 4, then it
is true for 𝑛 = 5
• ...
• Prove induction step from 𝑛 to 𝑛 + 1 —
adding one more line in the general case
• ...
• Profit!
Mathematical Induction
𝐴 𝐵
Even and Odd Points
Let us call a point even if it has even number of
neighbors, otherwise we call this point odd.
𝐴
𝐼
𝐵
𝐻
𝐶
𝐺
𝐷
𝐹
𝐸
Even and Odd Points
Let us call a point even if it has even number of
neighbors, otherwise we call this point odd.
In the example below, points 𝐴, 𝐵, 𝐶 and 𝐷 are
odd, and all the other points are even.
𝐴
𝐼
𝐵
𝐻
𝐶
𝐺
𝐷
𝐹
𝐸
Even Number of Odd Points
Theorem
The number of odd points is always even, regardless
of how many points and segments are there and
which pairs of points are connected by segments.
Proof Idea
𝐴 𝐵
Adding a Segment in General
𝐴 𝐵
Adding a Segment in General
𝐴 𝐵
Adding a Segment in General
𝐴 𝐵
Adding a Segment in General
𝐴 𝐵
Adding a Segment in General
𝐴 𝐵
Proof Structure
Number of segments
0 1 2 3 𝑛
Proof Structure
Number of segments
0 1 2 3 𝑛
Proof Structure
Number of segments
0 1 2 3 𝑛
Proof Structure
Number of segments
0 1 2 3 𝑛
Proof Structure
Number of segments
0 1 2 3 𝑛
Proof Structure
Number of segments
0 1 2 3 𝑛
𝑘 𝑘+1
Proof Structure
Number of segments
0 1 2 3 𝑛
𝑘 𝑘+1
Mathematical Induction
Problem
What is the sum of numbers from 1 to 100?
General Case
Problem
What is the sum of integer numbers from 1 to 𝑛?
Theorem
The sum of integers from 1 to 𝑛 is 𝑛(𝑛+1)
2 .
Proof by Induction
Induction base: 𝑛 = 1
1⋅2
1+2+⋯+𝑛=1=
2
Induction step: 𝑛 → 𝑛 + 1
𝑛(𝑛 + 1)
!
1 + 2 + ⋯ + 𝑛 + (𝑛 + 1) = + (𝑛 + 1) =
2
𝑛(𝑛 + 1) + 2(𝑛 + 1) (𝑛 + 1)(𝑛 + 2)
= =
2 2
How to come up with this formula in the first place?
Gauss’s Idea
Problem
Is there such 𝑛 that 1000 ⋅ 1.02𝑛 > 1000000? Or, is
there such 𝑛 that 1.02𝑛 > 1000?
Bernoulli’s Inequality
Theorem
For any 𝑛 ≥ 0 and 𝑥 > 0, (1 + 𝑥)𝑛 ≥ 1 + 𝑛𝑥.
Proof by Induction
Induction base: 𝑛 = 0
(1 + 𝑥)𝑛 = (1 + 𝑥)0 = 1 = 1 + 0𝑥 = 1 + 𝑛𝑥
Proof by Induction
Induction base: 𝑛 = 0
(1 + 𝑥)𝑛 = (1 + 𝑥)0 = 1 = 1 + 0𝑥 = 1 + 𝑛𝑥
Induction step: 𝑛 → 𝑛 + 1
!
(1 + 𝑥)𝑛+1 = (1 + 𝑥)𝑛 (1 + 𝑥) ≥ (1 + 𝑛𝑥)(1 + 𝑥) =
= 1 + 𝑛𝑥 + 𝑥 + 𝑛𝑥2 > 1 + (𝑛 + 1)𝑥
Solution
𝑛 = 50000
Induction base: 𝑛 = 12
Indeed, 12 = 3 ⋅ 4, so using just 4 cents coins is
enough.
Proof by Induction
Induction base: 𝑛 = 12
Indeed, 12 = 3 ⋅ 4, so using just 4 cents coins is
enough.
Induction step: 𝑛 → 𝑛 + 1
Proof by Induction
Induction base: 𝑛 = 12
Indeed, 12 = 3 ⋅ 4, so using just 4 cents coins is
enough.
Induction step: 𝑛 → 𝑛 + 1
???
It is unclear how to prove that we can give change
of 𝑛 + 1 cents assuming that we can give change of
𝑛 and we have more 4 cents and 5 cents coins.
Complete Induction
12 = 3 ⋅ 4
13 = 2 ⋅ 4 + 1 ⋅ 5
14 = 2 ⋅ 5 + 1 ⋅ 4
15 = 3 ⋅ 5
Complete Induction
Induction step: 𝑛, 𝑛 − 1, 𝑛 − 2, 𝑛 − 3 → 𝑛 + 1
If we know that 𝑛 − 3 can be given with 4 cents and
5 cents coins 𝑛 − 3 = 𝑎 ⋅ 4 + 𝑏 ⋅ 5, then 𝑛 + 1 also
can be given with these coins:
𝑛 + 1 = (𝑛 − 3) + 4 = 𝑎 ⋅ 4 + 𝑏 ⋅ 5 + 4 =
= (𝑎 + 1) ⋅ 4 + 𝑏 ⋅ 5
Proof Structure
Change amount
12 13 14 15 𝑛
Proof Structure
Change amount
12 13 14 15 𝑛
Proof Structure
Change amount
12 13 14 15 𝑛
Proof Structure
Change amount
12 13 14 15 𝑛
Proof Structure
Change amount
12 13 14 15 𝑛
Proof Structure
Change amount
12 13 14 15 𝑛
𝑘, 𝑘 − 1, 𝑘 − 2, 𝑘 − 3 𝑘+1
Proof Structure
Change amount
12 13 14 15 𝑛
Change amount
12 13 14 15 𝑛
Change amount
12 13 14 15 𝑛
𝑘, 𝑘 − 1, 𝑘 − 2, 𝑘 − 3 𝑘+1
Complete Induction
Obtuse triangle
𝐶
𝐴 𝐵
Acute triangle
𝐹
𝐷 𝐸
Problem
Is it possible to cut an obtuse triangle into several
acute triangles?
Theorem
If an obtuse triangle is cut into 𝑛 ≥ 1 triangular
pieces, at least one of the pieces is obtuse.
𝐴 𝐵
Proof by Induction
Induction step: 𝑛 → 𝑛 + 1.
By assumption of induction, there is an obtuse
piece. If we cut it into two triangles, at least one of
them is obtuse, so an obtuse piece remains.
𝐶 𝐺
𝐻
𝐴 𝐵 𝐸 𝐹
𝐷
This Proof is Wrong
Induction base: 𝑛 = 1
Obviously, the statement is true for just one person.
Induction step: 𝑛 → 𝑛 + 1
By the assumption of induction, the first 𝑛 people
are of the same age. Also, by the same assumption,
the last 𝑛 people are of the same age. Then all
𝑛 + 1 people are of the same age as the middle
𝑛 − 1 people.
Can you spot what was wrong in this proof?
The induction step breaks for 𝑛 = 1 → 𝑛 + 1 = 2:
indeed, among 𝑛 + 1 = 2 people, the first 𝑛 = 1 is
of the same age, and the last 𝑛 = 1 is of the same
age, but these two people can be of different ages,
because the middle 𝑛 − 1 people are actually 0
people.
Theorem
For any integer 𝑛 ≥ 0, 5𝑛 = 0.
Proof by Induction
Induction base: 𝑛 = 0
Indeed, 5𝑛 = 5 ⋅ 0 = 0
Induction step: 𝑛 → 𝑛 + 1
Write 𝑛 + 1 = 𝑖 + 𝑗 where 𝑖 and 𝑗 are non-negative
integers up to 𝑛. Then
5(𝑛 + 1) = 5(𝑖 + 𝑗) = 5𝑖 + 5𝑗 = 0 + 0 = 0.
Can you spot what was wrong in this proof?
The induction step is wrong for
𝑛 = 0 → 𝑛 + 1 = 1. Indeed, it is impossible to
write 𝑛 + 1 = 1 as a sum 𝑖 + 𝑗 of two non-negative
integers up to 𝑛 = 0, because then both 𝑖 and 𝑗
would have to be 0, and 0 + 0 = 0 < 1.
Outline
Lines and Triangles
Connecting Points
Sums of Numbers
Bernoulli’s Inequality
Coins
Cutting a Triangle
Flawed Induction Proofs
Alternating Sum
Problem
Prove that
1 1 1 1 1
1− + − +⋯+ − =
2 3 4 99 100
1 1 1
= + +⋯+
51 52 100
Generalization
Induction base: 𝑘 = 1
1 1
1− =
2 2
Proof by Induction
Induction step: 𝑘 → 𝑘 + 1
Let’s see what changes in the left and the right part
when 𝑘 increases by one.
Two new summands are added in the left part
1 1
when 𝑘 increases by one: 2𝑘+1 − 2(𝑘+1)
Proof by Induction
Right part:
1 1 1 1 1
+ +⋯+ + + =
𝑘+2 𝑘+3 2𝑘 2𝑘 + 1 2(𝑘 + 1)
1 1 1 1 1 1 1
= (− + )+ + +⋯+ + + =
𝑘+1 𝑘+1 𝑘+2 𝑘+3 2𝑘 2𝑘 + 1 2(𝑘 + 1)
1 1 1 1 1 1 1
( + + +⋯+ )+ + −
𝑘+1 𝑘+2 𝑘+3 2𝑘 2𝑘 + 1 2(𝑘 + 1) 𝑘 + 1
1 1 1 1 1
So, right part changes by 2𝑘+1 + 2(𝑘+1) − 𝑘+1 = 2𝑘+1 − 2(𝑘+1) , and
the left part changes by the same amount. Thus, left part and right part
are the same initially, and they change by the same value, so they stay the
same.
Conclusion