Prime-factor FFT algorithm
Fast Fourier Transform algorithm
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.)
01Algorithm
Let be a polynomial and
be a principal
-th root of unity. We define the DFT of
as the
-tuple
.
In other words,
For simplicity, we denote the transformation as .
The PFA relies on a coprime factorization of and turns
into
for some choices of
's where
is the tensor product.
Mapping based on CRT
For a coprime factorization , we have the Chinese remainder map
from
to
with
as its inverse where
's are the central orthogonal idempotent elements with
.
Choosing
(therefore,
), we rewrite
as follows:
Finally, define and
,
we have
Therefore, we have the multi-dimensional DFT, .
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 and a group isomorphism from
to
, we have the following algebra isomorphism
where refers to the tensor product of algebras.
To see how PFA works, we choose and
be additive groups.
We also identify
as
and
as
.
Choosing
as the group isomorphism
, we have the algebra isomorphism
, or alternatively,
Now observe that is actually an algebra isomorphism from
to
and each
is an algebra isomorphism from
to
,
we have an algebra isomorphism
from
to
.
What PFA tells us is that
where
and
are re-indexing without actual arithmetic in
.
Counting the number of multi-dimensional transformations
Notice that the condition for transforming into
relies on "an" additive group isomorphism
from
to
.
Any additive group isomorphism will work.
To count the number of ways transforming
into
,
we only need to count the number of additive group isomorphisms from
to
, or alternative, the number of additive group automorphisms on
.
Since
is cyclic, any automorphism can be written as
where
is a generator of
.
By the definition of
,
's are exactly those coprime to
.
Therefore, there are exactly
many such maps where
is the Euler's totient function.
The smallest example is
where
, demonstrating the two maps in the literature: the "CRT mapping" and the "Ruritanian mapping".
Sources and credits
This article is adapted from the Wikipedia article “Prime-factor FFT algorithm”, written by its contributors and licensed under CC BY-SA 4.0. Fathomly has changed the layout, removed citation markers, navigation and maintenance notices, and adjusted punctuation. This adapted version is shared under the same license. For references, see the original article.
Fathomly is not affiliated with or endorsed by the Wikimedia Foundation. Spotted a problem? Tell us.