Recurrence relation
Encyclopedia : R : RE : REC : Recurrence relation
- Recurrent redirects here; for the meaning of "recurrent" in contemporary hit radio, see recurrent rotation.
- Recurrence redirects here; for Henri Poincaré's theorem on dynamical systems, see Poincaré recurrence theorem.
For example (the logistic map):
- [x_ = r x_n (1 - x_n) \,]
Solving a recurrence relation means obtaining a non-recursive function of n.
Linear homogeneous recurrence relations with constant coefficients
The term linear means that each term of the sequence is defined as a linear function of the preceding terms.
The general form of a linear recurrence relation of order [d \,] is as follows:
- [a_n = c_1a_ + c_2a_+...+c_da_ + c \, ]
In order to obtain a unique solution to the linear recurrence there must be some initial conditions, as the first number in the sequence can not depend on other numbers in the sequence and must be set to some value.
Solving linear recurrence relations
Solutions to recurrence relations are found by systematic means, often by using generating functions (formal power series) or by noticing the fact that rn is a solution for particular values of r.
Consider, for example, a recurrence relation of the form
- [a_=Aa_+Ba_. \,]
- [r^=Ar^+Br^. \,]
- [r^2=Ar+B \,]
- [r^2-Ar-B=0 \,]
- [a_n = C\lambda_1^n+D\lambda_2^n \,]
- [a_n = C\lambda^n+Dn\lambda^n \,]
Different solutions are obtained depending on the nature of the roots of the characteristic equation.
Certain difference equations can be solved using z-transforms. The z-transforms are a class of integral transforms that lead to more convenient algebraic manipulations and more straightforward solutions. There are cases in which obtaining a direct solution would be all but impossible, yet solving the problem via a thoughtfully chosen integral transform is straightforward.
Linear homogeneous recurrence relations with constant coefficients theorem
Given a linear homogeneous recurrence relation with constant coefficients of order [ d \,], let [p(t) \,] be the characteristic polynomial[t^d - c_1t^ - c_2t^-...-c_ = 0 \,] such that each [c_i \,] corresponds to each [c_i \,] in the original recurrence relation (see the general form above). Suppose [\lambda \,] is a root of [p(t) \,] having multiplicity [r \,]. This is to say that [(t-\lambda)^r \,] divides [p(t) \,]. The following two properties hold:
- Each of the [r \, ] sequences [\lambda^n, n\lambda^n, n^2\lambda^n,...,n^\lambda^n \,] satisfies the recurrence relation.
- Any sequence satisfying the recurrence relation can be written uniquely as a linear combination of solutions constructed in part 1.
As a result of this theorem a linear homogeneous recurrence relation with constant coefficients can be solved in the following manner:
- Find the characteristic polynomial [p(t) \,].
- Find the roots of [p(t) \,] counting multiplicity.
- Write [a_n \,] as a linear combination of all the roots (counting multiplicity as shown in the theorem above) with unknown coefficients.
This is the general solution to the original recurrence relation.
(Note: [q \,] is the multiplicty of [\lambda_ \,])
4. Equate each [a_0, a_1, a_2,...,a_d \,] from part 3 (plugging in [n = 0,...,d \,] into the general solution of the recurrence relation) with the known values [a_0, a_1, a_2,...,a_d \, ] from the original recurrence relation. Note, however, that the values [a_n \,] from the original recurrence relation used do not have to be contiguous, just [d \,] of them are needed (i.e. for an original linear homogeneous recurrence relation of order 3 one could use the values [a_0, a_1, a_4 \,]). This process will produce a linear system of [d \,] equations with [d\,] unknowns. Solving these equations for the [c_1, c_2, c_3,...,c_d \,] coefficients of the general solution and plugging these values back into the general solution will produce the particular solution to the original recurrence relation that fits the original recurrence relation's initial conditions (as well as all subsequent values [a_0,a_1,a_2,a_3... \,] of the original recurrence relation).
Interestingly, the method for solving linear differential equations is similar to the method above — the "intelligent guess" for linear differential equations with constant coefficients is [e^] where [\lambda] is a complex number that is determined by substituting the guess into the differential equation.
This is not a coincidence. If you consider the Taylor series of the solution to a linear differential equation:
- [\sum_^ \frac(a)} (x-a)^]
This equivalence can be used to quickly solve for the recurrence relationship for the coefficients in the power series solution of a linear differential equation.
The rule of thumb (for equations in which the polynomial multiplying the first term is non-zero at zero) is that:
- [y^ \to f[n+k] ]
- [x^m*y^ \to n(n-1)(n-m+1)f[n+k-m]]
- [ (x^2 + 3x -4)y^ -(3x+1)y^ + 2y = 0\, ]
- [ n(n-1)f[n+1] + 3nf[n+2] -4f[n+3] -3nf[n+1] -f[n+2]+ 2f[n] = 0\, ]
- [-4f[n+3] +2nf[n+2] + n(n-4)f[n+1] +2f[n] = 0.\,]
Example: The differential equation
- [ay'' + by' +cy = 0\,]
- [ y=e^.\, ]
- af[n + 2] + bf[n + 1] + cf[n] = 0.
Solving inhomogeneous recurrence relations
If the recurrence is inhomogeneous, a particular solution can be found by the method of undetermined coefficients and the solution is the sum of the solution of the homogeneous and the particular solutions. Another method to solve an inhomogeneous recurrence is the method of symbolic differentiation. For example, consider the following recurrence:
- [a_ = a_ + 1\,]
- [a_ = a_ + 1\,]
- [a_ - a_ = a_ - a_\,]
- [a_ = 2 a_ - a_\,]
- [ a_ = \lambda_ a_ + \lambda_ a_ + \cdots + \lambda_1 a_ + \lambda_0 a_ + p(n) ]
Example: Fibonacci numbers
The Fibonacci numbers are defined using the linear recurrence relation
- [F_ = F_+F_ \,]
- [F_ = 0 \,]
- [F_ = 1, \,]
- [F_n = }]
- [\phi = \over 2}]
- 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 ...
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)), \qquad y(t_0)=y_0, \qquad\qquad]
- [ y_ = y_n + hf(t_n,y_n). ]
Systems of linear first order differential equations can be discretized exactly analytically using the methods shown in the discretization article.
See also
- Differential equation
- Recursion
- Holonomic function
- Lagged Fibonacci generator
- Master theorem
- Circle points segments proof
References
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 1990. ISBN 0262032937. Chapter 4: Recurrences, pp.62–90.
- [Difference and Functional Equations: Exact Solutions] at EqWorld - The World of Mathematical Equations.
- [Difference and Functional Equations: Methods] at EqWorld - The World of Mathematical Equations.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
