Rader's FFT algorithm


Rader's algorithm, named for Charles M. Rader of MIT Lincoln Laboratory, is a fast Fourier transform algorithm that computes the discrete Fourier transform of prime sizes by re-expressing the DFT as a cyclic convolution.
Since Rader's algorithm only depends upon the periodicity of the DFT kernel, it is directly applicable to any other transform with a similar property, such as a number-theoretic transform or the discrete Hartley transform.
The algorithm can be modified to gain a factor of two savings for the case of DFTs of real data, using a slightly modified re-indexing/permutation to obtain two half-size cyclic convolutions of real data; an alternative adaptation for DFTs of real data uses the discrete Hartley transform.
Winograd extended Rader's algorithm to include prime-power DFT sizes, and today Rader's algorithm is sometimes described as a special case of Winograd's FFT algorithm, also called the multiplicative Fourier transform algorithm, which applies to an even larger class of sizes. However, for composite sizes such as prime powers, the Cooley–Tukey FFT algorithm is much simpler and more practical to implement, so Rader's algorithm is typically only used for large-prime base cases of Cooley–Tukey's recursive decomposition of the DFT.

Algorithm

If N is a prime number, then the set of non-zero indices n = 1,...,N-1 forms a group under multiplication modulo N. One consequence of the number theory of such groups is that there exists a generator of the group, an integer g such that n = gq for any non-zero index n and for a unique q in 0,...,N-2. Similarly k = g-p for any non-zero index k and for a unique p in 0,...,N-2, where the negative exponent denotes the multiplicative inverse of gp modulo N. That means that we can rewrite the DFT using these new indices p and q as:
The final summation, above, is precisely a cyclic convolution of the two sequences aq and bq of length N-1 defined by:

Evaluating the convolution

Since N-1 is composite, this convolution can be performed directly via the convolution theorem and more conventional FFT algorithms. However, that may not be efficient if N-1 itself has large prime factors, requiring recursive use of Rader's algorithm. Instead, one can compute a length- cyclic convolution exactly by zero-padding it to a length of at least 2-1, say to a power of two, which can then be evaluated in O time without the recursive application of Rader's algorithm.
This algorithm, then, requires O additions plus O time for the convolution. In practice, the O additions can often be performed by absorbing the additions into the convolution: if the convolution is performed by a pair of FFTs, then the sum of xn is given by the DC output of the FFT of aq plus x0, and x0 can be added to all the outputs by adding it to the DC term of the convolution prior to the inverse FFT. Still, this algorithm requires intrinsically more operations than FFTs of nearby composite sizes, and typically takes 3-10 times as long in practice.
If Rader's algorithm is performed by using FFTs of size N-1 to compute the convolution, rather than by zero padding as mentioned above, the efficiency depends strongly upon N and the number of times that Rader's algorithm must be applied recursively. The worst case would be if N-1 were 2N2 where N2 is prime, with N2-1 = 2N3 where N3 is prime, and so on. In such cases, supposing that the chain of primes extended all the way down to some bounded value, the recursive application of Rader's algorithm would actually require O time. Such Nj are called Sophie Germain primes, and such a sequence of them is called a Cunningham chain of the first kind. The lengths of Cunningham chains, however, are observed to grow more slowly than log2, so Rader's algorithm applied in this way is probably not O, though it is possibly worse than O for the worst cases. Fortunately, a guarantee of O complexity can be achieved by zero padding.