Prime-factor FFT algorithm

From Wikipedia, the free encyclopedia

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 a more complicated re-indexing of the data based on the Chinese remainder theorem (CRT). 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 , 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[]

Recall that the DFT is defined by the formula:

The PFA involves a re-indexing of the input and output arrays, which when substituted into the DFT formula transforms it into two nested DFTs (a two-dimensional DFT).

Re-indexing[]

Suppose that , where and are relatively prime, i.e. . Then the re-indexing is performed using two bijective mappings between and .

The first map

is a bijection called the Ruritanian mapping (also Good's mapping).

Indeed it is a homomorphism , because and :

Therefore, according to the first isomorphism theorem, is an injection to the quotient group . Here the kernel , because otherwise there would exist a pair and , which are not simultaneously zero, such that for some nonzero . Since , the only remaining value of is 1. In this case would be an integer from which is impossible, because for the fraction to yield an integral value, must be a multiple of (since ). But this would contradict . Thus, , that is injects to . Now since , is indeed bijective, i.e. for distinct values of the pair it produces distinct values of throughout the whole set .

The second map

is called the CRT mapping. The name refers to the Chinese remainder theorem which provides the bijective mapping , in which and are any solution to the linear diophantine equation equation (see Bézout's identity).

In order to perform the DFT, one needs to map different pairs of and to distinct values of and also pairs and to . To do it one can use the Ruritanian mapping to produce indices in the input vector and the CRT mapping to evaluate indices of the output vector or use the two mappings the opposite way.

A great deal of research has been devoted to schemes for evaluating this re-indexing efficiently, ideally in-place, while minimizing the number of costly modulo (remainder) operations (Chan, 1991, and references).

DFT re-expression[]

The above re-indexing is then substituted into the formula for the DFT, and in particular into the product in the exponent. Because , this exponent is evaluated modulo . Similarly, and are implicitly periodic in , so their subscripts are evaluated modulo .

First, substitute the Ruritanian mapping into the formula for DFT:

.

Now substitute the CRT mapping in place of to produce

Likewise, substitution of the CRT mapping in place of and Ruritanian mapping in place of yields

.

In both cases the inner and outer sums are simply DFTs of size and , respectively.

References[]

  • Good, I. J. (1958). "The interaction algorithm and practical Fourier analysis". Journal of the Royal Statistical Society, Series B. 20 (2): 361–372. JSTOR 2983896. Addendum, ibid. 22 (2), 373-375 (1960) JSTOR 2984108.
  • Thomas, L. H. (1963). "Using a computer to solve problems in physics". Applications of Digital Computers. Boston: Ginn.
  • Duhamel, P.; Vetterli, M. (1990). "Fast Fourier transforms: a tutorial review and a state of the art". Signal Processing. 19 (4): 259–299. doi:10.1016/0165-1684(90)90158-U.
  • Chan, S. C.; Ho, K. L. (1991). "On indexing the prime-factor fast Fourier transform algorithm". IEEE Trans. Circuits and Systems. 38 (8): 951–953. doi:10.1109/31.85638.

See also[]

Retrieved from ""