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 make clear sense of this re-write of an equation

I'm having a little trouble intuitively seeing the step being performed here. $2\times(2\times(2\times(2\times(2\times3+3)+3)+3)+3)+3) = 2^5\times3 + 2^4\times3 + 2^3\times3 + 2^2\times3 + 2^1\times3 + 2^0\times3$
db2791
  • 197
1
vote
2 answers

Solve recurrence relation - t(n)=(n-1)*t(n-1)

How can I solve the following recursive relation: t(n)=(n-1)*t(n-1) where the base case is t(1)=1 Is it okay just saying that: t(2)=1! t(3)=(3-1)t(2)=2! t(4)=(4-1)t(3)=3! t(5)=4! and so on...t(n)=(n-1)! and after prove this by induction? Any…
KeykoYume
  • 492
1
vote
2 answers

Simplification of an Equation with Recurrence Relations

I'm reading through examples on this site. In example 2_2, given the recurrence relation $A_n - 2A_{n-1} = 2n^2$, the guess for the particular solution is $A_n= Bn^2 + Cn + D$. Substituting that into the recurrence relation gets you I just don't…
1
vote
2 answers

Solving a recurrence relation (textbook question)

$a_{n+1} - a_n = 3n^2 - n$ ;$a_0=3$ I need help for solving the particular solution. Based on a chart in my textbook if you get $n^2$ the particular solution would be $A_2n^2 + A_1n + A_0$ and $n$ has the particular solution of $A_1n+A_0$. So given…
1
vote
0 answers

Recurrence Relation / Difference Equation Problem

I am trying to solve the following recurrence relation, but I am doing something wrong all the time when trying to find the particular solution, and I cannot figure out what. $y_k+4y_{k-1}+4y_{k-2}=(-2)^k$ To try to find the particular solution,…
Akitirija
  • 435
1
vote
1 answer

Solve recurrence relation

Solve the following recurrence. First transform it to a simpler recurrence and then solve the new recurrence using generating functions or a characteristic polynomial: $f_n = f_{n−1} · f_{n−2}$ for $n \ge 2, f_0 = 2, f_1 = 4$.
1
vote
2 answers

Solution of recurrence relation

I want to find a solution of $$ u(n+2) - 3u(n+1)+2u(n) = n, \text{ for } n \ge 0, u(1)=u(0)=1$$ Update: Solution using Joel idea: 1) multiply by $x^n$: $$\frac{1}{x^2}u(n+2)x^{n+2}-\frac{1}{x}3u(n+1)x^{n+1}+2u(n)x^n=nx^n$$ 2) sum from n=0 to inf:…
1
vote
2 answers

Recurrence relation!

I want to know how to compute $H(n) = H(n-5) + \frac{n}5$ I know how to solve the recurrence relations whose difference between LFS and RFS is 1 (ex. $H(n) = H(n-1) + n$) but I have no idea how to solve the relation above. Can anyone please help…
1
vote
1 answer

Recurrence equation solution?

Can you help me with the solution of this recurrence equation? $$ f(n+2) = -2f(n) +3f(n+1) +n \quad\mid\quad f(1)=4 \quad\mid\quad f(2)=5 $$ Thank you.
uni2622
  • 39
1
vote
2 answers

general solution of $y(n+2)+2y(n+1)-3y(n) = -2n$

I would like to find the general solution of $y(n+2)+2y(n+1)-3y(n) = -2n$. I've found the general solution of $\tilde{y}(n+2)+2\tilde{y}(n+1)-3\tilde{y}(n) = 0$ to be $\tilde{y}(n) = c_1(-3)^n+c_2$. I also found that for $b(n) = -2n$ and $L_b(y):=…
1
vote
2 answers

the general solution of $y(n+3)-\frac{2}{3}y(n+1)+\frac{1}{3}y(n) = 0$

I have some trouble finding the correct solution for the difference equation $$y(n+3)-\frac{2}{3}y(n+1)+\frac{1}{3}y(n) = 0$$ I've found that the characteristic equation of the difference equation is $\lambda^3-\frac{2}{3}\lambda+\frac{1}{3}$. By…
1
vote
2 answers

System of recursive equation.

Let's consider: $$u_o = -1, v_0 = 3$$ $$\begin{cases} u_{n+1} = u_n + v_n \\ v_{n+1} = -u_n + 3v_n \end{cases}$$ I tried: $$x^n = u_n , y^n = v_n$$ $$\begin{cases} x^{n+1} = x^n + y^n \\ y^{n+1} = -x^n + 3y^n \end{cases}$$ $$\begin{cases} x = 1 +…
user180834
  • 1,453
1
vote
2 answers

Recurrence. Number of sequences.

Let $q_n$ be amount of sequences, where length of sequence is $n$. The sequences are constructed from elements $\in \{a,b,c,d\}$ . In sequecne 'b' occurs odd times. For example: $$n = 10$$ $$aabbcacacb$$ number of 'b' is three so this sequence is…
user180834
  • 1,453
1
vote
2 answers

Solution for recurrence $T(n+1) = T(n) + \lfloor \sqrt{n+1}\rfloor $

ould someone please give me an idea as to how the solve the following. $$T(1) = 1$$ $$T(n+1) = T(n) + \lfloor\sqrt{n+1}\rfloor$$ I converted the recurrence to $T(n) = T(n-1) + \lfloor\sqrt{n}\rfloor$ and then tried to solve it using the method…
anirudh
  • 157
1
vote
3 answers

Solving a recurrence related to tree counting

What I want is to count the number of binary trees on $n$ nodes, except when a node has only one child, I don't distinguish between left and right. So let $T_n$ be the number of such trees on $n$ nodes, we have \begin{align*} …
sxu
  • 537