My HW asks me to solve the following Linear Recurrence: f(0)=3 f(1)=1 f(n

Rosina Mayer

Rosina Mayer

Answered question

2022-02-22

My HW asks me to solve the following Linear Recurrence:
f(0)=3
f(1)=1
f(n)=4f(n1)+21f(n2)
Unfortunately my professor ran through the concept of Linear Recurrence rather quickly so I'm stuck. But this is what I've done so far:
1). Assuming xn=f(n), I rewrote the equation as xn=4xn1+21xn2.
2). I then divided each part of the equation using the common factor xn2 to get x2=4x+21, a quadratic.
3). I then used the quadratic formula to get two values, 6 and 2.
From here I don't know how to proceed. I know I'm trying to write a closed form of the above equation, right? How do the values I've found figure into that? I'm also not sure what the salience of 'the boundary conditions' are (are those f(0)=3 and f(1)=1?).

Answer & Explanation

Liyana Iles

Liyana Iles

Beginner2022-02-23Added 6 answers

Your first steps were correct. First, assume xn with x0 is a solution. Plugging this into the recurrence, we get
xn=4xn1+21xn2
Dividing through by xn2 gives the quadratic
x2=4x+21
This has roots x=3 and x=7. Since the recurrence is linear, any linear combination of solutions is also a solution. Therefore, we assume that our solution is of the form
fn=c1(3)n+c27n.
All that's left to do is to make sure that fn satisfies the initial conditions:
3=c1(3)0+c270=c1+c2;
1=c1(3)1+c271=3c1+7c2.
Solving this linear system gives c1=2 and c2=1 so that the final recurrence is
fn=2(3)n+7n.

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?