FFT对于具有方面具有不同指数方程方程、方面、指数、不同

由网友(删除回忆录丶)分享简介:我是新来的FFT,所以我稍微混淆一些概念。到目前为止,我已经看到了方程的FFT例子乘法涉及到与连续指数(即 A(X)= 1 + 3X + 5X ^ 2 + ... 和公式 B(X)= 4 + 6X + 9倍^ 2 + ... 和 C(X)= A(X)* B(X))。然而,也可以使用FFT的上两式不具有相等指数?例如,是...

我是新来的FFT,所以我稍微混淆一些概念。到目前为止,我已经看到了方程的FFT例子乘法涉及到与连续指数(即 A(X)= 1 + 3X + 5X ^ 2 + ... 和公式 B(X)= 4 + 6X + 9倍^ 2 + ... C(X)= A(X)* B(X))。然而,也可以使用FFT的上两式不具有相等指数?例如,是否有可能使用FFT繁殖:

I am new to FFTs so I am slightly confused on some concepts. So far the FFT examples I've seen for equation multiplication involve equations with consecutive exponents (i.e. A(x) = 1 + 3x + 5x^2 +... and B(x) = 4 + 6x + 9x^2 + ... and C(x) = A(x)*B(x)). However, it is possible to use FFT on two equations that do not have equal exponents? For example, is it possible to use FFT to multiply:

A(x) = 1 + 3x^2 + 9x^8

B(x) = 5x + 6 x^3 + 10x^8

O(nlogn)的时间?

如果不是,是否有任何情况下,运行时将 O(nlogn)?例如,如果计算在产品的数量是 O(N)而不是为O(n ^ 2)

If not, are there any cases where the runtime will be O(nlogn)? For example, if the number of terms in the product is O(n) instead of O(n^2)?

即使运行时间低于更多的O(nlogn),怎样才能利用FFT减少运行?

Even if the runtime is more than O(nlogn), how can we use FFT to minimize the runtime?

推荐答案

是的,它可以使用DFFT非平等指数polynoms ...

yes it is possible to use DFFT on non equal exponent polynoms...

缺少的指数只是乘以0,这也是众多...

只是重写你的polynoms: the missing exponents are just multiplied by 0 which is also a number...

just rewrite your polynoms:

A(x) = 1 + 3x^2 + 9x^8
B(x) = 5x + 6x^3 + 10x^8

要这样的:

求助当用solve指令解含常数e的指数方程时,如何把结果里的数值提取出来 代码见问题补充

to something like this:

A(x) = 1x^0 + 0x^1 + 3x^2 + 0x^3 + 0x^4+ 0x^5+ 0x^6+ 0x^7 +  9x^8
B(x) = 0x^0 + 5x^1 + 0x^2 + 6x^3 + 0x^4+ 0x^5+ 0x^6+ 0x^7 + 10x^8

让你的向量DFFT是:

so your vectors for DFFT are:

A = (1,0,3,0,0,0,0,0, 9)
B = (0,5,0,6,0,0,0,0,10)

添加零这样的载体是正确的结果的大小(最大一个esponent +1 +最大乙指数+1)

add zeroes so the vector is the correct result size (max A esponent +1 + max B exponent +1)

那么原来的尺寸为9,9 - > 9 + 9 - > 18 - >四舍五入 - > 32

so original sizes are 9,9 -> 9+9 -> 18 -> round up -> 32

A = (1,0,3,0,0,0,0,0, 9,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0)
B = (0,5,0,6,0,0,0,0,10,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0)
//   |    original      |,| correct result |,|     nearest power of 2      |

和你想的DFFT东西...

and do the DFFT stuff you want ...

我假设你想要做这样的事情

I assume you want to do something like this

A' = DFFT(A)
B' = DFFT(B)
C(i)' = A'(i) * B'(i)   // i=0..n-1
C= IDFFT(C')

这是O(n *的log(n))

which is O(n*log(n))

阅读全文

相关推荐

最新文章