We discuss the fast Fourier transform in a finite field F\mathbb{F} with size pp.

For w∈Fw \in \mathbb{F}, and n∈F+n \in \mathbb{F}_+, define

Mw,n≐[1ww2...wn−11w2w4...w2(n−1)...1wnw2n...wn(n−1)]. M_{w, n} \doteq \begin{bmatrix} 1 &w &w^2 &... &w^{n - 1} \\ 1 &w^2 &w^4 &... &w^{2(n - 1)} \\ ... \\ 1 &w^{n} &w^{2n} &... &w^{n(n - 1)} \end{bmatrix}.

If the following two conditions hold:

  1. nn is some power of 22 and;
  2. wn=1w^n = 1 in the finite field.

Then ∀x⃗≐(x1,x2,...,xn)∈Fn\forall \vec x \doteq (x_1, x_2, ..., x_n) \in \mathbb{F}^n, we can compute

Mw,nx⃗=[1ww2...wn−11w2w4...w2(n−1)...1wnw2n...wn(n−1)][x1x2...xn] M_{w, n} \vec x = \begin{bmatrix} 1 &w &w^2 &... &w^{n - 1} \\ 1 &w^2 &w^4 &... &w^{2(n - 1)} \\ ... \\ 1 &w^{n} &w^{2n} &... &w^{n(n - 1)} \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ ... \\ x_n \end{bmatrix}

in O(nlog⁡n)O(n \log n) time.

Proof. If n=2n = 2, then the claim holds trivially.

Otherwise, let d=n/2=2k−1d = n / 2 = 2^{k - 1} and v=w2v = w^2. The odd columns of the first dd rows of the matrix Mw,nM_{w, n} constitutes

[1w2w4...wn−21w4w8...w2(n−2)...1w2dw4d...wd(n−2)]=[1vv2...vd−11v2v4...v2(d−1)...1vdv2d...vd(d−1)]=Mv,d. \begin{bmatrix} 1 &w^2 &w^4 &... &w^{n - 2} \\ 1 &w^4 &w^8 &... &w^{2(n - 2)} \\ & & &... \\ 1 &w^{2d} &w^{4d} &... &w^{d(n - 2)} \end{bmatrix} = \begin{bmatrix} 1 &v &v^2 &... &v^{d - 1} \\ 1 &v^2 &v^4 &... &v^{2(d - 1)} \\ & & &... \\ 1 &v^{d} &v^{2d} &... &v^{d(d - 1)} \end{bmatrix} = M_{v, d}.

By assumption, for even numbers i=2,4,...,(n−2)i = 2, 4, ..., (n - 2), we have i⋅d=1i \cdot d = 1 in the finite field. Hence, the odd columns of the last dd rows of Mw,nM_{w, n} is

[1w2(d+1)w4(d+1)...w(n−2)(d+1)1w2(d+2)w4(d+2)...w(n−2)(d+2)...1w2(d+d)w4(d+d)...w(n−2)(d+d)]=[1w2w4...wn−21w4w8...w2(n−2)...1w2dw4d...wd(n−2)]=Mv,d. \begin{bmatrix} 1 &w^{2(d + 1)} &w^{4(d + 1)} &... &w^{(n - 2)(d + 1)} \\ 1 &w^{2(d + 2)} &w^{4(d + 2)} &... &w^{(n - 2)(d + 2)} \\ & & &... \\ 1 &w^{2(d + d)} &w^{4(d + d)} &... &w^{(n - 2)(d + d)} \end{bmatrix} = \begin{bmatrix} 1 &w^2 &w^4 &... &w^{n - 2} \\ 1 &w^4 &w^8 &... &w^{2(n - 2)} \\ & & &... \\ 1 &w^{2d} &w^{4d} &... &w^{d(n - 2)} \end{bmatrix} = M_{v, d}.

Let x⃗o,x⃗e∈Fd\vec x_o, \vec x_e \in \mathbb{F}^d be the vectors obtained by the odd and even dimensions of x⃗\vec x respectively. By our construction,

  1. dd is some power of 22 and;
  2. vd=wn=1v^d = w^n = 1.

Hence, by induction hypothesis we can compute Mv,dx⃗oM_{v, d} \vec x_o in O(dlog⁡d)=O(nlog⁡n)O(d \log d) = O( n \log n) time.

Next, consider the even columns of the first dd rows of the matrix Mw,nM_{w, n} constitutes

[ww3w5...wn−1w2w6w10...w2(n−1)...wdw3dw5d...wd(n−1)]=[w...w2......wd][1w2w4...wn−21w4w8...w2(n−2)...1w2dw4d...wd(n−2)]=[w...w2......wd]Mv,d \begin{aligned} \begin{bmatrix} w &w^3 &w^5 &... &w^{n - 1} \\ w^2 &w^6 &w^{10} &... &w^{2(n - 1)} \\ & & &... \\ w^d &w^{3d} &w^{5d} &... &w^{d(n - 1)} \end{bmatrix} &= \begin{bmatrix} w &... & \\ &w^2 &... \\ & & &... \\ & & & & w^d \\ \end{bmatrix} \begin{bmatrix} 1 &w^2 &w^4 &... &w^{n - 2} \\ 1 &w^4 &w^8 &... &w^{2(n - 2)} \\ & & &... \\ 1 &w^{2d} &w^{4d} &... &w^{d(n - 2)} \end{bmatrix} \\ &= \begin{bmatrix} w &... & \\ &w^2 &... \\ & & &... \\ & & & & w^d \\ \end{bmatrix} M_{v, d} \end{aligned}

Similarly, the even columns of the last dd rows of the matrix Mw,nM_{w, n} constitutes

[wd+1...wd+2......wd+d]Mv,d=(−1)[w...w2......wd]Mv,d. \begin{aligned} \begin{bmatrix} w^{d + 1} &... & \\ &w^{d + 2} &... \\ & & &... \\ & & & & w^{d + d} \\ \end{bmatrix} M_{v, d} = (-1) \begin{bmatrix} w &... & \\ &w^2 &... \\ & & &... \\ & & & & w^d \\ \end{bmatrix} M_{v, d}. \end{aligned}

The equality comes from that wd=wn/2=−1w^d = w^{n / 2} = -1. By induction hypothesis, we can compute Mv,dx⃗eM_{v, d} \vec x_e in O(nlog⁡n)O(n \log n) time.

Finally, the first dd dimensions of Mw,nx⃗M_{w, n} \vec x equals

Mv,dx⃗o+[w...w2......wd]Mv,dx⃗e, M_{v, d} \vec x_o + \begin{bmatrix} w &... & \\ &w^2 &... \\ & & &... \\ & & & & w^d \\ \end{bmatrix} M_{v, d} \vec x_e,

which can be computed in O(nlog⁡n)+O(nlog⁡n)+O(n)=O(nlog⁡n)O(n \log n) + O(n \log n) + O(n) = O(n \log n) time.

The last dd dimensions of Mw,nx⃗M_{w, n} \vec x equals

Mv,dx⃗o−[w...w2......wd]Mv,dx⃗e, M_{v, d} \vec x_o - \begin{bmatrix} w &... & \\ &w^2 &... \\ & & &... \\ & & & & w^d \\ \end{bmatrix} M_{v, d} \vec x_e,

which can also be computed in O(nlog⁡n)+O(nlog⁡n)+O(n)=O(nlog⁡n)O(n \log n) + O(n \log n) + O(n) = O(n \log n) time.

□\square