Discrete Fourier transform over a ring

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Fourier transforms

In mathematics, the discrete Fourier transform over a ring generalizes the discrete Fourier transform (DFT), of a function whose values are commonly complex numbers, over an arbitrary ring.

Definition

Let Template:Mvar be any ring, let n1 be an integer, and let αR be a principal nth root of unity, defined by:[1]

Template:NumBlk

The discrete Fourier transform maps an n-tuple (v0,,vn1) of elements of Template:Mvar to another n-tuple (f0,,fn1) of elements of Template:Mvar according to the following formula:

Template:NumBlk

By convention, the tuple (v0,,vn1) is said to be in the time domain and the index Template:Mvar is called time. The tuple (f0,,fn1) is said to be in the frequency domain and the index Template:Mvar is called frequency. The tuple (f0,,fn1) is also called the spectrum of (v0,,vn1). This terminology derives from the applications of Fourier transforms in signal processing.

If Template:Mvar is an integral domain (which includes fields), it is sufficient to choose α as a primitive nth root of unity, which replaces the condition (Template:EquationNote) by:[1]

αk1 for 1k<n

Template:Math proof

Another simple condition applies in the case where n is a power of two: (Template:EquationNote) may be replaced by αn/2=1.[1]

Inverse

The inverse of the discrete Fourier transform is given as:

Template:NumBlk

where 1/n is the multiplicative inverse of Template:Mvar in Template:Mvar (if this inverse does not exist, the DFT cannot be inverted).

Template:Math proof

Matrix formulation

Since the discrete Fourier transform is a linear operator, it can be described by matrix multiplication. In matrix notation, the discrete Fourier transform is expressed as follows:

[f0f1fn1]=[11111αα2αn11α2α4α2(n1)1αn1α2(n1)α(n1)(n1)][v0v1vn1].

The matrix for this transformation is called the DFT matrix.

Similarly, the matrix notation for the inverse Fourier transform is

[v0v1vn1]=1n[11111α1α2α(n1)1α2α4α2(n1)1α(n1)α2(n1)α(n1)(n1)][f0f1fn1].

Polynomial formulation

Sometimes it is convenient to identify an Template:Mvar-tuple (v0,,vn1) with a formal polynomial

pv(x)=v0+v1x+v2x2++vn1xn1.

By writing out the summation in the definition of the discrete Fourier transform (Template:EquationNote), we obtain:

fk=v0+v1αk+v2α2k++vn1α(n1)k.

This means that fk is just the value of the polynomial pv(x) for x=αk, i.e.,

Template:NumBlk

The Fourier transform can therefore be seen to relate the coefficients and the values of a polynomial: the coefficients are in the time-domain, and the values are in the frequency domain. Here, of course, it is important that the polynomial is evaluated at the Template:Mvarth roots of unity, which are exactly the powers of α.

Similarly, the definition of the inverse Fourier transform (Template:EquationNote) can be written:

Template:NumBlk

With

pf(x)=f0+f1x+f2x2++fn1xn1,

this means that

vj=1npf(αj).

We can summarize this as follows: if the values of pv(x) are the coefficients of pf(x), then the values of pf(x) are the coefficients of pv(x), up to a scalar factor and reordering.[2]

Special cases

Complex numbers

If F= is the field of complex numbers, then the nth roots of unity can be visualized as points on the unit circle of the complex plane. In this case, one usually takes

α=e2πin,

which yields the usual formula for the complex discrete Fourier transform:

fk=j=0n1vje2πinjk.

Over the complex numbers, it is often customary to normalize the formulas for the DFT and inverse DFT by using the scalar factor 1n in both formulas, rather than 1 in the formula for the DFT and 1n in the formula for the inverse DFT. With this normalization, the DFT matrix is then unitary. Note that n does not make sense in an arbitrary field.

Finite fields

