Recurrence relation

Short description: Pattern defining an infinite sequence of numbers

In mathematics, a recurrence relation is an equation according to which the nth term of a sequence of numbers is equal to some combination of the previous terms. Often, only k previous terms of the sequence appear in the equation, for a parameter k that is independent of n; this number k is called the order of the relation. If the values of the first k numbers in the sequence have been given, the rest of the sequence can be calculated by repeatedly applying the equation.

In linear recurrences, the nth term is equated to a linear function of the k previous terms. A famous example is the recurrence for the Fibonacci numbers, Fn=Fn−1+Fn−2 where the order k is two and the linear function merely adds the two previous terms. This example is a linear recurrence with constant coefficients, because the coefficients of the linear function (1 and 1) are constants that do not depend on n. For these recurrences, one can express the general term of the sequence as a closed-form expression of n. As well, linear recurrences with polynomial coefficients depending on n are also important, because many common elementary functions and special functions have a Taylor series whose coefficients satisfy such a recurrence relation (see holonomic function).

Solving a recurrence relation means obtaining a closed-form solution: a non-recursive function of n.

The concept of a recurrence relation can be extended to multidimensional arrays, that is, indexed families that are indexed by tuples of natural numbers.

## Contents

* 1 Definition
* 2 Examples
* 2.1 Factorial
* 2.2 Logistic map
* 2.3 Fibonacci numbers
* 2.4 Binomial coefficients
* 3 Difference operator and difference equations
* 3.1 From sequences to grids
* 4 Solving
* 4.1 Solving linear recurrence relations with constant coefficients
* 4.2 Solving first-order non-homogeneous recurrence relations with variable coefficients
* 4.3 Solving general homogeneous linear recurrence relations
* 4.4 Solving general non-homogeneous linear recurrence relations with constant coefficients
* 4.5 Solving first-order rational difference equations
* 5 Stability
* 5.1 Stability of linear higher-order recurrences
* 5.2 Stability of linear first-order matrix recurrences
* 5.3 Stability of nonlinear first-order recurrences
* 6 Relationship to differential equations
* 7 Applications
* 7.1 Mathematical biology
* 7.2 Computer science
* 7.3 Digital signal processing
* 7.4 Economics
* 8 See also
* 9 References
* 9.1 Footnotes
* 9.2 Bibliography
* 10 External links

## Definition

A recurrence relation is an equation that expresses each element of a sequence as a function of the preceding ones. More precisely, in the case where only the immediately preceding element is involved, a recurrence relation has the form

un=φ(n,un−1)forn>0,

where

φ:ℕ×X->X

is a function, where X is a set to which the elements of a sequence must belong. For any u0∈X, this defines a unique sequence with u0 as its first element, called the initial value.[1]

It is easy to modify the definition for getting sequences starting from the term of index 1 or higher.

This defines recurrence relation of first order. A recurrence relation of order k has the form

un=φ(n,un−1,un−2,…,un−k)forn≥k,

where φ:ℕ×Xk->X is a function that involves k consecutive elements of the sequence. In this case, k initial values are needed for defining a sequence.

## Examples

### Factorial

The factorial is defined by the recurrence relation

n!=n⋅(n−1)!forn>0,

and the initial condition

0!=1.

This is an example of a linear recurrence with polynomial coefficients of order 1, with the simple polynomial (in n)

as its only coefficient.

### Logistic map

An example of a recurrence relation is the logistic map defined by

xn+1=rxn(1−xn),

for a given constant r. The behavior of the sequence depends dramatically on r, but is stable when the initial condition x0 varies.

### Fibonacci numbers

The recurrence of order two satisfied by the Fibonacci numbers is the canonical example of a homogeneous linear recurrence relation with constant coefficients (see below). The Fibonacci sequence is defined using the recurrence

Fn=Fn−1+Fn−2

with initial conditions

F0=0
F1=1.

Explicitly, the recurrence yields the equations

F2=F1+F0
F3=F2+F1
F4=F3+F2

etc.

We obtain the sequence of Fibonacci numbers, which begins

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...

