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

Showing that a given recurrence relationship equals sin(nx) - please advise me how to come to a conclusion at the end?

If, $u_{r}-2\cos\theta u_{r-1}+u_{r-2}=0$, given $u_{0}=0$, $u_{1}=\sin \theta$, find $u_{n}$ My workings: I rearranged to get, $u_{r}=2\cos\theta u_{r-1}-u_{r-2}$ Then starting with $r=2$, $u_{2}=2\sin \theta \cos\theta \implies u_{2}=\sin…
Nicko
  • 69
0
votes
0 answers

Closed form of a recurrence relationship

So in my discrete mathematics course, we were working on recurrence relationships, and we mostly worked with basic ones that I was able to solve. But the next day, my professor gave the class a challenge problem that no one solved, and I am curious…
0
votes
2 answers

What is the solution (tightest upper bound for runtime) of $T(n) = 2T(n/4) + O(n^2 \log n)$?

I'm trying to find the tightest upper bound for runtime of a function whose recurrence relation is the following: $T(n) = 2T(n/4) + O(n^2 \log n)$ I got $O(n^2 \log n)$ but I'm not sure if that is correct. I arrived to the solution using the…
0
votes
2 answers

How was a factorial/gamma function obtained from solving this recurrence relation?

So I came up with the following recurrence relation for $m \geq 2$ and initial value $a_1 = 1$: $$a_m = m+(m+1)a_{m-1}$$ Putting this result into Wolfram Alpha yields the following closed form: $$a_m = \Gamma(m+2) - 1$$ I get how factorials/the…
sywy
  • 3
0
votes
0 answers

Variant of Tower of Hanoi - Relax the restriction that no disk may be placed on top of a disk that is smaller than it

(I have no idea how to simplify the title. You can change it to make it briefer.) In this variant of Tower of Hanoi, we relax the restriction that no disk may be placed on top of a disk that is smaller than it. Specifically, the three stacks each…
0
votes
0 answers

Solve the recurrence $T(n)=T(n-3)+\frac1{\log n}$

We must solve the recurrence $T(n)=T(n-3)+ \frac{1}{\log {n}}$ using substitution. I've got up to here $$T(n)=T(n-3-3)+\frac1{\log(n-3)} + \frac1{\log n} \implies T(n-3-3-3) + \frac1{\log(n-3-3)} + \frac1{\log(n-3)} + \frac1{\log n}$$ And after $k$…
0
votes
1 answer

What will be the base case here in this recurrence relation?

Problem: Lorenzo takes up a loan of 40,000. It is to be paid by annual installments of 2000 with first payment made at the end of the first year the loan was taken out. 3% interest is charged at the end of each year on the remaining debt. Model an…
0
votes
0 answers

Solving a recursive equation

So I'm working on a combinatorics problem, to which I've reached that $$f(1)=1, f(n)=1+\frac{1}{n}\sum_{k=1}^{n-1} f(k)$$ I have been working at this problem for a few days now, and I am fairly confident solving this recursive equation is the key to…
jbg05
  • 47
0
votes
1 answer

Finding a recursive definition for the following problems

I'm preparing for an upcoming exam on Discrete Maths, and I've come across the following past exam question which I don't quite understand: An ATM dispenses only \$20 and \$50 notes. Let M be the set of amounts of money that the ATM can…
Arvin
  • 1,733
0
votes
1 answer

$f(kx) = f(x)$: Proving the Constancy of a Function with a Recursive Property

Given a function $f:\mathbb{R}\to\mathbb{R}$ that is continuous at $0$, and such that there exists a non-zero natural number $k$ (not equal to $1$) for which $f(kx)=f(x)$, show that $f$ is constant.
0
votes
1 answer

Find the value of $x-y$ when $f(x) = 2006$

Let f be a function defined for all positive integers x and y satisfying the following conditions: $1)f(1, 1)=2$ $II. f(x+1, y)=2(x+y)+f(x, y)$ $III. f(x, y+1)=2(x+y-1)+f(x, y)$ The value of $x-y$ for what $f(x, y) =2006$ is ?(Answer:$-20$} I tried…
peta arantes
  • 6,211
0
votes
1 answer

Closed form for linear recurrence

$$ \mbox{Given the following sequence}:\quad a_{n + 1} = n + n\,a_{n}\quad\mbox{and}\quad a_{1} = 0. $$ How would one find the closed form of this $?$. This looks vaguely like something involving factorials. Finding the closed form is difficult,…
Allen
  • 53
0
votes
1 answer

linear recurrence equation with constant coefficients and initial conditions

We are given this linear recurrence relation: $$U_n=3\cdot U_{n-1}-2\cdot U_{n-2}$$ "Guess" that $U_n = x^n$ is a solution and plug into the recurrence relation: $$ x^n = 3x^{n-1} - 2x^{n-2} $$ Divide both sides by $x^{n-2}$, assuming $x \ne…
user122424
  • 3,926
0
votes
1 answer

Evaluation of $~y_k~$with $~y_{k+1}=(1-h)y_{k}-h~$ where $~k\in\mathbb{N}_{\geq0},~~y_0=0,~~h=\text{non-zero constant} $

$$ y_{k+1}=(1-h)y_{k}-h~~\text{where} ~~k\in\mathbb{N}_{\geq0},~~y_0=0,~~h=\text{non-zero constant} $$ I want to evaluate the general term of the sequence…
TG24
  • 443
0
votes
1 answer

Solution of a difference equation

I want to solve the following difference equation for all $00$: $$\frac{a_{k+1}-a_k}{h}=-a_k $$ with the condition $a_0=c$. Can someone explain how to solve equations of this kind?
user1072059