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

How to solve this recurrence relation? (number of multiplications to calculate $x^n$)

I'm trying to find the number of multiplications to calculate $x^n$. I have arrived at this: $$M(n) = \begin{cases} - 1 + M\left(\frac{n}{2}\right) & \text{if $n$ even}\\ - 2 + M\left(\frac{n-1}{2}\right) & \text{if $n$ odd} \end{cases} $$ with…
marvin
  • 121
2
votes
1 answer

solving a recurrence function

If $y_n=\frac{1-y_{n-1}}{y_{n-2}}$ and $y_1=a$ and $y_2=b$, find if the sequence repeats or not and for what value of $a, b$ does it repeats. So I plug in $a=1$ and $b=2$ and here is the first few value for $y_n$: $1,2,-1,1,0,1$ and $y_7$ is…
M. Chen
  • 485
  • 2
  • 14
2
votes
2 answers

how to develop positive solution space for difference equations?

this is set of equations I am working on the following equations: D(t)=D(t-1)+(1-P(t-1)/P'*alpha) P(t)=P(t-1)-(1-D(t-1)/D'*beta)+(1-R(t-1)/R'*gamma) R(t)=R(t-1)+(1-D(t-1)/D'*eta) where D is demand, P; Price, R;Resources and D',P',R' are the…
Summyia
  • 33
2
votes
0 answers

Problem understanding a step in Josephus Problem in Concrete Mathematics

On Page 11 of Second edition of Concrete Mathematics, it reads as The induction step has two parts, depending on whether $l$ is even or odd. If $m > 0$ and $2^m + l= 2n$, then $l$ is even and $J(2^m +l) = 2J(2^{m-1} +l/2)-1 = 2(2l/2+1)-1 = 2l+1$ by…
2
votes
1 answer

Solving the Recurrence : $f(n,d) = f(n, d-1) - f(n-1, d-1)$

I had postulated following sequences by depth n(hereby d${n\in\Bbb N}$) which are gaps between adjacent terms where the first starts from given (d1): $1 ,x , {1\over 2}x^2, {1\over6}x^3, {1\over 24}x^4 \dots {1\over n!}x^n\tag {d1}$ $x-1,\space…
Beverlie
  • 2,645
2
votes
2 answers

Recurrence equation solution: what are the missing steps?

Given $$y(0)=1$$ $$y(n)=3y(n-1)+3^n$$ My attempt so far using reverse substitution…
student
  • 668
2
votes
0 answers

Recurrence with cases

$\def\left{\operatorname{left}}\def\right{\operatorname{right}}$I have the following recurrence with cases: $$ p(l, r, s) = 0.5 \cdot \left(l, r, s) + 0.5 \cdot \right(l, r, s) $$ where: $$ \left(l, r, s) = \begin{cases} p(l -…
axel22
  • 173
2
votes
2 answers

What are some strategies for creating linear recurrence relationships?

For instance if I have a string of numbers outputted from some function $f(1), f(2), f(3), \ldots, f(n)$ that can be expressed in the form of $f(n) = af(n-10) + bf(n-9) + \cdots+ jf(n-1)$ etc (It doesn't have to be $n-10$, just using it as an…
KaliMa
  • 923
2
votes
1 answer

An exponential recurrence

Is there any way to solve the recurrence $$x[n+1]=(x[n]+1)2^{x[n]+1}-1$$ I know how to solve recurrences with z-transforms, but it doesn't look like that technique will yield anything useful here. I have a feeling I'll be able to work around this…
Mike
  • 13,318
2
votes
1 answer

How to find recurrence relation for this problem?

How to find a recurrence relation for F(n) the number of ways to make n cents change using only pennies, nickels(5cents), and dimes(10cents)... So for 9 cents, there are 6 ways, which are 1 1 1 1 1 1 1 1 1 ( 9 pennies) 5 1 1 1 1 (1 nickel followed…
xiamx
  • 449
2
votes
2 answers

Recurrence relation for the number of ternary strings containing 2 consecutive zeros vs not containing

Find a recurrence relation for the number of ternary strings of length $n$ that contain a pair of consecutive $0$s The answer to this can be found quite easily to be: $$a_n=2a_{n-1}+2a_{n-2}+3^{n-2}\;.$$ Now I came across a similar question…
2
votes
4 answers

Justifying a recurrence relationship

I have a recurrence relationship here that I have to justify: $A_n = A_{n-1} + A_{n-2} + 1 $ and $A_0 $ = 1 and $A_1 $ = 1 I know that the first step is to turn this into a characteristic equation of order 2, and then go on to solve that equation. I…
Broadsword93
  • 567
  • 6
  • 21
2
votes
2 answers

How to Solve Non-Homogeneous Recurrence Relations : $r_n = 2\left(r_{n-1} - \binom{n-1}{2}\right) + \binom{n-1}{2}$?

$$r_n = 2\left(r_{n-1} - \binom{n-1}{2}\right) + \binom{n-1}{2}$$ which is equal to $$r_n - 2r_{n-1} = -\frac{n^2-3n+2}{2}$$ This given recurrence relation is derived from the question "How many regions line n could make at most in Euclidean…
Beverlie
  • 2,645
2
votes
3 answers

Recurrence relation for rectangular floor

Let $\{b_n\}$ a sequence such that $b_n$ count the number of ways to pave a rectangular floor of dimension $2 \times n$ in using rectangular tiles of dimensions $2 \times 1$ (and $1 \times 2$), square tiles of dimensions $2 \times 2$ and…
2
votes
0 answers

closed form solution to a recurrence relation

I have come up with this recurrence relation in solving a problem : $$ \begin{cases} y_i = \lambda\{\sum_{m=1}^M (y_{i-1}^m)P_m + y_{i-1}P_0\} & \quad i\ge1 \\ y_0 = 1\\ \end{cases} \ $$ which $P_m$ is described as $P_m =…