The recurrence can be solved by methods described below yielding Binet's formula, which involves powers of the two roots of the characteristic polynomial t2=t+1; the generating function of the sequence is the rational function

t1−t−t2.

### Binomial coefficients

A simple example of a multidimensional recurrence relation is given by the binomial coefficients (nk), which count the ways of selecting k elements out of a set of n elements. They can be computed by the recurrence relation

(nk)=(n−1k−1)+(n−1k),

with the base cases (n0)=(nn)=1. Using this formula to compute the values of all binomial coefficients generates an infinite array called Pascal's triangle. The same values can also be computed directly by a different formula that is not a recurrence, but uses factorials, multiplication and division, not just additions:

(nk)=n!k!(n−k)!.

The binomial coefficients can also be computed with a uni-dimensional recurrence:

(nk)=(nk−1)(n−k+1)/k,

with the initial value (n0)=1 (The division is not displayed as a fraction for emphasizing that it must be computed after the multiplication, for not introducing fractional numbers). This recurrence is widely used in computers because it does not require to build a table as does the bi-dimensional recurrence, and does not involve very large integers as does the formula with factorials (if one uses (nk)=(nn−k), all involved integers are smaller than the final result).

## Difference operator and difference equations

The difference operator is an operator that maps sequences to sequences, and, more generally, functions to functions. It is commonly denoted Δ, and is defined, in functional notation, as

(Δf)(x)=f(x+1)−f(x).

It is thus a special case of finite difference.

When using the index notation for sequences, the definition becomes

(Δa)n=an+1−an.

The parentheses around Δf and Δa are generally omitted, and Δan must be understood as the term of index n in the sequence Δa, and not Δ applied to the element an.

Given sequence a=(an)n∈ℕ, the first difference of a is Δa.

The second difference is Δ2a=(Δ∘Δ)a=Δ(Δa). A simple computation shows that

Δ2an=an+2−2an+1+an.

More generally: the kth difference is defined recursively as Δk=Δ∘Δk−1, and one has

Δkan=∑t=0k(−1)t(kt)an+k−t.

This relation can be inverted, giving

an+k=an+(k1)Δan+⋯+(kk)Δk(an).

A difference equation of order k is an equation that involves the k first differences of a sequence or a function, in the same way as a differential equation of order k relates the k first derivatives of a function.

The two above relations allow transforming a recurrence relation of order k into a difference equation of order k, and, conversely, a difference equation of order k into recurrence relation of order k. Each transformation is the inverse of the other, and the sequences that are solution of the difference equation are exactly those that satisfies the recurrence relation.

For example, the difference equation

3Δ2an+2Δan+7an=0

is equivalent to the recurrence relation

3an+2=4an+1−8an,

in the sense that the two equations are satisfied by the same sequences.

As it is equivalent for a sequence to satisfy a recurrence relation or to be the solution of a difference equation, the use of the term "difference equation" is not limited to equations using a difference operator,[2][3] and the two terms "recurrence relation" and "difference equation" can be used interchangeably.[4] See Rational difference equation, Linear constant-coefficient difference equation and Matrix difference equation for examples of using "difference equation" instead of "recurrence relation".

Difference equations resemble differential equations, and this resemblance is often used to mimic methods for solving differentiable equations to apply to solving difference equations, and therefore recurrence relations.

Summation equations relate to difference equations as integral equations relate to differential equations. See time scale calculus for a unification of the theory of difference equations with that of differential equations.

### From sequences to grids

Single-variable or one-dimensional recurrence relations are about sequences (i.e. functions defined on one-dimensional grids). Multi-variable or n-dimensional recurrence relations are about n-dimensional grids. Functions defined on n-grids can also be studied with partial difference equations.[5]

## Solving

### Solving linear recurrence relations with constant coefficients

Main article: Linear recurrence with constant coefficients

### Solving first-order non-homogeneous recurrence relations with variable coefficients

Moreover, for the general first-order non-homogeneous linear recurrence relation with variable coefficients:

an+1=fnan+gn,fn≠0,

there is also a nice method to solve it:[6]

an+1−fnan=gn
an+1∏k=0nfk−fnan∏k=0nfk=gn∏k=0nfk

