Mathematical Induction and Recursive Functions

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

MATHEMATICAL INDUCTION

Mathematical induction and recursive functions


Mathematical induction
Mathematical induction is one of the technique, which can be used to prove a variety of
mathematical statements which are formulated in terms of n, where n is a positive integer.
or
Mathematical induction is a technique that can be applied to prove the universal statements
for sets of positive integers or their associated sequences.
Principles of mathematical induction
Suppose you want to prove that a statement about an integer “n” is true for every positive
integer “n”.
 Define a propositional function P(n) that describes the statement to be proven about “n”.
 To prove that P(n) is true for all n ≥ 1, do the following steps;
 Basic step: Prove that P(n)is true.
 Inductive step: let k ≥ 1. Assume P(k) is true, and prove that P(k+1) is true.
Example 1: Prove the sum of first n odd integers is n 2 .
i.e. 1+3+5+.......+(2n-1) = n 2 for all positive integers.
Proof:
What is P(n)?
P(n): 1+3+5+.......+(2n-1) = n 2
Basic step:
When n =1 in P(n)
L.H.S =1
R.H.S = 1 2 = 1
P(n) is true for n = 1
Inductive step:
Let us assume that P(n) is true for n = K,
P(K): 1+3+5+.......+(2k - 1) = k 2 .......... 1
When n = (k+1),
1+3+5+.......+(2k - 1) + [2(k+1)-1] = (k+1) 2 ............... 2
The left hand side of (2) can be written as
: 1+3+5+.......+(2k - 1) + [2(k+1)-1]
In view of (1), this simplies to:
1+3+5+.......+(2k - 1) + [2(k+1)-1] = k 2 + [2(k+1)-1]
= k 2 + [2(k+1)-1]
= k 2 + 2k +2 – 1
= k 2 + 2k +1
= (k+1) 2
The given statement is true for all n.
•Example
  2: 1 2 + 2 2 + 3 2 + ... + n 2 = n (n + 1) (2n + 1)/ 6
P(n): 1 2 + 2 2 + 3 2 + ... + n 2 =
Basic step:
When n = 1 P(n) is,
L.H.S = 1
R.H.S = 1(1+1) (2*1+1)/6
=
= =1
P(n) is true for n = 1
•Inductive
  Step:
Let us assume that P(n) is true for n = k,
P(k): 1 2 + 2 2 + 3 2 + ... + k 2 = ........ 1
When n = (k+1)
P(K+1): 1 2 + 2 2 + 3 2 + ... + (k+1) 2 = .......... 2
The left hand side of (2) can be written as,
: 1 2 + 2 2 + 3 2 + ... + k2 + (k+1) 2
In view of (1), this simplies to;
: 1 2 + 2 2 + 3 2 + ... + k 2 + (k+1) 2 = + (k+1) 2

=
•  
=

The given statement is true for all n.


Recursion:
The process in which a function calls itself directly or indirectly is called recursion and the
corresponding function is called as recursive function.
We can use recursion to define
 Functions
 Sequences
 Sets
 Algorithm
 Structure
Factorial function:
 n! = 1 if n = 1
 n! = n(n-1)! If n ≥ 1.
 0! = 1
Fibonacci numbers:
It is commonly denoted by Fn.
 F(0) = 0, F(1) = 1 and
 F(n) = F(n-1) + F(n-2) for n ≥ 2.
Example:
Give a recursive formula for the following sequence.
2,6,10,14,18,…..
Given,
T1 = 2
T2 = t1 + 4
T3 = t2 +4
……….
…………
tn =t(n-1) + 4 for n = 1, 2, 3……
Example:
Find the recursive sequence if
a1=4,an=a(n-1)+5
Given,
a1 = 4
a2 = a(2-1) +5 = 4+5 = 9
a3 = a(3-1) +5 = 9+5 =14
a4 = a(4-1) +5 = 19
The required recursive sequence is 4,9,14,19,………

You might also like