Recurrence relation

Last updated

In mathematics, a recurrence relation is an equation according to which the th term of a sequence 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 the order 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.

Contents

In linear recurrences, the nth term is equated to a linear function of the previous terms. A famous example is the recurrence for the Fibonacci numbers, where the order 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 For these recurrences, one can express the general term of the sequence as a closed-form expression of . As well, linear recurrences with polynomial coefficients depending on are also important, because many common elementary 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 .

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 X 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 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 orderk has the form

where 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

and the initial condition

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

for a given constant The behavior of the sequence depends dramatically on but is stable when the initial condition 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, which involves powers of the two roots of the characteristic polynomial ; 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 , 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 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:

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 involve very large integers as does the formula with factorials (if one uses 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

It is thus a special case of finite 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 index n in the sequence and not applied to the element

Given sequence the first difference of a is

The second difference is A simple computation shows that

More generally: the kth difference is defined recursively as and one has

This relation can be inverted, giving

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

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 two terms "recurrence relation" and "difference equation" are sometimes used interchangeably. See Rational difference equation and Matrix difference equation for example of uses of "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 -dimensional grids. Functions defined on -grids can also be studied with partial difference equations. [2]

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: [3]

Let

Then

If we apply the formula to and take the limit , 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 first-order rational difference equations

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 .

Stability

Stability of linear higher-order recurrences

The linear recurrence of order ,

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

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 an absolute value which is less than 1.

Stability of nonlinear first-order recurrences

Consider the nonlinear first-order recurrence

This recurrence is locally stable, meaning that it converges to a fixed point from points sufficiently close to , if the slope of in the neighborhood of 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.

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 a chaotic 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 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 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 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

with representing the hosts, and the parasites, at time .

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. [4] [5] 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 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 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 of which will be .

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 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.

Economics

Recurrence relations, especially linear recurrence relations, are used extensively in both theoretical and empirical economics. [6] [7] 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

Related Research Articles

<span class="mw-page-title-main">Binomial coefficient</span> Number of subsets of a given size

In mathematics, the binomial coefficients are the positive integers that occur as coefficients in the binomial theorem. Commonly, a binomial coefficient is indexed by a pair of integers nk ≥ 0 and is written It is the coefficient of the xk term in the polynomial expansion of the binomial power (1 + x)n; this coefficient can be computed by the multiplicative formula

In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the polynomial (x + y)n into a sum involving terms of the form axbyc, where the exponents b and c are nonnegative integers with b + c = n, and the coefficient a of each term is a specific positive integer depending on n and b. For example, for n = 4,

A finite difference is a mathematical expression of the form f (x + b) − f (x + a). If a finite difference is divided by ba, one gets a difference quotient. The approximation of derivatives by finite differences plays a central role in finite difference methods for the numerical solution of differential equations, especially boundary value problems.

In mathematics, Stirling numbers arise in a variety of analytic and combinatorial problems. They are named after James Stirling, who introduced them in a purely algebraic setting in his book Methodus differentialis (1730). They were rediscovered and given a combinatorial meaning by Masanobu Saka in 1782.

In mathematics, a generating function is a representation of an infinite sequence of numbers as the coefficients of a formal power series. Generating functions are often expressed in closed form, by some expression involving operations on the formal series.

In numerical analysis, polynomial interpolation is the interpolation of a given bivariate data set by the polynomial of lowest possible degree that passes through the points of the dataset.

In mathematics, the falling factorial is defined as the polynomial

<span class="mw-page-title-main">Bernstein polynomial</span> Type of polynomial used in Numerical Analysis

In the mathematical field of numerical analysis, a Bernstein polynomial is a polynomial expressed as a linear combination of Bernstein basis polynomials. The idea is named after mathematician Sergei Natanovich Bernstein.

In mathematics, especially in combinatorics, Stirling numbers of the first kind arise in the study of permutations. In particular, the unsigned Stirling numbers of the first kind count permutations according to their number of cycles.

In mathematics, and more specifically in analysis, a holonomic function is a smooth function of several variables that is a solution of a system of linear homogeneous differential equations with polynomial coefficients and satisfies a suitable dimension condition in terms of D-modules theory. More precisely, a holonomic function is an element of a holonomic module of smooth functions. Holonomic functions can also be described as differentiably finite functions, also known as D-finite functions. When a power series in the variables is the Taylor expansion of a holonomic function, the sequence of its coefficients, in one or several indices, is also called holonomic. Holonomic sequences are also called P-recursive sequences: they are defined recursively by multivariate recurrences satisfied by the whole sequence and by suitable specializations of it. The situation simplifies in the univariate case: any univariate sequence that satisfies a linear homogeneous recurrence relation with polynomial coefficients, or equivalently a linear homogeneous difference equation with polynomial coefficients, is holonomic.

In numerical analysis, finite-difference methods (FDM) are a class of numerical techniques for solving differential equations by approximating derivatives with finite differences. Both the spatial domain and time domain are discretized, or broken into a finite number of intervals, and the values of the solution at the end points of the intervals are approximated by solving algebraic equations containing finite differences and values from nearby points.

In commutative algebra, the Hilbert function, the Hilbert polynomial, and the Hilbert series of a graded commutative algebra finitely generated over a field are three strongly related notions which measure the growth of the dimension of the homogeneous components of the algebra.

In mathematics, the Schuette–Nesbitt formula is a generalization of the inclusion–exclusion principle. It is named after Donald R. Schuette and Cecil J. Nesbitt.

In mathematics, the Dickson polynomials, denoted Dn(x,α), form a polynomial sequence introduced by L. E. Dickson (1897). They were rediscovered by Brewer (1961) in his study of Brewer sums and have at times, although rarely, been referred to as Brewer polynomials.

In numerical analysis, von Neumann stability analysis is a procedure used to check the stability of finite difference schemes as applied to linear partial differential equations. The analysis is based on the Fourier decomposition of numerical error and was developed at Los Alamos National Laboratory after having been briefly described in a 1947 article by British researchers John Crank and Phyllis Nicolson. This method is an example of explicit time integration where the function that defines governing equation is evaluated at the current time. Later, the method was given a more rigorous treatment in an article co-authored by John von Neumann.

In discrete calculus the indefinite sum operator, denoted by or , is the linear operator, inverse of the forward difference operator . It relates to the forward difference operator as the indefinite integral relates to the derivative. Thus

In mathematics, the Fibonomial coefficients or Fibonacci-binomial coefficients are defined as

<span class="mw-page-title-main">Constant-recursive sequence</span> Infinite sequence of numbers satisfying a linear equation

In mathematics, an infinite sequence of numbers is called constant-recursive if it satisfies an equation of the form

In mathematics, a linear recurrence with constant coefficients sets equal to 0 a polynomial that is linear in the various iterates of a variable—that is, in the values of the elements of a sequence. The polynomial's linearity means that each of its terms has degree 0 or 1. A linear recurrence denotes the evolution of some variable over time, with the current time period or discrete moment in time denoted as t, one period earlier denoted as t − 1, one period later as t + 1, etc.

In mathematics a P-recursive equation is a linear equation of sequences where the coefficient sequences can be represented as polynomials. P-recursive equations are linear recurrence equations with polynomial coefficients. These equations play an important role in different areas of mathematics, specifically in combinatorics. The sequences which are solutions of these equations are called holonomic, P-recursive or D-finite.

References

Footnotes

  1. Jacobson, Nathan, Basic Algebra 2 (2nd ed.), § 0.4. pg 16.
  2. Partial difference equations, Sui Sun Cheng, CRC Press, 2003, ISBN   978-0-415-29884-1
  3. "Archived copy" (PDF). Archived (PDF) from the original on 2010-07-05. Retrieved 2010-10-19.{{cite web}}: CS1 maint: archived copy as title (link)
  4. Cormen, T. et al, Introduction to Algorithms, MIT Press, 2009
  5. R. Sedgewick, F. Flajolet, An Introduction to the Analysis of Algorithms, Addison-Wesley, 2013
  6. 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.
  7. Ljungqvist, Lars; Sargent, Thomas J. (2004). Recursive Macroeconomic Theory (Second ed.). Cambridge: MIT Press. ISBN   0-262-12274-X.

Bibliography