You are on page 1of 6

5.

Recurrence Relations

Consider the following sequence


5, 8, 11, 14, 17,...

The first term is 5 and each term is increased by 3. If we denote the sequence as,

a1 , a2 , a3 ....
Then we can write
a1  5
By convention, we can also write’
a2  an 1  3
Thus,
a3  a2  3
a4  a3  3
This is an example of a recurrence relation. A recurrence relation defines a sequence by giving
the nth value in terms of certain of its predecessors. It must need a start up values called the
initial value.

Examples:

1. If the Fibonacci sequence is defined by the recurrence relation, f n  f n 1  f n  2

has initial values f1  1; f 0  0 . Find the first ten terms;

Solution:

f1  1; f 0  0 f2  0  1  1
f3  1  1  2
f4  1  2  3
f5  2  3  5
f6  3  5  8
f 7  5  8  13
f8  8  13  21
f 9  13  21  34
f10  21  34  45

Solving Recurrence Relations


To solve a Recurrence Relations is to find an explicit formula for its general term. We
have the following examples:

1.) To solve
an  an 1  3 (1)
subject to the initial condition
a1  2
by replacing n by n-1 we have
an 1  an  2  3 (2)
substituting an 1 to (1)
an  an  2  3  3
an  an  2  2(3)
In general, we have
an =an k +k(3)
Replacing k by n-1,
an =an  ( n 1) +(n-1)(3)
an =a1 +(n-1)(3)
an =2+3(n-1).
2.) To solve
cn  2cn 1  1 (1)
subject to the initial condition
c1  1
by replacing n by n-1 we have
cn 1  2cn  2  1 (2)
substituting c n 1 to (1)
cn  2(2cn  2  1)  1
cn  22 cn  2  2  1
cn  22 (2cn 3  1)  2  1
cn  23 cn 3  2  2  1
cn  23 cn 3  22  1
In general, we have
cn  2n 1 c1  2n  2  2n 3  ...  2  1
Replacing c1 =1,
cn  2n 1  2n  2  2n 3  ...  2  1
By the Geometric Sum, r=2
2n 1  1
1+2+22  23  24  ....  2 2   2 n 1  1
2 1
Replacing n by n+1
cn  2n 11 -1
cn  2n -1

To solve another recurrence relations {a n }with two inital values,


Assume that there exists c1 and c2 in the Quadratic form r 2  c1r  c2  0.
Consequently, the sequence {a n }with a n  r n is a solution is r is found and
is called, the characteristic root of the recurrence relation.

1.)What is the solutionto the recurrence relation


an  an 1  2an 2 with a0  2 and a1  7
Here, c1  1 and c 2  2, and the quadratic equation is
r 2 - r - 2  0 with roots r=2 and r=1. So,
an  1 2n   2 (1) n . Applying the initial values, we have
a0  1 20   2 ( 1)0
2  1   2 (1)
a1  1 2   2 ( 1)1
1

7  21   2 (2)
By solving (1) and (2) , we have,
1  3 and  2  1. So, the standard equation is,
an  3  2n  (1) n
2.)What is the solutionto the recurrence relation
an  6an1  8an  2 with a0  1 and a1  0
Here, c1  6 and c 2  8, and the quadratic equation is
r 2 - 6r +8  0 with roots r =2 and r= 4. So,
an  1 2n   2 4n. Applying the initial values, we have
a0  1 20   2 40
1  1   2 (1)
a1  1 2   2 4
1 1

0  21  4 2 (2)
By solving (1) and (2) , we have,
1  2 and  2  1. So, the standard equation is,
an  2  2 n  4 n

3.)What is the solutionto the recurrence relation


f n  f n 1  f n  2 with f 0  0 and f1  1 (Fibonacci)
Here, c1  1 and c 2  1, and the quadratic equation is
1 5 1 5
r 2 - r -1  0 with roots r = and r= . So,
2 2
n n
 1 5   1 5 
an  1     2   . Applying the initial values, we have
 2   2 
0 0
 1 5   1 5 
a0  1     2  
 2   2 
0  1   2
1   2 (1)
1 1
 1 5   1 5 
a1  1     2  
 2   2 
   1 5    2   2 5 
1   1     but 1   2 , so,
 2   2 
 2   2 5  2   2 5
1 
2 2
 2  2  2 5  2 5
1   
2 2 2 2
2 5
1  2 so,
2
1
2 
5
1
1  
5
So, the standard equation is,
n n
1 1 5  1 1 5 
an       
5 2  5  2 
Let’s check

Exercises 2

1.)What is the solutionto the recurrence relation


an  7 an 1  10an  2 with a0  5 and a1  16?

2.)What is the solutionto the recurrence relation


an  2an 1  8an 2 with a0  4 and a1  10 ?

3.)What is the solutionto the recurrence relation


an  7 an 1  3an 2 with a0  1 and a1  1?

4.)What is the solutionto the recurrence relation


an  6an 1  9an 2 with a0  1 and a1  1?

5.)What is the solutionto the recurrence relation


an  8an 1  16an 2 with a0  2 and a1  20?

6.)Try solving the Fibonacci sequence with a0  1 and a1  2.

You might also like