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

Getting the recurrence formula with a condition

Get the recurrence formula of $$U_n=2(-3)^n-5n(-3)^n$$ For $$n \geq 1$$ What am I supposed to do with this condition $n\geq 1$?
Saturn
  • 7,191
2
votes
4 answers

How to form a recurrence for a $n$-digit sequence using digits $0,1,2,3$ so that we have even no of $0$'s?

If we assume $T(n)$ to be the function representing the case where we have even number of $0$'s then $T(1)=3$ precisely strings $1, 2$ and $3$. $T(2)= 10$ ($00,11,22,33,12,21,13,31,23,32$). Likewise I got $T(3)=36$ and $T(4)=124$. Now how to…
2
votes
2 answers

I am having trouble solving $T(n) = T(n/2) + n^2$

I am working with the equation $T(n) = T(n/2) + n^2$, given $T(1) = 0$. I started by using backwards substitution arriving at $T( ( ( n - 1 ) / 2 ) + ( n - 1 ) ^ 2 ) + n ^ 2$ and eventually arrived at $T( ( n - k ) / 2 )$ + the summation of…
2
votes
1 answer

Fibonacci sequence emerging from integer partitioning

Let $a_n$ count the number of ways a sequence of $1$s and $2$s will sum to n. For example $a_3 = 3$ since $1 + 1 + 1 = 3 = 1 + 2 = 3 = 2 + 1 = 3$ (The ordering matters so 1 + 2 is different from 2 + 1). Find $a_4$ and $a_5$ I think that $a_4 =…
alkabary
  • 6,214
2
votes
1 answer

Homework help with Non-homogeneous Recurrence Relations

I solved this problem but am not super confident with my methods, if someone could take a look at it and tell me if it looks okay, that would be great. Solve the following non-homogeneous recurrence…
2
votes
1 answer

Solve the following homogeneous recurrence relation

$a_n=2a_{n-1}-a_{n-2}$ $a_{0}=a_{1}=2$ $x^{2}=2x-1$ $x^{2}-2x+1=0$ $(x-1)^2=0$ $x=1$ $a_{n}=(α+βn) 1^{n}$ $(α+β(0)) 1^{0}=2$ $α=2$ $(α+β(1)) 1^{1}=2$ $α+β=2$ $a_{n}=2$ I can't seem to find of anything I did wrong. It seems weird that this would be…
2
votes
0 answers

Solving quadratic recurrence relation

I'm seeking a solution (if one is known to exist) to the following recurrence relation: $x_{t+1}^2 = ax_t+bx_t^2$. where $a\in(0,1)$, $b\in(0,1)$. I know $x_0\in(1,3)$, but its value varies case-by-case within that range. Ideally the solution would…
John
  • 57
2
votes
1 answer

Linear recurrence problem

Solve linear recurrence f(1) = 12, f(2) = 16, f(n) = 4f(n − 2). Hint: the solution has integer coefficients, so if you get square roots and/or difficult fractions, it’s likely that you have made a mistake somewhere. So far i got: f(n) = x² f(n) =…
2
votes
1 answer

Recurrence of Log function

I have the equation $T(n) = 4T(n/2) + n + log(n)$ for $n\ge2$. I am considering the case where $n=2^k$ I have come to the conclusion that $T(n)$ follows the following formula: $$\begin{align*}T(n) = [n+\log(n)] & + 4[(n/2)+\log(n/2)] + 4^2[(n/2^2) +…
canton
  • 129
  • 8
2
votes
1 answer

Recurrence & Rate of Growth

I have the equation $T(n) = T(n-2) + n^5 + n$ for $n\ge2$. I want to write $n$ in the form of $bk+r$. Thus $n=2k+r$ where $0\le r<2$, i.e. $r=0$ or $r=1$. I have come to the conclusion that $T(n)$ follows the following formula: $$\begin{align*}T(n)…
canton
  • 129
  • 8
2
votes
3 answers

Can $(2k-2)2^{k-1}$ be simplified to $(k-1)2^k$?

I'm working on solving some recurrence relations and following along with a couple of example solutions. One is my lecture notes. The other which closely matches in form is answered in this post: How to solve this recurrence $T(n) = 2T(n/2) + n\log…
ThisClark
  • 145
2
votes
2 answers

Solve the recurrence relation: $T_n=\sqrt nT_{\sqrt n} +1$

Try to solve it over similar methods , but I can not give the answer $T_n=\sqrt nT_{\sqrt n} +1$ Can anyone arrive at the solution?
2
votes
5 answers

How can I solve this recurrence relation: $a_n = 3a_{n-1} + \frac{4^n}{4}$?

How can I solve the following recurrence relation? $$a_n = 3a_{n-1} + \frac{4^n}{4}$$ I know that $a_n^{(h)} = 3a_{n-1}$ and that the characteristic equation is: $$r-3 = 0$$ and thus: $$a_n^{(h)} = \alpha_1(3)^n$$ I am struggling with the particular…
Julia
  • 496
2
votes
2 answers

Find and solve a recurrence equation for the number “gn” of ternary strings of length n that do not contain $102$ as a substring.

Find and solve a recurrence equation for the number gn of ternary strings of length n that do not contain $102$ as a substring. I am having some trouble finding the recurrence relation for this question. My thinking is that you can set this…
2
votes
2 answers

Solving recurrence relation without initial condition

Any idea on how I can approach this recurrence relation? It is very different to other questions I have encountered where there is only one term of $T(n)$ on the RHS, and the initial condition isn't given as…
plo009