Recurrence relation
   HOME

TheInfoList



OR:

In
mathematics Mathematics is a field of study that discovers and organizes methods, Mathematical theory, theories and theorems that are developed and Mathematical proof, proved for the needs of empirical sciences and mathematics itself. There are many ar ...
, a recurrence relation is an
equation In mathematics, an equation is a mathematical formula that expresses the equality of two expressions, by connecting them with the equals sign . The word ''equation'' and its cognates in other languages may have subtly different meanings; for ...
according to which the nth term of a
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
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 th term is equated to a
linear function In mathematics, the term linear function refers to two distinct but related notions: * In calculus and related areas, a linear function is a function whose graph is a straight line, that is, a polynomial function of degree zero or one. For di ...
of the k previous terms. A famous example is the recurrence for the
Fibonacci number In mathematics, the Fibonacci sequence is a Integer sequence, sequence in which each element is the sum of the two elements that precede it. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers, commonly denoted . Many w ...
s, F_n=F_+F_ 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 In mathematics, an expression or equation is in closed form if it is formed with constants, variables, and a set of functions considered as ''basic'' and connected by arithmetic operations (, and integer powers) and function composition. ...
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
tuple In mathematics, a tuple is a finite sequence or ''ordered list'' of numbers or, more generally, mathematical objects, which are called the ''elements'' of the tuple. An -tuple is a tuple of elements, where is a non-negative integer. There is o ...
s of
natural number In mathematics, the natural numbers are the numbers 0, 1, 2, 3, and so on, possibly excluding 0. Some start counting with 0, defining the natural numbers as the non-negative integers , while others start with 1, defining them as the positive in ...
s.


Definition

A ''recurrence relation'' is an equation that expresses each element of a
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
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 :u_n=\varphi(n, u_)\quad\text\quad n>0, where :\varphi:\mathbb N\times X \to X is a function, where is a set to which the elements of a sequence must belong. For any u_0\in X, this defines a unique sequence with u_0 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 :u_n=\varphi(n, u_, u_, \ldots, u_)\quad\text\quad n\ge k, where \varphi: \mathbb N\times X^k \to X 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 In mathematics, the factorial of a non-negative denoted is the Product (mathematics), product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial: \begin n! &= n \times ...
is defined by the recurrence relation :n!=n\cdot (n-1)!\quad\text\quad n>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 :x_ = r x_n (1 - x_n), for a given constant r. The behavior of the sequence depends dramatically on r, but is stable when the initial condition x_0 varies.


Fibonacci numbers

The recurrence of order two satisfied by the
Fibonacci number In mathematics, the Fibonacci sequence is a Integer sequence, sequence in which each element is the sum of the two elements that precede it. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers, commonly denoted . Many w ...
s is the canonical example of a homogeneous linear recurrence relation with constant coefficients (see below). The Fibonacci sequence is defined using the recurrence :F_n = F_+F_ with initial conditions :F_0 = 0 :F_1 = 1. Explicitly, the recurrence yields the equations :F_2 = F_1 + F_0 :F_3 = F_2 + F_1 :F_4 = F_3 + F_2 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 t^2 = t + 1; the generating function of the sequence is the
rational function In mathematics, a rational function is any function that can be defined by a rational fraction, which is an algebraic fraction such that both the numerator and the denominator are polynomials. The coefficients of the polynomials need not be ...
: \frac.


Binomial coefficients

A simple example of a multidimensional recurrence relation is given by the
binomial coefficient 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 and is written \tbinom. It is the coefficient of the t ...
s \tbinom, which count the ways of selecting k elements out of a set of n elements. They can be computed by the recurrence relation :\binom=\binom+\binom, with the base cases \tbinom=\tbinom=1. Using this formula to compute the values of all binomial coefficients generates an infinite array called
Pascal's triangle In mathematics, Pascal's triangle is an infinite triangular array of the binomial coefficients which play a crucial role in probability theory, combinatorics, and algebra. In much of the Western world, it is named after the French mathematician Bla ...
. The same values can also be computed directly by a different formula that is not a recurrence, but uses
factorial In mathematics, the factorial of a non-negative denoted is the Product (mathematics), product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial: \begin n! &= n \times ...
s, multiplication and division, not just additions: :\binom=\frac. The binomial coefficients can also be computed with a uni-dimensional recurrence: :\binom n k = \binom n(n-k+1)/k, with the initial value \binom n 0 =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 involve very large integers as does the formula with factorials (if one uses \binom nk= \binom n, all involved integers are smaller than the final result).


Difference operator and difference equations

