# Moltiplicare n polinomi di grado 1

35

Il problema è calcolare il polinomio . Supponiamo che tutti i coefficienti si adattino a una parola macchina, cioè possano essere manipolati in unità di tempo.$\left({a}_{1}x+{b}_{1}\right)×\cdots ×\left({a}_{n}x+{b}_{n}\right)$$(a_1 x + b_1) \times \cdots \times (a_n x + b_n)$

È possibile eseguire tempo applicando FFT in modo albero. Puoi fare ?$O\left(n{\mathrm{log}}^{2}n\right)$$O(n \log^2 n)$$O\left(n\mathrm{log}n\right)$$O(n \log n)$

Bella domanda, sembra di aver visto qualcosa di simile nel blog di qualcuno, ma non ricordo dove fosse.
Grigory Yaroslavtsev,

3
${\alpha }_{i}=-{b}_{i}/{a}_{i}$$\alpha_i = -b_i/a_i$, so the problem is equivalent to: Given ${\alpha }_{1},\dots ,{\alpha }_{n}$$\alpha_1, \dots , \alpha_n$, compute the polynomial $\left(x-{\alpha }_{1}\right)\dots \left(x-{\alpha }_{n}\right)$$(x-\alpha_1)\dots(x-\alpha_n)$. (I guess.)
ShreevatsaR

1
Can you give a reference to the $O\left(n{\mathrm{log}}^{2}n\right)$$O(n\log^2 n)$ result?
Mohammad Al-Turkistany

2
As @Suresh mentioned, it is a simple divide-and-conquer approach. It can be generalized so that n polys may have different degrees ${d}_{i}$$d_i$, in which case you can divide in a Huffman tree fashion. See Strassen: The computational complexity of continued fractions.
Zeyu

1
Can we compute the convolution of $n$$n$ vectors of constant dimension 2 in time $O\left(n\mathrm{log}n\right)$$O(n \log n)$?
Kaveh

Risposte:

7

Warning: This is not yet a complete answer. If plausibility arguments make you uncomfortable, stop reading.

I will consider a variant where we want to multiply (x - a_1) ... (x - a_n) over the complex numbers.

The problem is dual to evaluating a polynomial at n points. We know this can be done cleverly in O(n log n) time when the points happen to be nth roots of unity. This takes essential advantage of the symmetries of regular polygons that underlie the Fast Fourier Transform. That transform comes in two forms, conventionally called decimation-in-time and decimation-in-frequency. In radix two they rely on a dual pair of symmetries of even-sided regular polygons: the interlocking symmetry (a regular hexagon consists of two interlocking equilateral triangles) and the fan unfolding symmetry (cut a regular hexagon in half and unfold the pieces like fans into equilateral triangles).

From this perspective, it seems highly implausible that an O(n log n) algorithm would exist for an arbitrary set of n points without special symmetries. It would imply that there is nothing algorithmically exceptional about regular polygons as compared to random sets of points in the complex plane.

3
On the other hand, an $\mathrm{\Omega }\left(n{\mathrm{log}}^{2}n\right)$$\Omega(n\log^2 n)$ lower bound for such a natural problem seems equally implausible!
Jeffε

True! I wish I had a more definitive answer. It's very interesting.
Per Vognsen

Bounty awarded!
Jeffε

@PerVognsen: Can you give a reference for this point of view re: symmetries of polygons / interlocking symmetry? Or if this is an observation of your own, could you expand on it a bit more?
Joshua Grochow
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.