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

Finding Recurrence Relation of a Search algorithm

Suppose that we have a sorted array of integers $a[0],...,a[n]$ such that $$a[i] \le a[j] \text{ for } 0 \le i \le j \le n$$ A student designs the following algorithm that searches for an occurrence of an integer b in the sequence…
lucidgold
  • 1,054
0
votes
0 answers

Regularity condition of 3rd Case of Master Theorem. Need explanation

I do not understand how regularity expression was constructed in Wiki example for 3rd Case Master Theorem. Here is what given in Wiki Shouldn't it be $$2(\frac{n^2}{2}) \leq kn^2$$ for regularity condition? If we have b = 2, how did we get 4 as our…
YohanRoth
  • 1,437
0
votes
1 answer

Second order difference equation with a stochastic term

I'm trying to solve a second order difference equation. But there's a stochastic term inside the equation, I was wondering what should the correct way of approaching this problem? Here's the 2nd order equation:…
George
  • 83
0
votes
3 answers

How to solve recurrence relation $a_{k}=7a_{k-1}-10a_{k-2}, \forall k\ge2$ with $a_{0} = a_{1} = 2$

Unfortunately I have no idea where to even start with this. This is my first math class in almost a decade. Can anybody tell me how i would go about solving for the following recurrence relation? All help greatly…
User
  • 907
0
votes
1 answer

Recurrence Relations with Geometric Series

if we have a situation where something is like this $2^k + c(2^{k-1} + 2^{k-2} + 2^{k-3} + ... + 1)$ since in this case $r > 1$ then in Computer Science we look at $\sum_{i=1}^{n} r^{i} = \theta(r^{n})$ So in this case would we look at the $2^{k}$…
MD_90
  • 103
0
votes
2 answers

Prove T(n)= T(n-2)+k is O(n) for all n >1

I'm stuck on trying to prove that $ T(n)= T(n-2)+k$ is bounded by $O(n)$ for all $n >1$ I expanded it out to reach the following guess: $T(n) = ((n-2)/2)k $ though when I try to prove inductively, I get: Base case : $T(2) = 0$ which is obviously…
0
votes
1 answer

Tools for solving recurrent expresions

I've got a problem involving a recurrent expression. I would like to find a solution of $x_t$ that let me take derivatives or finding the minimum of the function. Does anybody know tools for solving this problem? $x_t = [k_1 + (1-k_1)·x_{t-1}] ·…
0
votes
1 answer

Recurrence Relation with Variable Coefficient Help

I'm sure that this question is very simple, but there are no example like it in the course material and I'm not really sure what I'm looking for online. $x_n=2^n x_{n-1}, x_0=3$ If anybody could even point me to a website that explained this, that…
Padster
  • 83
0
votes
2 answers

how to solve $ T(n) = T (2n/3) + 1$ using master theorem?

I solved the above recurrence using master theorem and applied case $2$ to solve it. However in the final answer I have $T(n) = \Theta(\log^{(k+1)} n)$ . what should happen to $k+1$? because the final answer is $T(n) = \Theta(\log n)$ If someone has…
0
votes
1 answer

Recurrence in Kepler's Equation (trascendent equation)

Kepler's equation is $E-e\sin E = M$, where $e,M$ are constants. My teacher of celestial mechanics told me that if $e\ll 1$, I should take a first aproximation $E_1=M$, then a second aproximation $E_2=M+e\sin E_1,\ldots,$ then a $n$-th aproximation…
0
votes
2 answers

Solve the following recurence relation.

While I was working on some graph theory problem I encounter the following recurrence relation $$a_{n+1}=a_{n-1}+6$$ where $a_0=3.$ Note: I have rewritten the recurrence relation as recommended.
user226045
0
votes
2 answers

Recurrence relation of $T(n) = T(n^\frac13) + \log n$

I'm having trouble deciphering what this recurrence relation is: $$T(n) = T(n^\frac13) + \log n$$ when I try to expand it out I get: $T(n) = T(n^\frac1{3^k}) + k\times\log n $ my problem is breaking down or converting what the big oh notation is,…
Joshhw
  • 603
0
votes
1 answer

Recurrence Relation with Strings

Q. How many strings in {0,1,2,3} have an even number of 1's. The answer provided uses the recurrence relation $a_{n+1} = 3a_n + (4^n - a_n)$. The hint given was that consider the last string of length $n+1$ is : $0$ - Number of strings that can…
0
votes
1 answer

If $f(n) = af(n/a) + c \log n$, how does $f(n)$ grow?

Question: If $f(n) = af(n/a) + c \log n$, how does $f(n)$ grow? This is an attempt to correct my answer here: https://math.stackexchange.com/questions/1188652/time-complexity-of-recurrence-fn-3f-fracn3ologn/1188673#1188673 It turns out my answer…
marty cohen
  • 107,799
0
votes
1 answer

solving non-homogeneous recurrence relation

solve the equation $a_n − 4a_{n−2} = −3n + 8$ for initial values $a_0=2, a_1=1$ I'm stuck on finding the particular solution for $a_n$. I tried using the form $a_n = C_1n + C_2$ but that gets me nowhere??
Gudushen
  • 101