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
2 answers

Linear recurrence

I'm having a lot of problems with this one linear recurrence problem ... First, verify that: $x^3 − 3x − 2 = (x^2 + 2x + 1)(x − 2). $ Then, solve the linear recurrence f(0) = 0, f(1) = 1, f(2) = 7, f(n) = 3f(n − 2) + 2f(n − 3). I'm…
Joe
  • 3
0
votes
0 answers

Recurrence relations closed form solutions

I am looking at various recurrence relations of the form: $x_{n+2} + bx_{n+1} +cx_{n} = f(n)$ In the book I use, I have been given an algorithm on how to solve these kinds of recurrence relations when $f(n)$ is a polynomial $p(n)$, of the form $a^n…
Avatrin
  • 1,527
0
votes
1 answer

How to solve this 2-D recurrence relation?

I am trying to solve this recurrence relation:- $$F(A,B)=\frac{F(A,B-1)F(A-1,B-1)}{F(A,B-1)-F(A-1,B-1)} ;\ F(A,1)=A$$ Please help in finding the general term of it.
0
votes
1 answer

solving recurrence with $\Theta$: $T(n) = 3T(\frac{n}{2}) + \Theta n$

Solving Recurrence with $\Theta$ If $f(n)=\Theta n$, what exactly is $f(n)$? This is what's throwing me off. I'm trying to solve using the master theorem. $$\mathrm{T}(n) = 3\mathrm{T}(\frac{n}{2}) + \Theta n$$
Imagin
  • 125
0
votes
1 answer

Not understanding the recurrence formula of n nodes with a height h in an AVL tree to show $2 \log n \geq h$

I know the formula is: $n(h) = n(h-1) + n(h-2) + 1$ And I know it can be reduced as: \begin{align} n(h) & = n(h-1) + n(h-2) + 1 \\[6pt] & \geq n(h-2) + n(h-2) + 1 \\[6pt] & \geq 2n(h-2) + 1 \\[6pt] & \geq 2n(h-2) \end{align} After this step I don't…
0
votes
0 answers

Having trouble solving a complicated recurrence relation

Original equation: $T(n) = n^{2/3}T(n^{1/3})+n$ My work: = $n^{2/3}(T(n^{1/3})+n^{1/3})$ = $n^{2/3}(n^{2/9}(T(n^{1/3})+n^{1/9})+n^{1/3})$ = $n^{2/3}(n^{2/9}(n^{2/81}(T(n^{1/81})+n^{1/81})+n^{1/9})+n^{1/3})$ My problem is I don't know how to…
0
votes
1 answer

General solution to difference equation with only one unique eigenvalue

If you have a system of difference equations like this: $x_{n+1} = a_{11}x_n + a_{12}y_n$ $y_{n+1} = a_{21}x_n + a_{21}y_n$ And you know that there is only one unique eigenvalue (ie: $\lambda_1=\lambda_2=\lambda$), how do you show that the general…
0
votes
2 answers

Guessing particular solution for a recurrence relation with multiple quasi-polynomials on the right side

I'm trying to solve this recurrence: $$a_{n+2}+2a_{n+1}-3a_{n}=n+n(-3)^{n-1},\ a_0=0, a_1=1$$ However, the algorithm in my textbook doesn't seem to mention this case with multiple quasi-polynomials on the right side. How should I gues the particular…
user45045
0
votes
1 answer

Recurrence relation to find time-complexity

I have the following simple C-program: int factorial(int n) { if(n==0) return 1; else return n*factorial(n-1); } Now, if I take the recurence relation as T(n) = n*T(n-1), when n>0 T(n) = 1, when n=1 then, the time…
0
votes
1 answer

Solve a recurrence in terms of n

I'm trying to determine the order of growth of a recursive algorithm but I only got a recurrence. Please somebody explain me how to solve the following recurrence with $k = 2$: $S(n,k)=kS(n-1,k)+S(n-1,k-1)$ $S(n,k)$ is an arbitrary function in terms…
Juan David
  • 113
  • 4
0
votes
2 answers

Solving a nonhomogeneous recurrence relation

How does one solve a recurrence relation of the kind $u_{k+1} = u_k + u_{k-1} + a \cdot \cos(\omega k)$ for arbitrary $a > 0$ and $\omega > 0$?
Mekanik
  • 1,761
0
votes
2 answers

are there any functions that fit this recurrence relation

Would anyone know if there any functions that fit this recurrence relation: $F_n = \frac{1}{n+3/2} \left ( F_{n+2} - c F_{n+1} \right )$ where $c$ is a constant parameter. or, more general: $F_n = g(n) \left ( F_{n+2} - c F_{n+1} \right )$ Any…
uday
  • 300
0
votes
3 answers

Simple Linear Recurrence Relation Problems

$M(n)=3M(n−1)+1$ with base case of $M(1)=1$ Somehow I'm not understanding how to solve the recurrences. This problem is from my textbook and I was fine until I see this in example. I know it goes like: $M(1)=3\times M(0)+1=1$ $M(2)=3\times…
Minjae
  • 207
0
votes
2 answers

Recurrence relation complexity

I just learned about recurrences and I just can't solve this problem. I have this recurrence relation: $T(n)=k * T(n / k)$ $T(0)=1$, where k is a constant number. I tried drawing a recurrence tree or replacing for lower n-s but no success. I hope…
0
votes
1 answer

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

I am learning how to solve recurrence relations and I have an equation that got me to a dead end: $$g(n)=2g(n-1)+n+2^n$$ My problem is the non-homogeneous part.