0% found this document useful (0 votes)
22 views17 pages

Lecture 05 - Induction and Recursion Rev 10aug2020

Maths
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)
22 views17 pages

Lecture 05 - Induction and Recursion Rev 10aug2020

Maths
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/ 17

LECTURE 05 – INDUCTION AND RECURSION

What you will learn in this lecture:

 Mathematical Induction
 Sequence
 Defining sequence methods
 Examples of sequence
 Proving of explicit formula for recursive sequence

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
MATHEMATICAL INDUCTION

The Principles of Mathematical


Induction:
 A technique for proving certain
types of mathematical
statements is true for all positive
integers, or for all positive
integers from some point on.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
MATHEMATICAL INDUCTION

 Let P(n) be a proposition depending on n, where n is a positive integer.


 To prove P(n) is true for all positive integers, it suffices to prove:
• P(1) is true
• For all k ≥ 1, P(k + 1) is true whenever P(k) is true: P(k)  P(k + 1)

𝑷 𝟏 ∧ ∀𝒌 𝑷 𝒌 → 𝑷 𝒌 + 𝟏 ⟹ ∀𝒏𝑷 𝒏

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
MATHEMATICAL INDUCTION

The 3 Steps of Mathematical Induction (for nonnegative or positive integers)

Step 1: Inductive base


• Show that P(base value) is true. Note that base value not always = 1.

Step 2: Inductive hypothesis


• Assume P(k) is true.

Step 3: Inductive step


• Show that P(k + 1) is true on the basis of the inductive hypothesis.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
MATHEMATICAL INDUCTION

Example:
𝑛 𝑛+1
Use Mathematical Induction to prove that the sum of the first n positive integers is .
2
n(n  1)
Let P(n) be the proposition that 1  2  3    n  , for n = 1, 2, 3, ….
2

Step 1: Inductive base Step 2: Inductive hypothesis Step 3: Inductive base


n=1 n=k 1 + 2 + 3 + ⋯+ 𝑘 + 𝑘 + 1
Left side of the equation = 1 Assume that P(k) is true. 𝑘 𝑘+1
Right side of the equation = + 𝑘+1
k (k  1) 2
= 1(1  1)  1 1  2  3  ...  k  𝑘+1 𝑘+2
2 =
2 2
Hence P(1) is true. We have shown that P(k + 1) is true
whenever P(k) is true.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
Thus by mathematical induction, P(n) is true for all n ≥ 1. FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
MATHEMATICAL INDUCTION

Example:
Use mathematical induction to prove the inequality n  2 n for all positive integers n.
Let P(n) be the proposition n  2 n , for n = 1, 2, 3, ….

Step 1: Inductive base Step 2: Inductive hypothesis Step 3: Inductive base


n=1 n=k We want to show that P(k+1) is true, i.e. we
LHS of the inequality = 1 Assume that P(k) is true. want to show that k+1 < 2k+1.
RHS of the inequality = 21 = 2 Now, 𝑘 + 1 ≤ 𝑘 + 𝑘 = 2𝑘 < 2 2𝑘 = 2𝑘+1
Since 1 < 2, P(1) is true. k < 2k
By assuming P(k) is true, we have shown that
P(k+1) is true.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
By mathematical induction, P(n) is true for all n ≥ 1 . FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
SEQUENCE

A sequence is a function whose domain is either all the integers between two
given integers or all the integers greater than or equal to a given integer.

Typically a sequence is represented as a set of elements written in a row.


An example of a sequence is, This is generally referred as ak
20, 21, 22, 23,24, …, 2k
Each individual element, ak (read “a sub k”) is called a term.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
DEFINING SEQUENCE METHODS - LISTING

A sequence can be defined in a variety of different ways.


One informal way is to write the first few terms with the expectation that the general
pattern will be obvious.

We might say, for instance, “consider the sequence 3, 5, 7, . . ..” Unfortunately,


misunderstandings can occur when this approach is used.

The next term of the sequence could be 9 if we mean a sequence of odd integers, or it
could be 11 if we mean the sequence of odd prime numbers.
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
DEFINING SEQUENCE METHODS – EXPLICIT FORMULA

The second way to define a sequence is to give an explicit formula for its nth term.
For example, a sequence 𝑎0 , 𝑎1 , 𝑎2 , … can be specified by writing
−1 𝑛
𝑎𝑛 = for all integers 𝑛 ≥ 0
𝑛+1

The advantage of defining a sequence by such an explicit formula is that each term of the
sequence is uniquely determined and can be computed in a fixed, finite number of steps,
by substitution.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
DEFINING SEQUENCE METHODS – RECURSION

