A recurrence relation for the an sequence in terms of one or more of its previous terms (a0,a1,a2…an−1) such that n>ni, where ni is a non-negative integer.
Example: Fibonacci series
{Fn} = 1, 1, 2, 3, 5,…
F0 = 1, F1 = 1, F2 = 2, F3 = 3, …
Fn = Fn−1 + Fn−2, n >= 2
Degree of recurrence relation
The degree of recurrence relation is ‘K’ if the highest term of the numeric function is expressed in terms of its previous K terms.
Degree = highest coefficient - lowest coefficient
Linear recurrence relation with constant coefficients
The standard form of a linear recurrence relation with a constant coefficient is,
c0an + c1an−1 + c2an−2 +…+ ckan−k
Each term of the sequence {an} is linear, the coefficients are c0, c1, c2,…,ck
an = a0an−1 + a1an−2+…+an−1a0
Homogeneous recurrence relation
The above equation is said to be homogenous if f( r ) = 0
, i.e,
c0an + c1an−1 +…+ckan−k = 0
Non-homogeneous recurrence relation
Equation is non-homogeneous if f( r ) != 0
c0an + c1an−1 +…+ ckan−k != 0
General solution of the Fibonacci relation
If Fn satisfies the fibonacci relation an = Fn−1 + Fn−2 for n>=2, then there are constants c1 and c2 such that,
Fn = c1( 21+2.2360 )^n + c1( 21−2.2360 )^n
Let the constant be completely determined by the initial conditions.
Solving recurrence relations by the method of characteristic roots
Let the homogeneous linear recurrence relation with constant coefficient be,
an = c1an−1 + c2an−2 +…+ ckan−k
Assume that there exists a solution of form an = rn and substitute in the above relation.
rk - c1rk−1 - c2rk−2 -…-ck = 0 – characteristic equation.
r1, r2, r3,…,rk are called characteristic roots.
- Roots are real and unequal: If the roots r1, r2,…,rk are real and unequal then the homogeneous solution is,
an = c1r1^n + c2r2^n +…+ ckrk^n
c1, c2 are constants that are determined by the given initial conditions.
- Roots are real and equal: If two roots r1, r2 are equal ( r1 = r2 ), then the homogeneous solution is,
an = ( c1 + nc2 )rn