Prime-factor FFT algorithm

From testwiki
Jump to navigation Jump to search

Template:Use American English Template:Short description The prime-factor algorithm (PFA), also called the Good–Thomas algorithm (1958/1963), is a fast Fourier transform (FFT) algorithm that re-expresses the discrete Fourier transform (DFT) of a size N = N1N2 as a two-dimensional N1×N2 DFT, but only for the case where N1 and N2 are relatively prime. These smaller transforms of size N1 and N2 can then be evaluated by applying PFA recursively or by using some other FFT algorithm.

PFA should not be confused with the mixed-radix generalization of the popular Cooley–Tukey algorithm, which also subdivides a DFT of size N = N1N2 into smaller transforms of size N1 and N2. The latter algorithm can use any factors (not necessarily relatively prime), but it has the disadvantage that it also requires extra multiplications by roots of unity called twiddle factors, in addition to the smaller transforms. On the other hand, PFA has the disadvantages that it only works for relatively prime factors (e.g. it is useless for power-of-two sizes) and that it requires more complicated re-indexing of the data based on the additive group isomorphisms. Note, however, that PFA can be combined with mixed-radix Cooley–Tukey, with the former factorizing N into relatively prime components and the latter handling repeated factors.

PFA is also closely related to the nested Winograd FFT algorithm, where the latter performs the decomposed N1 by N2 transform via more sophisticated two-dimensional convolution techniques. Some older papers therefore also call Winograd's algorithm a PFA FFT.

(Although the PFA is distinct from the Cooley–Tukey algorithm, Good's 1958 work on the PFA was cited as inspiration by Cooley and Tukey in their 1965 paper, and there was initially some confusion about whether the two algorithms were different. In fact, it was the only prior FFT work cited by them, as they were not then aware of the earlier research by Gauss and others.)

Algorithm

Let a(x) be a polynomial and ωn be a principal n-th root of unity. We define the DFT of a(x) as the n-tuple (a^j)=(a(ωnj)). In other words, a^j=i=0n1aiωnij for all j=0,1,,n1. For simplicity, we denote the transformation as DFTωn.

The PFA relies on a coprime factorization of n=d=0D1nd and turns DFTωn into dDFTωnd for some choices of ωnd's where is the tensor product.

Mapping Based on CRT

For a coprime factorization n=d=0D1nd, we have the Chinese remainder map m(mmodnd) from n to d=0D1nd with (md)d=0D1edmd as its inverse where ed's are the central orthogonal idempotent elements with d=0D1ed=1(modn). Choosing ωnd=ωned (therefore, d=0D1ωnd=ωnd=0D1ed=ωn), we rewrite DFTωn as follows: a^j=i=0n1aiωnij=i=0n1ai(d=0D1ωnd)ij=i=0n1aid=0D1ωnd(imodnd)(jmodnd)=i0=0n01iD1=0nD11ad=0D1edidd=0D1ωndid(jmodnd). Finally, define ai0,,iD1=ad=0D1ided and a^j0,,jD1=a^d=0D1jded, we have a^j0,,jD1=i0=0n01iD1=0nD11ai0,,iD1d=0D1ωndidjd. Therefore, we have the multi-dimensional DFT, d=0D1DFTωnd.

As Algebra Isomorphisms

PFA can be stated in a high-level way in terms of algebra isomorphisms. We first recall that for a commutative ring R and a group isomorphism from G to dGd, we have the following algebra isomorphism R[G]dR[Gd] where refers to the tensor product of algebras.

To see how PFA works, we choose G=(n,+,0) and Gd=(nd,+,0) be additive groups. We also identify R[G] as R[x]xn1 and R[Gd] as R[xd]xdnd1. Choosing η=a(amodnd) as the group isomorphism GdGd, we have the algebra isomorphism η*:R[G]dR[Gd], or alternatively, η*:R[x]xn1dR[xd]xdnd1. Now observe that DFTωn is actually an algebra isomorphism from R[x]xn1 to iR[x]xωni and each DFTωnd is an algebra isomorphism from R[x]xdnd1 to idR[xd]xdωndid, we have an algebra isomorphism η from didR[xd]xdωndid to iR[x]xωni. What PFA tells us is that DFTωn=ηdDFTωndη* where η* and η are re-indexing without actual arithmetic in R.

Counting the Number of Multi-Dimensional Transformations

Notice that the condition for transforming DFTωn into ηdDFTωndη* relies on "an" additive group isomorphism η from (n,+,0) to d(nd,+,0). Any additive group isomorphism will work. To count the number of ways transforming DFTωn into ηdDFTωndη*, we only need to count the number of additive group isomorphisms from (n,+,0) to d(nd,+,0), or alternative, the number of additive group automorphisms on (n,+,0). Since (n,+,0) is cyclic, any automorphism can be written as 1g where g is a generator of (n,+,0). By the definition of (n,+,0), g's are exactly those coprime to n. Therefore, there are exactly φ(n) many such maps where φ is the Euler's totient function. The smallest example is n=6 where φ(n)=2, demonstrating the two maps in the literature: the "CRT mapping" and the "Ruritanian mapping".[1]

See also

Notes

Template:Reflist

References

Template:Refbegin

Template:Refend