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
3
votes
0 answers

General periodic recurrences

I was blown away when I read in Concrete Math that the recurrence $$Q_0 = \alpha$$ $$Q_1 = \beta$$ $$Q_n = \frac{Q_{n-1} + 1}{Q_{n-2}}$$ is periodic (period 5). Is there a general method to determine if a recurrence is periodic? What are some…
3
votes
3 answers

The solution to the recurrence equation $T(n) = 2 T\left(\frac{n}{2}\right) + 2$

I got stuck at the solution to the recurrence equation $T(n) = 2 T\left(\frac{n}{2}\right) + 2$. Please give me a detailed explanation or references with detailed steps? Sorry, I missed something. If $n = 2$, then $T(n) = 1$; else if $n > 2$, then…
3
votes
2 answers

Question about a recurrence

In a syllabus of mine, they try to find a closed form of the following recurrence relation $$\begin{align*} T(2k) &\leq 3T(k) + ck & k \geq 1\\ T(1) &= 1 \end{align*}$$ The method I usually use to find the closed form of a recurrence is…
sxd
  • 3,504
3
votes
5 answers

Solution to the recurrence relation

I came across following recurrence relation: $T(1) = 1, $ $T(2) = 3,$ $T(n) = T(n-1) + (2n-2)$ for $n > 2$. And the solution to this recurrence relation is given as $$T(n)=n^2-n+1$$ However I am not able to get how this is obtained.
Mahesha999
  • 2,053
3
votes
0 answers

Solving the recurrence relation $a_k=3a_{k-1}+4a_{k-2}$ with $a_0=1$, $a_1=2$

Solve the recurrence relation $a_k=3a_{k-1}+4a_{k-2}$ with $a_0=1$, $a_1=2$ using characteristic equation. These are the steps I used. Is my work correct?
Knotts
  • 31
3
votes
1 answer

Solution to this recurrence?

Is there exists a solution to this recurrence. $$F(N,1) = N, N≥1$$ $$F(N,K) = \frac {1}{\lfloor\frac 1{F(N-1,K-1)} -\frac 1{F(N,K-1)}\rfloor} \;\;\;\;2≤K≤N$$ I tried to simplify the equation but i am not able to find F(1,2) and thus unable to…
Simpi
  • 59
3
votes
1 answer

Solving two-parameter linear recurrence with different initial values

I'm looking for a method to solve the well-known recurrence ralation with different initial values. The one-parameter linear recurrence is easier. Let's take a peek: $a_0 = \alpha$; $a_1 = \beta$; $a_{n+2} = a_{n+1} + a_n$ whenever $n \in \mathbb…
Yai0Phah
  • 9,733
3
votes
2 answers

Solving linear recurrences with repertoire method

$$\begin{align*} A_1 &= 0\\ A_{2n} &= 3A_n + n\\ A_{2n+1} &= 3A_n + n \end{align*}$$ I am trying to solve a recurrence of this form, after writing out small number I can see no pattern except it should be related to $3^{\lfloor\log n\rfloor}$. And…
3
votes
3 answers

Recurrence relation for a strictly increasing sequence

Find a recurrence relation for the number of strictly increasing sequences of positive integers such that the first term is 1 and last term is $n$, where $n$ is a positive integer. The sequence is: $a_1$, $a_2$, $a_3$, ... , $a_k$ and $a_1=1$,…
Vibhav
  • 115
3
votes
1 answer

How to solve this nonlinear difference equation $a_{n+1} = 2a_n + \frac{1}{a_n}$, $a_1 = 1$?

How to solve this nonlinear difference equation $$a_{n+1} = 2a_n + \frac{1}{a_n},\quad a_1 = 1.$$
wayne
  • 41
3
votes
1 answer

solving a recurrence

given the general recurrence equation $ a_{n+1}-a_{n}=f(n)a_{n+2}$ (1) is this possible to find a function $ g(x)$ so $ g(x)= \sum_{n=0}^{\infty}a_{n}x^{n}$ ?? where the $ a_{n}$ are the solutions of the recurrence (1) in case $ f(n)=const$ i know…
Jose Garcia
  • 8,506
3
votes
1 answer

Solving recurrence relation with repeating roots

I am aiming to solve this recurrence relation and I have chosen the Characteristic Equation method: $d_n = 4(d_{n-1}-d_{n-2})$ with $d_0 =1, d_1=1 $ Finding the C.E. I get: $x^2-4x+4=0$ Solving for the roots I get $(x-2)(x-2), x=2$, so repeating…
Huss
  • 303
  • 1
  • 6
3
votes
1 answer

Will this recurrence yield $(4,2,0)$?

Consider the recurrence $$(a,b,c)\mapsto \left(\frac{3a+4b}{5}, \frac{4a-3b}{5}, c\right)$$ and suppose that we start with $(2,3,2)$, and allow swapping positions before applying the recurrence again. If we start with $(2,3,2)$, will we be able to…
yiyi
  • 7,352
3
votes
3 answers

Solving Recurrence Relations using Iteration

$$a_0 = 2; \qquad a_k=4a_{k-1}+5 ~ \forall\ k\ge 1$$ I have already tried solving for $a_1$ through $a_5$.
3
votes
3 answers

How to solve the recurrence T(n) = T(⌈n/2⌉) + 1 is O(lg n)?

How do you solve the recurrence $T(n) = T(⌈n/2⌉) + 1$ is $O(\lg n)$? In this explanation, I don't understand how the guess is made: We guess $T(n)\le c \lg(n−2)$: $$ T(n)\le c \lg(⌈n/2⌉−2)+1 \le c \lg(n/2+1−2)+1 $$ $$ \le c \lg((n−2)/2)+1 \le c…
Student
  • 141