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
1
vote
2 answers

solve the following recurrence exactly.

$$t(n)=\begin{cases}n&\text{if }n=0,1,2,\text{ or }3\\t(n-1)+t(n-3)+t(n-4)&\text{otherwise.}\end{cases} $$ Express your answer as simply using the theta notation. I don't know where to go with this. $$t(n) - t(n-1) - t(n-3) + t(n-4) = 0$$ Is the…
1
vote
2 answers

How do we solve the exact recurrence for $T(1) = 1, T(n) = 3T(n - 1) + 2n + 2$ for $n > 1$?

This looks like an exponential recurrence due to the 3 behind $T$, but I'm not sure how to formally solve for $T(n)$ without $T$ on the righthand side.
David Faux
  • 3,425
1
vote
1 answer

Difference equation - counting problem

I need to to define difference equation for following problem and solve that equation using generating function. Border of length 10cm is made of small bricks (10cm long) and large bricks (20cm long). Small bricks come in 2 colours and large bricks…
mikolaj
  • 11
1
vote
1 answer

Difference equation formula $\sum a^t = \frac{a^t}{a-1}$.

As I explain below, this question was originally posted by user YYG, but then deleted. I am reposting the question (from memory) and I will answer it myself below. Question: In Difference Equations by Walter Kelley and Allan Peterson, 2ed., p. 22,…
1
vote
2 answers

Recursive function definition, how does my teacher arrive at this answer?

I am currently revising for my maths exam in school and there is a section on recursion. The question is explained as follows: $$f(m, n) =\begin{cases} n + 1 &\text{if } m = 0\\ f(m − 1, 1) &\text{if } m > 0 \text{ and } n = 0\\ f(m − 1, f(m, n…
1
vote
1 answer

Finding explicit formula for recurrence relation?

What would a explicit formula for this sequence? a_k = a_(k-1)/k? The way I find explicit formula is to write out some terms but this time it's not working.. I'd appreciate your help!
user48601
1
vote
2 answers

Solving recurrence $T(n)=T(n-1)+3^{n-1}$

I have trouble solving following recurrence. $$T(n)=T(n-1)+3^{n-1}$$ So far I tried annihilators but it doesn't work.
user109319
  • 25
  • 3
1
vote
2 answers

Solving a recurrence relation in 2 variables

Given this sequence $Q_1(x)=x$, $Q_{n+1}(x)={Q_n(x+1)\over Q_n(x)}$, with $n>=1$, how can I get the explicit n-th term relation? More precisely, $Q_n(x)=$ ? (when $n>=0$) I'm eager to learn a method for expliciting this multi-variable recurrences in…
Daniel C
  • 629
1
vote
1 answer

Show that $=a_n$ ($$: rounding function)

I would appreciate if somebody could help me with the following problem Q: Let $(2+\sqrt{3})^n=a_n+b_n\sqrt{3}$ $(a_n,b_n,n\in\mathbb{N})$ . Show that $=a_n$ ($$: rounding function)
Young
  • 5,492
1
vote
3 answers

Can Master Theorem be applied on any of these?

1) $T(n) = 6T(n/2) + 2^{3 \log(n)}$ 2) $T(n) = 8T(n/2) + \frac{n^3}{(\log(n))^4}$ 3) $T(n) = 9T(n/3) + n(\log(n))^3$ Can the complexity for these be calculated with the Master Theorem? I am not sure how to decide upon which case they fit in.
Alex
  • 235
1
vote
1 answer

2nd order homogeneous repeated roots

$$a_{n+2}-6a_{n+1}+9a_{n}= 3^n \quad n\geq 0 \quad a_{0}=2 \quad a_{1}=3$$ Got repeated roots of 3, so $a_{n}= A\cdot3^n+b\cdot (n\cdot3^n)$ how would i calculate A+B when there is $3^n$? Edit: So i calculated $a_{n}=6\cdot3^n - n\cdot3^n$ can…
1
vote
0 answers

finding a recurrence relation for tile covering problem

for $n \ge 1$ let $t_n$ be the number of ways to.cover the squares of a 2xn xheckerboard using 1x2 tiles which can be rotated (ie 2x1 tile) and 2x2 tiles. 1x2 tile comes in 5 different colors and 2x2 tile in 4 different colors. find and solve a…
1
vote
2 answers

$a_{n}=C \alpha^{n}$ where $C\in R$ a general solution to difference equation $a_{n+1}-\alpha a_{n}=0$?

Suppose $T(N) = 2 T(\frac{N}{2}) + N$, where $T(1) = 0$ and $N = 2^{n}$ where $n \in N$. I get $ \alpha ^{n-1} (\alpha -2) = \frac{n}{C}$, using the general difference equation formula. My sketch: 3^{n-1} T(n) n 1 0 1 3 2 …
hhh
  • 5,469
1
vote
2 answers

Recurrence Relation for max and min of a sequence

Please observe the following How many comparisons are needed to locate the Maximum and minimum elements in a sequence of 128 elements. Using the following : $$f(n) = 2 f(n/2) + 2,$$ where $f(1) =0$. My work: $$f(n) = 2 f(n/2)+ 2$$ If this is a…
MahimA
  • 193
1
vote
2 answers

Solving a recurrence relation using repeated substitution

So, basically I am having a big issue with this recurrence relationship: $$T(n) = T(n-1)+n, T(1) = 0$$ using repeated substitution I get down to: $$i=1, T(n-1) + n$$ $$i=2, T(n-2) + 2n - 2$$ $$i=3, T(n-3) + 3n - 3$$ $$T(n) = T(n-i) + i*n - i$$ Base…