Constant-recursive sequence
This article, Constant-recursive sequence, has recently been created via the Articles for creation process. Please check to see if the reviewer has accidentally left this template after accepting the draft and take appropriate action as necessary.
Reviewer tools: Inform author |
In mathematics, a constant-recursive sequence or C-finite sequence is sequence satisfying a linear recurrence with constant coefficients.
Examples
Fibonacci sequence
The sequence of Fibonacci numbers satisfies 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, ...
It can be solved by methods described below yielding the closed-form expression, which involves powers of the two roots of the characteristic polynomial t2 = t + 1; the generating function of the sequence is the rational function
Lucas sequences
The sequence 2, 1, 3, 4, 7, 11, 18, 29, 47, 76, 123, 199, ... of Lucas numbers satisfies the same recurrence as the Fibonacci sequence but with initial conditions
More generally, every Lucas sequence is a constant-recursive sequence.
Structure of a homogeneous linear recurrence relations with constant coefficients
An order d homogeneous linear recurrence relation with constant coefficients is an equation of the form
where the d coefficients ci (for all i) are constants.
More precisely, this is an infinite list of simultaneous linear equations, one for each n>d−1. A sequence that satisfies a relation of this form is called a linear recurrence sequence or LRS. There are d degrees of freedom for LRS, i.e., the initial values can be taken to be any values but then the linear recurrence determines the sequence uniquely.
The same coefficients yield the characteristic polynomial (also "auxiliary polynomial")
whose d roots play a crucial role in finding and understanding the sequences satisfying the recurrence. If the roots r1, r2, ... are all distinct, then the solution to the recurrence takes the form
where the coefficients ki are determined in order to fit the initial conditions of the recurrence. When the same roots occur multiple times, the terms in this formula corresponding to the second and later occurrences of the same root are multiplied by increasing powers of n. For instance, if the characteristic polynomial can be factored as (x−r)3, with the same root r occurring three times, then the solution would take the form
Rational generating function
Theorem: Linear recursive sequences are precisely the sequences whose generating function is a rational function. The denominator is the polynomial obtained from the auxiliary polynomial by reversing the order of the coefficients, and the numerator is determined by the initial values of the sequence.[2]
The simplest cases are periodic sequences, , which have sequence and generating function a sum of geometric series:
More generally, given the recurrence relation:
with generating function
the series is annihilated at ad and above by the polynomial:
That is, multiplying the generating function by the polynomial yields
as the coefficient on , which vanishes (by the recurrence relation) for n ≥ d. Thus
so dividing yields
expressing the generating function as a rational function.
The denominator is a transform of the auxiliary polynomial (equivalently, reversing the order of coefficients); one could also use any multiple of this, but this normalization is chosen both because of the simple relation to the auxiliary polynomial, and so that .
The generating function of the Catalan numbers is not a rational function, so the theorem tells us that the Catalan numbers do not satisfy a linear recurrence with constant coefficients.
Solving homogeneous linear recurrence relations with constant coefficients
For order 1, the recurrence
has the solution an = rn with a0 = 1 and the most general solution is an = krn with a0 = k. The characteristic polynomial equated to zero (the characteristic equation) is simply t − r = 0.
Solutions to such recurrence relations of higher order are found by systematic means, often using the fact that an = rn is a solution for the recurrence exactly when t = r is a root of the characteristic polynomial. This can be approached directly or using generating functions (formal power series) or matrices.
Consider, for example, a recurrence relation of the form
When does it have a solution of the same general form as an = rn? Substituting this guess (ansatz) in the recurrence relation, we find that
must be true for all n > 1.
Dividing through by rn−2, we get that all these equations reduce to the same thing:
which is the characteristic equation of the recurrence relation. Solve for r to obtain the two roots λ1, λ2: these roots are known as the characteristic roots or eigenvalues of the characteristic equation. Different solutions are obtained depending on the nature of the roots: If these roots are distinct, we have the general solution
while if they are identical (when A2 + 4B = 0), we have
This is the most general solution; the two constants C and D can be chosen based on two given initial conditions a0 and a1 to produce a specific solution.
In the case of complex eigenvalues (which also gives rise to complex values for the solution parameters C and D), the use of complex numbers can be eliminated by rewriting the solution in trigonometric form. In this case we can write the eigenvalues as Then it can be shown that
can be rewritten as[3]: 576–585
where
Here E and F (or equivalently, G and δ) are real constants which depend on the initial conditions. Using
one may simplify the solution given above as
where a1 and a2 are the initial conditions and
In this way there is no need to solve for λ1 and λ2.
In all cases—real distinct eigenvalues, real duplicated eigenvalues, and complex conjugate eigenvalues—the equation is stable (that is, the variable a converges to a fixed value [specifically, zero]) if and only if both eigenvalues are smaller than one in absolute value. In this second-order case, this condition on the eigenvalues can be shown[4] to be equivalent to |A| < 1 − B < 2, which is equivalent to |B| < 1 and |A| < 1 − B.
The equation in the above example was homogeneous, in that there was no constant term. If one starts with the non-homogeneous recurrence
with constant term K, this can be converted into homogeneous form as follows: The steady state is found by setting bn = bn−1 = bn−2 = b* to obtain
Then the non-homogeneous recurrence can be rewritten in homogeneous form as
which can be solved as above.
The stability condition stated above in terms of eigenvalues for the second-order case remains valid for the general nth-order case: the equation is stable if and only if all eigenvalues of the characteristic equation are less than one in absolute value.
Solving via linear algebra
A linearly recursive sequence y of order n
is identical to
Expanded with n-1 identities of kind this n-th order equation is translated into a system of n first order linear equations,
Observe that the vector can be computed by n applications of the companion matrix, C, to the initial state vector, . Thereby, n-th entry of the sought sequence y, is the top component of .
Eigendecomposition, into eigenvalues, , and eigenvectors, , is used to compute Thanks to the crucial fact that system C time-shifts every eigenvector, e, by simply scaling its components λ times,
that is, time-shifted version of eigenvector,e, has components λ times larger, the eigenvector components are powers of λ, and, thus, recurrent homogeneous linear equation solution is a combination of exponential functions, . The components can be determined out of initial conditions:
Solving for coefficients,
This also works with arbitrary boundary conditions , not necessary the initial ones,
This description is really no different from general method above, however it is more succinct. It also works nicely for situations like
where there are several linked recurrences.[5]
Solving with z-transforms
Certain difference equations - in particular, linear constant coefficient 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.
Theorem
Given a homogeneous linear recurrence relation with constant coefficients of order d, let p(t) be the characteristic polynomial (also "auxiliary polynomial")
such that each ci corresponds to each ci in the original recurrence relation (see the general form above). Suppose λ is a root of p(t) having multiplicity r. This is to say that (t−λ)r divides p(t). The following two properties hold:
- Each of the r sequences 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 λ varies over all distinct roots of p(t).
As a result of this theorem a homogeneous linear 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 an as a linear combination of all the roots (counting multiplicity as shown in the theorem above) with unknown coefficients bi.
- This is the general solution to the original recurrence relation. (q is the multiplicity of λ*)
- 4. Equate each from part 3 (plugging in n = 0, ..., d into the general solution of the recurrence relation) with the known values from the original recurrence relation. However, the values an from the original recurrence relation used do not usually have to be contiguous: excluding exceptional cases, just d of them are needed (i.e., for an original homogeneous linear recurrence relation of order 3 one could use the values a0, a1, a4). This process will produce a linear system of d equations with d unknowns. Solving these equations for the unknown 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 of the original recurrence relation).
The method for solving linear differential equations is similar to the method above—the "intelligent guess" (ansatz) for linear differential equations with constant coefficients is eλx where λ is a complex number that is determined by substituting the guess into the differential equation.
This is not a coincidence. Considering the Taylor series of the solution to a linear differential equation:
it can be seen that the coefficients of the series are given by the nth derivative of f(x) evaluated at the point a. The differential equation provides a linear difference equation relating these coefficients.
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:
and more generally
Example: The recurrence relationship for the Taylor series coefficients of the equation:
is given by
or
This example shows how problems generally solved using the power series solution method taught in normal differential equation classes can be solved in a much easier way.
Example: The differential equation
has solution
The conversion of the differential equation to a difference equation of the Taylor coefficients is
It is easy to see that the nth derivative of eax evaluated at 0 is an
Non-homogeneous linear recurrence relations with constant coefficients
If the recurrence is non-homogeneous, 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 non-homogeneous recurrence is the method of symbolic differentiation. For example, consider the following recurrence:
This is an non-homogeneous recurrence. If we substitute n ↦ n+1, we obtain the recurrence
Subtracting the original recurrence from this equation yields
or equivalently
This is a homogeneous recurrence, which can be solved by the methods explained above. In general, if a linear recurrence has the form
where are constant coefficients and p(n) is the inhomogeneity, then if p(n) is a polynomial with degree r, then this non-homogeneous recurrence can be reduced to a homogeneous recurrence by applying the method of symbolic differencing r times.
If
is the generating function of the inhomogeneity, the generating function
of the non-homogeneous recurrence
with constant coefficients ci is derived from
If P(x) is a rational generating function, A(x) is also one. The case discussed above, where pn = K is a constant, emerges as one example of this formula, with P(x) = K/(1−x). Another example, the recurrence with linear inhomogeneity, arises in the definition of the schizophrenic numbers. The solution of homogeneous recurrences is incorporated as p = P = 0.
Notes
- ^ Greene, Daniel H.; Knuth, Donald E. (1982), "2.1.1 Constant coefficients – A) Homogeneous equations", Mathematics for the Analysis of Algorithms (2nd ed.), Birkhäuser, p. 17.
- ^ Martino, Ivan; Martino, Luca (2013-11-14). "On the variety of linear recurrences and numerical semigroups". Semigroup Forum. 88 (3): 569–574. doi:10.1007/s00233-013-9551-2. ISSN 0037-1912.
- ^ Chiang, Alpha C., Fundamental Methods of Mathematical Economics, third edition, McGraw-Hill, 1984.
- ^ Papanicolaou, Vassilis, "On the asymptotic stability of a class of linear difference equations," Mathematics Magazine 69(1), February 1996, 34–43.
- ^ Maurer, Stephen B.; Ralston, Anthony (1998), Discrete Algorithmic Mathematics (2nd ed.), A K Peters, p. 609, ISBN 9781568810911.
References
- Brousseau, Alfred (1971). Linear Recursion and Fibonacci Sequences. Fibonacci Association.
- Graham, Ronald L.; Knuth, Donald E.; Patashnik, Oren (1994). Concrete Mathematics: A Foundation for Computer Science (2 ed.). Addison-Welsey. ISBN 0-201-55802-5.
External links
- "OEIS Index Rec". 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)