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

Deriving a recurrence relation for a ternary string

Consider ternary strings (consisting of only numbers $0,1,2$). For $n\geq 1$, let $a_n$ be the number of ternary strings of length $n$, where there are no consecutive $1$'s or $2$'s. Find a relation for $a_n$. This is my attempt: Call a ternary…
Natash1
  • 1,379
0
votes
1 answer

How to calculate the year by the difference model?

A humanoid skull is discovered near the remains of an ancient campfire. Archaeologists are convinced the skull is the same age as the original campfire. It is determined from the laboratory testing that only 1% of the original amount of carbon-14…
0
votes
2 answers

$T(n) = nT(n − 1), T(1) = 1$ for $n ≥ 1$

Hey I was wondering if anyone knows how to solve this recurrence relation by repeated substitution? $T(n) = nT(n − 1), T(1) = 1$ for $n ≥ 1$ Thanks.
Tlm
  • 1
0
votes
1 answer

Tower of Hanoi and constructing a recurrence relation

In the Tower of Hanoi game, we have three pegs A, B, and C, with a pile of n rings on peg A such that each ring has a smaller diameter than the ring immediately below it and thus the largest ring is at the bottom of the pile. The aim of the game is…
Natash1
  • 1,379
0
votes
2 answers

Recurrence relation construction

Find a recurrence relation for number of ways to lay out a walkway with tiles if tiles are red,green or grey so that no two red tiles are adjacent and tiles of the same colour are considered indistinguishable. Why is my method wrong? Let $a_n$ be…
0
votes
0 answers

How to find number of recursive call from result value?

I have following recursive equation y(0) = 0 x(0) = 0 y(n+1) = If((x(n)<50) then (y(n)+1) else (y(n)-1)) x(n+1) = If((If((If((x(n)<50) then (y(n)+1) else (y(n)-1))<0) then 1 else 0)==0) then (x(n)+1) else…
Tom
  • 291
0
votes
1 answer

That method am I supposed to use here? Recurrence Relations

How am I meant to solve B? I've done A it goes as follows:- Sequences may be generated by recurrence relations of the form $U_{n+1}=kU_n-20, U_0=5.$ A) Show that $U_2=5k^2-20k-20$ B) Determine the range of values of K for which $U_2 \lt…
0
votes
1 answer

How to solve this particular recurrence?

$x_{n+1}=((n+1)/n)x_{n}+x_n+n+1, x_1=5$ I have calculated $x_2= 17, x_3= 35.5, $ But I don't know how to go forward. Please help.
0
votes
3 answers

How to solve this particular recurrence relation?

$x_{n+1}= 2nx_n+1$, $n\geq 0$, $x_0$=0 I tried by putting $n=0, 1, 2, 3, ...$ and got $x_0= 0$, $x_1= 1, x_2= 3, x_3= 13, x_5= 79$ I have one more 2. $x_{n+1}=((n+1)/n)x_{n}+x_n+n+1, x_1=5$ I have calculated $x_2= 17, x_3= 35.5, $ But I can't…
0
votes
0 answers

General Method For Recurrent Relations To General Formula

There's a famous problem "How many regions n lines could make at most in euclidean plane?" I solved it into below recurrent relation: $r_n = 2(r_{n-1} - _{n-1}\mathbf C_2) + _{n-1}\mathbf C_2$ embeded intuition in above relation is simple. Line…
Beverlie
  • 2,645
0
votes
3 answers

Can the recurrence relation provide a stable means for computing $r_n$ in this case?

If the recurrence relation $r_{n+1}=r_n+r_{n-1}$ is used with starting values $r_0=1$ and $r_1=(1-\sqrt{5})/2$, what is the theoretically correct value of $r_n$ ($n\geq 2$)? Can the recurrence relation provide a stable means for computing…
0
votes
1 answer

Solving simple linear recurrences with generating functions

I know how to solve sequences like the Fibonacci using generating functions, but how do you solve recurrences when there is a constant? A simple example would be $a_{n+1}=2a_{n}-1, a_0=0$. The generating function of this would be result in…
dcxt
  • 614
0
votes
2 answers

Solve the recurrence $T(n) = 2T(\frac{n}{2}) + \frac{n}{\log(\log n)}$

I've been trying to solve this recurrence relation in my advance algorithms paper. I've found that the Master method doesn't work. I tried using an iterative method up to an extent, and then substituted $n = 2^{2^i}$ as…
Vishnu Vivek
  • 1,441
0
votes
1 answer

Equilibrium in system of non-linear difference equations

I have a little question. I want to know if there is a process in which I can find equilibrium solutions to some system of difference equations. For example, if I have something crazy like \begin{cases} x[n+1]=(x[n])^2y[n]+z[n]e^{-ax[n]} \\[3mm]…
davidaap
  • 708
0
votes
1 answer

Is there an analytical solution (or approach) for n in recurrence relation?

Suppose I have the following recurrence relation: $$ E_{n+1} = E_{n} \ \left[ 1 + \left( \frac{ 2 \ \lambda }{ \sqrt{E_{n}} } \right) + \left( \frac{ \lambda }{ \sqrt{E_{n}} } \right)^{2} \right] \tag{1} $$ where $\lambda \in R$ is some known,…