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

A $n\cdot n$ square grid problem?

I thought of this problem when I was playing a game called BINGO with my friend. The game basically is like this: Suppose $2$ people are playing the game(can be played with any no of people though). Both make a $5\cdot 5$ square grid and and fill…
Kalpan
  • 375
4
votes
3 answers

Solving $T(n)= 2T(n/2)+n \lg (n)$

I am trying to solve a recursive function: $$ T(n)= 2 T(n/2)+n \lg(n), \quad n>2,\quad T(2)=2,\quad n = 2^{k}$$ Master theorem didn't work. The result is pointless (if I did it right). Any suggestions?
4
votes
4 answers

Explicit formula for a recursion

How can you express the following recursion explicitly? \begin{cases} T_0 = 1\\ T_n = 1 + 2\cdot T_{n-1}\\ \end{cases}
4
votes
1 answer

What types of functions do recurrence relations methods apply to?

I have been working with a function that I defined recursively as $$a(n) = (1-a(n-1)^k)^k$$ where $a(0) = x$ and $k$ is an integer $>1$. So really, $a(n)$ returns a function on $x$ and $k$. I have just stumbled upon the term "recurrence relation"…
OctaviaQ
  • 1,059
4
votes
3 answers

How to solve a 2nd order non-homogeneous linear recurrence?

I have a problem in solving this equation : $x_{n+2} + 3\ x_{n+1} + 2\ x_{n} = 5 \times 3^n $ given that $x_{0} = 0$ and $x_{1} = 1$. I solved the homogeneous associated equation and got $v_{n} = c_{1} \times (-1)^{n} + c_{2} \times (-2)^{n}$ (where…
jdw
  • 49
4
votes
1 answer

Generating a recurrence relation

Suppose you have a large collections of red 1x2 tiles, blue 1x2 tiles and green 1x2 tiles. For $n\ge 0$, let $t_n$ be the number of ways to use these to exactly cover the squares of a 2xn checkerboard (without overlapping the tiles). The tiles can…
4
votes
2 answers

Generating a recurrence relation question

A switching game has $n$ switches, all initially in the OFF position. In order to be able to flip the $ith$ switch, the $(i-1)st$ switch must be ON, and all earlier switches OFF. The first switch can always be flipped. Find a recurrence relation…
4
votes
4 answers

Recursively defining the set of bit strings set having more zeros than ones

Question: Recursively define the set of bit strings that have more zeros than ones. I tried it this way: $\Sigma\subset \{0,1\}^*$ Basis step: $0 \in \Sigma$ Recursive step: For any $x\in \Sigma$, $00x1\in L$ Is it a valid answer?
Bek Abdik
  • 443
4
votes
1 answer

Is there some well known efficient way to change this recurrence formula to a somewhat different one?

\begin{align} & J_0 = 2\sin\alpha. \qquad J_1 = 4\sin\alpha-4\alpha\cos\alpha. \\[6pt] \text{For }n\ge2,\quad & J_n = 2n\Big( (n-1)J_{n-1} - (n-2)\alpha^2 J_{n-2} \Big). \qquad\qquad\qquad\qquad \end{align} (This sequence occurs in Mary Cartwright's…
4
votes
2 answers

Recurrence Relations with single roots

I have the following recurrence: $a_{n+3}=3a_{n+2}-3a_{n+1}+a_n$ with initial values $a_1 = 1, a_2 = 4, a_3 = 9$ I have found the characteristic equation to be $x^3-3x^2+3x-1$ and the root to be 1. My text book is not helpful in how I should go…
MrX
  • 77
4
votes
1 answer

Solving recurrence relation of the form $T(n)=T\left(\frac{nb}{a}\right)+T\left(\frac{(n-b)c}{a}\right)+n$

How do we solve a recurrence of the form: $T(n)=T\biggl(\dfrac{nb}{a}\biggr)+T\biggl(\dfrac{(n-b)c}{a}\biggr)+n$ ? I tried substituting $q=\dfrac{a}{b},\ r=\dfrac{a}{c}, \ s=\dfrac{bc}{a}$ to…
curryage
  • 1,183
4
votes
2 answers

Non-homogeneous linear recurrence relation

I have this recurrence relation to solve: $$a_{n+1}=3a_n+2^{n-1}-1.$$ The homogeneous part's solution is obviously $a_n=k3^n.$ Now I don't know how to solve the original equation, but I do know what to do in the case of a seemingly analogous…
Bartek
  • 6,265
4
votes
1 answer

how to find the $n^{th}$ term of the recurrence relation $a_n = a_{n - a_{n-1}} + a_{n-1 - a_{n-2}}$?

I can only solve basic linear recurrence relations using characteristic polynomial technique. Then I hit this, and I cannot think of the polynomial that is necessary to solve this problem. If there is any concrete theory behind solving this kind of…
Sami
  • 329
4
votes
2 answers

How to write $[(2+\sqrt{3})^n + (2-\sqrt{3})^n + (2+\sqrt{3})^{n+1} + (2-\sqrt{3})^{n+1}]/6$ to the form $a^2 + 2 b^2$ ($a, b \in \mathbb{N}$).

We know that $(2+\sqrt{3})^n + (2-\sqrt{3})^n$ is an integer (See here). However, we want to write the formula \begin{align} &\frac{3+\sqrt{3}}{6} (2+\sqrt{3})^n + \frac{3-\sqrt{3}}{6} (2-\sqrt{3})^n\\ &=\frac{1}{6} \left[(2+\sqrt{3})^{n+1} +…
Yummy
  • 43
4
votes
1 answer

Combining simultaneous linear recurrence relations

I was studying the sequence A249665, which I will call $a_n$, and came up with a second sequence $b_n$ for which I could prove that the following recurrence…
SmileyCraft
  • 6,777
  • 13
  • 26