The third way to define a sequence is to use recursion.


All recursive definition consist of two parts:
1) Initial value
2) Recurrence relation
The recurrence relation defines each later term in the sequence by reference to earlier
terms and one or more initial values for the sequence.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
DEFINING SEQUENCE METHODS

Example:
Given the sequence 20 , 21 , 22 , 23 , 24 , …

The explicit formula for the above is: 𝑎 𝑛 = 2𝑛 for 𝑛 ∈ 𝑁


This is the initial value
The recursive definition is:
𝑓 0 =1
𝑓 𝑛 + 1 = 2 × 𝑓 𝑛 for 𝑛∈𝑁

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


This is the recurrence relation FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
EXAMPLES OF SEQUENCE

Example: Arithmetic Sequence


The recursive definition of the The explicit formula for the
arithmetic sequence is, arithmetic sequence,
initial value: a1 an = a + ( n – 1 ) d
recurrence relation: an+1 = an + d

Say a1 = 2 and d = 4, then we will have Say a = 2, d = 4, then we will have


a1 = 2 a1 = 2 + (1 - 1)4 = 2
a2 = a1 + d = 2 + 4 = 6 a2 = 2 + (2 - 1)4 = 6
a3 = a2 + d = 6 + 4 = 10 a3 = 2 + (3 - 1)4 = 10
a4 = a3 + d = 10 + 4 = 14 a4 = 2 + (4 - 1)4 = 14
a5 = a4 + d = 14 + 4 = 18 a5 = 2 + (5 - 1)4 = 18
a6 = a5 + d = 18 + 4 = 22 a6 = 2 + (6 - 1)4 = 22 TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
EXAMPLES OF SEQUENCE

Example: Factorial Sequence


The factorial is defined recursively as n fn
initial value : 𝑓1 = 1 1 1
recurrence relation: 𝑓𝑛 = 𝑛 × 𝑓𝑛−1 for n ≥ 2 2 2
3 6
4 24
5 120
6 720
7 5040

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
EXAMPLES OF SEQUENCE

Example: Fibonacci Sequence


The Fibonacci sequence is defined recursively as n fn

initial value : 𝑓0 = 1, 𝑓1 = 1 0 1
recurrence relation: 𝑓𝑛 = 𝑓𝑛−1 + 𝑓𝑛−2 for n ≥ 2 1 1
2 2
3 3
4 5
5 8
6 13

 
TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY
PROVING OF EXPLICIT FORMULA FOR RECURSIVE SEQUENCE

Example:
Show that 𝑎𝑛 = 1 + 2𝑛 for all 𝑛 ∈ 𝑁 is the explicit formula for the recursion with initial
value 𝑎0 = 1 and recurrence relation 𝑎𝑛 = 𝑎𝑛−1 + 2 for all 𝑛 ∈ 𝑍 + .

Step 1: Inductive base Step 2: Inductive hypothesis Step 3: Inductive step


n=0 n=k 𝑎𝑘+1 = 𝑎𝑘 + 2
𝑎0 = 1 Assume that 𝑎𝑘 = 1 + 2𝑘 is 𝑎𝑘+1 = 1 + 2 𝑘 + 2
𝑎0 = 1 + 2𝑛 = 1 + 2 0 = 1 true for 𝑘 ∈ 𝑁. 𝑎𝑘+1 = 1 + 2 𝑘 + 1
Hence 𝑎𝑛 = 1 + 2𝑛 is true for We have shown that 𝑎𝑘+1 is true
𝑛 = 0. whenever 𝑎𝑘 is true.
Hence, 𝑎𝑛 = 1 + 2𝑛 for all 𝑛 ∈ 𝑁 is the explicit formula for the recursion with
initial value 𝑎0 = 1 and recurrence relation 𝑎𝑛 = 𝑎𝑛−1 + 2 for all 𝑛 ∈ 𝑍 + is TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I
FACULTY OF COMPUTING AND INFORMATICS
true. MULTIMEDIA UNIVERSITY
SUMMARY

We have learnt the following:


 Apart from listing the elements, a sequence can be defined by an explicit formula or
by recursion(recurrence definition).
 The recurrence definition involves two parts, the initial value and the recurrence
relation.
 A proof by induction can be applied to prove the correctness of an explicit formula for
a recurrence definition.

TMA1401 MATHEMATICS FOR INFORMATION SYSTEMS I


FACULTY OF COMPUTING AND INFORMATICS
MULTIMEDIA UNIVERSITY

You might also like