Prime-factor FFT algorithm

Uses your system voice; voice and rate in settings.

Snapshot

≈ 8 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

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 as a two-dimensional DFT, but only for the case where N 1 and N 2 are relatively prime. These smaller transforms of size N 1 and N 2 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 into smaller transforms of size N 1 and N 2 . 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.…

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 as a two-dimensional DFT, but only for the case where N 1 and N 2 are relatively prime. These smaller transforms of size N 1 and N 2 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 into smaller transforms of size N 1 and N 2 . 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 N 1 by N 2 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.) Let a(x) be a polynomial and \omega_n be a principal n -th root of unity. We define the DFT of a(x) as the n -tuple (\hat{a}_j) = (a(\omega_n^j)) . In other words, \hat{a}_j = \sum_{i=0}^{n-1} a_i \omega_n^{ij} \quad \text{ for all } j = 0, 1, \dots, n - 1. For simplicity, we denote the transformation as \text{DFT}_{\omega_n} . The PFA relies on a coprime factorization of n = \prod_{d = 0}^{D - 1} n_d and turns \text{DFT}_{\omega_n} into \bigotimes_d \text{DFT}_{\omega_{n_d}} for some choices of \omega_{n_d} 's where \bigotimes is the tensor product. For a coprime factorization , we have the Chinese remainder map m \mapsto (m \bmod n_d) from \mathbb{Z}_{n} to \prod_{d = 0}^{D - 1} \mathbb{Z}_{n_d} with (m_d) \mapsto \sum_{d = 0}^{D - 1} e_d m_d as its inverse where 's are the central orthogonal idempotent elements with \sum_{d = 0}^{D - 1} e_d = 1 \pmod{n} . Choosing \omega_{n_d} = \omega_n^{e_d} (therefore, {{tmath|1= \prod_{d = 0}^{D - 1} \omega_{n_d} = \omega_n^{\sum_{d = 0}^{D - 1} e_d} = \omega_n }}), we rewrite \text{DFT}_{\omega_n} as follows: \hat{a}_j = \sum_{i = 0}^{n - 1} a_i \omega_n^{ij} = \sum_{i = 0}^{n - 1} a_i \left( \prod_{d = 0}^{D - 1} \omega_{n_d} \right)^{ij} = \sum_{i = 0}^{n - 1} a_i \prod_{d = 0}^{D - 1} \omega_{n_d}^{ (i \bmod n_d) (j \bmod n_d)} = \sum_{i_0 = 0}^{n_0 - 1} \cdots \sum_{i_{D - 1} = 0}^{n_{D - 1} - 1} a_{\sum_{d = 0}^{D - 1} e_d i_d} \prod_{d = 0}^{D - 1} \omega_{n_d}^{i_d (j \bmod n_d)} . Finally, define a_{i_0, \dots, i_{D - 1}} = a_{\sum_{d = 0}^{D - 1} i_d e_d} and {{tmath|1= \hat{a}_{j_0, \dots, j_{D - 1} } = \hat{a}_{\sum_{d = 0}^{D - 1} j_d e_d} }}, we have \hat{a}_{j_0, \dots, j_{D - 1}} = \sum_{i_0 = 0}^{n_0 - 1} \cdots \sum_{i_{D - 1}=0}^{n_{D - 1} - 1} a_{i_0, \dots, i_{D - 1}} \prod_{d = 0}^{D - 1} \omega_{n_d}^{i_d j_d} . Therefore, we have the multi-dimensional DFT, {{tmath|1= \textstyle \otimes_{d = 0}^{D - 1} \text{DFT}_{\omega_{n_d} } }}. R[G] \cong \bigotimes_d R[G_d] , where \bigotimes refers to the tensor product of algebras. To see how PFA works, we choose G = (\Z_n, +, 0) and G_d = (\Z_{n_d}, +, 0) be additive groups. We also identify R[G] as \frac{R[x]}{\langle x^n - 1 \rangle} and R[G_d] as {{tmath|1= \textstyle \frac{R[x_d]}{\langle x_d^{n_d} - 1 \rangle} }}. Choosing \eta = a \mapsto (a \bmod n_d) as the group isomorphism , we have the algebra isomorphism \eta^* : R[G] \cong \bigotimes_d R[G_d] , or alternatively, \eta^* : \frac{R[x]}{\langle x^n - 1 \rangle} \cong \bigotimes_d \frac{R[x_d]}{\langle x_d^{n_d} - 1 \rangle} . Now observe that \text{DFT}_{\omega_n} is actually an algebra isomorphism from \frac{R[x]}{\langle x^n - 1 \rangle} to \prod_i \frac{R[x]}{\langle x - \omega_n^i \rangle} and each \text{DFT}_{\omega_{n_d}} is an algebra isomorphism from \frac{R[x]}{\langle {x_d}^{n_d} - 1 \rangle} to \prod_{i_d} \frac{R[x_d]}{\langle x_d - \omega_{n_d}^{i_d} \rangle} , we have an algebra isomorphism \eta' from \bigotimes_d \prod_{i_d} \frac{R[x_d]}{\langle x_d - \omega_{n_d}^{i_d} \rangle} to \prod_i \frac{R[x]}{\langle x - \omega_n^i \rangle} . What PFA tells us is that \text{DFT}_{\omega_n} = \eta' \circ \bigotimes_d \text{DFT}_{\omega_{n_d}} \circ \eta^* where \eta^* and \eta' are re-indexing without actual arithmetic in R . Notice that the condition for transforming \text{DFT}_{\omega_n} into \eta' \circ \bigotimes_d \text{DFT}_{\omega_{n_d}} \circ \eta^* relies on "an" additive group isomorphism \eta from (\mathbb{Z}_n, +, 0) to . Any additive group isomorphism will work. To count the number of ways transforming \text{DFT}_{\omega_n} into {{tmath|1= \textstyle \eta' \circ \bigotimes_d \text{DFT}_{\omega_{n_d} } \circ \eta^* }}, we only need to count the number of additive group isomorphisms from (\mathbb{Z}_n, +, 0) to \prod_d (\mathbb{Z}_{n_d}, +, 0) , or alternative, the number of additive group automorphisms on . Since (\mathbb{Z}_n, +, 0) is cyclic, any automorphism can be written as 1 \mapsto g where g is a generator of (\mathbb{Z}_n, +, 0) . By the definition of , g 's are exactly those coprime to n . Therefore, there are exactly \varphi(n) many such maps where \varphi is the Euler's totient function. The smallest example is n = 6 where \varphi(n) = 2 , demonstrating the two maps in the literature: the "CRT mapping" and the "Ruritanian mapping".

Text derived from https://en.wikipedia.org/w/index.php?oldid=1320745095 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

No external citation was extracted for this revision. That is a statement about the source, not a claim that none exists.