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

Non linear recursion

Is there any general method to solve a non linear recurrence relation. For example: $$ \begin{eqnarray}f_{n+1}&=&2f_{n}^2-1 \\ f_1&=&4 \end{eqnarray}$$ Is there any way to solve it?
0
votes
2 answers

Solving nonlinear recursive relation

I am trying to solve a nonlinear recursive relation that reads \begin{equation} \frac{1}{f(n+1)} = \frac{1}{f(n)+A} + B, \quad \text{for} \quad n=1,2,\ldots \end{equation} where $A$ and $B$ are two positive constants. Is it possible to solve these…
Saïd M
  • 406
  • 3
  • 13
0
votes
1 answer

Looking forward to generate formula

Right now we have a java method calculating a number, it is called prestige, the prestige cost increases each level, the code is a loop, we're trying to find the max prestige an user can reach with all their current balance. The loop takes a long…
0
votes
1 answer

How to obtain generating function and an analytic solution

I have the following recurrence relation, and I need to obtain generating function and an analytic solution. How to go about with it? $$ f(N,M) = 0, N < M\\ f(N+1,M+1) = 2f(N,M) + (N-1)f(N,M+1), N > 0, M > 0\\ f(1,1) = 1\\ f(N,1) = 0, N > 1\\ $$ PS:…
Qiang Li
  • 4,097
0
votes
1 answer

Using the substitution method for solving recurrences

I have a question. In my book they have the following recurrence: $T(n) = 3T(\lfloor n/4\rfloor )+\theta(n^2)$ They try to guess that $T(n) = O(n^2)$ and they then use the substitution method to verify the guess. But they don't show the base case?…
user11775
  • 333
0
votes
1 answer

Attempting to describe number of possible bit strings containing sequence [0, 1] recursively.

I'm trying to solve a university question we were asked to find the recursive relation between number of possible bit strings of length n containing sequence 0,1. I tried to reason logically and given in a lot of similar question it was useful to…
0
votes
2 answers

Close form fomula for Narayana's cows sequence

I am using Narayana’s cows sequence OEIS A000930 in a paper I am about to submit to a conference. The link gives a closed form, however, I am not sure if I can cite the link in the paper because some program committee members will (most likely)…
0
votes
1 answer

Is there anything wrong with this question or I'm not understanding it correctly?

Here's the question: A population of weasels grows with rate $3\%$. We define $w(k)$ to be the number of weasels after $k$ years from now, and the current number of weasels is $350$. a) Find the difference equation that describes the population…
Pwaol
  • 2,113
0
votes
0 answers

How to draw a graph of this difference equation?

Knowing that: $y(0)=100, y(1)=90$. And: $y(k+1)-y(k)=-0.128(y(k)-22)$ for every $k=0,1,2,...$ How to draw a graph of $y(k)$ as a function of $k$ for every $k=0,1,2,...,100$. I'm really stuck, I know for sure the purpose isn't to start…
Pwaol
  • 2,113
0
votes
0 answers

How could I draw a graph from a difference equation? (Is this a good solution?)

Knowing that $y(k+1)=1.02y(k)$ for every $k=1,2,...$ And $y(0)=0$. And I'm asked to draw the graph of $y(k)$ as a function of $k$ for $k=1,2,...,100.$ I've thought of calculating some of $y(1),y(2),...$, but that seems so inefficient. So I've…
Pwaol
  • 2,113
0
votes
1 answer

How could I find what is $y(k)$?

First of all I'm really sorry if this isn't the right tag, I was confused of what this is called, but I think this was the closest. This is a bank model we were introducted to in the lecture, where $y(k)$ is the balance (remainder) in day $k$, and…
Pwaol
  • 2,113
0
votes
1 answer

Master Method Recurrence (Solved already using recursion tree but want to use Master Method if possible)

Given this recurrence relation, T(n) = 2T(n/2)+T(n/4)+n^2, would I be able to utilize the Master Method to solve for the time complexity in the tightest bound? I utilized the recursion tree method and got T(n) = Theta(n^2) as my answer, but I want…
0
votes
1 answer

Find $f\left(n\right)$ and the general solution for $a_n=n\left(n+1\right)a_{n-1}+f\left(n\right),\:n\in \mathbb{N},\:n\ge 2$

Considering the following recurrence: $\left(E\right):\:\:a_n=n\left(n+1\right)a_{n-1}+f\left(n\right),\:n\in \:\mathbb{N},\:n\ge \:2$ $a_n=\left[n!\right]\left[\left(n+1\right)!\right]+\frac{1}{n},\:\forall n\:\ge 1\:\:$ it's a solution for…
0
votes
0 answers

Difference equation with boundary

$$f(x)=pf(x+1)+qf(x-1)$$ I know how to solve this equation using the generating transform if given a boundary such that $f(a)=0$ and $f(b)=1$. But what if $f(a)=f(b)=0$ ? I tried using the same method but I have this $f(1)$ in the end that I cannot…
CJC .10
  • 153
0
votes
1 answer

Non-homogeneous recurrence equation problem, i dont understand how we reached this particular solution

So I have the equation $y(x+3) - 7y(x+2) +16y(x+1) - 12y(x) = 8 \cdot 2^x$ First I find the general form The roots of the characteristic polynomial are $2$ (double) and $3$ So the general form is $$c_12^x +c_2x2^x +c_33^x=y^{0}_x$$ Now to find the…
Than1
  • 331