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

Deriving a recurrence relation

The number of sequences of length $n$ consisting of positive integers such that the opening and ending elements are $1$ or $2$ and the absolute difference between any $2$ consecutive elements is $0$ or 1 is given by $T_{n}$ where $$T_{n} =…
Shashwat Kumar
  • 322
  • 4
  • 15
5
votes
1 answer

When is a recurrence relation linear

In http://www.cs.fsu.edu/~lacher/courses/COT5405/spring07/notes2.html, it says that $T(n) = aT(n/b) + f(n) $ is nonlinear recurrence. But I think it is linear because $T(n)$ is linear in $T(n/b)$. So I was wondering how a linear recurrence is…
Tim
  • 47,382
5
votes
1 answer

How to solve this nonlinear difference equation system

I was working on a model and arrived to the following difference equation system: \begin{align} x_{t+1} &= x_{t} \alpha \beta (y_{t} - 2 x_{t})^{\alpha-1} \\ y_{t+1} &= (y_{t} - 2 x_{t})^{\alpha} \end{align} where $\alpha$ and $\beta$ are parameters…
ornmtl
  • 53
5
votes
2 answers

How to come up with a recurrence relation?

In general what are some things you can do to come up with a recurrence relation for something? I've had it covered in a course in combinatorics that I took, but our professor would always say "you just have to be clever". So can there be a…
Ethan
  • 153
5
votes
1 answer

Solving a recurrence relation with the characteristic equation

I have some trouble solving this due to not seeing the steps to be able to feed it into the characteristic equation. $$T(n) = 4T(n-2) +n + 2^nn^2\ \text{with}\ \ T(0)=0,\ T(1)=1$$ (don't have to solve for the constants) I don't understand the steps…
saxly
  • 53
5
votes
1 answer

Given nonlinear recurrence relation : $b_n=(\frac{1}{2}b_{n-1}+\frac{1}{2})^2$, then evaluate $\lim_{n\to\infty} (b_n)^{2n}$

I encounter the following problem: Given nonlinear recurrence relation : $b_n=(\frac{1}{2}b_{n-1}+\frac{1}{2})^2$ with $b_0=\frac{1}{2}$, we want to evaluate the $\lim_{n\to\infty} (b_n)^{2n}$. Firstly, I use MATLAB to verify this numerically, and…
Syoung
  • 670
5
votes
2 answers

Linear map $f(x^n)=nf(x)$.

I want to find a linear map $f$ with the property $f(x^n)=nf(x)$. Suppose we have the recurrence $x_n+\frac{1}{x_n}=x_{n+1}$ with $x_1=a$. If such a map exists then $0=f(x_{n+1})$. So $f$ attains roots at $x_2,x_3,....$. Does $\{x_2,x_3,....\}$…
5
votes
0 answers

Solving a linear recurrence relation with 2 variables for closed-form solution

Given a recurrence relation $f(x, y) = 2 \times f(x-1, y) + 4\times f(x - 1, y - 1)$ for $x, y \geq 1$, otherwise $f(x,y) = 1$. Find the closed-form solution of $f(x,y)$ for all $x$ and $y$. I tried to calculate a few values, but I can't recognize…
5
votes
4 answers

Recurrence equation: $u_n = 4u_{n−1} + 4u_{n−2}$ ; is $4x+4 = 4$ the characteristic equation?

Given this recurrence equation: $u_1 = 0, u_2 = 1$ $u_n = 4u_{n−1} + 4u_{n−2}$ Is the correct characteristic equation: $4x+4 = 4$ EDIT: Complete solve: The characteristic equation is $x^2-4x-4=0$ We solve the quadratic equation... $\alpha = 5$…
Nerian
  • 321
5
votes
3 answers

Prove that this recurrence always cycles

If $n$ is a nonnegative integer, let $S_n=\{0, 1, 2, \dots, 2n+1\}$. For $t\in S_n$ repeatedly perform if t is even t = t/2 else t = (n + 1 + ⌊t/2⌋) It seems that ultimately $t$ becomes equal to the initially chosen number. For…
Eight
  • 733
5
votes
4 answers

If $T(n)= T(n-1) + 2T(n-2)$

If $T(n)= T(n-1) + 2T(n-2)$ with $T(0)=0$ and $T(1) = 1$ What is $T(n)$ (in $Θ$–notation) in terms of $n$? I am trying to solve by substitution, but I am not sure if I am doing this right, as I get stuck. Can anybody tell me where to go from…
User
  • 907
5
votes
0 answers

Series expansion for $x_n=x_{n-1}+\log \left(x_{n-1}\right)$

$x_0=2,\ x_n=x_{n-1}+\log \left(x_{n-1}\right)\quad$ has a series expansion about $1.$ Since $x_0=2,$ $(x_0-1)^k=1,$ so the recurrence can be written, up to the first $5$ terms as \begin{align} 1+\frac{773788}{604800}\ 2^n-\frac{247200}{604800}\…
martin
  • 8,998
5
votes
1 answer

general technique to convert recurrence relation to integral

I know the following recurrence relation $$a_n=\frac{a+na_{n-1}}{a-n}$$ with $a_0=1$ can be represented alternatively as an integral $$a_n=a\int_0^1{x^{a-n-1}(2-x)^ndx}$$ Verifying this is easy, but is there any general technique to do this kind of…
5
votes
2 answers

$T(n) = 4T(n/2) + \theta(n\log{n})$ using Master Theorem

I am trying to solve the following recurrence relation using the Master Theorem: $$T(n) = 4T(n/2) + \theta(n\log{n})$$ So: $a = 4$, $b = 2$, and $f(n) = n\log{n}$ So we are comparing: $n^{\log_b{a}}$ with $n\log{n}$ $n^{\log_2{4}} = n^2$ so we are…
gprime
  • 593
4
votes
1 answer

How do you prove uniqueness of solution of homogeneous linear recurrences?

I was following the MIT 6.042 course on OCW (that don't cover generating function on the lectures, sorry if the answer is easier by doing that method). Recall a linear homogeneous recurrences is of the form: $$T(n) = \sum^{n}_{i=1} a_i T(n-i)$$ It…