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

Tower of Hanoi Problem: Two Dimensions

I'm reading Knuths Concrete Mathematics and trying to solve my own questions as I read through the book. Right now, I want to solve a variant of the tower of Hanoi problem - solving for minimum number of moves T(n) to shift n disks from one tower to…
theideasmith
  • 1,090
0
votes
1 answer

Recurrence of $T\left(n\right)=\:T\left(\frac{n}{2}\right)+n$

Recurrence of $T\left(n\right)=\:T\left(\frac{n}{2}\right)+n$ where T(1) = 1. I know the Master Theorem is applicable here, but I have to prove it. I found a question similar to mine on this forum, but I didn't really understand the answer given. I…
MikhaelM
  • 1,473
0
votes
2 answers

Linear Recursion with backtracking

I have been trying to solve this question for hours. But can't seen to figure out how to solve it by backtracking. Is my current step correct? May I get some help how to continue and derive the simplified solution.…
0
votes
1 answer

Recurrence Relation for QuickSort

Suppose a special recurrence relation for quicksort is: $T(0)=\Theta(1)$ (N>0) $T(N)= T(N-1)+T(0)+\Theta(\sqrt{N}) $ How does this relate to the theta class of: $\Theta(N \sqrt{N})$ ? Can someone please help me understand why this takes place…
InNeed
  • 1
0
votes
1 answer

How to derive the general solution of a recurrence relation?

I know for a recurrence relation $$X(n)=c_1X(n-1)+c_2X(n-2).....+c_kX(n-k)$$ the characteristic equation is $$X^n=c_1X^{n-1}+c_2X^{n-2}+...$$ I know the general solution if all roots are equal is…
0
votes
1 answer

Solving heterogeneous successions

I know how to get the explicit formula for homogeneous successions, kinda. What I do is get the characteristic equation, get the solutions and then solve a system to obtain the values of A,B,C... constants to build the explicit formula. ... But what…
Saturn
  • 7,191
0
votes
4 answers

$f(n) = 2f(n-1) -f(n-2) + 1$ find closed form by repeated substitution

$$f(0)=a$$ $$f(1)=b$$ $$f(n) = 2f(n-1) -f(n-2) + 1$$ How can I begin repeated substitution with this? I'm confused because there are two $f$ terms not sure how to sub for both of them.
rm120
  • 91
0
votes
4 answers

How to confirm if my explicit formula is right?

I have to determine an explicit formula for $$a_n=5a_{n-1}+6a_{n-2}$$ Initial values are $$a_0=2\\a_1=-1\\n>=2$$ My answer is $$a_n = \frac{1}{7}\cdot 6^n+\frac{13}{7}\cdot (-1)^n$$ Which I suspect is wrong. But, how to "test" it?
Saturn
  • 7,191
0
votes
1 answer

Convert recursive formula to explicit formula using backtracking

This is a question from the book Discrete Mathematical Structures by Bernard Kolman, Robert C. Busby and Sharon Cutler Ross. I want to find the explicit formula of the following recursive formula using backtracking: $$C_n = C_{n-1} + n$$ The initial…
Saiyan
  • 25
0
votes
3 answers

Solving linear recurrence for large n

I came across this recurrence function: $$F(n) = a \times F(n-1) + b$$ where $F(0) =1$. We have to solve for $F(n) \pmod {m}$ But for very large $n$, solving it with computer is also taking time. Is there anyway to simplify this. I think the…
0
votes
1 answer

Solving a $2$ variable recurrence

I have a recurrence relation defined as : $A(i, j) = A(i, j-1) + A(i+1, j)$ where both $i$ and $j$ are less than a fixed variable $N$. Also, $A(i,1) = 1\:\:$ for all $1 \leq i \leq N$. $A(N, j) = 1\:\:$ for all $1 \leq j \leq N$. How do I proceed…
rkabhishek
  • 115
  • 6
0
votes
0 answers

Mistake in recurrence relation text book?

I'm sorry for posting this here, but I would like to confirm my doubt about the correctness of the systems of equation in the textbook example. I enclosed an image.
jhuk
  • 359
0
votes
1 answer

Non-homogenous recurrence relation. How to find the particular solution?

I have enclosed one image of two textbook pages. There is a system of equation (see frame) on page 2. I do not understand why both terms can be set equal to 0 (zero)to solve it. Thank you for the assistance.
jhuk
  • 359
0
votes
0 answers

Solving two variable(dependent) recursion relation

I have the following recursion relation: $d(m,k)=d(m-1,k) + d(m-1,k-1) + ... + d(m-1,k-\min(k+1,m)+1); \hspace{2cm} m=1,2,3,...; k=0,1,2,...,\binom{m}{2}.$ with the following conditions $d(m,0) = 1, d(1,k) = 0 \text{ for } k>0.$ For $k \leq m-1,$…
sankha
  • 11
  • 2
0
votes
2 answers

differential equation resolution

I need some help, I've tried to solve it since yesterday but i failed.As usually, I need to find $y(x)$ which is the solution of the differential equation. Here is the equation: $$ (1+x^2)y^3dx-(y^2-1)x^3dy = 0,\qquad y(1) = -1 $$ It is supposed…
mhfff32
  • 103