an+1∏k=0nfk−an∏k=0n−1fk=gn∏k=0nfk

Let

An=an∏k=0n−1fk,

Then

An+1−An=gn∏k=0nfk
∑m=0n−1(Am+1−Am)=An−A0=∑m=0n−1gm∏k=0mfk
an∏k=0n−1fk=A0+∑m=0n−1gm∏k=0mfk
an=(∏k=0n−1fk)(A0+∑m=0n−1gm∏k=0mfk)

If we apply the formula to an+1=(1+hfnh)an+hgnh and take the limit h->0, we get the formula for first order linear differential equations with variable coefficients; the sum becomes an integral, and the product becomes the exponential function of an integral.

### Solving general homogeneous linear recurrence relations

Many homogeneous linear recurrence relations may be solved by means of the generalized hypergeometric series. Special cases of these lead to recurrence relations for the orthogonal polynomials, and many special functions. For example, the solution to

Jn+1=2nzJn−Jn−1

is given by

Jn=Jn(z),

the Bessel function, while

(b−n)Mn−1+(2n−b+z)Mn−nMn+1=0

is solved by

Mn=M(n,b;z)

the confluent hypergeometric series. Sequences which are the solutions of linear difference equations with polynomial coefficients are called P-recursive. For these specific recurrence equations algorithms are known which find polynomial, rational or hypergeometric solutions.

### Solving general non-homogeneous linear recurrence relations with constant coefficients

Furthermore, for the general non-homogeneous linear recurrence relation with constant coefficients, one can solve it based on variation of parameter.[7]

### Solving first-order rational difference equations

Main article: Rational difference equation

A first order rational difference equation has the form wt+1=awt+bcwt+d. Such an equation can be solved by writing wt as a nonlinear transformation of another variable xt which itself evolves linearly. Then standard methods can be used to solve the linear difference equation in xt.

## Stability

### Stability of linear higher-order recurrences

The linear recurrence of order d,

an=c1an−1+c2an−2+⋯+cdan−d,

has the characteristic equation

λd−c1λd−1−c2λd−2−⋯−cdλ0=0.

The recurrence is stable, meaning that the iterates converge asymptotically to a fixed value, if and only if the eigenvalues (i.e., the roots of the characteristic equation), whether real or complex, are all less than unity in absolute value.

### Stability of linear first-order matrix recurrences

Main article: Matrix difference equation

In the first-order matrix difference equation

[xt−x*]=A[xt−1−x*]

with state vector x and transition matrix A, x converges asymptotically to the steady state vector x* if and only if all eigenvalues of the transition matrix A (whether real or complex) have an absolute value which is less than 1\.

### Stability of nonlinear first-order recurrences

Consider the nonlinear first-order recurrence

xn=f(xn−1).

This recurrence is locally stable, meaning that it converges to a fixed point x* from points sufficiently close to x*, if the slope of f in the neighborhood of x* is smaller than unity in absolute value: that is,

|f′(x*)|<1.

A nonlinear recurrence could have multiple fixed points, in which case some fixed points may be locally stable and others locally unstable; for continuous f two adjacent fixed points cannot both be locally stable.

A nonlinear recurrence relation could also have a cycle of period k for k>1. Such a cycle is stable, meaning that it attracts a set of initial conditions of positive measure, if the composite function

g(x):=f∘f∘⋯∘f(x)

with f appearing k times is locally stable according to the same criterion:

|g′(x*)|<1,

where x* is any point on the cycle.

In a chaotic recurrence relation, the variable x stays in a bounded region but never converges to a fixed point or an attracting cycle; any fixed points or cycles of the equation are unstable. See also logistic map, dyadic transformation, and tent map.

## Relationship to differential equations

When solving an ordinary differential equation numerically, one typically encounters a recurrence relation. For example, when solving the initial value problem

y′(t)=f(t,y(t)), y(t0)=y0,

with Euler's method and a step size h, one calculates the values

y0=y(t0), y1=y(t0+h), y2=y(t0+2h), …

by the recurrence

yn+1=yn+hf(tn,yn),tn=t0+nh

