Relax, but Don't be Too Lazy

Assume that we wish to expand the product h = fg of two formal power series f and g. Classically, there are two types of algorithms to do this: zealous algorithms first expand f and g up to order n, multiply the results and truncate at order n. Lazy algorithms on the contrary compute the coefficients of f, g and h gradually and they perform no more computations than strictly necessary at each stage. In particular, at the moment we compute the coefficient hi of zi in h, only f0,..., fi and g0,..., gi are known.Lazy algorithms have the advantage that the coefficients of f and g may actually depend on "previous" coefficients of h, as long as they are computed before they are needed in the multiplication, i.e. the coefficients fi and gi may depend on h0,..., hi-1. For this reason, lazy algorithms are extremely useful when solving functional equations in rings of formal power series. However, lazy algorithms have the disadvantage that the classical asymptotically fast multiplication algorithms on polynomials--such as the divide and conquer algorithm and fast Fourier multiplication--cannot be used.In a previous paper, we therefore introduced relaxed algorithms, which share the property concerning the resolution of functional equations with lazy algorithms, but perform slightly more computations than lazy algorithms during the computation of a given coefficient of h. These extra computations anticipate the computations of the next coefficients of h and dramatically improve the asymptotic time complexities of such algorithms.In this paper, we survey several classical and new zealous algorithms for manipulating formal power series, including algorithms for multiplication, division, resolution of differential equations, composition and reversion. Next, we give various relaxed algorithms for these operations. All algorithms are specified in great detail and we prove theoretical time and space complexity bounds. Most algorithms have been experimentally implemented in C++ and we provide benchmarks. We conclude by some suggestions for future developments and a discussion of the fitness of the lazy and relaxed approaches for specific applications.This paper is intended both for those who are interested in the most recent algorithms for the manipulation of formal power series and for those who want to actually implement a power series library into a computer algebra system.

[1]  Philippe Flajolet,et al.  Automatic Average-Case Analysis of Algorithm , 1991, Theor. Comput. Sci..

[2]  Bruno Salvy,et al.  GFUN: a Maple package for the manipulation of generating and holonomic functions in one variable , 1994, TOMS.

[3]  Alain Denise,et al.  CS: a MuPAD package for counting and randomly generating combinatorial structures , 1998 .

[4]  H. T. Kung,et al.  O((n log n)3/2) ALGORITHMS FOR COMPOSITION AND REVERSION OF POWER SERIES , 1976 .

[5]  Donald Ervin Knuth,et al.  The Art of Computer Programming , 1968 .

[6]  Joris van der Hoeven,et al.  Lazy multiplication of formal power series , 1997, ISSAC.

[7]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[8]  Don H. Johnson,et al.  Gauss and the history of the fast Fourier transform , 1984, IEEE ASSP Magazine.

[9]  Joachim von zur Gathen,et al.  Modern Computer Algebra , 1998 .

[10]  G. Pólya Kombinatorische Anzahlbestimmungen für Gruppen, Graphen und chemische Verbindungen , 1937 .

[11]  S. Cook,et al.  ON THE MINIMUM COMPUTATION TIME OF FUNCTIONS , 1969 .

[12]  Philippe Flajolet,et al.  An introduction to the analysis of algorithms , 1995 .

[13]  J. Tukey,et al.  An algorithm for the machine calculation of complex Fourier series , 1965 .

[14]  É. Schost,et al.  Fast Multivariate Power Series Multiplication in Characteristic Zero , 2003 .

[15]  Anatolij A. Karatsuba,et al.  Multiplication of Multidigit Numbers on Automata , 1963 .

[16]  Richard P. Brent,et al.  On the Complexity of Composition and Generalized Composition of Power Series , 1980, SIAM J. Comput..

[17]  H. T. Kung,et al.  All Algebraic Functions Can Be Computed Fast , 1978, JACM.

[18]  Erich Kaltofen,et al.  Solving systems of nonlinear polynomial equations faster , 1989, ISSAC '89.

[19]  Alain Denise,et al.  Uniform Random Generation of Decomposable Structures Using Floating-Point Arithmetic , 1999, Theor. Comput. Sci..

[20]  Philippe Flajolet,et al.  A Calculus for the Random Generation of Labelled Combinatorial Structures , 1994, Theor. Comput. Sci..

[21]  Laurent Bernardin On bivariate Hensel and its parallelization , 1998, ISSAC '98.

[22]  A. Odlyzko Periodic oscillations of coefficients of power series that satisfy functional equations , 1982 .

[23]  A. C. Norman,et al.  Computing with Formal Power Series , 1975, TOMS.

[24]  Alberto Del Lungo,et al.  Random Generation of Trees and Other Combinatorial Objects , 1999, Theor. Comput. Sci..

[25]  John ffitch,et al.  CABAL: polynomial and power series algebra on a parallel computer , 1997, PASCO '97.

[26]  Daniel J. Bernstein Composing Power Series Over a Finite Ring in Essentially Linear Time , 1998, J. Symb. Comput..

[27]  D. Zeilberger A holonomic systems approach to special functions identities , 1990 .

[28]  H. T. Kung,et al.  Fast Algorithms for Manipulating Formal Power Series , 1978, JACM.

[29]  Joris van der Hoeven,et al.  Asymptotic expansions of exp-log functions , 1996, ISSAC '96.

[30]  R. Stanley What Is Enumerative Combinatorics , 1986 .

[31]  Philippe Flajolet,et al.  The Cycle Construction , 1991, SIAM J. Discret. Math..

[32]  Thom Mulders On Short Multiplications and Divisions , 2000, Applicable Algebra in Engineering, Communication and Computing.

[33]  L. Lipshitz,et al.  D-finite power series , 1989 .

[34]  Laurent Bernardin On bivariate Hensel lifting and its parallelization , 1997 .