[Paper Review] An in-place truncated Fourier transform and applications to polynomial multiplication
This paper presents in-place algorithms for the truncated Fourier transform (TFT) and its inverse (ITFT), achieving $O(n\log n)$ time complexity with only $O(1)$ auxiliary space. By reworking van der Hoeven's TFT using a decimation-in-time approach and on-the-fly root computation, the authors eliminate the $O(n)$ memory overhead of prior methods, enabling efficient, space-restricted polynomial multiplication for arbitrary-degree polynomials.
The truncated Fourier transform (TFT) was introduced by van der Hoeven in 2004 as a means of smoothing the "jumps" in running time of the ordinary FFT algorithm that occur at power-of-two input sizes. However, the TFT still introduces these jumps in memory usage. We describe in-place variants of the forward and inverse TFT algorithms, achieving time complexity O(n log n) with only O(1) auxiliary space. As an application, we extend the second author's results on space-restricted FFT-based polynomial multiplication to polynomials of arbitrary degree.
Motivation & Objective
- To eliminate the $O(n)$ auxiliary memory usage of existing truncated Fourier transform (TFT) and inverse TFT (ITFT) algorithms, which occurs due to buffer requirements at power-of-two sizes.
- To develop in-place variants of the forward and inverse TFT that maintain $O(n\log n)$ time complexity while using only $O(1)$ extra storage.
- To extend space-restricted FFT-based polynomial multiplication to arbitrary-degree polynomials by removing the need for $O(n)$ auxiliary space.
- To demonstrate that in-place polynomial multiplication is possible with $O(1)$ auxiliary space and $O(n\log n)$ time, even when inputs are read-only and outputs are written incrementally.
Proposed method
- Design an iterative, non-recursive version of the TFT and ITFT using a decimation-in-time decomposition into $L_1 \times L_2$ transforms, where $L_1 = L/2$ and $L_2 = 2$, to minimize recursion depth and space usage.
- Compute roots of unity on the fly using bit-reversal indexing, avoiding storage of all roots and enabling $O(1)$ auxiliary space despite data dependencies.
- Use a recursive partitioning strategy that divides the transform into blocks of size $L = 2^\ell$, where $\ell = \lfloor \lg(r - q) \rfloor - 1$, ensuring that each block fits in the output buffer.
- Apply FFTs to subarrays of size $L$ in place, accumulating results in the output buffer, and use a final in-place inverse TFT to recover the full polynomial product.
- Structure the algorithm so that intermediate transforms are written directly into the output buffer, minimizing temporary storage and enabling out-of-place multiplication with $O(1)$ auxiliary space.
Experimental results
Research questions
- RQ1Can the truncated Fourier transform and its inverse be computed in-place with only $O(1)$ auxiliary space while preserving $O(n\log n)$ time complexity?
- RQ2Is it possible to eliminate the $O(n)$ memory overhead of existing TFT algorithms by reordering operations and computing roots on the fly?
- RQ3Can space-restricted FFT-based polynomial multiplication be generalized to arbitrary-degree polynomials using in-place TFT and ITFT algorithms?
- RQ4What is the minimal auxiliary space required for in-place FFT-based multiplication, and is $O(1)$ space sufficient for a fully in-place algorithm?
Key findings
- The authors present iterative, in-place TFT and ITFT algorithms that achieve $O(n\log n)$ time complexity with only $O(1)$ auxiliary space, eliminating the $O(n)$ memory overhead of prior methods.
- The algorithms use a decimation-in-time approach with $L_1 = L/2$ and $L_2 = 2$, enabling $O(\log n)$ recursion depth and $O(1)$ space per level.
- On-the-fly computation of roots of unity in bit-reversed order allows the algorithms to avoid storing all roots, reducing space usage to $O(1)$.
- The method enables space-restricted polynomial multiplication of arbitrary-degree polynomials in $O((m+n)\log(m+n))$ time using only $O(1)$ auxiliary space, even when inputs are read-only.
- The algorithm correctly computes the full product $C = AB$ by partitioning the coefficient space into blocks, applying local FFTs, and combining results in-place.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.