Systems of linear first order differential equations can be discretized exactly analytically using the methods shown in the discretization article.

## Applications

### Mathematical biology

Some of the best-known difference equations have their origins in the attempt to model population dynamics. For example, the Fibonacci numbers were once used as a model for the growth of a rabbit population.

The logistic map is used either directly to model population growth, or as a starting point for more detailed models of population dynamics. In this context, coupled difference equations are often used to model the interaction of two or more populations. For example, the Nicholson–Bailey model for a host-parasite interaction is given by

Nt+1=λNte−aPt
Pt+1=Nt(1−e−aPt),

with Nt representing the hosts, and Pt the parasites, at time t.

Integrodifference equations are a form of recurrence relation important to spatial ecology. These and other difference equations are particularly suited to modeling univoltine populations.

### Computer science

Recurrence relations are also of fundamental importance in analysis of algorithms.[8][9] If an algorithm is designed so that it will break a problem into smaller subproblems (divide and conquer), its running time is described by a recurrence relation.

A simple example is the time an algorithm takes to find an element in an ordered vector with n elements, in the worst case.

A naive algorithm will search from left to right, one element at a time. The worst possible scenario is when the required element is the last, so the number of comparisons is n.

A better algorithm is called binary search. However, it requires a sorted vector. It will first check if the element is at the middle of the vector. If not, then it will check if the middle element is greater or lesser than the sought element. At this point, half of the vector can be discarded, and the algorithm can be run again on the other half. The number of comparisons will be given by

c1=1
cn=1+cn/2

the time complexity of which will be O(log2(n)).

### Digital signal processing

In digital signal processing, recurrence relations can model feedback in a system, where outputs at one time become inputs for future time. They thus arise in infinite impulse response (IIR) digital filters.

For example, the equation for a "feedforward" IIR comb filter of delay T is:

yt=(1−α)xt+αyt−T,

where xt is the input at time t, yt is the output at time t, and α controls how much of the delayed signal is fed back into the output. From this we can see that

yt=(1−α)xt+α((1−α)xt−T+αyt−2T)
yt=(1−α)xt+(α−α2)xt−T+α2yt−2T

etc.

### Economics

Recurrence relations, especially linear recurrence relations, are used extensively in both theoretical and empirical economics.[10][11] In particular, in macroeconomics one might develop a model of various broad sectors of the economy (the financial sector, the goods sector, the labor market, etc.) in which some agents' actions depend on lagged variables. The model would then be solved for current values of key variables (interest rate, real GDP, etc.) in terms of past and current values of other variables.

## See also

* Circle points segments proof
* Combinatorial principles
* Continued fraction
* Holonomic sequences
* Infinite impulse response
* Integration by reduction formulae
* Iterated function
* Lagged Fibonacci generator
* Master theorem (analysis of algorithms)
* Mathematical induction
* Orthogonal polynomials
* Recursion
* Recursion (computer science)
* Time scale calculus

## References

### Footnotes

1. ↑ Jacobson, Nathan, Basic Algebra 2 (2nd ed.), § 0.4. pg 16.
2. ↑ S. Barnard and J. M. Child, Higher Algebra (1936) page 369. "An equation of the form aun \+ bun−1 \+ cun−2 \+ ... + kun−r = l is called a linear difference equation."
3. ↑ C. R. Wylie, Advanced Engineering Mathematics (1960) page 167. "However, in the study of difference equations we do not ordinarily consider equations of the form f(Δ)y = 𝜙(x) ... but rather equations of the form f(E)y = 𝜙(x)" where Δ is the difference operator and E is a shift operator.
4. ↑ J. Bradley, Introduction to Discrete Mathematics (1988) page 266. "Older texts on this topic tend to talk primarily about difference equations; newer ones talk about recurrence equations or relations. This reflects an important change in mathematical thinking since the 1950s; difference equations are primarily seen as an approximation of differential equations, a calculus topic. Recurrence equations are seen as an important topic in their own right. The shift in names suggests the growing recognition of the importance of discrete mathematics."
5. ↑ Partial difference equations, Sui Sun Cheng, CRC Press, 2003, ISBN 978-0-415-29884-1
6. ↑ "Archived copy". http://faculty.pccu.edu.tw/~meng/Math15.pdf.
7. ↑ Solution of Nonhomogeneous Linear Recurrence Relations with Constant Coefficient based on Variation of Parameter, Haoran Han, 2025
8. ↑ Cormen, T. et al, Introduction to Algorithms, MIT Press, 2009
9. ↑ R. Sedgewick, F. Flajolet, An Introduction to the Analysis of Algorithms, Addison-Wesley, 2013
10. ↑ Stokey, Nancy L.; Lucas, Robert E. Jr.; Prescott, Edward C. (1989). Recursive Methods in Economic Dynamics. Cambridge: Harvard University Press. ISBN 0-674-75096-9. https://books.google.com/books?id=BgQ3AwAAQBAJ.
11. ↑ Ljungqvist, Lars; Sargent, Thomas J. (2004). Recursive Macroeconomic Theory (Second ed.). Cambridge: MIT Press. ISBN 0-262-12274-X. https://archive.org/details/recursivemacroec02edljun.

