Hello everybody !


I was reading a book on geometry which taught me that one could compute the volume of a simplex through the determinant of a matrix, and I thought (I'm becoming a worse computer scientist each day) that if the result is exact this may not be the computationally fastest way possible to do it.


Hence, the following problem : if you are given a polynomial in one (or many) variables $\alpha\_1 x^1 + \dots + \alpha\_n x^n$, what is the cheapest way (in terms of operations) to evaluate it ?


Indeed, if you know that your polynomial is $(x-1)^{1024}$, you can do much, much better than computing all the different powers of $x$ and multiply them by their corresponding factor.


However, this is not a problem of factorization, as knowing that the polynomial is equal to $(x-1)^{1024} + (x-2)^{1023}$ is also much better than the naive evaluation.


Of course, multiplication and addition all have different costs on a computer, but I would be quite glad to understand how to minimize the "total number of operations" (additions + multiplications) for a start ! I had no idea how to look for the corresponding litterature, and so I am asking for your help on this one :-)


Thank you !


Nathann


P.S. : *I am actually looking for a way, given a polynomial, to obtain a sequence of addition/multiplication that would be optimal to evaluate it. This sequence would of course only work for **THIS** polynomial and no other. It may involve working for hours to find out the optimal sequence corresponding to this polynomial, so that it may be evaluated many times cheaply later on.*



Fast evaluation of polynomials
If the polynomial is given as $\alpha\_0x^0+\dots+\alpha\_nx^n$ and you do not know a priori anything about the $\alpha\_i$’s, then you can’t do better than [Horner’s scheme](http://en.wikipedia.org/wiki/Horner_scheme) (which takes $n$ additions and multiplications). If you know that the polynomial is sparse and you are given a list of nonzero coefficients, you can evaluate the individual terms using [repeated squaring](http://en.wikipedia.org/wiki/Exponentiation_by_squaring) (this takes about $k$ additions and $O(k\log n)$ multiplications, where $k$ is the number of nonzero terms). Other information about the polynomial may also help in principle, such as some sort of symmetries in the coefficient list.


