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

Question about recurrences algorithm design and anaylsis

I have a question about recurrences. The following problem is: $a_k = 0$ if $k = 0$, $a_k = a_{k−1} + 3k + 1$ if $k > 0$ I need to: write out the first six terms of recurrences, make a guess for explicit formula an, and prove using induction. Any…
Josh A
  • 9
-1
votes
2 answers

Suggestion to solve the equation

Suggestion to solve the equation: $$T(n)=2T(n-1)+\frac{1}{n}+1?$$
Polycom
  • 1
  • 1
-1
votes
3 answers

How do you find the general term on the recurrence relation?

How do you find the general term of this recurrence relation? $b_n = 3b_{n-1}+3^{n-1}, n \geq 2$ $b_1 = 1$ Thank you.
-1
votes
1 answer

Solving a homogeneous recurrence relation

How to solve $$a_n=4a_{n-1}-4a_{n-2}$$ $a_0=6$ and $a_1=8$ I found first few terms as $$6,8,8,0,... $$ But I don't know how to proceed.
user614828
-1
votes
1 answer

Finding a closed form expression for the following recurrence relation.

Given that: $S_0 = 0$ $S_1 = 3$ $S_n = S_{n-1} + 6S_{n-2}$ for $n ≥ 2$ What are the steps I would take to find the closed form expression for the following recurrence relation?
Tiffany
  • 103
-1
votes
1 answer

How does the following evaluate?

We have a recurrence as follows: $$T(n) = 2T\left(\sqrt{n}\right) + \log n$$ Renaming $m = \log n$ yields $$T(2^m) = 2T(2^{\frac{m}{2}}) + m$$ Renaming $S(m) = T(2^m)$ new recurrence becomes: $$S(m) = 2S\left(\frac{m}{2}\right) + m$$ How does…
Navjot Singh
  • 109
  • 5
-1
votes
1 answer

How to solve this recurrence T(n)=2T(n/5)+3T(n/10)+n

i need to solve the teta notation for $T(n)=2\cdot T(\frac{n}{5})+3\cdot T(\frac{n}{10})+n $ but the recursive calls each one multiplied by a different factor make it not solvable with the master theorem , and I can't figure out how the recursive…
-1
votes
2 answers

How do I turn the equation of a set into the equation of a line?

The equation of my set is: X(i) = 1.1 * X(i-1) + 10 where X(i) = 10 I want to know how to turn this into a equation into which I hope to insert a value of X(i-50) (for example) and find X(i) or graph on a graphic calculator.
rpgstar
  • 101
-1
votes
1 answer

Solving recuurence equation $T(n)=3T(n/2)+cn$

Please check my solving process. Using recursion tree method for $T(n)=3T(n/2)+cn$, \begin{align} T(n)&=\sum_{i=0}^{\log_2 n}\frac{3^i}{2^i}cn\\ &=cn\sum_{i=0}^{\log_2 n}(\frac{3^i}{2^i})\\ &=cn\frac{(\frac{3}{2})^{{\log_2…
haram
  • 147
-1
votes
3 answers

Help needed in recurrence relation

I missed one of my class today morning where in Recurrence Relation was conducted. In the solution to one problem the following stage is reached: $C_0+\frac{C_1}3+\frac{C_2}9=0,\,C_0+\frac{C_1}4+\frac{C_2}{16}=0$, and $2(C_0+C_1+C_2)=6$. Solving…
-1
votes
1 answer

difference equation $(y_{n+1}-2y_n+y_{n-1})-\frac{h}{2}(y_{n+1}-y_{n-1})-6h^2y_n=0$

$$(y_{n+1}-2y_n+y_{n-1})-\frac{h}{2}(y_{n+1}-y_{n-1})-6h^2y_n=0$$ Show that solution is approximately $(1-2h)^n$ when $n$ tends to infinity and $0
Steve
  • 868
-1
votes
2 answers

How to solve this equation with recurrence

How can I solve the equation below with a recurrence procedure? Show, with the help of reasoning by recurrence, the following equality $$\sum_{k=1}^{n}(-1)^k \cdot k^2=(-1)^{n} \cdot \sum_{k=1}^{n}k$$
-1
votes
1 answer

Solution for a recurrence

Need hints/solution to solve for a in terms of n in the equation: $$a = \sqrt{n} + \sqrt{a}$$ I'm actually trying to get and solve the recurrence for the following piece of code: while (n > 1) { n = (long)Math.Sqrt(n); // do something } I…
-1
votes
1 answer

Recurrence function / induction

Let $$T(n):=\begin{cases} 3 & \text{if }n=1\\ 4 \cdot T(n/4) + 3 & \text{if }n>1\end{cases}$$ Prove that $T(n) = 4n − 1$ for all $n \geq 1$. Base case: When $n = 1$, LHS $= T(1) = 3$, RHS $= 4 \cdot 1 − 1 = 3$. Therefore, LHS = RHS LHS = Left…
Tudor
  • 1
-1
votes
2 answers

How can I solve this exponential recurrence relation?

Does anyone know how to solve $a_{n+1}=1-Ce^{-a_n}$ explicitly for $a_n$ in terms of $n$ and $a_0$, where $C$ is constant?
SAM
  • 178