4

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.

ead
  • 32,758
  • 6
  • 90
  • 153
yejc
  • 41
  • 5
  • 5
    I would be surprised if there is better than an `O(n^2)` algorithm for this, when you change the product operator like that it destroys a lot of structure of FFT. – Chris Beck Sep 12 '15 at 16:20
  • the details of FFT require the "Distributive Property of Multiplication" over addition (i.e, a*b+a*c=a*(b+c)). Since you replace the native multiplication with the "*" operation, the distributive property will not hold. But there might exist some algorithm that takes less than O(N^2). – DU Jiaen Mar 21 '18 at 03:13

0 Answers0