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

Is this statement true? If so, how to prove it?

I'm working as an assistant in an algebra course. We're looking at homigenous linear recurrence relations of second order. For real valued initial conditions, is it possible for the constants in the solutions of the homogenous linear recurrence…
0
votes
0 answers

Complex roots in recurrence relation

I was reading brilliant wiki on recurrence relations. It says, if the characterstic polynomial has complex roots. Say $$r=2e^{\pm i\theta}\\\text{where }\theta=\arctan(\sqrt{15})\\\text{for relation }x_n=x_{n-1}-4x_{n-2}$$ Then the solution are…
Anvit
  • 3,379
0
votes
2 answers

Linear non-homogeneous recurrence relation $a_n-3a_{n-1}+2a_{n-2}=3^n-2$

For solving $$a_n-3a_{n-1}+2a_{n-2}=3^n-2,$$ I tried as follows: For the homogeneous part the characteristics equation is : $r^2-3r+2=0\implies r=1,2$. So, $$ a_n^h=A(1)^n+B(2)^n=A+B2^n $$ Now how will I guess the particular solution? For that…
XYZABC
  • 1,053
0
votes
1 answer

recursive algorithm. Is my recursive tracing right?

I wanted to know if I have been tracing this recursive algorithm right: foo(x,y) x is an integer and y a non-negative integer if y == 0 return x else return (foo(x, y-1))^3 for: x = 1 , y= 1. I got 1 for this one x=2 y=3. I got 134,217,728 x=3 y=2.…
Jenjen
  • 29
  • 4
0
votes
3 answers

Is there an equation for this?

So I want to have a grouping where 50% of the right-most length of a line (segment) contains 25% of the 'units' being grouped. I then want the remaining 75% of the units grouped in to the remaining 50% of the line. Next, I want to repeat the…
0
votes
1 answer

How to solve $T(n)=4T(n/4)+n^2$ by recursion tree and master theroem?

My solution is different between master thereom and recursion tree... How to solve it? Recursion Tree In the problem, when n=1, T(n)=c (constant). So In recursion tree, I found pattern. $4^0\frac{n^2}{4^0}, 4^1\frac{n^2}{4^1},…
haram
  • 147
0
votes
1 answer

Solving a system of recurrence equations based on a Markov process

I'm having some problem to solve a system of recurrence equations, which happens to represent a Markov process. Its matrix of coefficients is {(0,0.5,1),(1,0,0),(0,0.5,0)} and calculating its eigenvalues I got a real value and two complex. I'm using…
0
votes
0 answers

error in finding positive solution space boundary for difference equation

$$\begin{pmatrix} D(t) \\ P(t) \\ R(t) \\ 1 \end{pmatrix}= \begin{pmatrix} 1 & \frac{-1}{20} & 0 & 1 \\ \frac{1}{100} & 1 & \frac{-1}{10} & 0 \\ \frac{-1}{100} & 0 & 1 & 1 \\ 0 & 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} D(t-1) \\…
Summyia
  • 33
0
votes
4 answers

Solve the recurrence relation where $S_n=3S_{n-1}+3;S_0=10$

Solve the recurrence relation where $S_n=3S_{n-1}+3;S_0=10$ I tried using the iterative method but I am completely lost. Any help is much appreciated.
nova_star
  • 463
0
votes
0 answers

How to solve $a_{n+1} = P/(P-1)$, where $P := \prod_{i=1}^{n}a_{i}$.

I really don't know where to start here. I have looked at "Rational Difference Equation" on Wikipedia, but found nothing useful. The recurrence I am trying to solve is $$a_{n+1} = P/(P-1), \text{ where } P_{n-1} := \prod_{i=1}^{n}a_{i},$$ where…
Freddie
  • 1,759
0
votes
1 answer

Arrangements of roots in recurrence relations

I came across the recurrence relation $T(k)-7T(k-2)+6T(k-3)=0$ where $T(0)=8,T(1)=6 $and $T(2)=22$. I found the roots of the characteristic equation to be $1,-3,2$ and the constants to be $1,2,5$. So, the solution $T(k)=5(1)^k+2(-3)^k+1(2)^k$. But…
Ayan Shah
  • 491
0
votes
2 answers

Solve the recurrence $T(n) = 5T(n/5) + n/\log(n)$

$T(n) = 5T(n/5) + n/\log(n)$ I tried everything but I can't solve this recurrence. I would love to know a way using the masters theorem.
Jurko Guba
  • 101
  • 1
  • 2
0
votes
1 answer

Recurrence relation for of bit strings of length n

Find a recurrence relation for the number of bit strings of length $n$ such that: number of all $0$s and $1$s is even. number of $0$s and number of $1$s is even. Thank you.
Maya
  • 55
0
votes
2 answers

Linear Nonhomogeneous Recurrence Relations

I have to find a formula for the recurrence $a_{n+1}=2a_n + 2^n$ with $a_0 = 3$. I've started to solving its associated equation $a_{n+1}=2a_n$ and I've found the solution $a_n =\alpha 2^n$. Then I know that a trial solution for the nonhomogeneous…
0
votes
4 answers

How do I solve the recurrence relation: $X(n) + 2X(n-1) - 8X(n-2) = 10$?

How do I solve the recurrence relation: $X(n) + 2X(n-1) - 8X(n-2) = 10$? I understand if the 10 was replaced by the 0, we could use the characteristic equation, but with that constant I am completely lost.. The initial conditions are $X(0) = 0$ and…