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

How to solve this homogeneous recurrence relation of 2nd order?

I have this homogeneous recurrence relation: $x_n = 3x_{n-1} + 2x_{n-2}$ for $n \geq 2$ and $x_0 = 0$, $x_1 = 1$. I form the characteristic polynomial: $r^2 - 3r -2 = 0$ which gives the roots $r = \frac{3}{2} - \frac{\sqrt{17}}{2}$, $\frac{3}{2} +…
imc
  • 409
1
vote
0 answers

Solving a linear multivariable recurrrence

How do I solve a linear multivariable recurrence relation like the following: $$ f(x, y) = a f(x - 1, y) + b f(y - 1, x) + c $$ subject to the boundary conditions: $$ f(x, 0) = 0, f(0, y) = 1 $$ Assuming $a, b, c$ are all real (possible…
Daishisan
  • 299
1
vote
1 answer

Let t(n) be the number of strings of n letters that can be produced by concatenating copies of the string "a", "bc", "cb" find t(3) and t(4)

For each integer n>= 1, let $t_n$ be the number of strings of n letters that can be produced by concatenating (running together) copies of the strings "a", "bc", and "cb" For example, $t_1$ = 1("a" is the only possible string) and $t_2$ = 3 ("aa",…
SAR
  • 297
1
vote
1 answer

Where does this reccurence relation come from?

if$$\alpha_m = \int^{1}_{-1}\cos \pi x (x^2-1)^m dx$$ then how do I get $$\alpha_m = \frac{-1}{\pi^2}(2m(2m-1)\alpha_{m-1} + 4m(m-1)\alpha_{m-2})$$ I have to integrate by parts! But $$\alpha_n = -\frac{1}{\pi^2}\int^{1}_{-1}\cos \pi x…
user197848
1
vote
3 answers

Recurrence substitution method

I just want to see if I did this right. I need to show that $T(n) = 3T(n/4) + n\log n$ shows that $T(n) = O(n\log n)$ using substitution method in recurrence. $$T(n) = 3c(n/4 \log n/4) + n\log n$$ $$c\log nn - cn + n\log n$$ $$n\log n$$ That does…
Rambo
  • 11
  • 2
1
vote
1 answer

Solve the reccurence $T(n) = 3T(\sqrt[3]{n}) + \log_{2}(\log_{2}n)$

$T(1) = 1 $ , $T(n) = 3T(\sqrt[3]{n}) + \log_{2}(\log_{2}n)$. I tried to define $ n = 2^{k}$. So, $T(2^k) = 3T(2^{\frac{k}{3}}) + \log_{2}k$ Then defin $S(k) = T(2^k)$ So ,$S(k) = 3S(\frac{k}{3}) + \log_{2}k$ And now im pretty stuck, Someone has…
NM2
  • 721
1
vote
0 answers

Explicit solution for a non-linear recurrence equation

Does the following non-linear recurrence equation has an explicit solution with given boundary conditions $x_0$ and $x_\infty$? $$ x_n = a + b x_{n-1}x_{n+1} $$ $a$ and $b$ are constants.
1
vote
1 answer

Find a recurrence relation for a retirement account with an initial deposit of $1000 and 3% interest per year

Given that the 3% interest per year is compounded monthly and that the person saving up adds $200 to the account each month: If for each integer ($n$) greater than 0, $A_n$ is the amount the account has at the end of $n$ months, what is the…
1
vote
1 answer

Write a recurrence relation that models how your loan balance changes from month to month.

You have saved \$40,000 for a deposit on a home purchase. A cheerful Victorian home is on sale for \$370,000. You have qualified for a home loan mortgage at an annual interest rate of 3.6% compounded monthly. You plan on paying off the home loan…
Vince
  • 11
1
vote
0 answers

Recurrence tree diagram

I can generally do these but I feel like I'm missing a very basic piece of information. For example, the recurrence $T(n) = 2T(n/2) + n$ is easy to draw out in a tree diagram, but for some reason I can't figure out a diagram for $2T(n/2) + 1$. What…
1
vote
2 answers

Two dimensional recurrence relation $f(n,k)=f(n-1,k)\cdot(n-1) + f(n-1,k-1)$

I'm struggling to get the following recurrence relation into a closed form if possible: $$f(n,n)=1$$ $$f(n,1)=(n-1)!$$ $$f(n,k)=f(n-1,k)\cdot(n-1) + f(n-1,k-1)$$ where $f$, $n$ and $k$ are positive integers, and $k\leq n$. I've tried to plug the…
1
vote
5 answers

recurrence relation unable to solve

I am trying to solve recurrence relation : $$z_n = 2z_{n-1} + z_{n-2} \;\;\;\;\;z_0=1\;\;\;z_1=3$$ Could you please help to provide a solution. I got stuck with Lamdas.. Are there some simple methods to solve any kind of these problems perhaps ?…
HGO HGO
  • 57
1
vote
2 answers

Solve the following recurrences using backward substitutions:

Solve the following recurrences using backward substitutions: $x(n) = 3x(n-1)$, for $n > 1$; $x(1) = 4$
1
vote
1 answer

Solving recurrence equation that appear in biology

I am struggling to solve this recurrence equation, $$a_{n}(1-sa_{n-1}^{2})+sa_{n-1}^2-a_{n-1}=0$$ where the parameter $s\in[0,1]$ and the initial condition $a_{0} > 0$ is close to 1. I have graphed it in matlab and it decreases really fast even if…
1
vote
3 answers

How to solve the non-homogeneous linear recurrence $ a_{n+1} - a_n = 2n+3 $, given that $a_0=1$?

The problem: $ a_{n+1} - a_n = 2n+3 $, given that $a_0=1$ First I solved the associated homogeneous recurrence and got $a_n = A(1)^n = A$, where A is a constant, but I got stuck solving the rest. My final answer was $a_n=2n^2+n+1$ while my textbook…
Pybert
  • 13