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
2
votes
1 answer

Solution of a recurrence equations

$T(1) = 1$ $T(n) = 2T(\frac{n}{3}) + n + 1$ How do you solve this equzione recurrence? I arrived at this point and then I don't know how to proceed... $2^kT(\frac{n}{3^k}) + \frac{2^{k-1}n}{3^{k-1}} + 2^{k-1} + \frac{2^{k-2}n}{3^{k-2}} + 2^{k-2} +…
2
votes
0 answers

How to solve nonlinear recurrence relation (quadratic)

Please help me solve this weird recurrence relation. This is not really standard quadratic, so I'm totally confused. I tried with logarithm (but 8 is excess), tried writing this recurrence in one degree up or down... I cannot sleep for days because…
2
votes
1 answer

Converting recurrence into matrix

How to convert $F(n) = F(n-2) + F(n-3) + 2n$ into a matrix? I am not getting how to create matrix for this?
2
votes
1 answer

Recurrence relation to closed form of generating function

I have the following recurrence relation: $$a_n=F_0a_{n-1}+F_1a_{n-2}+F_2a_{n-3}...+F_{n-1}a_0 $$ with $a_0=5$ and $F_n$ being the nth Fibonacci number. How would I find the closed form of the generating function of this? The Fibonacci sequence is…
2
votes
1 answer

Solving a linear nonhomogeneous recurrence relation with troublesome $F(n)$

I am trying to solve the following: $$a_n=5a_{n-1}-6a_{n-2}+2^n+3n$$ The general solution to the homogeneous equation is simple: $$a_n=5a_{n-1}-6a_{n-2} \rightarrow \\ r^2-5r+6=0 \rightarrow \\r=3,2$$ giving $$a_n^{(h)}=C_13^n+C_22^n$$ Now for the…
2
votes
0 answers

Achieving the "mirror" of exponential decay

I'm working on a product that has a visual transition. I've found that applying a simple filter that results in an exponential decay (starting fast, then tapering off) is pleasing in one direction. The problem is that going the other direction with…
LVB
  • 121
2
votes
3 answers

Recurrence relations with factors in recurrence

How would I go about approaching solving a recurrence relation such as: $$a_{n}=2a_{\frac{n}{3}}+1$$ I'm just not sure how to get a general form for a non-recursive solution, can someone walk through the first couple steps?
dogman288
  • 195
2
votes
2 answers

How can I solve this recurrence relation?

Suppose $A_n = n + nA_{n-1}$, How can I figure out an equation for $A_n$ in terms of $n$? Let the base case $A_0 = 0$.
Kenshin
  • 2,152
2
votes
1 answer

Distinct Real Roots of $2^{nd}$ order linear homogeneous reccurence relation

I'm currently being introduced to $2^{nd}$ order linear homogenous recurrence relations for the first time. I was working through a first example in my textbook and came into some trouble. Here is the section of my textbook: What is confusing me is…
Dunka
  • 2,787
  • 12
  • 41
  • 69
2
votes
2 answers

Is this recurrence $O(n^2)$?

Is this recurrence $O(n^2)$? $$ \begin{cases} T(1) = a\\ T(n+1) = T(n) + \log_2(n), n\geq 1 \\ \end{cases} $$ I try to solve it like this: $T(n+1) = T(n) + \log_2(n), n \geq 1 $ $T(n+1) - T(n) = \log_2(n), n \geq 1 $ $(E-1)t =…
2
votes
1 answer

Solving a difference equation with several parameters

Let $r>4$ be a positive integer. Let us consider this difference equation: $$u_{q+1}=(r^{2q+1}+(c/a))u_{q}-(c/a)r^{2q-1}u_{q-1} +2c+d-(bc/a)$$ where $a,b,c,d$ are integers. I want to find a closed form, but I am not able to find the good idea. Or at…
DER
  • 3,011
2
votes
1 answer

Solve the recurrence $T(n) = 2T(n-1) + n, T(1)=1, n\geq 2$

This question has been already solved here, I just want to figure out why I'm not being able to solve it using my method. Here's what I did - $T(n)=2T(n-1)+n$ $T(n-1)=2T(n-2)+(n-1)$ $\therefore…
Siddharth Thevaril
  • 875
  • 4
  • 15
  • 27
2
votes
0 answers

Need help in understanding the procedure of expanding recurrence formula

So here is the actual expansion: \begin{align} T(n) &= T(n-1) + n \\ &= T(n-2) + (n-1) + n \\ &= T(n-3) + (n-2) + (n-1) + n \\ &\vdots \\ &= T(0) + 1 + 2 + \ldots + (n-2) + (n-1) + n \\ &= T(0) + \frac{n(n+1)}{2} = O(n^2) \end{align} I do not…
UserMoon
  • 349
2
votes
0 answers

Why do I generally see real solutions to recurrence relations?

I haven't worked very much with recurrence relations, but for the ones I have worked with I always get real solutions, which is strange to me because looking briefly at the procedure for solving (linear) recurrence relations, it seems that we try to…
user82004
2
votes
0 answers

Solving the recurrence relation $a_n = \frac{g}{1-ga_{n-1}}$

Possible Duplicate: Help on a rational recursive relation: $T\[n+1\]=\frac{E\[n+1\](D+T\[n\])}{E\[n+1\]+D+T\[n\]}$ I'm trying to understand how one solves the recurrence relation in the title: $a_n = \frac{g}{1-g \, a_{n-1}}$ with $a_0 = x$. I…
Kyle
  • 765