These are the human proofs of Bluestein's algorithm, at full length.
Bluestein's algorithm computes the DFT of any length with three FFTs of length M, and has a first-order error bound full
This proof shows: correctness, complexity, error-bound.
Let R be a commutative ring, n≥1, and ζ∈R with ζ2n=1 such that ω=ζ2 is a principal n-th root of unity. Let M be the least power of two with M≥2n−1, and suppose R has a principal M-th root of unity and M is a unit in R. For an integer m put cm=ζm2; since ζ2n=1, cm=ζm2mod2n, which is the value of line L2, and c−m=cm. Each cm is a unit, with inverse ζ2n−(m2mod2n).
Lemma 1 (the identity). For all integers j and k, ωjk=cjckck−j−1.
Proof.j2+k2−(k−j)2=2jk, so cjckck−j−1=ζj2+k2−(k−j)2=ζ2jk=ωjk. □
Lemma 2 (the kernel). After line L4, for every integer d with ∣d∣<n, b[dmodM]=cd−1, and b[r]=0 for every other position r.
Proof. For 0≤m<n, line L4 writes cm−1 at m and at (M−m)modM, which is dmodM for d=m and d=−m; as c−m=cm, the value written is cd−1 in both cases. The positions 0,1,…,n−1 and M−n+1,…,M−1 are distinct, because M−n+1≥n when M≥2n−1. For m=0 both writes go to position 0 with the same value. No other position is written, and all start at 0. □
Theorem 1 (forward). BLUESTEIN(x,ζ) returns the DFT Xk=∑j=0n−1xjωjk, 0≤k<n.
Proof. After line L3, aj=xjcj for j<n and aj=0 for n≤j<M. Let z=a⊛b be the cyclic convolution of length M, zk=∑j=0M−1ajb[(k−j)modM]. Lines L5 to L7 compute z exactly: by the convolution theorem over R, with the principal M-th root and M a unit, FM−1(FMa⊙FMb)=a⊛b, and the FFT and its inverse compute FM and FM−1 exactly in R by the FFT page. For 0≤k<n, only j<n contribute, and then d=k−j satisfies ∣d∣<n, so by Lemma 2, zk=∑j<nxjcjck−j−1. By Lemma 1, line L8 gives ckzk=∑j<nxjωjk=Xk. □
Theorem 2 (inverse). INVERSE-BLUESTEIN(X,ζ) returns the x whose DFT is X, provided n is a unit.
Proof.ζ−1 satisfies (ζ−1)2n=1, and (ζ−1)2=ω−1 is again a principal n-th root of unity: (ω−1)n=1, and for 0<i<n, ∑kω−ik=∑kω(n−i)k=0 because 0<n−i<n. So by Theorem 1, line L10 returns yj=∑kXkω−jk. By the inversion formula on the DFT page, yj=nxj, and line L11 divides by n. □
Operation count. Line L3 does n multiplications and line L8 does n; line L6 does M. Lines L2 and L4 form the chirp and copy its inverses, which the cost model counts apart like a table. Each of the two forward FFTs of length M in line L5 uses 2MlgM multiplications and MlgM additions, and the inverse FFT of line L7 uses the same plus M multiplications by M−1. The total is 23MlgM+2M+2n multiplications and 3MlgM additions. As M is the least power of two ≥2n−1, M<2(2n−1), so M=Θ(n) and the cost is Θ(nlogn); the extra space is the arrays of length M and n.
Theorem 3 (rounding error). Work over C in floating point with unit roundoff u, and γ2=2u/(1−2u). Suppose (i) each computed chirp value satisfies ∣c^m−cm∣≤μ, and b^m=c^m, which is exact; (ii) a complex multiplication satisfies fl(pq)=pq(1+ϵ) with ∣ϵ∣≤2γ2 (Higham, Section 3.6); (iii) the computed FFT of length M satisfies ∥fl(FFT(v))−FMv∥2≤εM∥FMv∥2, and the inverse FFT, done as an FFT with conjugate twiddles followed by the exact division by the power of two M, satisfies the same bound with FM−1; Higham's Theorem 24.2 gives εM=lgM⋅η+O(u2). Then, with β=2n−1,
Proof. All norms are Euclidean unless marked. Put δ=μ+2γ2, and recall ∣cm∣=1, ∥FMv∥2=M∥v∥2 and ∥FM−1v∥2=∥v∥2/M. Terms of order u2 are dropped throughout.
Step 1 (line L3).∣a^j−aj∣≤∣xj∣∣c^j−cj∣+2γ2∣xjc^j∣≤δ∣xj∣, so ∥a^−a∥≤δ∥x∥, and ∥a∥=∥x∥.
Step 2 (line L5, the kernel).b has β nonzero entries of modulus 1, so ∥B∥∞≤∥b∥1=β and ∥b∥2=β. Write B^=FMb^+e2. Then ∥FM(b^−b)∥∞≤∥b^−b∥1≤βμ, and ∥e2∥∞≤∥e2∥2≤εMMβ. Since M<2β, Mβ<2β, so ∥B^−B∥∞≤β(μ+2εM).
Step 3 (line L5, the data). Write A^=FMa^+e1 with ∥e1∥≤εMM∥a^∥. Then ∥A^−A∥≤M∥a^−a∥+∥e1∥≤M(δ+εM)∥x∥, and ∥A∥=M∥x∥.
Step 4 (line L6). With P=A⊙B and P^r=A^rB^r(1+ϵr),
P^−P=(A^−A)⊙B^+A⊙(B^−B)+ϵ⊙A^⊙B^,
so ∥P^−P∥≤∥A^−A∥∥B^∥∞+∥A∥∥B^−B∥∞+2γ2∥A^∥∥B^∥∞≤Mβ∥x∥(δ+μ+2γ2+(1+2)εM). Also ∥P∥≤βM∥x∥.
Step 5 (line L7).z^=FM−1P^+e3 with ∥e3∥≤εM∥P^∥/M≤εMβ∥x∥. Since z=FM−1P, ∥z^−z∥≤∥P^−P∥/M+∥e3∥≤β∥x∥(2μ+22γ2+(2+2)εM), using δ=μ+2γ2.
Step 6 (line L8). For k<n, ∣X^k−Xk∣≤∣c^kz^k−ckzk∣+2γ2∣c^kz^k∣≤∣z^k−zk∣+δ∣zk∣, and ∣zk∣=∣Xk∣ because Xk=ckzk with ∣ck∣=1. Summing in the Euclidean norm over k<n and using Step 5 gives the bound.
Finally ∥X∥2=n∥x∥2 by Parseval's identity for Fn, and β/n<2n, so the relative error is at most 2n(2μ+22γ2+(2+2)εM)+δ+O(u2). ■