Recursive Algorithm Analysis using Substitution Method
Recursive Algorithm Analysis using Substitution Method
Download Presentation
Loading...
RECURSIVE ALGORITHMS
The process in which an algorithm/function calls itself directly or indirectly is called recursion and the corresponding algorithm/function is called as recursive algorithm.Many problems can be solved quite easily using recursive algorithms.
RECURRENCE RELATION
It is just a mathematical formula to solve a problem that does a particular thing repeatedly. It occurs when some number in a sequence depends upon previous number. To implement this formula in a computer program, we can either solve it using recursion or iteration.
For example, the Fibonacci series forms a recurrence relation
< 0,1,1,2,3,5,8,13….>
Fn = Fn-1 + Fn-2
n0 =0 ; n1=1
n>=2
ANALYSIS USING SUBSTITUTION METHOD