efficient way of calculating the $n-1$ polynomial coefficients

118 Views Asked by At

Given $n$ polynomials with the same $M$ degree. $$ A_1 = \sum_{i=0}^M a_{1i} x^i \\ A_2 = \sum_{i=0}^M a_{2i} x^i \\ \cdots \\ A_n =\sum_{i=0}^M a_{ni} x^i $$

My objective is to obtain all coefficients from $n-1$ products, e.g.: $$ N = \{1, \dots, n\}, \forall i \in N \\ \prod_{j \in N \setminus \{i\}} A_j $$

One way I'm thinking is to get $\prod_{j \in N } A_j$ first using FFT, and perform $n$ Polynomial Division to obtain the final results. And I'm wondering if there are much better solutions around?

Another solution:

Inspired from this

One can generate two sequence:

$$ B = 1, A_1A_2, A_1A_2A_3, \cdots, A_1A_2\cdots A_{n-1} \\ C = A_2\cdots A_{n-1}, A_3\cdots A_{n-1}, \cdots, A_{n-2}A_{n-1}, 1 $$ And the result would be the pointwise product of $B$ and $C$