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

Recurrence relation $ 2y_n = 11 y_{n-1} -20y_{n-2}+12y_{n-3}+2 $

I am really not an expert in mathematics. I'd like to solve the problem $$ 2y_n = 11 y_{n-1} -20y_{n-2}+12y_{n-3}+2 $$ with $y_0 = \frac{9}{8}$, $y_1 = \frac{-5}{4}$ and $y_2 = \frac{-1}{2}$ Could you explain to me how to solve such problem?
0
votes
1 answer

Find a recurrence relation for the number of sequences of $ \ 1s, \ 3s, \ and \ \ 5s \ $

(a) Find a recurrence relation for the number of sequences of $ \ 1s, \ 3s, \ and \ \ 5s \ $ whose terms sum to $ \ n $ (b) Repeat part $ \ (a) $ with the added condition that no $ \ 5 \ $ can be followed by a $ \ 1 \ $ (c) Repeat part $ \…
MAS
  • 10,638
0
votes
1 answer

deriving a solution to a difference equation

I am reading about difference equations (I have very little background in them ) in an economics book and it has an example where there are two statements neither which I have been able to derive. So, I repeat below what is in the book: Suppose we…
mark leeds
  • 1,514
0
votes
2 answers

converting a recursive formula into a non-recursive formula.

We found a recursive formula for the following problem: For any positive integer $n$, let $b(n)$ be the number of ways that you can write $n$ as a sum using only the numbers 1, 2, and 3 where the order of the sum doesn’t matter. our recursive…
meaden
  • 1
0
votes
2 answers

Consecutive ones (Recurrence)

I am studying for my exam and this is an example I don't understand: Consider all words in $\{1,2,3\}$ with n characters. We know from combinatorics that there are $3^n$ different words. Question: How many words have at least two consecutive…
0
votes
1 answer

Solve a recurrence using binary search

For this following recurrence: $$f(0) = 1,\\ f(1) = 1,\\ f(2) = 2,\\ f(2t) = f(t) + f(t + 1) + t\text{ (for }t > 1),\\ f(2t + 1) = f(t - 1) + f(t) + 1\text{ (for }t \ge 1).$$ After thorough research i know that this should be solved using a binary…
0
votes
0 answers

How do you substitute for a recurrence equation ( relation )?

Let $T(0) = 0$ and $T(n) = 1 + T(n/2)$ for $n > 0$. Which one of the following is a solution for $T(n)$ when $n = 2^{m}$. a. $T(2^{m}) = m + 1$ b. $T(2^{m}) = m$ c. $T(2^{m}) = m - 1$ d. $T(2^{m}) = 2m$ e. $T(2^{m}) = 2^{m}$ $f$ a recurrence…
0
votes
1 answer

non homogeneous recurrence relations

how to solve the particular equation of this problem Im not able to equate the polynomial formed I have taken $a_n(p) = A_0+A_1n+A_2 n^22^n$ is it right ? $a_n-4 a_{n-1} + 4a_{n-2} = 3n + 2^n$ ?
0
votes
2 answers

Prove the correctness algorithm for computing the $n$th Fibonacci number.

Prove correctness of the following algorithm for computing the $n$th Fibonacci number. algorithm fastfib (integer $n$) if $n \lt 0$ return $0$; else if $n = 0$ return $0$; else if $n = 1$ return $1$; else $a \leftarrow 1; b \leftarrow…
jhg
  • 77
0
votes
1 answer

How to solve the following recurrence relation question?

Solve the recurrence relation $$f(n) = f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = 2, f(1) = 1$. Give full details. The following is what I have done: - try $f(n) = r^n$, for some fixed $r$. - $r^n = r^{n - 1} + r^{n - 2}$ - equation =…
jhg
  • 77
0
votes
1 answer

Solving homogenous recurrence relation

Solve the recurrence relation $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers). I'm confused on how to approach this, a and b are fixed, arbitrary integers.
M.Jones
  • 357
0
votes
1 answer

Recurrence relation house 3 color painting

It's my first time trying to create recurrence relation . I am trying to build and expalin recurrence relation for the 3 colors house painting problem : There are a row of n houses, each house can be painted with one of the three colors: red,…
benz
  • 101
0
votes
2 answers

Solving recurrence relation. Recurrence

Solve the recurrence relation $$f(n) = 2f(n - 1) + f(n - 2)$$ with initial conditions $f(0) = a, f(1) = b$. (here a and b are fixed, arbitrary integers). Can anyone show me how to solve this? a and b are fixed, arbitrary integers. Does it mean I…
jhg
  • 77
0
votes
0 answers

How do I find the initial conditions for linear homogeneous recurrence relations

So I have this equation: $$a_n = −a_{n−1 } + 6a_{n−2}$$ How do I find the solution to this? Everywhere I look, everyone is using some initial conditions to solve it, but I don't get those in my paper, only this equation.
0
votes
2 answers

Explicit formulas for non-linear recurrence relations

It seems that recurrence relations like Hofstadter's Q-series, in which nested calls to the relation occur, i.e. Q(n) = ...Q(...Q(...)...)..., don't appear to have explicit formulas listed. My introductory textbooks only offers solutions to various…
sshine
  • 135