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

Question about O notation for recurrence

$A({n})=A(\lfloor{n/2} \rfloor)+n^2$ for $n>1$ $A({n})=1$ for $n=0,1$ Will above recursion ends in $\Theta(n^2)$ time?
0
votes
2 answers

Help to understand method to find a solution to a second order linear recurrence

Here's an excerpt from my lecture notes: Choosing a Particular Solution $$ ay_{t+2}+by_{t+1}+cy_t=f(t)\,,\qquad t = 0, 1,2,\ldots $$ $$ \begin{array}{|c|c|}\hline f(t)&\text{First choice for Particular Solution}\\ \hline \hline 0&0\\ \hline…
mauna
  • 3,540
0
votes
2 answers

2nd order homogeneous difference equation

$$a_{n+2} = 9a_{n+1} - 18a_n,\quad n\geq 0,\,\,a_0=1,\,\, a_1=3$$ I got to the point where i moved all to LHS which gives me $a_{n+2} - 9 a_{n+1} + 18 a_n$ (correct me if I'm wrong). I then calculated to the point of getting the roots 3 & 6. From…
0
votes
1 answer

What is the steady state for this difference equation: $X_{n+1}-X_{n}+\beta \alpha X_{n-1}(1-\frac {X_{n-1}}{X_{max}})=t$

This is my self study, as I know the steady state from an difference equation should satisfy $x=X_{n+1}=X_{n}$ What is the steady state for this difference equation? $$X_{n+1}-X_{n}+\beta \alpha X_{n-1}\left(1-\frac {X_{n-1}}{X_{\max}}\right)=t$$…
valerie
  • 250
0
votes
1 answer

Does solving a recurrence relation by iteration have two different meanings?

I've seen iteration used by plugging numbers in and not simplifying and guessing the explicit formula, e.g., $t_n$ plug $n=1,2,3,4$ in and guess the explicit formula. The other way I've seen is plugging the variables in e.g. plug $t_{n+1}$ in for…
Celeritas
  • 2,743
0
votes
1 answer

Finding general solutions to recurrences

What is the general solution to the recurrence $$x_{n+2} = x_{n+1} + x_n + n-1$$ for $n\ge 1$ with $x_1 = 0$, $x_2=1$? I am stuck on this a bit. Can someone help me understand this?
Rajen
  • 11
0
votes
2 answers

How to solve this recurrence?

$ E_{n}=2E_{n-1}+ 2^{n-1} $ Can anyone help me to solve this recurrence? Is there a general way to think about recurrence?
0
votes
4 answers

How to solve this simple difference equation?

$ y(k+1)-2y(k)=k2^k$ I know that theres a formula for situations where the right hand side is a geometric series, but that doesn't seem to be the case.
Shmoopy
  • 325
0
votes
2 answers

How do I solve this recurrence equation using substitution?

f(1)=1, and f(n) = f(n-1)+2(n-1) Using substitution, here are the first few steps: f(n-1) = f((n-1)-1) + 2((n-1)-1) f(n-1-1) = f((n-1-1)-1-1) + 2((n-1-1)-1-1) And then eventually I see that f(n+(-1)*2^j) = f(n+(-1)*2^(j+1)) + 2n +…
Gary Choi
  • 167
0
votes
1 answer

Recurrence relation coefficients

For all integers $n \geq 1$, $x_{n+1}$ is linked to $x_n$ by a recurrence relation and $y_{n+1}$ is linked to $y_n$ by another recurrence relation and $x_1$ and $y_1$ are given. If $A(x_n)^2 + B(x_n y_n) + C(y_n)^2 = 0$ for all integers $n \geq 1$,…
0
votes
1 answer

How do I express a given linear recurrence relation in a non-recursive way?

If I have a linear recurrence relation such as $f_n=f_{n+1}+f_{n+2}$ or $f_n=f_{n+1}+k$, how can I find a formula that will give me a function to represent these relations in a non-recursive way? Is there a generic approach to solving these,…
Kvass
  • 367
0
votes
1 answer

Stuck at solving T(n) problem using recursive relation

I am trying to solve the following $T(n) = 4T(n/2) + p*n $ where p is a constant, we may assume $ n = 2^k $ I took the general equation as $T(n) = a*T(n/b) + g(n) $ Writing it recursively i came to the following function: assuming i as the tree…
0
votes
1 answer

recurrence relations substitution method

Hi any one knows the approach to solve this recurrence: $T(n)=3T(\frac{n}{3}- 2)+ \frac{n}{2}$; Master method not suitable. Then how the substitution can be done to find the bound?
studnt
  • 71
0
votes
1 answer

The explicit solution of the recurrence $f(2n) = f(2n + 1) = 2f(n)$ with $f(1) = 1$

Given that $f(1) = 1$ and for $n\geq1$, $$f(2n) = f(2n + 1) = 2f(n)$$ show that for every natural number $n$, $f(n)$ is the largest power of $2$ less than or equal to $n$. I don't understand what is going on. Am I asked to prove that $f(n) =…
0
votes
0 answers

A simple recursion equation

Let $L_1=\lceil\log_2x\rceil$ where $x>0$, $L_i = \lceil \log_2L_{i-1} \rceil$ and let $T[1]=1$. What is the solution for the recursion equation $$T[x]=\sum_{i=1}^{L_1}\frac{xT[L_1-i+1]}{2^i}?$$
Turbo
  • 6,221