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

Find the general solution for $F_{n+2}-5F_{n+1}+6F_n=n$ (Proof verification)

I would like to get your help to understand if I am solving this correctly. Especially, I am not sure if I actually got the general solution, and what is the role of $\alpha =2,3$ that also solve the equivalent equation I got (and are true for…
e.ad
  • 660
1
vote
1 answer

Solve the recurrence $T(n) = nT(\sqrt{n}) + n^2, T(2) = 1$

$$T(n) = nT(\sqrt{n}) + n^2, T(2) = 1$$ The master theorem does not apply here, only recursion tree. Assume $n = 2^{2^k}$. The solution for self-check is $T(n = 2^{2^k}) = k \cdot n^2 + \frac{n^2}{4}$. Edited: My approach: $T(2^{2^k}) =…
1
vote
0 answers

Initial values for recurrence problem

Two gamblers, A and B, make a series of bets, where each has probability 1/2 of winning a bet, but A gets \$2 for each win and loses \$1 for each loss (a very favorable game for A!). Assume that the gamblers are allowed to borrow money, so they can…
1
vote
2 answers

finding $2$-cycle in logistic difference equation

The logistic difference equation is given by $x_{n+1}=Cx_n(1-x_n)$. I'm supposed to show that when $C>3$, the logistic difference equation has a $2$-cycle. Letting $f(x)=Cx(1-x)$, if $\{x_0,x_1\}$ is our $2$-cycle we have that $x_{1}=f(x_0)$. Thus,…
Bears
  • 684
1
vote
1 answer

a recurrence equation interpolating linear and exponential

$f(n+1) = f(n) + f(n)^{a}$ where $a \in (0,1)$ and $n \ge 1$ with $f(1) = m$. If $a=0$, we see $f(n) = m + n - 1$ and if $a=1$, we see $f(n) = 2^{n-1}m$. So the recursion seems to interpolate between linear and exponential forms. Is there a closed…
Turbo
  • 6,221
1
vote
1 answer

Solving $T(n) = 2^n T(n-1) + 2^n$

Is there an exact (and if not, an asymptotic) solution to the following recurrence relation? $$ T(n) = 2^n T(n-1) + 2^n, \text{for } n > 0 $$ If yes, I'd also like to know whether this relation is an instance of a more general class of relations for…
Mo B.
  • 165
1
vote
2 answers

Finding a general form of a recurrence

We have that $T_n^2-T_n+1=T_{n+1}$ for n greater than $1$ ($n$ is an integer) And we have to find the general form of the series.Also $T_2=2.$ Im new to this topic so i tried substitution but failed,any help would be appreciated.Thanks in advance.
1
vote
2 answers

Solve this recurrence relation $a_n=-a_{n-2}$

So far I have this relation of recurrence: $$a_n=-a_{n-2}$$ With $a_1=1$ and $a_2=2$. I know I shoud replace $C \times r^n $ for $a_n$ and $C \times r^{n-2}$ for $a_{n-2}$ Then the relation gets here: $$Cr^{n}+Cr^{n-2}=0$$ If I divide the left side…
1
vote
0 answers

What solution of this recurrence?

$T(n) = 27T(n/3)+n³/ \log n$ By Master Theorem will be: $T(n) = \theta(n^3)$ or $T(n) = \theta(n³ \log \log n)$ ?
1
vote
2 answers

Find the closed solution of $s_{n} = 3s_{n-1} + 2^{n-2} - 1$

Find the closed solution of $s_{n} = 3s_{n-1} + 2^{n-2} - 1$ if $s_1 = 0, s_2 = 0, s_3 = 1$ I have attempted to use $p_n = c2^{n-2} - d$ [where $h_n = A(3)^n$, but to no avail] - i ended up with $c=-1$ and $d=-\frac{1}{2}$, which is incorrect. Any…
Clinton
  • 219
1
vote
1 answer

How to solve this difference equations in the non-homogenous case

Let $0<\alpha<1$ and $N\in\mathbb{N}$. I would like to solve the following difference equation $$n=0: s_0 = 1+\alpha s_1 $$ $$n\in\{1,\dots,N-2\}: s_n = 1+\alpha s_{n+1}+(1-\alpha)s_n$$ $$n=N-1:s_{N-1}= 1+\alpha s_0 + (1-\alpha)s_{N-1}$$ and the…
swissy
  • 91
  • 1
  • 11
1
vote
2 answers

Solve a recurrence relation in two variables

Suppose the function $f : \mathbb{N}\to\mathbb{N}$ is such that $f(1)=1$ and $$f(2m) + f(2n) = 2(f(m+n) + f(m-n))$$ for all $m>n>0$. I would like to show that this implies $f(n) = n^2$ for all $n\in\mathbb{N}$. It is easy to show that $f(n)=n^2$ is…
jackzip
  • 13
1
vote
1 answer

Understanding Fibonacci Sequence with Rabbits?

Find a recurrence relation for the number of pairs of rabbits after n months if (1) initially there is one pair of rabbits who were just born, and (2) every month each pair of rabbits that are over one month old have a pair of offspring (a male and…
user848500
1
vote
5 answers

How can this $T(n) = T(n-1)+T(n-2)+3n+1$ non homogenous recurrence relation be solved

How are can the above recurrence relation be solved? I've reached here: $(x^{2}-x-1)(x-3)^2(x-1)$ And then here: $$a_n = l_1 \cdot (x_1)^n+l_2 \cdot (x_2)^n+l_3 \cdot (x_3)^n+l_4\cdot n \cdot (x_3)^n+l_5\cdot (x_4)^n$$ And we are given that these:…
Chris
  • 867
1
vote
3 answers

How can I solve this recurrence?

I have a weird recurrence relation and don't know how to solve it: $$a_n = pa_{n-1} + qa_{n+1} + cb_n$$ $$b_n = p'b_{n+1} + q'a_n$$ $$a_0 = 1$$ $p,q,c,p',q' \in [0,1]$ and $p+q+c=1,p'+q'=1$. Thanks for help.
kai
  • 25
  • 5