Questions tagged [recurrence-relations]

Questions regarding functions defined recursively, such as the Fibonacci sequence.

A recurrence relation is an equation that recursively defines a sequence or multidimensional array of values: once one or more initial terms are given, each further term of the sequence or array is defined as a function of the preceding terms.

Simple examples include the geometric sequence $a_{n}=r a_{n-1}$, which has the closed-form $a_{n}=r^n a_0$, the aforementioned Fibonacci sequence with initial conditions $f_0=0,f_1=1$ and recurrence $f_{n+2}=f_{n+1}+f_n$, and series: the sequence $S_n =\sum_{k=1}^{n} a_k$ can be written as $S_n= S_{n-1}+a_n$.

The term order is often used to describe the number of prior terms used to calculate the next one; for instance, the Fibonacci sequence is of order 2.

See the Wikipedia page for more information.

8985 questions
1
vote
2 answers

Solve the recurrence $a_n=7a_{n-1}-10a_{n-2}$ where $a_{0}= 3$ and $a_{1}=3$

Solve the recurrence $a_n=7a_{n-1}-10a_{n-2}$ where $a_{0}= 3$ and $a_{1}=3$ how can a $a_{0}$ and $a_{1}$ both equal $3$?
Tom
  • 29
1
vote
2 answers

Solve by using substitution method $T(n) = T(n-1) + 2T(n-2) + 3$ given $T(0)=3$ and $T(1)=5$

I'm stuck solving by substitution method: $$T(n) = T(n-1) + 2T(n-2) + 3$$ given $T(0)=3$ and $T(1)=5$ I've tried to turn it into homogeneous by subtracting $T(n+1)$: $$A: T(n) = T(n-1) + 2T(n-2) + 3$$ $$B: T(n+1) = T(n) + 2T(n-1) +3$$ $$A - B = T(n)…
1
vote
1 answer

How can we satisfy regularity condition for $T(n) = 81T(n/9) + n^4 \log n$?

Here is the question-answer It says that regularity condition is satisfied, while regularity condition is $$81\cdot \left(\frac{n^{4}\log n}{9}\right) \leq k\cdot n^4\log n$$ where $k < 1.$ So, how is it possible that regularity condition is…
YohanRoth
  • 1,437
1
vote
1 answer

Reccurence equation $f(n)=6f(n-1)-9f(n-2)+(n^2+1)3^n$

$f(n)=6f(n-1)-9f(n-2)+(n^2+1)3^n$ The root for the above relation is 3 two times. So its general term will be: $f(n) = c_{1}3^n + c_{2}n3^n + something$ According to my notes $something: n^2(n^2p_{2,0}+np_{1,0}+p_{0,0})3^n = (n^2+1)3^n$ That should…
1
vote
3 answers

Recurrence equation solution

I have the following equation that I need to solve (just find its form and replace numbers with $A,B$,... $a_{n} = 8a_{n-2} - 16a_{n-4}$ My problem is that there is no $a_{n-1} , a_{n-3}$. Do I just imagine they exist with a $0$ in front of them?…
1
vote
1 answer

Recurrence Relation when A = 0

Find the recurrence relation for: $a_k = -4_{k-1}-4_{k-2}$ when $a_0=0$ and $a_1=1$ Step 1: $r^k=-4r^{k-1}-4r^{k-2}$ Step 2: $0= r^2+4r+4 = (r+2)^2$ $r_1=r_2=-2$ $a_k=A(r_1)^k +Bk(r_2)^k$ (when roots are…
1
vote
1 answer

How to solve a generating recurrence relation with varying constant?

$$a_n = R_1a_{n-2} + R_2a_{n-3} + R_3a_{n-4} + CD^{n-4} \quad\text{ for } n\ge 4$$ I'm a little confused as to whether move the function around so that i solve the left hand side first for the equation below $$a_n - (R_1 a_{n-2} + R_2 a_{n-3} +…
PlayDis
  • 13
1
vote
2 answers

Solve the following recurrence relation:

Solve the following recurrence relation: $f(1) = 1$ and for $n \ge 2$, $$f(n) = n^2f(n − 1) + n(n!)^2$$ How would I go about solving this? Would I need to find a substitution $f(n) =\text{ insert here }g(n)$ in aim of getting rid of the $n^2$ that…
Hyune
  • 101
1
vote
1 answer

Solving a non-homogeneous recurrence relation

I have the following non-linear homogeneous recurrence relation: $a_n = 6a_{n-1} - 12a_{n-2} + 8a_{n-3} + 2^n$ And I need to solve it by giving a general form . So I get the process. First I solve $a_n = 6a_{n-1} - 12 a_{n-2} + 8a_{n-3}$, and then I…
MT_
  • 19,603
  • 9
  • 40
  • 81
1
vote
3 answers

Recurrence relation - equal roots of characteristic equation

I have the following problem: Solve the following recurrence relation $f(0)=3$ $f(1)=12 $ $f(n)=6f(n-1)-9f(n-2)$ We know this is a homogeneous 2nd order relation so we write the characteristic equation: $a^2-6a+9=0$ and the solutions are…
KeykoYume
  • 492
1
vote
1 answer

Writing a tight bound for a recurrence relation

$$\begin{align}T(n) &= 2 \cdot T(n-1) + 1\\ &= 2^2\cdot T(n-2)+2+1\\ &= 2^3\cdot T(n-3)+2^2+2+1\\ &= 2^4\cdot T(n-4)+2^3+2^2+2^1+2^0\end{align}$$ general form: $2^n\cdot T(0) + 2^{(n-1)} + 2^{(n-2)}\cdots +1$ Is this correct? Also, my friend said…
1
vote
1 answer

Recurrence Relation and finding cosine of a function of them.

What if we are given $$a_{r+1}=\sqrt{\frac12(a_r+1)},r\in\{0\}\cup\mathbb N$$ How to find: $$\chi=\cos\left(\frac{\sqrt{1-a_0^2}}{\displaystyle\prod_{k=1}^{\infty}a_k}\right)$$ My try, let $a_0=1$ then $a_1=1,a_2=1,..$ then $\chi=\cos(0)=1$ but the…
RE60K
  • 17,716
1
vote
1 answer

How to solve recurrence relation $T(n)=T(n-1)+\lceil \log(n) \rceil$

Without the ceilings, the solution is reasonable clear (given here). Is there a way to reach a solution with the ceilings, or the difference between the two?
1
vote
1 answer

$T(n) = 4T(n/3) + n\log_3(n)$ using Mater Theorem?

I am trying to solve this recurrence using the Master Theorem. $$T(n)=4T(n/3)+n\log_3n.$$ I tried this: We have: $a=4$, $b=3$ and $f(n)=n\log_3n$. I think that $f(n)$ is $O(n^{\log_ba - \epsilon})$ but I cannot prove it. Find $c>0$ and $n_0>0$ such…
Kira
  • 261
  • 2
  • 11
1
vote
1 answer

recurence equation: $(\lambda + \gamma) f_n = \gamma (1-p)^{n-1} f_{n+1} + \gamma [1-(1-p)^{n-1}] f_{n+2} + \lambda f_{n-1}$

I am trying to analytically solve the following recurrence equation $(\lambda + \gamma) f_n = \gamma (1-p)^{n-1} f_{n+1} + \gamma [1-(1-p)^{n-1}] f_{n+2} + \lambda f_{n-1}\,,$ Under constraints of the type $f_{-1}=f_{-2}=0$ and $\sum_{n=0}^\infty…
Peter
  • 145
  • 5