Fast Fourier transform via automorphism groups of rational function fields
Abstract.
The Fast Fourier Transform (FFT) over a finite field computes evaluations of a given polynomial of degree less than at a specifically chosen set of distinct evaluation points in . If or is a smooth number, then the divide-and-conquer approach leads to the fastest known FFT algorithms. Depending on the type of group that the set of evaluation points forms, these algorithms are classified as multiplicative (Math of Comp. 1965) and additive (FOCS 2014) FFT algorithms. In this work, we provide a unified framework for FFT algorithms that include both multiplicative and additive FFT algorithms as special cases, and beyond: our framework also works when is smooth, while all known results require or to be smooth. For the new case where is smooth (this new case was not considered before in literature as far as we know), we show that if is a divisor of that is -smooth for a real , then our FFT needs arithmetic operations in . Our unified framework is a natural consequence of introducing the algebraic function fields into the study of FFT.
1. Introduction
The discrete Fourier transform (DFT for short) of length over a field is a transform from coefficients of a polynomial over of degree less than to evaluations of at all -th roots of unity in . The inverse DFT (iDFT for short) is just the reverse process from evaluations to coefficients. However, the computation of DFT directly from the definition requires operations in which is usually too slow for practical purposes. Thus, we desire to design a faster DFT to fulfill various applications. This motivates the study of fast Fourier transform (FFT for short). FFT is a classical topic in complexity theory and has found various applications in theoretical computer science such as fast polynomial arithmetic [VZGG13, BCS13, BSCKL23], and coding theory [Jus76, Gao03, GS10, LCH14, LANHC16, LANH16, HCLB21].
1.1. Previous work
The origin of FFT can be traced back to Gauss’s unpublished work in 1805, which was pointed out by Heideman et al. in [HJB84]. After 160 years, Cooley and Tukey [CT65] independently rediscovered this algorithm and popularized it. Now this FFT is known as the Cooley-Tukey algorithm. Cooley-Tukey’s algorithm is a divide-and-conquer algorithm that implements DFT over the complex numbers ; namely, given a polynomial , evaluate at the -th roots of unity in . If is a -smooth number, i.e., all its prime factors are not greater than , Cooley-Tukey’s algorithm computes DFT in arithmetic operations of . In the following, we also call is smooth if is a constant. Using Cooley-Tukey’s algorithm, DFT over can also be done in field operations of if contains an -th root of unity for smooth integer [M.71]. For DFTs of polynomials in , but the evaluation points in an extension field which has smooth -th roots of unity, van der Hoeven and Larrieu [vDHL17] showed that the Frobenius automorphism can be used to accelerate the FFT over . The above class of FFTs is called multiplicative FFT due to the fact that the evaluation set is a multiplicative subgroup of .
However, if does not have the desired -th roots of unity, for example, and is a prime number, then the multiplicative FFT is not efficient. To implement FFT over in this case, a new type of FFT algorithm was discovered by Zhu-Wang [WY88] and Cantor [Can89] independently. To distinguish Cooley-Tukey’s FFT algorithm from the one by Zhu-Wang and Cantor, Mateer, and Gao [GS10] named the latter one as the additive FFT based on the fact that the evaluation set is an additive subgroup of . In their work [GS10], Mateer and Gao improved the previous additive FFT algorithm [WY88, Can89] and showed that their additive FFT algorithm requires additions and multiplications in . Particularly, in case is a power of two, their improved FFT needs multiplications and only additions. Four years later, Lin et al. [LCH14] showed that additive FFT can be run in operations (including additions and multiplications) over by taking a novel polynomial basis of (the -vector space consisting of all polynomials over of degree less than ). Moreover, their new FFT algorithm is applicable to finite field with arbitrary . The same group of authors later gave a new interpretation of their algorithm and presented some applications of FFT in encoding and decoding of Reed-Solomon codes [LANH16, HCLB21]. Note that for the additive FFT given in [LCH14, LANH16], it requires that every polynomial in is represented under a certain basis consisting of products of linearized polynomials instead of the standard monomial basis .
As we have seen, both multiplicative and additive FFTs over have constraints. Namely, for multiplicative FFT, one requires that is smooth; while for additive FFT, one requires that the characteristic of is a small constant. Recently, Ben-Sasson et al. [BSCKL23] made a breakthrough in the FFT-like algorithm over an arbitrary finite field. The new algorithm is based on elliptic curves and isogenies of smooth degree, thus it is called elliptic-curve-based FFT (ECFFT for short). More precisely, assume is a smooth number. Let be a polynomial and a carefully selected subset of cradinality . Then the multipoint evaluation (MPE for short) of at can be done in operations of under the representation of : , where is another subset of size and (This is different from previous FFTs which take as input the coefficients of under a certain basis of ). They made use of isogenies between elliptic curves to construct the transform from the MPE of at to the MPE of at . During the transformation, some precomputations are required. The authors did not give the total storage for the precomputations, but at least is required. This is an additional overhead compared to the multiplicative/additive FFTs. Besides, a constraint for the ECFFT over is that length is upper bounded by , especially for odd . This restricts many applications such as encoding and decoding of -ary Reed-Solomon codes where code lengths are usually proportional to .
1.2. Sketch of the multiplicative and additive FFT techniques
To compare our results and better understand the FFT algorithm, let us sketch the idea of Cooley-Tukey’s algorithm and Lin-Chung-Han’s algorithm [LCH14], which correspond to the multiplicative and additive cases, respectively. For both cases, let and be a polynomial of degree less than . Denote the complexity of FFT with respect to the number of additions and multiplications by and , respectively.
For Cooley-Tukey’s algorithm, the evaluation set is selected to be which is the set of all -th roots of unity, where is equal to for an integer . Then the square map maps onto . Moreover, the polynomial can be decomposed as a combination of two lower-degree polynomials meanwhile, i.e., , where are polynomials of degree less than . Thus, the DFT of at can be reduced to DFTs of and at and then a combination of these two sets of evaluations by using additions/multiplications in . Then the running time and both satisfy the recursive formula
(1.2.1) |
After steps of recursions, we have .
Lin-Chung-Han’s additive FFT algorithm inherited the idea of the FFT algorithm [Fid72] through polynomials modular arithmetic. Assume . Then the evaluations of at are exactly the residues
Note that and . To efficiently get these residues, Lin et al. introduced linearized polynomials to decompose the modulo into modulus recursively. Assume
is a subspace chain of and for some and each . In particular, we have and constitutes a basis of as a vector space over . Define the linearized polynomial as . Then and
For any , assume the -adic expansion of is . Then
Hence is a basis of . Under the basis , write , where are polynomials of degree less than . Since , by the Chinese Reminder theorem,
Thus, the computation of residues of can be reduced to residues of and residues of . Since both have degree less than , the computation of needs additions and multiplications in , respectively. Thus the running time and also satisfy equation (1.2.1) leading to .
So far, we have briefly described the ideas of multiplicative FFT and additive FFT. Although there are similarities between multiplicative and additive FFTs, the methods used are different. This makes great inconvenience for the generalization of these FFT algorithms and their applications.
1.3. Our result and comparisons
In this work, we provide a unified framework for FFT in that includes both multiplicative and additive FFT. More importantly, our framework works well when either , , or is smooth. In other words, we give a new FFT algorithm that includes both the multiplicative DFT and the additive DFT as two special cases. Besides, we discuss a new case that has never been considered: if is a divisor of that is -smooth for a real number ; namely, can be factored into the product of satisfying for every , then our FFT algorithm runs in operations in .
Theorem 1.1.
Let be a real. Let be the space of polynomials over of degree less than . If is a -smooth divisor of either , or , then one can run FFT for at a well-chosen multipoint set of size in field operations of .
Remark 1.2.
-
(1)
In our framework, we need to represent a polynomial under a certain basis of , then implement FFT of at a well-chosen multipoint set (the roots in of a polynomial of degree ). As we will see in Section 3, in the case of , then a basis of constructed from our framework is actually the standard monomial basis, i.e., ; in the case of , then is constructed by the products of a series of linearized polynomials, which is the same as in [LCH14].
Moreover, if is smooth and the polynomial is given under the standard basis , then our framework can implement DFT of in operations in (see Corollary 3.6 in Section 3), which is a generalization of Mateer-Gao’s additive FFT over to arbitrary characteristics.
Although the results for multiplicative and additive FFTs are known, we present them under a unified framework for FFT by the theory of algebraic function fields.
-
(2)
If both and are not smooth, then neither additive FFT nor multiplicative FFT in is applicable. In this case, if has a smooth divisor , then our framework ensures that there is an efficient FFT in . Therefore, our work loosens the restriction of FFT on the finite field to some extent.
For instance, let be a Sophie Germain prime, i.e., is also a prime. Then both and are not smooth. Thus, if is smooth, then is smooth. The other instance is that is a Sophie Germain prime and is a Mersenne prime, then is not smooth. Furthermore, . Thus, with high probability is not smooth as is a Mersenne number. On the other hand, we have is smooth.
-
(3)
For the new case: is smooth, we give a practical FFT algorithm over with multipoint set in Section 4. Although one could also consider multiplicative FFT in the quadratic extension field in this case, the corresponding multipoint set is a subgroup of . Note that . Thus, the multiplicative FFT over does not imply the FFT over .
We compare our result with known results in Subsection 1.1, see Table 1.
evaluation set | Representation of | constraints111in all cases, need to be -smooth. | |
---|---|---|---|
Multiplicative | is rep. | ||
FFT [CT65] | -th roots of unity | under the standard basis | |
Additive | is rep. under a | ||
FFT[LCH14] | subspace of | non-standard basis | |
Elliptic curve | is rep. as MPE | ||
FFT [BSCKL23] | -coord. of an -coset222a coset , where is a subgroup of order . | ||
Our | is rep. under a | , | |
results | roots of an -poly.333a polynomial determined by the automorphism subgroup of of order . | (non-)standard basis | or |
1.4. Our techniques
Let be the automorphism group consisting of all automorphisms of keeping elements of invariant. Let be a subgroup of and let be the subfield of fixed by . If satisfies the following conditions (see Section 2.1 for precise definitions):
-
(i)
is an abelian group with smooth order , i.e., , where all prime divisors are small constant.
-
(ii)
There is a place of that is totally ramified in .
-
(iii)
has a rational place that splits completely in . Let denote the set of places of lying over .
then we can construct an FFT for any polynomial in at with complexity (since every rational place is the zero of for and for any , we identify as a subset of ). Our FFT is based on the Galois theory, in order to differentiate it from the classical FFT, we name it G-FFT.
By condition (i) and the structure of finite abelian groups, has an ascending chain of subgroups
where for . By the Galois theory [HKTO08], each group determines a fixed subfield of . As any subfield of is again a rational function field [Sti09, Proposition 3.5.9], we assume for some . Thus the subgroups chain leads to a tower of fields
Furthermore, if the pole place of totally ramifies in the extension , then we can choose the such that each is a polynomial of of degree for . As a result, we have for each . Based on these facts, we can construct an -basis of the polynomial space as following
(1.4.1) |
Thus, any can be represented as
(1.4.2) |
where the second “=” is the result of combining all terms with the same for . Then are polynomials of degree less than with respect to variable . Thus, the evaluations of at can be reduced to the evaluations of at and then a combination of these sets of values by using additions/multiplications in . However, for every , its evaluation at every satisfying . According to (iii), let be the set of places of lying over . Then . Denote the complexity of FFT with respect to the number of additions and multiplications by and , respectively. Then and both satisfy the recursive formula
(1.4.3) |
Similarly, the DFTs of at can be reduced to DFTs of polynomials of lower-degree with respect to the variable at . Then, after steps of recursions, we obtain , where .
The above idea works well for a subgroup of the affine linear group as the pole place of totally ramifies in . However, if we choose a subgroup that is not contained in , then there are no rational places that totally ramify in . In this paper, we consider a cyclic subgroup of of order . There is a place of degree that totally ramifies in the extension , and the rational place is splitting completely. Assume . By some elementary analysis, we first construct a basis of the Riemann-Roch space (here we identify the place with a quadratic irreducible polynomial ). Then we show that a subset of spans the vector space , where is a polynomial of degree with no roots in (see Lemma 4.5). In other words, we get a basis of , namely, .
For a polynomial which is represented under the basis , let . By the same recursive reduction, we first show that the multipoint evaluation of can be computed via G-FFT in time . Next, by precomputing for all , we get for every .
In the process, we need precomputations of . Moreover, in the recursive reduction, we also need some precomputations to get around the pole places of elements in the basis , which will cost storage space. Therefore, the total storage in the G-FFT algorithm is .
1.5. Organization
The paper is organized as follows. In Section 2, we present some preliminaries on algebraic function fields, in particular rational function fields. In Section 3, we construct the G-FFT via affine linear subgroups of and instantiate by the multiplicative group and additive group as two examples. Moreover, in the case is smooth, we show that G-FFT under the standard basis of can be done in . In Section 4, we construct a new basis of via a non-affine cyclic subgroup of of order . Then we show that the G-FFT of smooth length can be done in and give the G-FFT algorithm for the case . Finally, Section 5 concludes our work.
2. Preliminary
In this section, we will introduce some preliminaries on algebraic function fields, especially some known results about the rational function field and its automorphism group. We also introduce the definition of -smooth groups which are similar to the -smooth integers.
2.1. Algebraic extensions of function fields
We briefly introduce the theory of rational function fields in this subsection. The reader may refer to [Sti09] for details.
For a prime power , let denote the finite field of elements. An algebraic function field over in one variable is a field extension such that is an algebraic extension of for some transcendental element over . In particular, the rational function field is an algebraic function field of one variable. In the following, we say is an algebraic function field with the assumption that is the full constant field of , i.e., every algebraic element of over belongs to as well.
Now let be the rational function field over . For every irreducible polynomial , we define a discrete valuation which is a map from to given by and , where is a nonzero polynomial and is the unique nonnegative integer satisfying and . This map can be extended to by defining for any two polynomials with . Apart from the above finite discrete valuation , we have an infinite valuation defined by for any two polynomials with . Note that we define . The set of places of is denoted by .
For each discrete valuation ( is either a polynomial or ), by abuse of notion we still denote by the set . Then the set is called a place of . If , then we denote by . The degree of the place is defined to be the degree of the corresponding polynomial . If is the infinite place , then the degree of is defined to be . A place of degree is called rational. In fact, there are exactly rational places for the rational function field over .
Let be the set of all places of and let be the subset of consisting of all rational places, i.e., places of degree one. Assume is a finite algebraic extension of degree with the constant field . A place is said to be lying over , written as , if . The ramification index of over is denoted by . Let be all the places of lying over . If for a place , then and is said to be totally ramified in ; if for every , , is said to be unramified in ; furthermore, if and , then is said to split completely in . An important fact that is used in the design of our G-FFT is that for every place of and a function with , the value is constant for all places of lying over .
2.2. The Riemann-Roch Space
Let be a rational function field. For a place of and an integer , we define the Riemann-Roch space associated with as
Then is a finite-dimensional vector space over . If is the pole of , then is the polynomial space . The dimension is usually denoted by . Then we have
for ; and , otherwise.
2.3. Subfields of the rational function field
Let be the rational function field for some transcendental element over the finite field . We denote by the automorphism group of over , i.e.,
(2.3.1) |
It is clear that an automorphism is uniquely determined by . It is well known that every automorphism is given by
(2.3.2) |
for some constant with (see [HKTO08]). Denote by the general linear group of invertible matrices over . Thus, every matrix induces an automorphism of given by (2.3.2). Two matrices of induce the same automorphism of if and only if they belong to the same coset of , where stands for the center of . This implies that is isomorphic to the projective linear group . Thus, we can idenitify with .
Consider the subgroup of
(2.3.3) |
is called the affine linear group. Every element defines an affine automorphism
In addition to the subgroup , has a cyclic subgroup with order . Let be a primitive polynomial over . Consider the element . Then the order of is (one can refer to [JMX19, Lemma V.1]). Thus induces a -cyclic subgroup of .
For a subgroup of , let be the fixed subfield by , i.e.,
By the Galois theory [HKTO08], we know that is a Galois field extension with . Moreover, Lüroth’s Theorem [Sti09, Proposition 3.5.9] asserts that if , then , where is a rational function of and is transcendental over .
Lemma 2.1 ([HKTO08]).
Assume is a subfield of and . Then for some polynomial with satisfying and . In particular, if and only if there exist such that and .
2.4. B-smooth groups
Let be a constant integer. Recall that a positive integer is called -smooth if every prime factor of is upper bounded by , i.e., with for all . Note that we do not require these prime divisors to be distinct. We give the definition of -smooth finite groups as follows.
Definition 2.2.
A finite group is called -smooth if there exists a chain of subgroups of :
(2.4.1) |
such that for .
Lemma 2.3.
Let be a finite abelian group. If is -smooth, then is -smooth.
Proof.
Assume , where are divisors not larger than . Since is abelian, by the structure theorem for finite abelian groups [KS04], there exists a subgroup of order . As is also abelian, there is a subgroup of of order . Continuing in this fashion until , we get a series of finite subgroups of that satisfy the condition (2.4.1) and . ∎
3. Fast Fourier transform via affine subgroups of
Assume the affine linear group has a smooth subgroup with order . We will first construct a polynomial basis of in terms of . Under this basis , we will then show that a Galois-group-based FFT (G-FFT for short) over of length can be computed in quasi-linear time of . We then instantiate our G-FFT by the multiplicative group and the additive group as two examples.
3.1. G-FFT via affine subgroups
Assume is a -smooth affine subgroup with order , i.e., such that for all . Then there is an ascending subgroup chain
satisfying for . Let be the fixed subfield of under ; namely,
By the Galois theory [HKTO08], is a Galois extension with and for . Furthermore, we have resulting a tower of fields
Lemma 3.1.
Assume is a B-smooth affine subgroup with order and . Let be a subgroup of of order and be the fixed subfield under for . Then we have
-
(1)
For , and ; moreover, each can be written as a polynomial of of degree .
-
(2)
The set
forms a basis of the -vector space .
Proof.
(1) Let . Since is affine, is a linear polynomial of for each by § 2.3. Thus is a polynomial of degree . Let . Then and is a root of . These lead to
Thus . Moreover, by definition,
By [JMX19, Proposition IV.2], the infinity place totally ramifies in . Let be the place of lying below . Then for . Thus
namely, is a pole of . Since is totally ramified in , for any , . Thus
Therefore, each is a linear polynomial of and can be seen as a polynomial of of degree .
(2) It is easy to see that . For any , by computation,
thus and . Note that, if , assume is the largest index in such that . Then
Thus . As each element in has pairwise distinct valuation at the infinity place , they must be linearly independent over . Since has dimension , then must be a basis of . ∎
By the above Lemma, under the basis , we can express any as
and are polynomials of for .
Theorem 3.2.
Let be the rational function field . Let be a -smooth subgroup of the affine group with . Assume is a rational place of that splits completely in the extension . Let be the set of rational places of lying over (hence ). Then, under the basis as in Lemma 3.1, the evaluations of every function at can be computed in operations in .
Proof.
First, denote the complexity (i.e., the total number of operations in ) of evaluating at the set by . Under the basis defined in Lemma 3.1, assume , where . To perform FFT of at , write in at most steps as follows
(3.1.1) |
Note that
where is the infinity place of . Thus we have . By equation (3.1.1), the DFT of at can be reduced to the DFTs of at and then a combination of these values by using operations in . Therefore, the running time satisfies the following recursive formula
(3.1.2) |
We continue the reduction in this fashion till to the DFTs of functions in . We get a total of constant polynomials and need to compute their’s evaluations at , which can be done in orperations. Thus, the recursive formula (3.1.2) leads the total running time equal to
This completes the proof.∎
Remark 3.3.
Let denote the MPE of at . The inverse G-FFT means that given the , output the coefficients of under the basis defined by G-FFT (see Lemma 3.1). In the following, we show that the inverse G-FFT can also be done in operations. Let denote the complexity of inverse G-FFT of length . For any , let be the places in lying over . By the recursive Equation (3.1.1),
(3.1.3) |
Thus, we can first compute the MPEs of at from the above equation, which will cost operations. Then we can reduce the inverse G-FFT of to inverse G-FFTs of , , , . Finally, we get by Equation (3.1.1). Therefore, satisfies the following recursive formula
3.2. Instantiation
3.2.1. Multiplicative G-FFT
Let us first look at the multiplicative case. Let be the rational function field . Consider a subgroup of of order and an automorphism subgroup
When , we denote by . Then the field extension has extension degree . Furthermore, there are a few facts about this extension (refer to [JMX19, Proposition IV.2])
-
(1)
The pole of is totally ramified in the extension .
-
(2)
There is a rational place of that splits completely in .
Let be a rational place of that lies over . Then splits completely in the extension . Let be the set of rational places of lying over . Then .
Assume that has factorization with for a positive integer . Consider an ascending chain of subgroups
with for . Let and . If , let . Then and . If is odd, then . We choose with even order (hence is also even). Then and for each . Let . Then and . Therefore, we always have for all . Furthermore, it is easy to see that gives only one solution , i.e., the zero of totally ramifies in . Let be a primitive element of . Then for any , the equation , i.e., gives solutions for . This implies that splits into rational places of . Let be the set of rational places of lying over , i.e., . Thus, we have . Partition into subsets for . It is easy to see that evaluation of at every place of is a constant that is equal to .
In our G-FFT algorithm, we have to decompose a polynomial in variable in terms of polynomials in variable . So we need represent under the basis defined in Lemma 3.1. Actually, in this case,
namely, is exactly the standard basis of . To illustrate, let us consider the first step, i.e., express a polynomial as a combination of with coefficients of polynomials in variable . Then, in at most steps, can be written as
(3.2.1) |
It is clear that each of has degree less than . We can then decompose each as a combination of with coefficients of polynomials in variable . Then the polynomials in all have degrees less than . We continue in this fashion until in the last step, all polynomials in variable have degrees less than , i.e., they are all constants.
In conclusion, we have the following result.
Corollary 3.4.
If is a divisor of that is smooth, then one can run FFT for polynomials in field operations of .
3.2.2. Additive G-FFT
We now turn to the additive case. Let be the rational function field . Let be the characteristic of . Consider an -subspace of of order and the associated automorphism group
When , we denote by . Then the field extension has extension degree . Furthermore, there are a few facts about this extension [JMX19]:
-
(1)
The pole of is totally ramified in the extension .
-
(2)
There is a rational place of that splits completely in .
Let be a rational place of that lies over . Then splits completely in the extension . Let be the set of rational places of lying over . Then .
Assume that has factorization . For simplicity, choose a set of -linearly independent elements in . Put . Then is an -subspace of of dimension . Hence, for . Put , and . Then each is a linearized polynomial of degree , denoted by . Furthermore, where . It is easy to see that gives solutions for all . This implies that splits into rational places of . Let be the set of rational places of lying over , i.e., . Thus, there exists an -vector space of dimension such that .
To perform G-FFT, we need to represent under a basis constructed in Lemma 3.1. In this case, each is a linearized polynomial of degree for . In particular, . Thus,
(3.2.2) |
We note that is constructed in the same way as in [LCH14]. Under this basis, we can decompose a polynomial in variable in terms of polynomials in variable step by step. To illustrate, let us consider the first step only. Let be a polynomial of degree less than . Under the basis , write as
(3.2.3) |
It is clear that each of has degree less than . We can then decompose each as a combination of and polynomials in variable . Then the polynomials in all have degrees less than . We continue in this fashion until the last step: all polynomials in variable have degrees less than , i.e., all constant polynomials. In conclusion, we have the following result.
Corollary 3.5.
Let be a basis of defined as in equation (3.2.2). Let be a given polynomial that is represented under . If is a divisor of , then one can run FFT for in field operations of .
The condition “ is represented under ” in Corollary 3.5 is necessary to decompose a polynomial in variable in terms of polynomials in variable step by step in our G-FFT. If we are given a representation of under the standard basis, i.e., , we need to compute its -adic expansion (refer to [GS10, VZGG13]) first, i.e.,
Then we can write as in the form of (3.2.3) in at most steps from its -adic expansion. In the second recursion, we need also to compute the -adic representation of each to write it as a combination of and polynomials in variable . We continue in this fashion until the last step: all polynomials in variable are constant. This has been considered in [GS10] for the case that . We notice that if the characteristic is a constant (not only for ), then the -adic expansion of any can be computed in for any (see Lemma A.2). Consequently, if is given under the standard basis, we must add the complexity of computing the -adic expansions in the recurse formula of . Then satisfies the following recursive formula
After steps of recursion, we have
In conclusion, we have the following result.
Corollary 3.6.
Let be a finite field with constant characteristic . Let be a given polynomial under the standard basis. If is a divisor of , then one can run FFT for in field operations of .
4. Fast Fourier transform via a cyclic subgroup of order
We continue to use the notation to denote the rational function field . Assume is a -smooth divisor. Let be an irreducible and primitive polynomial over and . Let denote the quadratic place of corresponding to . In this section, we will show that the DFT of any polynomial at a well-chosen set can be done in by using our G-FFT algorithm.
Recall that has order in the group , where are coefficients of . Let be the set of rational places of . Then acts as a -cycle on the set .
Lemma 4.1 ([JMX19]).
Let and be defined as above. Let be a subgroup of order . Then the fixed subfield of by is Moreover,
-
(1)
the pole place of splits completely in ;
-
(2)
the quadratic place is the unique place that is totally ramified in .
Assume is a -smooth subgroup of order , i.e., , where . Then there is an ascending chain of subgroups:
Let be the fixed subfield. By the same analysis as in Subsection 3.1, we have resulting a tower of fields
Define
(4.0.1) |
Then by taking in Lemma 4.1. Let . It is clear that according to the definition of . Furthermore, since is totally ramified in , for all [Sti09, Theorem 3.8.2]. Thus the pole divisor of is . By [Sti09, Theroem 1.4.11],
Thus . We have the following diagram
Let denote the pole place of for . According to Lemma 4.1, we know that splits completely in . In particular, let be the set of places lying over . Then . Let be the set of all rational places in lying above . Then . By the definition of , for every , thus . Define
(4.0.2) |
Since every rational place is the zero of for some , we identify with in this correspondence. Thus, can be viewed as a subset of for all . In particular, and .
The following lemma presents the relationships between , which is crucial for us to construct a basis of and perform the G-FFT for any .
Lemma 4.2.
For , let , be defined as in Equation (4.0.1). Let be the quadratic place of lying below . Then, the followings hold:
-
(1)
is a prime element of , i.e., , where is a quadratic irreducible polynomial corresponding to .
-
(2)
The pole place of splits into rational places including in ; namely, for some polynomial of degree , and are pairwise distinct.
-
(3)
, where and are given in (2).
-
(4)
for some of degree , and , where and is defined by Equation (4.0.2).
Proof.
Let . Then is a generator of , i.e., . Since acts as a -cycle on the set , then, as a permutation of , can be decomposed as a product of cycles of length . Assume the cycle which contains is as follows
(4.0.3) |
where are pairwise distinct. Thus
(4.0.4) |
for some . Consider the principal divisor . Since is totally ramified, for all by [Sti09, Theorem 3.8.2]. Then
According to equation (4.0.3),
Thus, we have
(4.0.5) |
Let be the pole of for . By Equations (4.0.4) and (4.0.5), is a double zero of and is the unique pole of in . Furthermore,
Thus must be a prime element of , denoted by . Then . This completes the proof of (1).
(2) For the relationship between and , we note that
(4.0.6) |
By Equation (4.0.4), the pole of splits completely in the extension . Thus splits into places of . It is obvious to see that from equation (4.0.6). Assume are places of lying above . Then , as an automorphism of , permutes these places. Without loss of generality, assume
(4.0.7) |
Then we have
for some polynomial . As , by Lemma 2.1, we then have . This completes the proof of (2).
(3) For the relationship between and , we note that
The second equality in the above display follows from (1). Consider the principal divisor in . By Equation (4.0.7),
Thus for some .
(4) can be proved similarly by substituting with in the proof of (2) and (3). We do not repeat it here. ∎
In the following, we will first construct a basis of the Riemann-Roch space . For simplicity, we define the following notions:
(4.0.9) |
where all are given in Lemma 4.2(2) for and .
Lemma 4.4.
Proof.
For , define the set as follows
(4.0.10) |
where the product “” of sets means a set consisting of all possible products of elements from these three sets. Then . Let and be two sets defined in Equation (4.0.10). We claim that
-
(i)
is a basis of the Riemann-Roch space .
-
(ii)
is a basis of the Riemann-Roch space .
Then and are linearly equivalent and have same cardinality. By substituting the subset with in , we get a new basis of , where . In particular, for , is a basis of . By substituting with , then we have is also a basis of . Continuing in this fashion till to , then we get a basis of , i.e.,
Therefore, it suffices to prove the above claims (i) and (ii).
(i) For every element in , where , and , by Lemma 4.2, we have
and it has no other poles except for . Thus . Assume
(4.0.11) |
where all and . Multiplying by on both sides of Equation (4.0.11), we have
(4.0.12) |
Since , we have the coefficients of for are all zero; namely, and for every . As , we then have and for all and . As is transcendental over , we have all the coefficients . Therefore, the elements in are linearly independent. By the Riemann-Roch theorem [Sti09], has dimension:
Thus, is a basis of .
Next, we take a subset of to construct a basis of .
Lemma 4.5.
Proof.
Firstly, let be the -subspace of spanned by . By Lemma 4.4, is an -linearly independent subset of . Then
It suffices to show that .
By the above claim, we have . Since , then the numerator of (as a rational polynomial function) belongs to . Thus, the lemma is proved if the claim is true.
The proof of claim: It is equivalent to show that the pole places of is a subset of . Since , the pole places of in are those lying above for , where is the zero of . Moreover, and splits completely in by Lemma 4.2, thus each splits completely in . Let be the pole place of and be its support set. Then . In particular, contains which has cardinality . Moreover, let . Then . For any , since , and are disjoint. This means the disjoint union is a subset of . Thus, the denominator can be killed by .
∎
Assume is -smooth, i.e., for all . By Lemma 4.1, there are rational places in that are splitting completely in , namely those places lying above the pole place of in . Denote the set consisting of these places by . Particularly, if , and contains if . We make the following choices:
(4.0.13) |
Let be the set of all rational places of lying over (hence ). If , by the proof of claim in Lemma 4.5, every base element has no poles in .
Theorem 4.6.
Let be a cyclic subgroup of of order . Let and be defined as above. If is -smooth, then the DFT of any polynomial at can be done in operations of .
Proof.
Let , where and come from and by Lemma 4.2(4). Then by Lemma 4.5. We will first show that the MPE of at can be done in . By pre-computing for all , we can obtain for every . If , we define since . Denote the complexity (i.e., the total number of operations of ) to compute the evaluations of any at the set by .
Under the basis in Lemma 4.5, we represent as
(4.0.14) |
where for every . Now, all and
Thus, for all .
For any , let . Then as . Let . Then by Lemma 4.1. Thus the evaluations of at can be reduced to evaluations of at , and then a combination of these values according to Equation (4.0.14). If , by the choice of , there are no places in that are poles of . So the reduction works well and we can directly get the recursive formula (4.0.17) which leads to the final result . However, if , the pole places of are contained in which need to be dealt with separately.
We are left to consider the case . According to Lemma 4.2 (2), let be the set of all rational places of lying above . For any , by computations,
(4.0.15) |
Then,
namely, each is a zero of . However, are simple poles of . We cannot evaluate and separately at for .
Note that, by Equation (4.0.15), and take only at for . Thus
(4.0.16) |
where the second “=” follows from Lemma 4.2 (4).
Thus, for these places in , we can get according to equations (4.0.16) and (4.0.14) which can be done in by pre-computing of
It is not hard to see , thus . As for other rational places in , the functions in equation (4.0.14) are well-defined at them. Thus, we can get the corresponding evaluations of according to Equations (4.0.14) by using operations in . Since each and , by the above analysis, we get a recursive formula for :
(4.0.17) |
Then we can continue to reduce the DFT of each at to the DFTs of functions in at , till to the last step where we get functions in and evaluate them at , which can be done in operations. Overall, the recursive formula (4.0.17) lead to a final complexity of :
Since we need some precomputations in each step of the reduction, we analyze the total storage for these precomputations. Precisely, in step of the reduction, we need to precompute
Therefore, the storage for the precomputations in the process of reduction is:
By adding the storage for for every , the total storage for precomputation is .
∎
Remark 4.7.
-
(1)
By the same analysis as in Remark 3.3, the inverse G-FFT for the case can also be performed in operations.
-
(2)
Let be any nonzero polynomial. In the affine G-FFT, we showed that the transformation from the coefficients of under the basis in Lemma 3.1 to the coefficients of under the standard basis can be done in at most operations. However, in the case, this transformation will cost operations in , where denotes the cost of multiplication of two polynomials of degree less than . For simplicity, we take as an example to illustrate. In this case, assume for . Assume , where each is the base element in Lemma 4.5, and the evaluation set , where and (resp. ) is the set of places lying above (resp. ). Since
where
The pole places of are in for all . Therefore, the computation of coefficients of under the standard basis can be reduced to the computations of and under the standard basis. Then get by multiplying with and add . Thus the transformation complexity, denoted by , satisfies
Example 4.8.
At last, let us present an example with to illustrate the G-FFT. Since for by Lemma 4.2, the pole place of splits into two places in , i.e., and . Let for . Then the G-FFT in the proof of Theorem 4.6 can be implemented by the following Algorithm 1. Note that it can be also applied to the general case, i.e., is -smooth, by writing under the basis in step 4 and adding the discussion of pole places of in step 8. For better understanding, we only present the simplest case .
-
–
Write .
-
–
For , let . In particular, .
More specifically, all data for the case are as follows. Let . Firstly, we choose a primitive polynomial over : . The automorphism has order . Since and , we can construct a tower of fields, i.e., is the subfield fixed by , . Then . In addition, let and be the quadratic place corresponding to . Then is totally ramified in . Let . The field is a subfield of . By computation, we have
(2) The basis of . The pole place of splits into two places in , i.e., and , for every . By computations, we have . Thus, by Lemma 4.5, a basis of is
(3) The precomputations. In the proof of Theorem 4.6, we need to store values in precomputing process:
According to Algorithm 1, we can compute the MPE for any at . In Appendix B, we take a random (see its coefficients in Table 2) and set . Then we compute by G-FFT and get for every (see Table 3 for the MPEs of and at ).
5. Conclusion
In this work, we consider FFT for evaluations of polynomials at a chosen set . We conclude that when either , or is smooth, then it is possible to run FFT in operations of , which loosens the restriction of FFT on the finite field to some extent. Most importantly, if is smooth, we give a practical algorithm to implement FFT over of length rather than turn to a quadratic extension field to do FFT of length . Our framework is based on the Galois theory and properties of the rational function field. The applications of our new algorithm to polynomial arithmetic and encoding/decoding of Reed-Solomon codes are not considered in this work and we leave them as a future research work.
Acknowledgments
We would like to thank Yi Kuang for his help in implementing the G-FFT algorithm. We would also like to thank Liming Ma and Fuchun Lin for their valuable comments on the manuscript of this work. This Research is partially supported by the National Key Research and Development Program under Grant 2022YFA1004900 and the National Natural Science Foundation of China under Grant numbers 123031011 and 12031011.
References
- [BCS13] Peter Bürgisser, Michael Clausen, and Mohammad A Shokrollahi. Algebraic complexity theory, volume 315. Springer Science & Business Media, 2013.
- [BSCKL23] Eli Ben-Sasson, Dan Carmon, Swastik Kopparty, and David Levit. Elliptic curve fast Fourier transform (ECFFT) part I: Low-degree extension in time over all finite fields. In Proceedings of the 2023 Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 700–737. SIAM, 2023.
- [Can89] D. G. Cantor. On arithmetical algorithms over finite fields. J. Combin. Theory, ser., 50(2):285–300, 1989.
- [CT65] James W Cooley and John W Tukey. An algorithm for the machine calculation of complex Fourier series. Mathematics of computation, 19(90):297–301, 1965.
- [Fid72] Charles M Fiduccia. Polynomial evaluation via the division algorithm the fast Fourier transform revisited. In Proceedings of the fourth annual ACM symposium on Theory of computing, pages 88–93, 1972.
- [Gao03] Shuhong Gao. A new algorithm for decoding Reed-Solomon codes. Communications, information and network security, pages 55–68, 2003.
- [GS10] Mateer T. Gao S. Additive fast Fourier transforms over finite fields. IEEE Transactions on Information Theory, 56(12):6265–6272., 2010.
- [HCLB21] Yunghsiang S Han, Chao Chen, Sian-Jheng Lin, and Baoming Bai. On fast Fourier transform-based decoding of Reed-Solomon codes. International Journal of Ad Hoc and Ubiquitous Computing, 36(3):180–187, 2021.
- [HJB84] Michael Heideman, Don Johnson, and Charles Burrus. Gauss and the history of the fast Fourier transform. IEEE Assp Magazine, 1(4):14–21, 1984.
- [HKTO08] James William Peter Hirschfeld, Gábor Korchmáros, Fernando Torres, and Fernando Eduardo Torres Orihuela. Algebraic curves over a finite field, volume 20. Princeton University Press, 2008.
- [JMX19] Lingfei Jin, Liming Ma, and Chaoping Xing. Construction of optimal locally repairable codes via automorphism groups of rational function fields. IEEE Transactions on Information Theory, 66(1):210–221, 2019.
- [Jus76] Jrn Justesen. On the complexity of decoding Reed-Solomon codes (corresp.). IEEE transactions on information theory, 22(2):237–238, 1976.
- [KS04] Hans Kurzweil and Bernd Stellmacher. The theory of finite groups: an introduction, volume 1. Springer, 2004.
- [LANH16] Sian-Jheng Lin, Tareq Y Al-Naffouri, and Yunghsiang S Han. FFT algorithm for binary extension finite fields and its application to Reed-Solomon codes. IEEE Transactions on Information Theory, 62(10):5343–5358, 2016.
- [LANHC16] Sian-Jheng Lin, Tareq Y Al-Naffouri, Yunghsiang S Han, and Wei-Ho Chung. Novel polynomial basis with fast Fourier transform and its application to Reed-Solomon erasure codes. IEEE Transactions on Information Theory, 62(11):6284–6299, 2016.
- [LCH14] Sian-Jheng Lin, Wei-Ho Chung, and Yunghsiang S Han. Novel polynomial basis and its application to Reed-Solomon erasure codes. In 2014 IEEE 55th annual symposium on foundations of computer science, pages 316–325. IEEE, 2014.
- [M.71] Pollard J M. The fast Fourier transform in a finite field. Mathematics of computation, 25(114):365–374, 1971.
- [Sti09] Henning Stichtenoth. Algebraic function fields and codes, volume 254. Springer Science & Business Media, 2009.
- [vDHL17] Joris van Der Hoeven and Robin Larrieu. The frobenius FFT. In Proceedings of the 2017 ACM on International Symposium on Symbolic and Algebraic Computation, pages 437–444, 2017.
- [VZGG13] Joachim Von Zur Gathen and Jürgen Gerhard. Modern computer algebra. Cambridge University press, 2013.
- [WY88] Zhu X. Wang Y. A fast algorithm for the Fourier transform over finite fields and its VLSI implementation. IEEE Journal on Selected Areas in Communications, 6(3):572–577, 1988.
Appendix A -adic expansions of polynomials in
Definition A.1 ([VZGG13, GS10]).
Let be a finite field with characteristic . Assume is a polynomial of degree less than . For any , the -adic expansion of is
where for and .
Mateer-Gao [GS10] showed that when , the -adic expansion of can be computed in . In this part, we will generalize this result to any constant characteristic .
Lemma A.2.
Assume is a finite field with constant characteristic . Let be a polynomial of degree less than . For any , one can compute the -adic representation of in operations in .
Proof.
Let be the leading coefficient of . If , then the -adic expansion of is
Next, we assume . Let be a positive integer such that
Write as
(A.0.1) |
where for . For the convenience of writing, we sometimes denote by and denote by for any integer . Since the characteristic of is , we have
Thus, for each in , we have
(A.0.2) |
Now, by substituting each in equation (A.0.1) with the formula on the right side of equation (A.0.1), we then have
(A.0.3) |
If , then
We split the sum over in equation (A.0.3) into two parts: a sum over satisfying and a sum over satisfying . Then, by the above equation, we have
(A.0.4) |
Note that the three coefficients of in the above equation all are polynomials of degree less than . Thus their sum, denoted by , is also a polynomial of degree less than . To explicitly compute the coefficients polynomial of , we need to add some polynomial terms and for in equation (A.0.4). Since , the additions are only needed when . In this case, can be computed in at most additions in . By counting, there are at most polynomials in the form for . Thus we need at most additions in to compute the coefficient of . Next, we count the total multiplications in to compute . Since there are most polynomials needed to be multiplied by a scalar and each scalar multiplication needs at most multiplications in . Thus the total multiplications are also . After the combinations, we get
Thus, the -adic expansion of of degree less than is reduced to -adic expansions of polynomials of degree . We can continue this procedure recursively to . Then in at most recursions, all the polynomials will have degrees less than and we obtain the -expansion of . Let and be the complexity of the -adic expansion of a polynomial in . Through the above analysis, we have
The recursive formula finally leads to and . ∎
Appendix B An example of G-FFT with
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
15 | 4 | 37 | 109 | 3 | 87 | 116 | 18 | 10 | 90 | 73 | 51 | 92 | 66 | 121 | 86 | 70 | |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | |
13 | 21 | 95 | 29 | 122 | 78 | 122 | 78 | 41 | 26 | 49 | 44 | 66 | 19 | 66 | 40 | 121 | |
34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | |
81 | 3 | 116 | 4 | 50 | 40 | 121 | 85 | 25 | 66 | 38 | 55 | 42 | 98 | 37 | 116 | 15 | |
51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | |
49 | 33 | 100 | 86 | 120 | 104 | 61 | 114 | 0 | 10 | 17 | 68 | 91 | 81 | 98 | 124 | 44 | |
68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | |
5 | 23 | 119 | 115 | 25 | 73 | 10 | 113 | 17 | 91 | 11 | 86 | 118 | 8 | 31 | 63 | 32 | |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | |
21 | 62 | 77 | 51 | 90 | 53 | 89 | 48 | 97 | 11 | 15 | 77 | 8 | 64 | 63 | 7 | 62 | |
102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | |
55 | 92 | 116 | 116 | 118 | 53 | 80 | 39 | 47 | 84 | 53 | 100 | 4 | 97 | 40 | 106 | 108 | |
119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | |||||||||
39 | 107 | 25 | 67 | 51 | 87 | 90 | 111 | 93 |
0 | 0 | 81 | 74 | 71 | 8 | 55 | 114 | 59 | 85 | 121 | 6 | 54 | 32 | |
106 | 123 | 89 | 107 | 126 | 91 | 92 | 75 | 101 | 66 | 11 | 112 | 11 | 3 | 62 |
101 | 94 | 2 | 24 | 91 | 33 | 46 | 108 | 57 | 5 | 92 | 104 | 38 | 61 | 123 |
111 | 123 | 108 | 49 | 3 | 63 | 117 | 99 | 31 | 22 | 85 | 35 | 41 | 10 | 79 |
21 | 42 | 64 | 68 | 105 | 95 | 9 | 96 | 83 | 20 | 68 | 5 | 19 | 119 | 34 |
54 | 102 | 106 | 110 | 42 | 107 | 84 | 22 | 18 | 93 | 74 | 14 | 26 | 117 | 53 |
31 | 9 | 99 | 1 | 40 | 102 | 37 | 68 | 9 | 25 | 98 | 111 | 27 | 25 | 48 |
64 | 98 | 107 | 76 | 93 | 5 | 99 | 77 | 6 | 53 | 96 | 62 | 124 | 68 | 43 |
34 | 114 | 12 | 48 | 109 | 91 | 12 | 31 | 68 | 75 | 124 | 119 | 10 | 40 | 22 |
94 | 38 | 103 | 113 | 10 | 75 | 86 | 36 | 50 | 115 | 41 | 5 | 97 | 40 | 104 |
89 | 89 | 93 | 13 | 16 | 100 | 72 | 30 | 124 | 23 | 68 | 48 | 32 | 116 | 22 |
100 | 120 | 30 | 109 | 21 | 100 | 103 | 68 | 94 | 91 | 48 | 71 | 60 | 72 | 66 |
51 | 76 | 8 | 73 | 113 | 84 | 0 | 86 | 61 | 40 | 83 | 72 | 63 | 20 | 68 |
118 | 37 | 117 | 126 | 48 | 109 | 2 | 79 | 89 | 116 | 96 | 30 | 80 | 3 | 31 |
112 | 0 | 0 | 14 | 29 | 116 | 70 | 23 | 71 | 30 | 23 | 17 | 65 | 54 | 60 |
123 | 24 | 95 | 69 | 36 | 71 | 82 | 120 | 118 | 108 | 69 | 33 | 119 | 40 | 11 |
4 | 0 | 0 | 57 | 77 | 83 | 43 | 89 | 11 | 33 | 75 | 81 | 45 | 111 | 107 |
105 | 111 | 59 | 78 | 106 | 106 | 56 | 105 | 52 | 122 | 73 | 33 | 96 | 48 | 15 |
35 | 109 | 6 | 39 | 35 | 22 | 98 | 15 | 65 | 3 | 104 | 43 | 62 | 126 | 74 |
67 | 51 | 57 | 95 | 65 | 114 | 125 | 8 | 126 | 15 | 110 | 69 | 121 | 58 | 17 |
17 | 62 | 44 | 77 | 73 | 22 | 44 | 58 | 1 | 83 | 46 | 47 | 52 | 93 | 9 |
102 | 105 | 77 | 120 | 53 | 90 | 47 | 10 | 16 | 85 | 16 | 97 | 90 | 36 | 105 |
36 | 69 | 52 | 7 | 101 | 101 | 74 | 110 | 72 | 29 | 76 | 109 | 55 | 77 | 79 |
61 | 40 | 48 | 28 | 77 | 83 | 79 | 69 | 55 | 42 | 122 | 85 | 104 | 34 | 77 |
18 | 89 | 92 | 16 | 41 | 35 | 58 | 77 | 31 | 87 | 6 | 31 | |||
50 | 123 | 86 | 71 | 84 | 82 | 88 | 4 | 10 | 114 | 43 | 17 |