Problem: Given 2N
degree polynomials as a0+a1x+a2x2..+aNxN
and
b0+b1x+b2x2..+bNxN
. Assume no 2 coefficient are the same in the 2 polynomials.
Find the product of the polynomials, the catch is that the product(*) operator between the coefficients is defined differently:
f(i,j) := ai * bj := 1/abs(ai-bj)
That means, find the following polynomial:
c0+c1x+c2x2..+c2Nx2N
,
where
ck := Σi=0..N f(i,k-i)
I know that with FFT, 2 polynomials can be multiplied in O(n lg n)
time with normal product operator between the coefficients but don't have any idea for this kind of problem.