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

recurrence relationship $a_{n+2} = 4a_{n+1} - 2a_n$ for all $n \geq 0$

The question is: Determine the numbers $a_n$ for $n \geq 0$ that satisfy the recurrence relation $a_{n+2} = 4a_{n+1} - 2a_n$ for $n\geq 0$. with Boundary conditions $a_0 = 0$ and $a_1 = 1$. Now my base step would be to fill in the formula…
0
votes
0 answers

Write down P(0), P(1), P(2), P(3) and P(4) when the difference equation and initial value are as given below.

$P(t) = ln|10cos(\pi\frac{t}{n})|$ $t = 0,1, . . .n$ $n \in \mathbb{N}$ I took $n$ as the number of the iteration we're currently on and then $t$ would essentially be $n-1$ Which then left me with: $P(0) = ln|10cos(\pi\frac{0}{1})| = 2.303$ $P(1) =…
0
votes
2 answers

Ways of solving the following recurrence relation system.

Consider the following system of linear recurrence relations. $$\begin{aligned} p_n &= a \cdot p_{n-1} - c_{n-1}\\ c_{n-1} &= p_{n-1} - b \cdot p_{n-2} + c_{n-2}\end{aligned}$$ with $p_0 = 1$ and $c_1 = 1$. I've tried to represent $p_n$ as a finite…
openspace
  • 6,470
0
votes
0 answers

How to solve a recurrence relation where $a_n$ has multiple restrictions?

How does one solve a recurrence relation like \begin{equation} a_n=\begin{cases} Pa_{n-1} + C , & a_{n-1}=7k, k \in \mathbb{N}, k\text{ is even}.\\ Qa_{n-1} + R , & a_{n-1} =7k, k \in \mathbb{N}, k \text{ is odd}. …
William
  • 4,893
0
votes
1 answer

Recurrence formula

Could you please help me to understand the task. The topic of the task is Recurrence formula. There is a txt file with integers that represent the members of the row of a(k), starting with k = 0. It is required to calculate the value of S (100),…
Gelios
  • 3
0
votes
1 answer

Find a closed form for this recurrence relation

For some value of $k$, $a_j=0$ for all $j\leq k$. Then, for $n\geq 1$, $$a_{n+k}=\frac{n}{n+k}-\frac{1}{n+k}\sum_{i=k+1}^{n+k}a_i$$ What is a closed form for $a_k$? I found that…
0
votes
0 answers

Solution to second order difference equation

A similar question has been answered at Second-order difference equation solution However I'm not entirely convinced by the answers. I'm wondering how to explain convincingly to an undergraduate class as to why we "guess" or "assume" an exponential…
PGupta
  • 609
0
votes
1 answer

How do you show that a recurrence relation holds?

There's a problem that goes as follows: Let $a_n$ be the number of binary strings of length $n$ in which there are no consecutive 0s. Show that $a_1 = 1, a_2 = 3$ and that $a_n = a_{n-1} + a_{n-2}$ I am not sure how exactly am I supposed to "show"…
0
votes
2 answers

Solution to $ y_{t+2} −4y_{t+1} + 3y_{t} = t^2 + 2t$

I have the following second order difference equation to solve: $y_{t+2} −4y_{t+1} + 3y_{t} = t^2 + 2t; y_{0} = 1; y_{1} = 2$. I have found the solution for the homogeneous part but i have difficulty in solving the non-homogeneous part. Can…
0
votes
1 answer

Recurrence relation $ T(n)=5^n+3T(\lfloor n^\frac{2}{5}\rfloor) $

I need to prove that the following recurrence relation is $O(5^n)$: $$ T(n)=5^n+3T(\lfloor n^\frac{2}{5}\rfloor) $$ And $T(n)=\Theta(1)$ for $n\le 9$. I am trying induction, and proving that there exists $c$ such that $T(n)\le c\cdot5^n$, but I am…
Daniel
  • 558
0
votes
5 answers

Solving Recurrence relation $a_n = 3a_{n-1} + 5 \cdot 3^n$ for $n\geq 1, a_0=2$?

How can I solve recurrence relation $a_n = 3a_{n-1} + 5 \cdot 3^n$ for $n \geq1 $ and $a_0 = 2$?
omidh
  • 876
0
votes
4 answers

Recurrence Relation - how to derive a proper series

I have a problem with understanding the way of deriving a series based on a given recurrence relation. Let us consider the following recurrence relation: $$ f(n) = b + a f(n-1) $$ for some values $a$ and $b$. My goal is to a find a general formula…
MMM
  • 751
0
votes
1 answer

What is the complexity of $f(n)=f(n-1)+f(n/2)+1$

$$f(1) = 1 : f(n)=f(n-1)+f(\lceil n/2\rceil)+1$$ What is the computational complexity of this recursive function? I have not been able to find anyone explaining a function like it in my searching, and I'm completely stuck as to what to do with…
Erik
  • 1
0
votes
0 answers

Prove by induction the uniqueness of solutions to a second order recurrence relation

Prove by induction that the only solutions to $au_{n+2}+bu_{n+1}+cu_n=0, n\geq0$ are $u_n=A\alpha ^n+ B\beta ^n$ where $\alpha$ and $\beta$ are solutions to $ax^2+bx+c=0$ and $b^2\neq 4ac$ and $A=\frac{u_1 - \beta u_0}{\alpha-\beta},…
0
votes
1 answer

Discrete analogy of partial integral formula.

Show that discrete analogy of partial integral formula as below. $$ \sum\limits_{k=0}^{n-1} y(k)\Delta x(k)=x(n)y(n)-\sum\limits_{k=0}^{n-1}x(k+1) \Delta y(k) + c $$ I have tried as below and I stuck. \begin{align*} \sum\limits_{k=0}^{n-1}…