Wikipedia / Recurrence relation
Wikipedia / Recurrence relation
In mathematics and computer science, a recurrence relation is an equationth term of a sequence is called the order numbers in the sequence have been given, the rest of the sequence can be calculated by repeatedly applying the equation.
In linear recurrences, the th term is equated to a linear function previous terms. A famous example is the recurrence for the Fibonacci numbers is two and the linear function merely adds the two previous terms. This example is a linear recurrence with constant coefficients For these recurrences, one can express the general term of the sequence as a closed-form expression. As well, linear recurrences with polynomial coefficients 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.
The concept of a recurrence relation can be extended to multidimensional arrays, that is, indexed families that are indexed by tuples of natural numbers.
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
where
is a function, where as its first element, called the initial value.
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 has the form
is a function that involves consecutive elements of the sequence. In this case, initial values are needed for defining a sequence.
Examples
Factorial
The factorial is defined by the recurrence relation
and the initial condition
This is an example of a linear recurrence with polynomial coefficients of order 1, with the simple polynomial (in )
as its only coefficient.
Logistic map
An example of a recurrence relation is the logistic map defined by
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
with initial conditions
Explicitly, the recurrence yields the equations
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; the generating function of the sequence is the rational function
Binomial coefficients
A simple example of a multidimensional recurrence relation is given by the binomial coefficients elements. They can be computed by the recurrence relation
. 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:
The binomial coefficients can also be computed with a uni-dimensional recurrence:
all involved integers are smaller than the final result).
Difference operator and difference equations Relationship to difference equations narrowly defined
The is an operator that maps sequences to sequences, and, more generally, functions and is defined, in functional notation, as
It is thus a special case of finite difference.
When using the index notation for sequences, the definition becomes
must be understood as the term of index
Given sequence the of
The A simple computation shows that
More generally: the th difference and one has
This relation can be inverted, giving
A of order is an equation that involves the first differences of a sequence or a function, in the same way as a differential equation of order relates the first derivatives of a function.
The two above relations allow transforming a recurrence relation of order into a difference equation of order , and, conversely, a difference equation of order into recurrence relation of order . 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
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, and the two terms "recurrence relation" and "difference equation" can be used interchangeably. 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
-grids can also be studied with partial difference equations.
Solving
Solving linear recurrence relations 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:
there is also a nice method to solve it:
Let
Then
, 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
is given by
the Bessel function, while
is solved by
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.
Solving first-order rational difference equations
.
Stability
Stability of linear higher-order recurrences
,
has the characteristic equation
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
In the first-order matrix difference equation
(whether real or complex) have an absolute value which is less than1.
Stability of nonlinear first-order recurrences
Consider the nonlinear first-order recurrence
This recurrence is locally stable, meaning that it converges is smaller than unity 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 continuous f two adjacent fixed points cannot both be locally stable.
. Such a cycle is stable, meaning that it attracts a set of initial conditions of positive measure, if the composite function
times is locally stable according to the same criterion:
is any point on the cycle.
In a chaotic 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
with Euler's method, one calculates the values
by the recurrence
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 populationss. For example, the Nicholson–Bailey model for a host-parasite interaction is given by
.
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. 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.
elements, in the worst case.
.
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
the time complexity.
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 is:
controls how much of the delayed signal is fed back into the output. From this we can see that
etc.
Economics
Recurrence relations, especially linear recurrence relations, are used extensively in both theoretical and empirical economics. 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
References
Footnotes
Bibliography
Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 1990. . Chapter 4: Recurrences, pp.62–90.
chapter 7.
Chapter 9.1: Difference Equations.
at EqWorld - The World of Mathematical Equations.
at EqWorld - The World of Mathematical Equations.
External links
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)