RADER-FFT computes a DFT of prime length n with (3/2) L lg L + 2L multiplications and 3 L lg L + 3n − 4 additions full
This proof shows: correctness, complexity.
Statement. Let n be a prime, N=n−1, L the least power of two with L≥2N−1, and R a commutative ring containing an element ω with ωn=1, and an element ρ with ρL=1 and ρL/2=−1 (when L≥2), in which L is a unit. (Over C, ω=e−2πi/n and ρ=e−2πi/L; modulo a prime P, this needs n∣P−1 and L∣P−1.) For every x∈Rn, RADER-FFT returns X with Xk=∑jxjωjk, using 23LlgL+2L multiplications and 3LlgL+3n−4 additions and subtractions in R.
Lemma 1 (the reindexing). Let g be a primitive root modulo n. The maps q↦gqmodn and p↦g−pmodn are bijections from [0,N) onto {1,…,n−1}, and gqg−p≡g(q−p)modN(modn). Proof. The multiplicative group modulo the prime n has order N and is generated by g, so g0,…,gN−1 are distinct and exhaust it; the same holds for their inverses g−p. Since gN≡1 (Fermat's little theorem), exponents may be reduced modulo N. □
Lemma 2 (the convolution). With aq=xgq and bm=ωg−m (exponents of g reduced modulo n), for each p∈[0,N),
Xg−p=x0+q=0∑N−1aqb(p−q)modN. Proof. Let k=g−pmodn, which is nonzero. Split Xk=x0ω0+∑j=1n−1xjωjk and substitute j=gq by Lemma 1. Since ωn=1, ωjk depends only on jkmodn, and jk≡gqg−p≡g−((p−q)modN)(modn) by Lemma 1, so ωjk=b(p−q)modN. □
Lemma 3 (cyclic convolution by padding). Let ℓ be the linear convolution of a and b, ℓr=∑q+m=raqbm for 0≤r≤2N−2. Then (a∗b)p=ℓp+ℓp+N for 0≤p<N, with ℓ2N−1=0. Proof. The pairs (q,m)∈[0,N)2 with (q+m)modN=p are those with q+m=p or q+m=p+N, since 0≤q+m≤2N−2. □
Line L4. Let α,β∈RL be a and b padded with zeros. The radix-2 FFT of length L with root ρ computes α^k=∑jαjρjk, because ρL/2=−1 (the proof is on the page of the iterative FFT). Then α^kβ^k=∑rγrρrk, where γr=∑(q+m)modL=rαqβm is the cyclic convolution of length L, by expanding the product and using ρL=1. Since αqβm=0 only if q,m<N, and then q+m≤2N−2<L, no index wraps around and γr=ℓr for r≤2N−2, γr=0 otherwise. The inverse FFT, run with ρ−1 (which also satisfies (ρ−1)L/2=−1) and multiplied by L−1, returns γ: indeed ∑kγ^kρ−kr=∑sγs∑kρk(s−r)=Lγr, because for s=r in [0,L) the inner sum S=∑k<Lρkt, t=(s−r)modL∈(0,L), vanishes. To see this, write t=2ed with d odd, so 2e+1≤L, and let K=L/2e+1. Then ρKt=(ρL/2)d=−1. Since ρL=1, the term ρkt depends only on kmodL, and k↦k+K permutes the residues modulo L, so S=ρKtS=−S. Thus 2S=0, and S=0 because 2 divides the unit L and is therefore a unit. Folding by Lemma 3 gives c=a∗b.
Correctness. Line L5 sets X0=∑jxjω0. By Lemma 1, the loop at lines L6 and L7 writes each nonzero index k=g−p exactly once, with the value x0+cp, which is Xk by Lemma 2 and line L4. So the returned vector is X.
Inverse. With ω−1, which also has (ω−1)n=1, the same program computes ∑kXkω−jk; if ω is a principal n-th root of unity and n is a unit, this is nxj, and the final division returns x.
Operation count. The three FFTs of length L (of α, of β, and the inverse) each consist of lgL stages of L/2 butterflies, one multiplication and two additions each: 2LlgL multiplications and LlgL additions per FFT. The pointwise product is L multiplications, and the scaling by L−1 is L more. The folding adds ℓp+N for 0≤p≤N−2: N−1 additions. Line L5 is n−1 additions and line L7 is N additions. The totals are 23LlgL+2L multiplications and 3LlgL+(N−1)+(n−1)+N=3LlgL+3n−4 additions. Since 2n−3≤L<2(2n−3), both are Θ(nlogn) for n≥3. The arrays have length L, so the extra space is Θ(n). ■