Recurrence Relations
Problem 2.12. Backtrack to find an explicit formula for the sequence defined by the recurrence
relation bn = 2bn – 1 + 1 with initial condition b1 = 7.
Solution. We begin by substituting the definition of the previous term in the defining formula.
bn = 2bn – 1 + 1 = 2 (2bn – 2 + 1) + 1 = 2[2 (2bn – 3 + 1) + 1] + 1 = 23 b n – 3 + 4 + 2 + 1 = 23 b n – 3 + 22 + 21 + 1.
A pattern is emerging with these rewritting of bn.
(Note : There are no set rules for how to rewrite these expressions and a certain amount of experimentation may be necessary.)
The backtracking will end at bn = 2n – 1b n – (n – 1)+ 2n – 2 + 2n – 3 + ... + 22 + 21 + 1 = 2n – 1b 1 + 2n – 1 – 1 = 7 . 2n – 1 + 2n – 1 – 1 (using b 1 = 7) = 8 . 2n – 1 – 1 or 2n + 2 – 1.
Problem 2.13. Write down the first six terms of the sequence defined by a1 = 1, ak + 1 = 3ak + 1 for k ≥ 1. Guess a formula for an and prove that your formula is correct.
Solution. The first six terms are
a1 = 1
a2 = 3a1 + 1 = 3(1) + 1 = 4 a3 = 3a2 + 1 = 3(4) + 1 = 13 a4 = 40, a5 = 121, a6 = 364.
Since there is multiplication by 3 at each step, we might suspect that 3n is involved in the answer.
After trial and error, we guess that an = 1
2 (3
n – 1) and verify this by mathematical induction.
When n = 1, the formula gives 1
2 (31 – 1) = 1, which is indeed a1, the first term in the sequence.
Now assume that k ≥ 1 and that ak = 1
2 (3k – 1).
We wish to prove that ak + 1 = 12 (3k + 1 – 1)
We have ak + 1 = 3ak + 1 = 31
2 (3k – 1) + 1
Using the induction hypothesis.
Hence, ak + 1 = 1 2 3 k + 1 – 3 2 + 1 = 1 2(3 k + 1 – 1) as required. By the principle of mathematical induction, our guess is correct.
Problem 2.14. A sequence is defined recursively by a0 = 1, a1 = 4 and an = 4an – 1 – 4an – 2 for n ≥ 2. Find the first six terms of this sequence. Guess a formula for an and establish the validity of your guess.
Solution. Here there are two initial conditions a0 = 1, a1 = 4.
Also, the recurrence relation, an = 4an – 1 – 4an – 2, defines the general term as a function of two previous terms.
The first six terms of the sequence are a0 = 1 a1 = 4 a2 = 4a1 – 4a0 = 4(4) – 4(1) = 12 a3 = 4a2 – 4a1 = 4(12) – 4(4) = 32 a4 = 4a3– 4a2 = 4(32) – 4(12) = 80 a5 = 4a4 – 4a3 = 4(80) – 4(32) = 192. Finding a general formula for an requires some ingenuity. Let us examine some of the first six terms.
We note that a3 = 32 = 24 + 8 = 3(8) + 4(8)
and a4 = 80 = 64 + 16 = 4(16) + 16 = 5(16)
and a5 = 192 = 6(32).
We guess that an = (n + 1) 2n.
To prove this, we use the strong form of mathematical induction (with n0 = 0). When n = 0, we have (0 + 1) 20 = 1(1) = 1, in agreement with the given value for a
0.
When n = 1, (1 + 1) 21 = 4 = a
1. Now that the formula has been verified for k = 0 and k = 1.
We may assume that k > 1 and that an = (n + 1) 2n for all n in the interval 0 ≤ n < k. We wish to prove the formula is valid for n = k.
That is, we wish to prove that ak = (k + 1) 2k. Since k ≥ 2, we know that ak = 4ak – 1 – 4ak – 2.
Applying the induction hypothesis to k – 1 and to k – 2 (each of which is in the range 0 ≤ n < k). We have ak – 1 = k 2k – 1 and a
k – 2 = (k – 1) 2k – 2. Thus, ak = 4(k 2k – 1) – 4(k – 1) 2k – 2
= 2k 2k – k 2k + 2k
= k 2k + 2k = (k + 1) 2k as required.
By principle of mathematical induction, the formula is valid for all n ≥ 0.
Problem 2.15. Solve the recurrence relation an = an – 1 + 2, n ≥ 2 subject to initial condition a1 = 3.
Solution. We backtrack the value of an by substituting the expression of an – 1, an – 2 and so on, until a pattern is clear.
Given an = an – 1 + 2 ...(1) Replacing n by n – 1 in (1), we obtain an – 1 = an – 2 + 2 From (1), an = an – 1 + 2 = (an – 2 + 2) + 2 = an – 2 + 2.2 ...(2) Replacing n by n – 2 in (1), we obtain an – 2 = an – 3 + 2 So, from (2), an = (an – 3 + 2) + 2.2 = an – 3 + 3.2 In general an = an – k + k . 2 For k = n – 1, an = an – (n – 1) + (n – 1) . 2 = a1 + (n – 1) . 2 = 3 + (n – 1) . 2 which is an explicit formula.
2.2. THE SECOND-ORDER LINEAR Homogeneous Recurrence Relation with constant coefficients
Let k ∈ Z+ and C
n (≠ 0), Cn – 1, Cn – 2, ... Cn – k (≠ 0) be real numbers. If an, for n ≥ 0, is a discrete function, then
is a linear recurrence relation (with constant coefficients) of order k. When f(n) = 0, for all n ≥ 0, the relation is called homogeneous ; other wise, it is non-homogeneous.
The homogeneous relation of order two :
Cnan + Cn – 1an – 1 + Cn – 2an – 2 = 0, n ≥ 2.
A solution of the form an = Crn, where C ≠ 0 and r ≠ 0 substituting a
n = Crn into Cnan + Cn – 1an – 1 + Cn – 2an – 2 = 0.
We obtain CnCrn + C
n – 1Crn – 1+ Cn – 2Crn – 2 = 0, with C, r ≠ 0, this becomes
Cnr2 + C
n – 1r + Cn – 2 = 0,
a quadratic equation which is called the characteristic equation.
2.3. THE NON HOMOGENEOUS RECURRENCE RELATIONS
The recurrence relations
an + Cn – 1an – 1 = f(n), n ≥ 1 ...(1)
an + Cn – 1an – 1 + Cn – 2an – 2 = f(n), n ≥ 2 ...(2) where Cn – 1 and Cn – 2 are constants, Cn – 1≠ 0, in (1), Cn – 2≠ 0, and f(n) is not identically 0.
Although there is no general method for solving all non homogeneous relations, for certain func- tions f(n) we shall find a successful technique.
When Cn – 1 = – 1, (1) gives, for the non homogeneous relation an – an – 1 = f(n), we have a1 = a0 + f(1) a2 = a1 + f(2) = a0 + f(1) + f(2) a3 = a2 + f(3) = a0 + f(1) + f(2) + f(3) --- an = a0 + f(1) + ... + f(n) = a0 + 1 ( ) n i f i =
∑
We can solve this type of relation in terms of n, if we find a suitable summation formula for
1 ( ) n i f i =
∑
.(a) The non homogeneous first-order relation an + Cn – 1an – 1 = krn
where k is a constant and n ∈ Z+.
(b) If rn is not a solution of the associated homogeneous relation a
n + Cn – 1an – 1 = 0, then an(P) = Arn, where A is a constant. When rn is a solution of the associated homogeneous relation, then
an(P) = Bn rn, for B a constant.
(c) The non-homogeneous second order relation an + Cn – 1an – 1 + Cn – 2an – 2 = k rn, where k is a constant. Here,
(i) an(p) = A rn, for A a constant, if rn is not a solution of the associated homogeneous relation, (ii) an(p) = Bn rn, where B is a constant, if a
n(h) = C1rn + C2r1n where r1≠ r,
(iii) an(p) = Cn2rn, for C a constant, when a
n(h) = (C1 + C2n) rn. 2.3.1. Characteristic Equation Method :
This method can be used to solve any constant order linear recurrence equation with constant coefficient. This recurrence relation may be homogeneous or non-homogeneous. Before attempting to solve any such problem, let us first, understand what is characteristic equation for a given recurrence equation and how to find it.
A recurrence equation of the mentioned type can be arrranged in standard form as :
An + C1An – 1 + C2An – 2 + C3 An – 3 = R.H.S. ...(1) Where C1, C2, C3 are constant coefficients and R.H.S. has one of the following forms :
Form Examples
Homogeneous 0
A constant to the nth power 2n, π– s, 2– n,
2n A polynomial in n 3, n2, n2 – n, n3 + 2n – 1
A product of a constant to the 2n (n2 + 2n – 1), (n – 1) n6, n 6n nth power and a polynomial in n
A linear combination of any of the above (2n + 3n/2) (n2 + 2n – 1) + 5
In the recurrence equation (1), assigning R.H.S. = 0, we get
An + C1An – 1 + C2An – 2 + C3An – 3 = 0 ...(2)
This equation (2) gives the homogeneous part of the given recurrence equation. Every recurrence equation has a homogeneous part. If the recurrence relation is homogeneous then it has only homogene- ous part and solving such equation is one step process. On the other hand, if the given recurrence equation is non-homogeneous then its homogeneous part is obtained by assigning R.H.S. equal to zero.
A characteristic equation corresponds to homogeneous part of the given recurrence relation.
The characteristic equation of (2) is given as :
x3 + C
1x2 + C2x + C3 = 0 ...(3)
This has been obtained by the following procedure : (i) Find the order of the recurrence equation here it is 3. (ii) Take any variable (say x) and substitute
An, An – 1, An – 2, by x3, x2, x respectively in the homogeneous part of the recurrence equation.
Equation so obtained is called characteristic equation of the given recurrence equation.
Example (1) : The characteristic equation of the recurrence equation Cn = 3Cn – 1 – 2Cn – 2 is given by
x2 – 3x + 2 = 0.
Example (2) : The characteristic equation of the recurrence equation fn = fn – 1 + fn – 2 is given by x2 – x – 1 = 0.
Example (3) : The characteristic equation of the recurrence equation
An – 5An – 1 + 6An – 2 = 2n + n is given by x2 – 5x + 6 = 0.