







Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
An introduction to mathematical induction, a proof technique used to establish the truth of a statement for all natural numbers. Definitions, theorems, examples using tower of hanoi, merge sort, and fibonacci sequence, and exercises to practice the concept. Induction is a fundamental concept in computer science and mathematics, and this document serves as a useful resource for students and researchers.
Typology: Slides
1 / 13
This page cannot be seen from the preview
Don't miss anything!








-^
-^
-^
Tower of Hanoi
Merge Sort
Fibonacci
Let P(n) be an assertion defined on the integer n.1. Base case: P(n
) is true for an integer n 0
. 0 2. Assumption: We assume that for a k ≥ n
, P(n) is true for all n 0
with k≥n≥ n
. 0 3. Incremental case: We can show P(k+1) is true for any k ≥ n
0
using assumption in 2. Then P(n) is true for every n≥n
. 0
Proof: By contradiction. Suppose P(n) is false for some n ≥ n
. Let 0
m be the least such n. We thus have
-^
m>n
(from condition 1). 0
-^
P(m-1) is true (from assumption). From condition 3, we have P(m) to be true which contradicts the
assumption.
The Tower of Hanoi: The sequence of the number of
moves: f
=1, f 1
=2fn
n-
+1, can be expressed as f
= 2n
n-1.
Proof: By induction.Base case: The base case is true because f
1
Assumption: We assume f
= 2n
n-1 for n in 1≤n≤k where
k≥1. Incremental: We show that f
k+
k+
-1 for any k≥1.
fk+
=2f
+1 (Complexity of recursion)k = 2×(
k-1)+1 (From assumption)
k+
-1 (Arithmetic operation)
Based on induction theorem f
= 2n
n-1 for all integer n≥
Complexity in terms of the number of elements:Merge Sort Complexity: f
=0, f 0
=2fn
n-
n.
We can express f
=n2n
n^
for n≥0.
Note that we have m=
n^
elements to sort.
In other words, the complexity to sort m elements takes
mlog
m comparison operations. 2
Fibonacci sequence: f
=0,f 0
=1, f 1
=fn
n-
+f
n-
, can be
expressed as f
= √5/5{[(1+√5)/2]n
n^
n}
Proof: By induction.Base case: f
0
0
f^1
=√5/5{[(1+√5)/2] -[(1-√5)/2]}=1 (Why f
Assumption: The expression is correct for n in 1≤n≤k
where k≥1. Incremental: f
k+
=f
+fk
k-
k^
k} +√5/5{[(1+√5)/2]
k-
k-
} (From Assumption)
k+
k+
} (Arithmetic operation)
Exercise: Show that√5/5{[(1+√5)/2]
k^
k} +√5/5{[(1+√5)/2]
k-
k-
k+
k+
Hint: Derive that
k^
k-
k+
And
k^
k-
k+
Statement: All horses are the same color.Proof: By induction.Base case: A horse is the same color.Assumption: Assume that n horses are the same color
for all 1≤n≤k where k≥1. Incremental: We show that k+1 horses are the same
color. We separate the horses into two groups x andy with |x|≤k, |y|≤k, |x|+|y|=k+2. Thus x and yoverlap by one. From assumption, x are the same color, y are the same
color. Because x and y overlaps, x and y are the same color.
-^
-^
-^
-^