### Bibliography

* Batchelder, Paul M. (1967). An introduction to linear difference equations. Dover Publications.
* Miller, Kenneth S. (1968). Linear difference equations. W. A. Benjamin.
* Fillmore, Jay P.; Marx, Morris L. (1968). "Linear recursive sequences". SIAM Rev. 10 (3): pp. 324–353.
* Brousseau, Alfred (1971). Linear Recursion and Fibonacci Sequences. Fibonacci Association. http://www.fq.math.ca/linear.html.
* Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 1990. ISBN 0-262-03293-7. Chapter 4: Recurrences, pp. 62–90.
* Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1994). Concrete Mathematics: A Foundation for Computer Science (2 ed.). Addison-Wesley. ISBN 0-201-55802-5.
* Enders, Walter (2010). Applied Econometric Times Series (3 ed.). http://eu.wiley.com/WileyCDA/WileyTitle/productCd-EHEP000338.html.
* Cull, Paul; Flahive, Mary; Robson, Robbie (2005). Difference Equations: From Rabbits to Chaos. Springer. ISBN 0-387-23234-6. chapter 7.
* Jacques, Ian (2006). Mathematics for Economics and Business (Fifth ed.). Prentice Hall. pp. 551–568. ISBN 0-273-70195-9. https://archive.org/details/mathematicsforec00jacq. Chapter 9.1: Difference Equations.
* Minh, Tang; Van To, Tan (2006). "Using generating functions to solve linear inhomogeneous recurrence equations". Proc. Int. Conf. Simulation, Modelling and Optimization, SMO'06. pp. 399–404. http://www.wseas.us/e-library/conferences/2006lisbon/papers/517-481.pdf.
* Polyanin, Andrei D.. "Difference and Functional Equations: Exact Solutions". http://eqworld.ipmnet.ru/en/solutions/fe.htm. at EqWorld - The World of Mathematical Equations.
* Polyanin, Andrei D.. "Difference and Functional Equations: Methods". http://eqworld.ipmnet.ru/en/education/edu-fe.htm. at EqWorld - The World of Mathematical Equations.
* Wang, Xiang-Sheng; Wong, Roderick (2012). "Asymptotics of orthogonal polynomials via recurrence relations". Anal. Appl. 10 (2): 215–235. doi:10.1142/S0219530512500108.

## External links

* Hazewinkel, Michiel, ed. (2001), "Recurrence relation", Encyclopedia of Mathematics, Springer Science+Business Media B.V. / Kluwer Academic Publishers, ISBN 978-1-55608-010-4, https://www.encyclopediaofmath.org/index.php?title=p/r080150
* Weisstein, Eric W.. "Recurrence Equation". http://mathworld.wolfram.com/RecurrenceEquation.html.
* "OEIS Index Rec". http://oeis.org/wiki/Index_to_OEIS:_Section_Rec. OEIS index to a few thousand examples of linear recurrences, sorted by order (number of terms) and signature (vector of values of the constant coefficients)

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Recurrence relation. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Recurrence_relation&oldid=4409830"