Professional Documents
Culture Documents
Chapter 5
Chapter 5
Fall, 2013/2014
1 Mathematical Induction
3 Recursive Definitions
4 Recursive Algorithms
Exercise:
Use mathematical induction to prove that 2n < n! for every integer n
with n ≥ 4.
Strong Induction
To prove that P(n) is true for all positive integers n, where P(n) is a
propositional function, we complete two steps:
BASIS STEP: We verify that P(1) is true.
INDUCTIVE STEP: We show that the conditional statement
[P(1) ∧ P(2) ∧ · · · ∧ P(k)] → P(k + 1) is true for all positive integers k.
Recursive definitions of sets have two parts, a basis step and a recursive
step. In the basis step, an initial collection of elements is specified. In
the recursive step, rules for forming new elements in the set from those
already known to be in the set are provided.
EX. Consider the subset S of the set of integers recursively defined by
BASIS STEP: 3 ∈ S..
RECURSIVE STEP: If x ∈ S and y ∈ S, then x + y ∈ S..
The new elements found to be in S are 3 by the basis step, 3 + 3 =
6 at the first application of the recursive step
3 + 6 = 6 + 3 = 9 and 6 + 6 = 12 at the second application of the
recursive step, and so on.
Note that S is the set of all positive multiples of 3.
First, we use the recursive step to write 4! = 4 · 3!. We then use the
recursive step repeatedly to write 3! = 3 · 2!, 2! = 2 · 1!, and 1! = 1 · 0!.
Inserting the value of 0! = 1, and working back through the steps, we see
that 1! = 1 · 1 = 1, 2! = 2 · 1! = 2, 3! = 3 · 2! = 3 · 2 = 6, and
4! = 4 · 3! = 4 · 6 = 24.
ECOM 2311- Discrete Mathematics - Ch.5 Dr. Musbah Shaat 16 / 23
Recursive Algorithms
Introduction
The iterative and recursive procedures for finding the nth Fibonacci
number.
EX. Use the merge sort to put the terms of the list 8, 2, 4, 6, 9, 7, 10, 1,
5, 3 in increasing order.
Two sorted lists with m elements and n elements can be merged into a
sorted list using no more than m + n - 1 comparisons.
End of Chapter # 5