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 - 2 consecutive 0s

I have a question about this question: Recurrence relation find the number of binary strings that contain two consecutive zeros In your answer, No, it takes each bit separately, except for the last two. It says the string can end in 00,01,10,11.…
eric
  • 1
0
votes
2 answers

What is the length of a polynomial taken to a power (multiplied by itself)?

Let's say I have a polynomial $B(x)$. Its length is $m$ (By which I mean, if you write out the sequence of $a_i$'s where $B(x) = \sum_{i=0}^{m-1} a_ix^i$ the length of that sequence is $m$.) So you'll notice, since we're starting from the 0'th…
0
votes
1 answer

Understanding the subsets without consecutive integers are counted with fibonacci numbers

I'm working my way though a section on Second-Order Linear Homogenous Recurrence Relations with Constant Coefficients. There is an example that I do not understand. The part I'm having trouble with is highlighted in red. Why does $n\in A$ mean that…
Dunka
  • 2,787
  • 12
  • 41
  • 69
0
votes
2 answers

Newton's method for square root recurrence

Here is a screenshot from the book. Can you help me with understanding the last line with this approximation? I don't understand how it follows from the formula. Where the denominator has gone?:)
Stan
  • 361
0
votes
1 answer

Solving Recurrence using Master Theorem

I do not see why this recurrence T(n) = T(n/2)+ 2^n of case 3 of Master Theorem fullfills the additional condition a f(n/b) ≤ c f(n) as 2^(n*(1/2)) ≤ c 2^n can not be fullfilled for 0 < c <1.
0
votes
1 answer

With the characteristic equation, how do I get this solution?

There is one part of the characteristic equation I don't quite understand. If I've been given the following equation: $$ T(n)= \begin{cases} 1,\quad if\ n=1\\ T(n-1)+n+1 \end{cases} $$ Then, you simply it to…
0
votes
2 answers

How do you unfold this summation factor?

This is from Concrete mathematics page 27: If we apply $s_n = s_{n-1} a_{n-1} / b_n$ recursively, at last we will need to know $s_0$, but how did it disappear in eq. 2.11?
qed
  • 1,083
0
votes
1 answer

Why it is $O(n)$ running time when we separate problems on n/2 subproblems each recursive call (and we continue to work on one side)

So, I do not understand why it is $O(n)$ running time in the case when we have some $n$ elements and with each recursive call we separate our array by half and we continue working only on a one half (considering that each recursive call requires…
UserMoon
  • 349
0
votes
1 answer

Determining the fourth term of $c_k = kc_{k-1}^2$

What is the fourth term of the following recursively defined sequence? $c_k = kc_{k-1}^2$ for integers $k \ge 1$ and $c_0 = 1$. The possible answers are $12$ and $20$. I am not sure which one it is and how to decide this.
0
votes
2 answers

How to show that $T(n) = T(n-1) + \Theta(n)$ is in $\Omega(n^2)$

In the class we have been shown the way to prove that $T(n) = T(n-1) + \Theta(n)$ is in $O(n^2)$ $$ \begin{align} T(n)&\le T(n-1) +cn &\\ &\le c(n-1)^2+cn &\\ &=cn^2-2cn+c+cn\\ &=cn^2-cn+c\\ &=c(n^2-n+1)\le cn^2 &\ \end{align} $$…
UserMoon
  • 349
0
votes
1 answer

Derive Recurrence To Determine Bn

Here is a question that states Bn is the number of bit strings with length n>=1 that don't contain any maximal run of ones of odd length, they're all even. I know how to do the first question but not sure how to go about the second question. Any…
0
votes
0 answers

Recurrence relation $F(n) = 2F(\sqrt n) + 1$

I'm stuck with the following recurrence relation: $F(n) = 2F(\sqrt n) + 1, n \in \mathbb{N}$ I considered $n = 2^{2^{k}}$ and then expanded the recursion and here is what I get $F(n) = F(2^{2^{k}}) = 2^{k}F(2) + 2^{k} -1$ Assuming, that we are…
ivt
  • 1,587
0
votes
0 answers

How to solve this biparametral recurrence relation?

I have a problem that reduces to solving the following recurrence relation: $$X(2, 1) = 1, \ \ \ X(n, 0) = 0, \ \ \ X(n, k \geq n) = 0$$ $$X(n, 0 < k < n) = \frac{k-1}{n-1} X(n-1, k-1) + \left(1 - \frac{k}{n-1}\right) X(n-1, k)$$ When I am given the…
user541686
  • 13,772
0
votes
1 answer

Solving a Recurence Relation with 2 parameters

Given the following recurrence relation $$u(n,1) = 1$$ $$u(1,m) = 1$$ $$u(n,m) = u(n-1, m) + u(n, m-1)$$ with $n > 0, m > 0$, how can one end up with a closed formula, without using generating functions?
stefan
  • 1,030
0
votes
1 answer

Recursive equation for non-recurisve equation.

Determine recursive equation for: ( $A$ is any const) $a_n = An!$ I am asking for any advice.
user180834
  • 1,453