The is an operator that maps
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
s to sequences, and, more generally, functions to functions. It is commonly denoted \Delta, and is defined, in functional notation, as :(\Delta f)(x)=f(x+1)-f(x). It is thus a special case of
finite difference A finite difference is a mathematical expression of the form . Finite differences (or the associated difference quotients) are often used as approximations of derivatives, such as in numerical differentiation. The difference operator, commonly d ...
. When using the index notation for sequences, the definition becomes :(\Delta a)_n= a_ - a_n. The parentheses around \Delta f and \Delta a are generally omitted, and \Delta a_n must be understood as the term of index in the sequence \Delta a, and not \Delta applied to the element a_n. Given
sequence In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members (also called ''elements'', or ''terms''). The number of elements (possibly infinite) is cal ...
a=(a_n)_, the of is \Delta a. The is \Delta^2 a=(\Delta\circ\Delta)a= \Delta(\Delta a). A simple computation shows that :\Delta^2 a_n= a_ - 2a_ + a_n. More generally: the ''th difference'' is defined recursively as \Delta^k=\Delta\circ \Delta^, and one has :\Delta^k a_n = \sum_^k (-1)^t \binom a_. This relation can be inverted, giving :a_ = a_n + \Delta a_n + \cdots + \Delta^k(a_n). 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
derivative In mathematics, the derivative is a fundamental tool that quantifies the sensitivity to change of a function's output with respect to its input. The derivative of a function of a single variable at a chosen input value, when it exists, is t ...
s 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 :3\Delta^2 a_n + 2\Delta a_n + 7a_n = 0 is equivalent to the recurrence relation :3a_ = 4a_ - 8a_n, 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 In mathematics, time-scale calculus is a unification of the theory of difference equations with that of differential equations, unifying integral and differential calculus with the calculus of finite differences, offering a formalism for studying ...
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.


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: :a_ = f_n a_n + g_n, \qquad f_n \neq 0, there is also a nice method to solve it: :a_ - f_n a_n = g_n :\frac - \frac = \frac :\frac - \frac = \frac Let :A_n = \frac, Then :A_ - A_n = \frac :\sum_^(A_ - A_m) = A_n - A_0 = \sum_^\frac :\frac = A_0 + \sum_^\frac :a_n = \left(\prod_^ f_k \right) \left(A_0 + \sum_^\frac\right) If we apply the formula to a_ = (1 + h f_) a_n + hg_ and take the limit h \to 0, we get the formula for first order
linear differential equation In mathematics, a linear differential equation is a differential equation that is linear equation, linear in the unknown function and its derivatives, so it can be written in the form a_0(x)y + a_1(x)y' + a_2(x)y'' \cdots + a_n(x)y^ = b(x) wher ...
s 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 In mathematics, an orthogonal polynomial sequence is a family of polynomials such that any two different polynomials in the sequence are orthogonal In mathematics, orthogonality (mathematics), orthogonality is the generalization of the geom ...
, and many
special function Special functions are particular mathematical functions that have more or less established names and notations due to their importance in mathematical analysis, functional analysis, geometry, physics, or other applications. The term is defined by ...
s. For example, the solution to :J_=\fracJ_n-J_ is given by :J_n=J_n(z), the Bessel function, while :(b-n)M_ +(2n-b+z)M_n - nM_=0 is solved by :M_n=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 In mathematics, a polynomial is a Expression (mathematics), mathematical expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addit ...
, 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

A first order rational difference equation has the form w_ = \tfrac. Such an equation can be solved by writing w_t as a nonlinear transformation of another variable x_t which itself evolves linearly. Then standard methods can be used to solve the linear difference equation in x_t.


Stability


Stability of linear higher-order recurrences

The linear recurrence of order d, :a_n = c_1a_ + c_2a_+\cdots+c_da_, has the characteristic equation :\lambda^d - c_1 \lambda^ - c_2 \lambda^ - \cdots - c_d \lambda^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

In the first-order matrix difference equation : _t - x^*= A _-x^*/math> 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 In mathematics, the absolute value or modulus of a real number x, is the non-negative value without regard to its sign. Namely, , x, =x if x is a positive number, and , x, =-x if x is negative (in which case negating x makes -x positive), ...
which is less than 1.


Stability of nonlinear first-order recurrences

