On the Number of Multiplications for the Evaluation of a Polynomial and Some of Its Derivatives

A family of new algorithms is given for evaluating the first <italic>m</italic> derivatives of a polynomial. In particular, it is shown that all derivatives may be evaluated in 3<italic>n</italic> - 2 multiplications. The best previous result required 1/2<italic>n</italic>(<italic>n</italic> + 1) multiplications. Some optimality results are presented.


INTRODUCTION
Some of the recent work in computational complexity has dealt with the number of arithmetic operations needed to evaluate a polynomial or a polynomial and its first derivative [B072], [MU71], [PA71]. Here we consider the evaluation of a polynomial and its first m derivatives and, in particular, the calculation of all the derivatives.
Let P denote a polynomial of degree n. Define a normalized derivative as P^/i! • The normalized derivatives are commonly needed for applications (Section 7). When we refer to derivatives in this paper we always mean normalized derivatives. We consider P itself to be the zeroth derivative P^ -2-Since n is the optimal number of multiplications for evaluating P alone, 3n-2 M/D is within a constant factor of optimality. Although we have no optimality results for derivatives, we can report related optimality results. We show that the calculation of either a^x*, i=1 ,. . . ,n or x X p (l) (x) /i!, i=0,... ,n in 2n-l multiplications is optimal.
We summarize the contents of the paper: in Section 2 we present the algorithm for computing all derivatives in 3n-2 M/D. A family of splitting algorithms for computing the first m derivatives and arithmetic operation counts for these algorithms are given in the next two sections. In Section V we obtain three known algorithms, two new algorithms, and one algorithm very similar to a recently discovered technique as special cases. Optimality results are presented in Section 6. We close by giving applications of these algorithms. analysis has yet been performed.

A FAMILY OF SPLITTING ALGORITHMS
We study a family of algorithms for computing the first m derivatives of a polynomial. Assume, without loss of generality, that We show that this recurrence may be used to compute the derivatives.
Using the properties of s(j), the recurrence may be written as T" 1 = a i+1 x s(i+1) > i=0,l,...,n-l = a^" 1 , j=0,l,...,m The following pseudo-Algol program implements the algorithm. Assume [x(i) will be x 1 , T(i,j) will be TJ] (4.1) f (q) = n-1 + q + m(n+1) -(mf2)r + j q r(r+1) m,n q The algorithm can be slightly improved in two cases. If all n derivatives are required, P^ (x) /n! = a^ and it is not necessary to compute a 1 P^fx^ it from x 4 ~-, so one division is saved. If q = n + 1 , it is not n! necessary to compute x 1 **""' , so one multiplication is saved. These special cases are not reflected in the function f (q) . m,n Given m and n, the best choice of q can be determined by minimizing f (q) subject to the constraint that q be an integer. Analysis of best m,n splittings as a function of m and n will be reported in a future paper. All the splittings require (m+l) (n-^ m) additions. For m = 0, this reduces to n additions which is known to be optimal. For m = 1, this reduces to 2n-l additions which Kirkpatrick [KI71] has shown to be optimal.
We now consider the optimality of the evaluation of x J P^j ; (x)/j! , j=0,l,...,n, with respect to multiplication. First we shall require a result which is interesting in its own right. We use the notation S(V) to denote the degree of the polynomial V. for any polynomial Q3 3(Q) > L+1. We use the notation (6.1), (6.2).
We consider three cases depending on 3(Z).  Some recent work in computational complexity has dealt with the number of arithmetic operations needed to evaluate a polynomial or a polynomial and its first derivative. Here we consider the evaluation of a polynomial and its first m derivatives and, in particular, the calculation of all the derivatives.
( i ) We compute the normalized derivatives P /i!; preconditioning is not allowed. Prior to the new results reported here, the best algorithm for computing all the derivatives was the iterated use of Horner's rule (synthetic division), which require* %n(n+l) multiplications and the same number of additions.
We give a new algorithm which computes all the derivatives of a polynomial in 3n-2 multiplications or divisions (M/D). If n is odd, we give an algorithm which computes all the derivatives in 3n-3 M/D. Both these algorithms belong to a family of algorithms for computing the first m derivatives. All the algorithms in the family require the same number of additions as the iterated Horner's rule for the first m derivatives.
Since n is the optimal number of multiplications for evaluating P alone, our 3n-2 M/D is within a constant factor of optimality. Although we have no optimality results for derivatives, we report related optimality results. We show that the calculation of either a^x^, i=l,..., n or x*"P^^ (x)/i !, i=0, . . . , n in 2n-l multiplications is optimal.