If F=GF(q) is a finite field, where Template:Mvar is a prime power, then the existence of a primitive Template:Mvarth root automatically implies that Template:Mvar divides q1, because the multiplicative order of each element must divide the size of the multiplicative group of Template:Mvar, which is q1. This in particular ensures that n=1+1++1n times is invertible, so that the notation 1n in (Template:EquationNote) makes sense.

An application of the discrete Fourier transform over GF(q) is the reduction of Reed–Solomon codes to BCH codes in coding theory. Such transform can be carried out efficiently with proper fast algorithms, for example, cyclotomic fast Fourier transform.

Polynomial formulation without nth root

Suppose F=GF(p). If pn, it may be the case that np1. This means we cannot find an nth root of unity in F. We may view the Fourier transform as an isomorphism F[Cn]=F[x]/(xn1)iF[x]/(Pi(x)) for some polynomials Pi(x), in accordance with Maschke's theorem. The map is given by the Chinese remainder theorem, and the inverse is given by applying Bézout's identity for polynomials.[3]

xn1=d|nΦd(x), a product of cyclotomic polynomials. Factoring Φd(x) in F[x] is equivalent to factoring the prime ideal (p) in Z[ζ]=Z[x]/(Φd(x)). We obtain g polynomials P1Pg of degree f where fg=φ(d) and f is the order of p mod d.

As above, we may extend the base field to GF(q) in order to find a primitive root, i.e. a splitting field for xn1. Now xn1=k(xαk), so an element j=0n1vjxjF[x]/(xn1) maps to j=0n1vjxjmod(xαk)j=0n1vj(αk)j for each k.

When p divides n

When p|n, we may still define an Fp-linear isomorphism as above. Note that (xn1)=(xm1)ps where n=mps and pm. We apply the above factorization to xm1, and now obtain the decomposition F[x]/(xn1)iF[x]/(Pi(x)ps). The modules occurring are now indecomposable rather than irreducible.

Order of the DFT matrix

Suppose pn so we have an nth root of unity α. Let A be the above DFT matrix, a Vandermonde matrix with entries Aij=αij for 0i,j<n. Recall that j=0n1α(kl)j=nδk,l since if k=l, then every entry is 1. If kl, then we have a geometric series with common ratio αkl, so we obtain 1αn(kl)1αkl. Since αn=1 the numerator is zero, but kl0 so the denominator is nonzero.

First computing the square, (A2)ik=j=0n1αj(i+k)=nδi,k. Computing A4=(A2)2 similarly and simplifying the deltas, we obtain (A4)ik=n2δi,k. Thus, A4=n2In and the order is 4ord(n2).

Normalizing the DFT matrix

In order to align with the complex case and ensure the matrix is order 4 exactly, we can normalize the above DFT matrix A with 1n. Note that though n may not exist in the splitting field Fq of xn1, we may form a quadratic extension Fq2Fq[x]/(x2n) in which the square root exists. We may then set U=1nA, and U4=In.

Unitarity

Suppose pn. One can ask whether the DFT matrix is unitary over a finite field. If the matrix entries are over Fq, then one must ensure q is a perfect square or extend to Fq2 in order to define the order two automorphism xxq. Consider the above DFT matrix Aij=αij. Note that A is symmetric. Conjugating and transposing, we obtain Aij*=αqji.

(AA*)ik=j=0n1αj(i+qk)=nδi,qk

by a similar geometric series argument as above. We may remove the n by normalizing so that U=1nA and (UU*)ik=δi,qk. Thus U is unitary iff q1(modn). Recall that since we have an nth root of unity, n|q21. This means that q21(q+1)(q1)0(modn). Note if q was not a perfect square to begin with, then n|q1 and so q1(modn).

For example, when p=3,n=5 we need to extend to q2=34 to get a 5th root of unity. q=91(mod5).

For a nonexample, when p=3,n=8 we extend to F32 to get an 8th root of unity. q2=9, so q3(mod8), and in this case q+1≢0 and q1≢0. UU* is a square root of the identity, so U is not unitary.

Eigenvalues of the DFT matrix

