Inmathematics, arecurrence relation is anequation according to which theth term of asequence of numbers is equal to some combination of the previous terms. Often, only previous terms of the sequence appear in the equation, for a parameter that is independent of; this number is called theorder of the relation. If the values of the first numbers in the sequence have been given, the rest of the sequence can be calculated by repeatedly applying the equation.
Inlinear recurrences, thenth term is equated to alinear function of the previous terms. A famous example is the recurrence for theFibonacci numbers,where the order is two and the linear function merely adds the two previous terms. This example is alinear recurrence with constant coefficients, because the coefficients of the linear function (1 and 1) are constants that do not depend on For these recurrences, one can express the general term of the sequence as aclosed-form expression of. As well,linear recurrences with polynomial coefficients depending on are also important, because many commonelementary functions andspecial functions have aTaylor series whose coefficients satisfy such a recurrence relation (seeholonomic function).
Solving a recurrence relation means obtaining aclosed-form solution: a non-recursive function of.
The concept of a recurrence relation can be extended tomultidimensional arrays, that is,indexed families that are indexed bytuples ofnatural numbers.
Arecurrence relation is an equation that expresses each element of asequence 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
where
is a function, whereX is a set to which the elements of a sequence must belong. For any, this defines a unique sequence with as its first element, called theinitial 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 offirst order. A recurrence relation oforderk has the form
where is a function that involvesk consecutive elements of the sequence.In this case,k initial values are needed for defining a sequence.
Thefactorial is defined by the recurrence relation
and the initial condition
This is an example of alinear recurrence with polynomial coefficients of order 1, with the simple polynomial (inn)
as its only coefficient.
An example of a recurrence relation is thelogistic map defined by
for a given constant The behavior of the sequence depends dramatically on but is stable when the initial condition varies.
The recurrence of order two satisfied by theFibonacci numbers is the canonical example of a homogeneouslinear recurrence relation with constant coefficients (see below). The Fibonacci sequence is defined using the recurrence
Explicitly, the recurrence yields the equations
etc.
We obtain the sequence of Fibonacci numbers, which begins
The recurrence can be solved by methods described below yieldingBinet's formula, which involves powers of the two roots of the characteristic polynomial; thegenerating function of the sequence is therational function
A simple example of a multidimensional recurrence relation is given by thebinomial coefficients, which count the ways of selecting elements out of a set of elements.They can be computed by the recurrence relation
with the base cases. Using this formula to compute the values of all binomial coefficients generates an infinite array calledPascal's triangle. The same values can also be computed directly by a different formula that is not a recurrence, but usesfactorials, multiplication and division, not just additions:
The binomial coefficients can also be computed with a uni-dimensional recurrence:
with the initial value (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 all involved integers are smaller than the final result).
Thedifference operator is anoperator that mapssequences to sequences, and, more generally,functions to functions. It is commonly denoted and is defined, infunctional notation, as
It is thus a special case offinite difference.
When using the index notation for sequences, the definition becomes
The parentheses around and are generally omitted, and must be understood as the term of indexn in the sequence and not applied to the element
Givensequence thefirst difference ofa is
Thesecond difference is A simple computation shows that
More generally: thekth difference is defined recursively as and one has
This relation can be inverted, giving
Adifference equation of orderk is an equation that involves thek first differences of a sequence or a function, in the same way as adifferential equation of orderk relates thek firstderivatives of a function.
The two above relations allow transforming a recurrence relation of orderk into a difference equation of orderk, and, conversely, a difference equation of orderk into recurrence relation of orderk. Each transformation is theinverse 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
is equivalent to the recurrence relation
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] SeeRational difference equation,Linear constant-coefficient difference equation andMatrix 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 asintegral equations relate to differential equations. Seetime scale calculus for a unification of the theory of difference equations with that of differential equations.
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-dimensional grids. Functions defined on-grids can also be studied with partial difference equations.[5]
Moreover, for the general first-order non-homogeneous linear recurrence relation with variable coefficients:
there is also a nice method to solve it:[6]
Let
Then
If we apply the formula to and take the limit, we get the formula for first orderlinear differential equations with variable coefficients; the sum becomes an integral, and the product becomes the exponential function of an integral.
Many homogeneous linear recurrence relations may be solved by means of thegeneralized hypergeometric series. Special cases of these lead to recurrence relations for theorthogonal polynomials, and manyspecial functions. For example, the solution to
is given by
theBessel function, while
is solved by
theconfluent hypergeometric series. Sequences which are the solutions oflinear difference equations with polynomial coefficients are calledP-recursive. For these specific recurrence equations algorithms are known which findpolynomial,rational orhypergeometric solutions.
Furthermore, for the general non-homogeneous linear recurrence relation with constant coefficients, one can solve it based on variation of parameter.[7]
A first order rational difference equation has the form. Such an equation can be solved by writing as a nonlinear transformation of another variable which itself evolves linearly. Then standard methods can be used to solve the linear difference equation in.
The linear recurrence of order,
has thecharacteristic equation
The recurrence isstable, meaning that the iterates converge asymptotically to a fixed value, if and only if theeigenvalues (i.e., the roots of the characteristic equation), whether real or complex, are all less thanunity in absolute value.
In the first-order matrix difference equation
with state vector and transition matrix, converges asymptotically to the steady state vector if and only if all eigenvalues of the transition matrix (whether real or complex) have anabsolute value which is less than 1.
Consider the nonlinear first-order recurrence
This recurrence islocally stable, meaning that itconverges to a fixed point from points sufficiently close to, if the slope of in the neighborhood of is smaller thanunity in absolute value: that is,
A nonlinear recurrence could have multiple fixed points, in which case some fixed points may be locally stable and others locally unstable; for continuousf two adjacent fixed points cannot both be locally stable.
A nonlinear recurrence relation could also have a cycle of period for. Such a cycle is stable, meaning that it attracts a set of initial conditions of positive measure, if the composite function
with appearing times is locally stable according to the same criterion:
where is any point on the cycle.
In achaotic recurrence relation, the variable 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 alsologistic map,dyadic transformation, andtent map.
When solving anordinary differential equationnumerically, one typically encounters a recurrence relation. For example, when solving theinitial value problem
withEuler's method and a step size, one calculates the values
by the recurrence
Systems of linear first order differential equations can be discretized exactly analytically using the methods shown in thediscretization article.
Some of the best-known difference equations have their origins in the attempt to modelpopulation dynamics. For example, theFibonacci numbers were once used as a model for the growth of a rabbit population.
Thelogistic 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 morepopulations. For example, theNicholson–Bailey model for a host-parasite interaction is given by
with representing the hosts, and the parasites, at time.
Integrodifference equations are a form of recurrence relation important to spatialecology. These and other difference equations are particularly suited to modelingunivoltine populations.
Recurrence relations are also of fundamental importance inanalysis of algorithms.[8][9] If analgorithm 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 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.
A better algorithm is calledbinary 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
thetime complexity of which will be.
Indigital signal processing, recurrence relations can model feedback in a system, where outputs at one time become inputs for future time. They thus arise ininfinite impulse response (IIR)digital filters.
For example, the equation for a "feedforward" IIRcomb filter of delay is:
where is the input at time, is the output at time, and controls how much of the delayed signal is fed back into the output. From this we can see that
etc.
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, realGDP, etc.) in terms of past and current values of other variables.
{{cite web}}: CS1 maint: archived copy as title (link)