Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Table 1: Complexity of solving linear differential equations/systems for N r. Entries marked with a ‘?’
correspond to new results.
is good with respect to N , but the exponential depen- We encapsulate our main complexity results in
dence in the order r is unacceptable. Thm. 1 below. When FFT is used, the functions M(N )
Instead, we devise in §2 a specific Newton iteration and MM(r, N ) have, up to logarithmic terms, a nearly
for Y 0 = A(t)Y . Thus we solve problems i and I linear growth in N , see §1.5. Thus, the results in the
in O(MM(r, N )), where MM(r, N ) is the number of following theorem are quasi-optimal.
operations in K required to multiply r × r matrices with
Theorem 1. Let N and r be two positive integers and
polynomial entries of degree less than N . For instance,
let K be a field of characteristic zero or at least N . Then
when K = Q, this is O(rω N + r2 M(N )), where rω can
we can solve:
be seen as an abbreviation for MM(r, 1), see §1.5 below.
(a) problems i and I in O (MM(r, N )) operations in K;
1.2 Divide-and-conquer. The resolution of prob-
lems i and I by Newton iteration relies on the fact that a (b) problem ii in O (r M(N ) log N ) operations in K;
whole basis is computed. When dealing with problems
(c) problem II in O r2 M(N ) log N operations in K.
ii and II, we do not know how to preserve this algorith-
mic structure while simultaneously saving a factor r. 1.3 Special Coefficients. For special classes of co-
To solve problems ii and II, we therefore propose efficients, we give different algorithms of better com-
in §3 an alternative algorithm, whose complexity is also plexity. We isolate two important classes of equations:
nearly linear in N . It is not quite as good, being in that with constant coefficients and that with polynomial
O(M(N ) log N )), but its dependence in the order r is coefficients. In the case of constant coefficients, our al-
better: linear for i and quadratic for ii. In a different gorithms are based on the use of the Laplace transform,
model of computation with power series, based on the that allows us to reduce the resolution of differential
so-called relaxed multiplication, van der Hoeven briefly equations with constant coefficients to manipulations
outlines another algorithm [35, §4.5.2] solving problem ii with rational functions. In the case of polynomial co-
in O(r M(N ) log N ). To our knowledge, this result efficients, we exploit the linear recurrence satisfied by
cannot be transferred to the usual model of power series the coefficients of solutions. The complexity results are
multiplication (called zealous in [35]). summarized in the following theorem.
We use a divide-and-conquer technique similar to
that used in the fast Euclidean algorithm [19, 29, Theorem 2. Let N and r be two positive integers and
34]. For instance, to solve problem ii, our algorithm let K be a field of characteristic zero or at least N .
divides it into two similar problems of halved size. Then, for differential equations and systems with con-
The key point is that the lowest coefficients of the stant coefficients, we can solve:
solution y(t) only depend on the lowest coefficients of
(a) problem i in O (rN ) operations in K;
the coefficients ai . Our algorithm first computes the
desired solution y(t) at precision only N/2, then it (b) problem ii in O (M(r) (1 + N/r)) operations in K;
recovers the remaining coefficients of y(t) by recursively
solving at precision N/2 a new differential equation. (c) problem I in O rω+1 log r + rM(r)N operations
The main idea of this second algorithm is close to that in K;
used for solving first-order difference equations in [14]. (d) problem II in O (rω log r+M(r)N ) operations in K.
1.4 Non-linear Systems. As an important conse- in L(n) = O(M(n)). As a consequence, if ϕ is an r-
quence of Thm. 1, we improve the known complexity variate sparse polynomial with m monomials of any de-
results for the problem of solving non-linear systems of gree, then L(n) = O(mr M(n)).
differential equations. To do so, we use a classical reduc- Another important class of systems with a sub-
tion technique from the non-linear to the linear case, see quadratic L(N ) is provided by rational systems, where
for instance [28, §25] and [8, §5.2] or [21] in a combinato- each ϕi is in K(y1 , . . . , yr ). Supposing that the com-
rial context. For simplicity, we only consider non-linear plexity of evaluation of ϕ is bounded by L (i.e., for any
systems of first order. There is no loss of generality in point z in Kr at which ϕ is well defined, the value ϕ(z)
doing so: more general cases can be reduced to that can be computed using at most L operations in K), then,
one by adding new unknowns and possibly differentiat- the Baur-Strassen theorem [1] implies that the com-
ing once. The following result generalizes [8, Thm. 5.1]. plexity of evaluation of the Jacobian Jac(ϕ) is bounded
If F = (F1 , . . . , Fr ) is a differentiable function bearing by 5L, and therefore, we can take L(n) = M(n)L in the
on r variables y1 , . . . , yr , we use the notation Jac(F ) for statement of Thm. 3.
the Jacobian matrix (∂Fi /∂yj )1≤i,j≤r .
1.5 Basic Complexity Notation. Our algorithms
Theorem 3. Let N, r ∈ N, let K be a field of charac- ultimately use, as a basic operation, multiplication of
teristic 0 or at least N and let ϕ denote (ϕ1 , . . . , ϕr ),
matrices with entries that are polynomials (or truncated
where the ϕi (t, y) are multivariate power series in power series). Thus, to estimate their complexities in
K[[t, y1 , . . . , yr ]]. a unified manner, we use a function MM : N × N → N
Let L : N → N be such that the first n terms of such that any two r × r matrices with polynomial
the compositions ϕ(t, s(t)) and Jac(ϕ)(t, s(t)) can be entries in K[t] of degree less than d can be multi-
computed in L(n) operations in K, for all n ∈ N and plied using MM(r, d) operations in K. In particu-
for all s(t) in K[[t]]r . lar, MM(1, d) represents the number of base field op-
Suppose in addition that the function n 7→ L(n)/n erations required to multiply two polynomials of degree
is increasing. Given initial conditions v in Mr×1 (K), less than d, while MM(r, 1) is the arithmetic cost of
if the differential system scalar r × r matrix multiplication. For simplicity, we de-
note MM(1, d) by M(d) and we have MM(r, 1) = O(rω ),
y 0 = ϕ(t, y), y(0) = v, where 2 ≤ ω ≤ 3 is the so-called exponent of matrix mul-
tiplication, see, e.g., [9] and [15].
admits a solution in Mr×1 (K[[t]]), then the first N Using the algorithms of [30, 10], one can take M(d)
terms of such a solution y(t) can be computed in in O(d log d log log d); over fields supporting FFT, one
can take it in O(d log d). By [10] we can always
O L(N ) + min(MM(r, N ), r2 M(N ) log N )
choose MM(r, d) in O(rω M(d)), but better estimates
are known in important particular cases. For instance,
operations in K.
over fields of characteristic 0 or larger than 2d, we
have MM(r, d) = O(rω d + r2 M(d)), see [5, Th. 4]. To
Werschulz [36, Thm. 3.2] gave an algorithm solving the
simplify the complexity analyses of our algorithms,
same problem using the integral Volterra-type equation
we suppose that the multiplication cost function MM
technique described in [28, pp. 172–173]. With our
no- satisfies the following standard growth hypothesis for
2
tation, his algorithm uses O L(N ) + r N M(N ) oper-
all integers d1 , d2 and r:
ations in K to compute a solution at precision N . Thus,
our algorithm is an improvement for cases where L(N ) MM(r, d1 ) MM(r, d2 )
is known to be subquadratic with respect to N . (1.2) ≤ if d1 ≤ d2 .
d1 d2
The best known algorithms for power series compo-
sition in r ≥ 2 variables require, at least on “generic” In particular, Equation (1.2) implies the inequalities
entries, a number L(n) = O(nr−1 M(n)) of operations
in K to compute the first n coefficients of the com- 2M(2κ−1 ) + 4M(2κ−2 ) + . . . + 2κ M(1) ≤ κM(2κ ),
position [7, §3]. This complexity is nearly optimal MM(r, 2κ )+MM(r, 2κ−1 )+. . .+MM(r, 1) ≤ 2MM(r, 2κ ).
with respect to the size of a generic input. By con-
trast, in the univariate√case, the best known result [8, These inequalities are crucial to prove the estimates in
Th. 2.2] is L(n) = O( n log n M(n)). For special en- Thms. 1 and 3. Note that when the available multipli-
tries, however, better results can be obtained, already cation algorithm is slower than quasi-linear (e.g., Karat-
in the univariate case: exponentials, logarithms, pow- suba or naive multiplication), then the factor κ in the
ers of univariate power series can be computed [6, §13] right-hand side of the first inequality can be replaced
by a constant and thus the estimates M(N ) log N in our SolveHomDiffSys(A, N, Y0 )
complexities become M(N ) in those cases.
Input: Y0 , A0 , . . . , AN −2 in Mr×r (K), A = Ai ti .
P
κ κ
Table 2: Computation of a basis of a linear homogeneous system with r equations, at precision N : comparison
of timings (in seconds) between algorithm SolveDiffHomSys and the naive algorithm. Entries marked with a ‘?’
are estimated timings.
40
Trans. Numer. Anal., 18:91–100, 2004.
[23] H. Mahmoud and B. Pittel. On the most probable
30
shape of a search tree grown from a random permuta-
20 tion. SIAM J. Alg. Discr. Meth., 5(1):69–81, 1984.
[24] R. T. Moenck and J. H. Carter. Approximate algo-
10 rithms to derive exact solutions to systems of linear
equations. In EUROSAM’79, pages 65–73. 1979.
0
200 400 600 800 1000 1200 1400 1600 [25] C. Moler and C. Van Loan. Nineteen dubious ways
precision
to compute the exponential of a matrix. SIAM Rev.,
Figure 8: Same, compared to the naive algorithm 20(4):801–836, 1978.
for a second-order equation. [26] C. Moler and C. Van Loan. Nineteen dubious ways to
compute the exponential of a matrix, twenty-five years
later. SIAM Rev., 45(1):3–49, 2003.
[27] W. O. Pennell. A New Method for Determining a Se-
In Analytic computational complexity, pages 151–176. ries Solution of Linear Differential Equations with Con-
Academic Press, New York, 1976. stant or Variable Coefficients. Amer. Math. Monthly,
[7] R. P. Brent and H. T. Kung. Fast algorithms for com- 33(6):293–307, 1926.
position and reversion of multivariate power series. In [28] L. B. Rall. Computational solution of nonlinear oper-
Proc. Conf. Theoretical Computer Science, University ator equations. J. Wiley & Sons Inc., New York, 1969.
of Waterloo, Canada, Aug. 1977, pages 149–158, 1977. [29] A. Schönhage. Schnelle Berechnung von Ketten-
[8] R. P. Brent and H. T. Kung. Fast algorithms for bruchentwicklungen. Acta Inform., 1:139–144, 1971.
manipulating formal power series. J. ACM, 25(4):581– [30] A. Schönhage and V. Strassen. Schnelle Multiplikation
595, 1978. großer Zahlen. Computing, 7:281–292, 1971.
[9] P. Bürgisser, M. Clausen, and M. A. Shokrollahi. Al- [31] G. Schulz. Iterative Berechnung der reziproken Matrix.
gebraic complexity theory, volume 315 of Grundlehren Z. Angew. Math. Mech., 13:57–59, 1933.
Math. Wiss. Springer–Verlag, 1997. [32] A. Storjohann. Deterministic computation of the
[10] D. G. Cantor and E. Kaltofen. On fast multiplication Frobenius form. In FOCS’01, pages 368–377.
of polynomials over arbitrary algebras. Acta Inform., [33] A. Storjohann. High-order lifting. In ISSAC’02, pages
28(7):693–701, 1991. 246–254. ACM, 2002.
[11] Fiduccia, C. M. An efficient formula for linear recur- [34] V. Strassen. The computational complexity of contin-
rences SIAM J. Comput., 14(1):106–112, 1985. ued fractions. SIAM J. Comput., 12:1–27, 1983.
[12] P. Flajolet, G. Labelle, L. Laforest, and B. Salvy. [35] J. van der Hoeven. Relax, but don’t be too lazy. J.
Hypergeometrics and the cost structure of quadtrees. Symbolic Comput., 34(6):479–542, 2002.
Random Structures & Algorithms, 7(1):117–144, 1995. [36] A. G. Werschulz. Computational complexity of one-
[13] P. Flajolet, P. Zimmermann, and B. Van Cutsem. step methods for systems of differential equations.
A Calculus for the Random Generation of Labelled Math. Comp., 34(149):155–174, 1980.