When pn, we have an nth root of unity α in the splitting field FqFp[x]/(xn1). Note that the characteristic polynomial of the above DFT matrix may not split over Fq. The DFT matrix is order 4. We may need to go to a further extension Fq, the splitting extension of the characteristic polynomial of the DFT matrix, which at least contains fourth roots of unity. If a is a generator of the multiplicative group of Fq, then the eigenvalues are {±1,±a(q1)/4}, in exact analogy with the complex case. They occur with some nonnegative multiplicity.

Number-theoretic transform

The number-theoretic transform (NTT)[4] is obtained by specializing the discrete Fourier transform to F=/p, the [[modular arithmetic|integers modulo a prime Template:Mvar]]. This is a finite field, and primitive Template:Mvarth roots of unity exist whenever Template:Mvar divides p1, so we have p=ξn+1 for a positive integer Template:Mvar. Specifically, let ω be a primitive (p1)th root of unity, then an Template:Mvarth root of unity α can be found by letting α=ωξ.

e.g. for p=5, α=2

21=2(mod5)22=4(mod5)23=3(mod5)24=1(mod5)

when N=4

[F(0)F(1)F(2)F(3)]=[1111124314141342][f(0)f(1)f(2)f(3)]

The number theoretic transform may be meaningful in the ring /m, even when the modulus Template:Mvar is not prime, provided a principal root of order Template:Mvar exists. Special cases of the number theoretic transform such as the Fermat Number Transform (Template:Math), used by the Schönhage–Strassen algorithm, or Mersenne Number Transform[5] (Template:Math) use a composite modulus.

In general, if m=ipiei, then one may find an [[Root of unity modulo n|nth root of unity mod Template:Mvar]] by finding primitive nth roots of unity gi mod piei, yielding a tuple g=(gi)ii(/piei). The preimage of g under the Chinese remainder theorem isomorphism is an nth root of unity α such that αn/2=1modm. This ensures that the above summation conditions are satisfied. We must have that n|φ(piei) for each i, where φ is the Euler's totient function function. [6]

Discrete weighted transform

The discrete weighted transform (DWT) is a variation on the discrete Fourier transform over arbitrary rings involving weighting the input before transforming it by multiplying elementwise by a weight vector, then weighting the result by another vector.[7] The Irrational base discrete weighted transform is a special case of this.

Properties

Most of the important attributes of the complex DFT, including the inverse transform, the convolution theorem, and most fast Fourier transform (FFT) algorithms, depend only on the property that the kernel of the transform is a principal root of unity. These properties also hold, with identical proofs, over arbitrary rings. In the case of fields, this analogy can be formalized by the field with one element, considering any field with a primitive nth root of unity as an algebra over the extension field 𝐅1n.Template:Clarify

In particular, the applicability of O(nlogn) fast Fourier transform algorithms to compute the NTT, combined with the convolution theorem, mean that the number-theoretic transform gives an efficient way to compute exact convolutions of integer sequences. While the complex DFT can perform the same task, it is susceptible to round-off error in finite-precision floating point arithmetic; the NTT has no round-off because it deals purely with fixed-size integers that can be exactly represented.

Fast algorithms

For the implementation of a "fast" algorithm (similar to how FFT computes the DFT), it is often desirable that the transform length is also highly composite, e.g., a power of two. However, there are specialized fast Fourier transform algorithms for finite fields, such as Wang and Zhu's algorithm,[8] that are efficient regardless of whether the transform length factors.

See also

References

  1. 1.0 1.1 1.2 Martin Fürer, "Faster Integer Multiplication", STOC 2007 Proceedings, pp. 57–66. Section 2: The Discrete Fourier Transform.
  2. R. Lidl and G. Pilz. Applied Abstract Algebra, 2nd edition. Wiley, 1999, pp. 217–219.
  3. Template:Cite web
  4. Template:Cite journal
  5. Template:Cite journal
  6. Template:Cite web
  7. Template:Citation
  8. Yao Wang and Xuelong Zhu, "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