Consider the nonlinear first-order recurrence :x_n=f(x_). 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 \circ f \circ \cdots \circ 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 In mathematics, an ordinary differential equation (ODE) is a differential equation (DE) dependent on only a single independent variable (mathematics), variable. As with any other DE, its unknown(s) consists of one (or more) Function (mathematic ...
numerically, one typically encounters a recurrence relation. For example, when solving the initial value problem :y'(t) = f(t,y(t)), \ \ y(t_0)=y_0, with Euler's method and a step size h, one calculates the values :y_0=y(t_0), \ \ y_1=y(t_0+h), \ \ y_2=y(t_0+2h), \ \dots by the recurrence :\, y_ = y_n + hf(t_n,y_n), t_n = t_0 + nh Systems of linear first order differential equations can be discretized exactly analytically using the methods shown in the
discretization In applied mathematics, discretization is the process of transferring continuous functions, models, variables, and equations into discrete counterparts. This process is usually carried out as a first step toward making them suitable for numeri ...
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 number In mathematics, the Fibonacci sequence is a Integer sequence, sequence in which each element is the sum of the two elements that precede it. Numbers that are part of the Fibonacci sequence are known as Fibonacci numbers, commonly denoted . Many w ...
s 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
population Population is a set of humans or other organisms in a given region or area. Governments conduct a census to quantify the resident population size within a given jurisdiction. The term is also applied to non-human animals, microorganisms, and pl ...
s. For example, the Nicholson–Bailey model for a host-
parasite Parasitism is a Symbiosis, close relationship between species, where one organism, the parasite, lives (at least some of the time) on or inside another organism, the Host (biology), host, causing it some harm, and is Adaptation, adapted str ...
interaction is given by :N_ = \lambda N_t e^ :P_ = N_t(1-e^), with N_t representing the hosts, and P_t the parasites, at time t.
Integrodifference equation In mathematics, an integrodifference equation is a recurrence relation on a function space, of the following form: : n_(x) = \int_ k(x, y)\, f(n_t(y))\, dy, where \\, is a sequence in the function space and \Omega\, is the domain of those functi ...
s are a form of recurrence relation important to spatial
ecology Ecology () is the natural science of the relationships among living organisms and their Natural environment, environment. Ecology considers organisms at the individual, population, community (ecology), community, ecosystem, and biosphere lev ...
. 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 In mathematics and computer science, an algorithm () is a finite sequence of Rigour#Mathematics, mathematically rigorous instructions, typically used to solve a class of specific Computational problem, problems or to perform a computation. Algo ...
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 :c_1=1 :c_n=1+c_ the time complexity of which will be O(\log_2(n)).


Digital signal processing

In
digital signal processing Digital signal processing (DSP) is the use of digital processing, such as by computers or more specialized digital signal processors, to perform a wide variety of signal processing operations. The digital signals processed in this manner are a ...
, 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 filter In signal processing, a digital filter is a system that performs mathematical operations on a Sampling (signal processing), sampled, discrete-time signal to reduce or enhance certain aspects of that signal. This is in contrast to the other ma ...
s. For example, the equation for a "feedforward" IIR comb filter of delay T is: :y_t = (1 - \alpha) x_t + \alpha y_, where x_t is the input at time t, y_t is the output at time t, and \alpha controls how much of the delayed signal is fed back into the output. From this we can see that :y_t = (1 - \alpha) x_t + \alpha ((1-\alpha) x_ + \alpha y_) :y_t = (1 - \alpha) x_t + (\alpha-\alpha^2) x_ + \alpha^2 y_ 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 An interest rate is the amount of interest due per period, as a proportion of the amount lent, deposited, or borrowed (called the principal sum). The total interest on an amount lent or borrowed depends on the principal sum, the 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 In mathematics, an iterated function is a function that is obtained by composing another function with itself two or several times. The process of repeatedly applying the same function is called iteration. In this process, starting from some ...
*
Lagged Fibonacci generator A Lagged Fibonacci generator (LFG or sometimes LFib) is an example of a pseudorandom number generator. This class of random number generator is aimed at being an improvement on the 'standard' linear congruential generator. These are based on a gener ...
*
Master theorem (analysis of algorithms) Master, master's or masters may refer to: Ranks or titles In education: *Master (college), head of a college *Master's degree, a postgraduate or sometimes undergraduate degree in the specified discipline * Schoolmaster or master, presiding offic ...
*
Mathematical induction Mathematical induction is a method for mathematical proof, proving that a statement P(n) is true for every natural number n, that is, that the infinitely many cases P(0), P(1), P(2), P(3), \dots  all hold. This is done by first proving a ...
*
Orthogonal polynomials In mathematics, an orthogonal polynomial sequence is a family of polynomials such that any two different polynomials in the sequence are orthogonal In mathematics, orthogonality (mathematics), orthogonality is the generalization of the geom ...
*
Recursion Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines ranging from linguistics to logic. The most common application of recursion is in m ...
*
Recursion (computer science) In computer science, recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves such recursion, recursive problems by using function (computer sc ...
*
Time scale calculus In mathematics, time-scale calculus is a unification of the theory of difference equations with that of differential equations, unifying integral and differential calculus with the calculus of finite differences, offering a formalism for studying ...


References


Footnotes


Bibliography

* * * * * Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. ''
Introduction to Algorithms ''Introduction to Algorithms'' is a book on computer programming by Thomas H. Cormen, Charles E. Leiserson, Ron Rivest, Ronald L. Rivest, and Clifford Stein. The book is described by its publisher as "the leading algorithms text in universities w ...
'', 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) {{Authority control Algebra Combinatorics