Back to resources

Article and note

A Series Learning through the MacWilliams IdentityPart 10 of 12

An Introduction to Heat Kernels and Trace Formulas through the MacWilliams Identity

Among the five proof systems for the MacWilliams identity, this note focuses on the proof that appears through heat kernels and trace formulas, and introduces kernels and traces on finite sets, heat operators and heat kernels on finite graphs, Hamming graphs, translation actions, and trace formulas on quotient spaces.
Published:
Updated:
Reading time:
38 min (about 8,278 words)
Tagscoding theoryMacWilliams identityheat kerneltrace formulaHamming graphspectral graph theoryfinite fieldsweight enumeratorexpository note

Introduction

One of the fundamental theorems in coding theory is the MacWilliams identity. Let EE be the coordinate set, let nEn \coloneqq \card{E}, and, for a linear code CFqEC \leq \F_{q}^{E} over the finite field Fq\F_{q}, consider its dual code

C{uFqE:uc=0 for all cC}C^{\perp} \coloneqq \{ u \in \F_{q}^{E} : u \cdot c = 0 \text{ for all } c \in C \}

where

uc=eEuece.u \cdot c = \sum_{e \in E} u_{e} c_{e}.

For a codeword cFqEc \in \F_{q}^{E}, write its support and Hamming weight as

supp(c){eE:ce0},wt(c)supp(c)\supp(c) \coloneqq \{ e \in E : c_{e} \neq 0 \}, \qquad \wt(c) \coloneqq \card{\supp(c)}

respectively. Define the weight enumerator of the linear code CC by

WC(X,Y)=cCXnwt(c)Ywt(c).W_{C}(X, Y) = \sum_{c \in C} X^{n - \wt(c)} Y^{\wt(c)}.

The MacWilliams identity is the formula saying that the weight enumerator of the dual code can be computed from the weight enumerator of CC as follows:

WC(X,Y)=1CWC(X+(q1)Y,XY).W_{C^{\perp}}(X, Y) = \frac{1}{\card{C}} W_{C}\bigl( X + (q - 1)Y, X - Y \bigr).

This is the MacWilliams identity.

In this series, we use proofs of the MacWilliams identity as a guide to introductions to neighbouring areas and concepts. For that reason, the series is aimed at readers with the following background:

We assume basic familiarity with elementary coding theory, namely with

  • what a (finite) field is,

  • what a linear code over a finite field is,

  • what the Hamming weight is,

  • what the dual code is.

(It is not necessary to know a proof of the MacWilliams identity.)

This note does not presuppose Parts 1–9. In the series as a whole, we compare several proofs of the MacWilliams identity, but the content of the previous parts is not needed in order to read this note. The necessary linear operators, kernels, traces, heat operators and heat kernels on finite graphs, Hamming graphs, translation actions, and character eigenfunctions are introduced in the text to the extent needed.

In this series, we view the proof methods for the MacWilliams identity as falling roughly into the following five families. However, this classification is a map of the whole series, and is not required for reading the proof in this note:

  1. Fourier, character, and Poisson-type proofs.

  2. Möbius inversion, lattice-theoretic, shortening-puncturing proofs.

  3. Orthogonal-polynomial and association-scheme proofs.

  4. Matroid and Tutte-polynomial proofs.

  5. Moment and double-counting proofs.

The proof treated in this note is written, on the surface, in the language of

Hamming graphs, heat operators, Markov operators, and trace formulas.

Compressed into the five families above, it belongs to the Fourier, character, and Poisson family. This is because, when the heat operator on the Hamming graph is diagonalised, characters of the finite abelian group FqE\F_{q}^{E} eventually appear as eigenfunctions. That said, character theory itself is not the main actor in this note. The aim here is to use a proof of the MacWilliams identity as a guide to an introduction to heat operators and heat kernels and to trace formulas.

Roughly speaking, a heat operator is an operator that describes how heat spreads on a graph or a space. Its matrix entries are called the heat kernel. On a finite set, a heat operator is a finite matrix, and the heat kernel is its matrix entry. A trace formula is an identity obtained by computing the trace of a single operator in two ways. In one computation, the operator is decomposed into eigenspaces and the eigenvalues are summed. In the other computation, the diagonal entries of the kernel are summed directly. The equality of these two computations gives a non-trivial identity. The trace formulas considered in this note are not deep trace formulas involving infinite-dimensional analysis or convergence issues, but finite trace formulas obtained by computing the trace of a finite-dimensional matrix in two ways.

The MacWilliams identity considered in this note appears as the following trace formula. Write Kz\Kop_{z} for the heat operator on the Hamming graph on V=FqEV = \F_{q}^{E}, and write its kernel as Kz(x,y)\Kop_{z}(x,y). We take the trace of Kz\Kop_{z} on the quotient space V/CV/C by the translation action of the code CC. More precisely, we are not defining a new quotient graph or a heat operator on that quotient graph separately. Rather, we identify the function space CV/C\C^{V/C} on the quotient set V/CV/C with the space HC\Hspace^{C} of CC-invariant functions on VV, and compute the trace of the restriction KzHC\res{\Kop_{z}}{\Hspace^{C}} of the original heat operator Kz\Kop_{z}. Computing this trace from the spectral side produces the weight distribution of CC^{\perp}. On the other hand, averaging along the translation action and then summing the diagonal entries produces the weight distribution of CC. Comparing the two gives the MacWilliams identity.

The flow of the note is as follows.

operators on finite sets → kernels and traces → heat operators and heat kernels on finite graphs → heat operators and heat kernels on Hamming graphs → traces on quotient spaces → the MacWilliams identity

Stating only the key point of the proof in advance, it is as follows. In one coordinate, the zero translation produces 1+(q1)z1+(q-1)z, and a non-zero translation produces 1z1-z. In several coordinates, this zero/non-zero distinction occurs coordinate by coordinate, and so records the Hamming weight. Averaging further over the elements of CC produces the weight enumerator of CC. On the other hand, from the viewpoint of eigenfunctions, the characters that remain on the quotient space are precisely the CC-invariant characters, and these correspond exactly to CC^{\perp}.

For the spectral theory of finite graphs, Chung [Chu97] and Godsil–Royle [GR01] are standard references. For heat kernels on graphs, see for instance Chung–Yau [CY99]. For Fourier analysis on finite groups and its applications to graph and coding theory, see also Terras [Ter99]. For the classical treatment of the MacWilliams identity in coding theory, see MacWilliams–Sloane [MS77]. In this note, we do not develop all this general theory, but instead extract only the part needed for the ordinary Hamming-weight MacWilliams identity for linear codes over finite fields.

Function Spaces, Kernels, and Traces on Finite Sets

Before treating heat operators and heat kernels, we prepare the language for viewing linear operators on finite sets as matrices. All spaces considered here are finite-dimensional, so no analytic convergence issues arise.

For a finite set Ω\Omega, let CΩ\C^{\Omega} be the set of all complex-valued functions on Ω\Omega. In this note, an italic CC denotes a code, whereas the blackboard bold C\C denotes the field of complex numbers. For each xΩx \in \Omega, define δxCΩ\delta_{x} \in \C^{\Omega} by

δx(y){1,y=x,0,yx\delta_{x}(y) \coloneqq \begin{cases} 1, & y = x,\\ 0, & y \neq x \end{cases}

Then {δx:xΩ}\{ \delta_x : x \in \Omega \} is a basis of CΩ\C^{\Omega}.

A linear operator T ⁣:CΩCΩT \colon \C^{\Omega} \to \C^{\Omega} can be written as a matrix whose rows and columns are indexed by Ω\Omega. In this note, we write its matrix entry as KT(x,y)K_{T}(x, y) and call it the kernel of TT. Thus

(Tf)(x)yΩKT(x,y)f(y)(Tf)(x) \coloneqq \sum_{y \in \Omega} K_{T}(x, y) f(y)

On a finite set, a kernel is simply another name for a matrix entry. However, when we later call it a heat kernel, we think of this matrix entry as the amount of heat transmitted from the point yy to the point xx. Here the basic convention in this note is that operators act on functions. As a matrix entry, KT(x,y)K_{T}(x,y) can be read as the contribution from the column index yy to the row index xx. On the other hand, when the same matrix is read intuitively as an expectation operator for a Markov process, it is read as the probability of moving from the current point xx to the next point yy. In general, the transpose matrix appears in the convention where one acts on probability distributions. The heat kernels actually used in this note are symmetric, so both readings use the same numerical matrix, and only the interpretation of the direction differs. The word kernel appears in two senses in this note. One is the matrix-entry sense just defined, written as KT(x,y)K_{T}(x,y) or Kz(x,y)\Kop_{z}(x,y). The other is the linear-algebraic subspace sent to zero, written as Ker(T)\Ker(T). To avoid confusion, kernels as matrix entries are denoted by symbols of the form KT(x,y)K_T(x,y), whereas linear-algebraic kernels are written as Ker(T)\Ker(T). Also note the following notation. KTK_{T} denotes the kernel of a general operator TT. The symbol KqK_{q} appearing later denotes the complete graph on qq vertices, and Kz\Kop_{z} denotes the heat operator on the Hamming graph. Its heat kernel is written Kz(x,y)\Kop_{z}(x,y). We use the same letter for the operator and its kernel, but when (x,y)(x,y) is attached it denotes a matrix entry.

Definition 2.1.

The trace of a linear operator T ⁣:CΩCΩT \colon \C^{\Omega} \to \C^{\Omega} is defined by

Tr(T)xΩKT(x,x).\Tr(T) \coloneqq \sum_{x \in \Omega} K_{T}(x, x).

This is the usual trace of a matrix. That is, it is the sum of the diagonal entries. If TT is diagonalisable and its eigenvalues, counted with multiplicity, are λ1,λ2,,λm\lambda_{1}, \lambda_{2}, \dots, \lambda_{m}, then

Tr(T)=λ1+λ2++λm.\Tr(T) = \lambda_{1} + \lambda_{2} + \dots + \lambda_{m}.

Thus the trace has at least two viewpoints.

summing diagonal entries ⇔ summing eigenvalues

Using these two viewpoints for the same operator is the basic idea of a trace formula.

In this note, we also use traces on subspaces. For that purpose we prepare a simple lemma using projections.

Lemma 2.2.

Let SCΩS \subseteq \C^{\Omega} be a subspace, and let P ⁣:CΩCΩP \colon \C^{\Omega} \to \C^{\Omega} be a projection onto SS. That is, assume P2=PP^{2} = P and Im(P)=S\Image(P) = S. Suppose that the linear operator TT commutes with PP. Then Tr(TS)=Tr(PT)\Tr(\res{T}{S})=\Tr(PT).

Proof

Since PP is a projection, CΩ\C^{\Omega} decomposes as

CΩ=Im(P)Ker(P).\C^{\Omega} = \Image(P) \oplus \Ker(P).

Since TT commutes with PP, the operator TT preserves both Im(P)\Image(P) and Ker(P)\Ker(P). With respect to this decomposition, the matrix of TT is block diagonal, and PP has the form

(I000).\begin{pmatrix} I & 0\\ 0 & 0 \end{pmatrix}.

Therefore the trace of PTPT is equal to the trace of the block of TT on Im(P)=S\Image(P) = S. Thus Tr(PT)=Tr(TS)\Tr(PT) = \Tr(\res{T}{S}).

End of proof

We will later apply this lemma to the space of functions invariant under translations by CC. This is because we identify functions on the quotient space FqE/C\F_{q}^{E}/C with CC-invariant functions on FqE\F_{q}^{E}, and compute traces using the projection onto that space.

Heat Operators and Heat Kernels on Finite Graphs

We next introduce the idea of heat operators and heat kernels on finite graphs. Rather than developing general graph theory, we keep in mind the finite regular graphs needed in this note, especially Hamming graphs.

Let Ω\Omega be the vertex set of a finite graph. The function space on the graph is CΩ\C^{\Omega}. The graph Laplacian is an operator that measures the difference between a function and its surrounding values. The standard combinatorial Laplacian is defined by LDAL \coloneqq D - A. Here AA is the adjacency matrix, and DD is the diagonal matrix whose diagonal entries are the degrees. For a regular graph, DD is a constant multiple of the identity matrix.

The finite-graph version of the heat equation can be written using the matrix exponential as Ht=exp(tL)H_{t} = \exp(-tL). This HtH_{t} is called the heat operator, and its kernel Ht(x,y)H_{t}(x, y) is called the heat kernel. On a finite set, this is just an ordinary matrix exponential. Here the matrix exponential is the matrix defined by

exp(tL)=r=0(tL)rr!.\exp(-tL) = \sum_{r=0}^{\infty} \frac{(-tL)^{r}}{r!}.

In the situations actually used in this note, the eigenspace decomposition gives concrete formulas, so there is no need to compute this series directly.

In this note, however, we use a scalar multiple of the Laplacian in order to simplify the calculations. Multiplying the Laplacian by a positive constant amounts to viewing the heat operator after rescaling time. Indeed, replacing LL by αL\alpha L gives exp(tαL)=exp((αt)L)\exp(-t\alpha L)=\exp(-(\alpha t)L). Thus the structure of eigenfunctions and trace formulas is unchanged. What changes is only the reparametrisation of the time parameter appearing in the eigenvalues. In this note, we use the parameter z=etz = e^{-t} instead of time tt. Strictly speaking, for finite tt we have 0<z10 < z \leq 1. The value z=0z=0 corresponds to the limit tt \to \infty. The time t=0t = 0 corresponds to z=1z = 1, and then the heat operator is the identity operator. As tt becomes larger, zz approaches 00, and the heat operator moves towards averaging. In the one-coordinate case, at the limiting value z=0z = 0 the operator MzM_{z} becomes the averaging projection Π0\Pi_{0}. Thus zz can be viewed as a parameter measuring how much of the original value is retained. The heat kernels and traces actually computed below are all expressed as polynomials in zz. Therefore substituting z=0z=0 also makes sense as a polynomial. At the stage where the MacWilliams identity is obtained, zz is read not as an analytic time parameter but as a formal variable. Thus we first understand the operators as heat operators for 0z10 \leq z \leq 1, and in the end read the same formulas as polynomial identities. The later substitution z=Y/Xz = Y/X and homogenisation use precisely this polynomial viewpoint.

Heat operators and heat kernels on finite graphs have the following two basic viewpoints.

Spectral side

Decompose HtH_{t} into eigenspaces and sum the eigenvalues etλe^{-t\lambda}.

Geometric side

Sum the diagonal entries Ht(x,x)H_{t}(x, x) of the heat kernel over the vertices xx.

Both compute the same trace Tr(Ht)\Tr(H_{t}). In this note, we also consider the trace of an operator obtained by composing a heat operator with a translation action. This operation of composing with a translation and then taking the trace is what extracts the weight distribution of the code CC.

The Heat Operator and Heat Kernel of the One-Coordinate Complete Graph

A Hamming graph is the Cartesian product, coordinate by coordinate, of complete graphs. Here the graph product is meant in the Cartesian sense. Two multi-coordinate vertices are adjacent precisely when they differ in exactly one coordinate, and in that coordinate they are adjacent in the one-coordinate complete graph. We therefore begin with the one-coordinate complete graph.

Let the one-coordinate vertex set be Fq\F_{q}, and let the function space be UCFqU \coloneqq \C^{\F_{q}}. Define the averaging projection onto the one-dimensional subspace of UU consisting of constant functions by

Π0f1q(aFqf(a))1.\Pi_{0} f \coloneqq \frac{1}{q}\left(\sum_{a \in \F_{q}} f(a) \right) \one.

Here 1\one is the function that is identically 11. The kernel of this projection in the linear-algebraic sense, namely the subspace on which Π0f=0\Pi_{0}f=0, is

U1={fU:aFqf(a)=0}.U_{1} = \left\{ f \in U : \sum_{a \in \F_{q}} f(a) = 0 \right\}.

Thus U=C1U1U = \C \one \oplus U_{1}. Here the subscript 11 indicates that this is the space corresponding to the eigenvalue 11 for the one-coordinate Laplacian Δ1\Delta_{1} defined immediately below; it does not mean that U1U_{1} is one-dimensional. In fact, dimCU1=q1\dim_{\C} U_{1}=q-1.

In this note, we define the one-coordinate Laplacian by

Δ1IdΠ0.\Delta_{1} \coloneqq \Id - \Pi_{0}.

This is a scalar multiple of the combinatorial Laplacian of the complete graph KqK_{q}. Here JJ is the q×qq \times q matrix all of whose entries are 11. Indeed, the adjacency matrix of KqK_{q} is JIJ - I, and the combinatorial Laplacian is

(q1)I(JI)=qIJ.(q - 1)I - (J - I) = qI - J.

On the other hand, since Π0=J/q\Pi_{0} = J/q,

Δ1=IJ/q=1q(qIJ).\Delta_{1} = I - J/q = \frac{1}{q}(qI - J).

Thus we are simply using the usual Laplacian multiplied by 1/q1/q.

Writing z=etz = e^{-t}, the one-coordinate heat operator is

Mzexp(tΔ1)=Π0+z(IdΠ0).M_{z} \coloneqq \exp(-t\Delta_{1}) = \Pi_{0} + z(\Id - \Pi_{0}).

It acts with eigenvalue 11 in the constant direction and with eigenvalue zz in the direction where the sum is 00.

Lemma 4.1.

The kernel of the one-coordinate heat operator MzM_{z} is given by

Mz(a,b)={1+(q1)zq,a=b,1zq,ab.M_{z}(a, b) = \begin{cases} \dfrac{1 + (q - 1)z}{q}, & a = b,\\[6pt] \dfrac{1 - z}{q}, & a \neq b. \end{cases}
Proof

The kernel of Π0\Pi_{0} is 1/q1/q for all aa and bb. The kernel of Id\Id is 11 when a=ba = b and 00 when aba \neq b. Therefore, writing Mz=zId+(1z)Π0M_{z} = z\Id + (1 - z)\Pi_{0}, when a=ba = b we get

z+1zq=1+(q1)zq,z + \frac{1 - z}{q} = \frac{1 + (q - 1)z}{q},

and when aba \neq b we get

1zq.\frac{1 - z}{q}.
End of proof

This formula also has a probabilistic reading. The operator MzM_{z} is the operation that keeps the current value with probability zz, and replaces it by a uniformly chosen value of Fq\F_{q} with probability 1z1 - z. In this note, we view MzM_{z} not as acting on probability distributions, but as an operator acting on functions, that is, observables. In other words, it returns the average value of ff when the next state is chosen at random by this rule. In particular, when 0z10 \leq z \leq 1, the operator MzM_{z} sends non-negative functions to non-negative functions and preserves constant functions, so it can be read as a Markov operator on the function side. If the same symmetric matrix is made to act on distributions, it can also be read as an operator sending probability distributions to probability distributions. In the convention where one acts on distributions, the transpose matrix appears, but the heat kernel in the present case is symmetric, so we are looking at the same numerical matrix. However, in this note we use it not for the probabilistic interpretation but for trace computations.

The most important point in one coordinate is the trace after composing with a translation. For aFqa \in \F_{q}, define the translation operator τa ⁣:UU\tau_{a} \colon U \to U by

(τaf)(x)f(xa).(\tau_{a} f)(x) \coloneqq f(x - a).

With this definition, τa\tau_{a} acts as pullback on functions. On basis vectors, τaδb=δa+b\tau_{a} \delta_{b} = \delta_{a + b}. The points themselves are moved by xx+ax \mapsto x+a, but because the action on functions is by pullback, the formula contains xax-a. Later we write CC-invariance as f(x+c)=f(x)f(x+c)=f(x). Since CC is an additive subgroup, as cc runs through all of CC, so does c-c. Thus the condition f(x+c)=f(x)f(x+c)=f(x) is equivalent to the condition τcf=f\tau_{c}f=f.

Lemma 4.2.

For every aFqa \in \F_{q},

Tr(τaMz)={1+(q1)z,a=0,1z,a0\Tr(\tau_{a} M_{z}) = \begin{cases} 1 + (q - 1)z, & a = 0,\\ 1 - z, & a \neq 0 \end{cases}

holds.

Proof

Write the kernel of MzM_{z} as Mz(x,y)M_{z}(x, y). The kernel of τaMz\tau_{a} M_{z} is

(τaMz)(x,y)=Mz(xa,y).(\tau_{a} M_{z})(x, y) = M_{z}(x - a, y).

Hence

Tr(τaMz)=xFqMz(xa,x).\Tr(\tau_{a} M_{z}) = \sum_{x \in \F_{q}} M_{z}(x - a, x).

If a=0a = 0, all these entries are diagonal entries, so

xFqMz(x,x)=q1+(q1)zq=1+(q1)z.\sum_{x \in \F_{q}} M_{z}(x, x) = q \cdot \frac{1 + (q - 1)z}{q} = 1 + (q - 1)z.

On the other hand, if a0a \neq 0, then xaxx - a \neq x for every xx, so all entries are off-diagonal entries. Therefore

xFqMz(xa,x)=q1zq=1z.\sum_{x \in \F_{q}} M_{z}(x - a, x) = q \cdot \frac{1 - z}{q} = 1 - z.
End of proof

This lemma records the source of the change of variables in the MacWilliams identity. In the ordinary trace, one sums Mz(x,x)M_{z}(x,x) over xx. After composing with τa\tau_{a}, however, one reads Mz(xa,x)M_{z}(x-a,x) as the diagonal entry. In other words, translation shifts the diagonal entries of the heat kernel by aa. The zero translation produces 1+(q1)z1 + (q - 1)z, and a non-zero translation produces 1z1 - z. This is because, when a=0a=0, only diagonal entries are read, whereas when a0a\neq 0, only off-diagonal entries are read. In several coordinates, this distinction occurs coordinate by coordinate, and the Hamming weight is recorded in the trace. After later substituting z=Y/Xz = Y/X and homogenising, this becomes

X+(q1)Y,XY.X + (q - 1)Y, \qquad X - Y.

The Heat Operator and Heat Kernel of the Hamming Graph

We now move to several coordinates. Put VFqEV \coloneqq \F_{q}^{E}. This is the vertex set of the Hamming graph. Define the Hamming distance between two vertices x,yVx, y \in V by

dH(x,y)wt(xy).\dist(x, y) \coloneqq \wt(x - y).

In the Hamming graph, two vertices at distance 11 are joined by an edge. This graph is the Cartesian product of nn copies of the one-coordinate complete graph.

Write the function space as HCV\Hspace \coloneqq \C^{V}. Using the one-coordinate space U=CFqU = \C^{\F_{q}}, this can be viewed as

HeEU.\Hspace \cong \bigotimes_{e \in E} U.

For each coordinate eEe \in E, let Δe\Delta_{e} be the operator that applies the one-coordinate Laplacian Δ1\Delta_{1} only in the ee coordinate and applies the identity operator in all other coordinates. Define the Laplacian on the Hamming graph by

ΔeEΔe.\Delta \coloneqq \sum_{e \in E} \Delta_{e}.

This is the usual combinatorial Laplacian of the Hamming graph multiplied by 1/q1/q. Indeed, the usual combinatorial Laplacian in the ee-coordinate direction is qΔeq\Delta_{e}. Thus, if LHamL_{\mathrm{Ham}} denotes the usual combinatorial Laplacian of the whole Hamming graph, then

LHam=eEqΔe=qΔ.L_{\mathrm{Ham}} = \sum_{e \in E} q\Delta_{e} = q\Delta.

Therefore the Δ\Delta used in the text is the usual combinatorial Laplacian multiplied by 1/q1/q, with the same normalisation as in the one-coordinate case. Since the operators Δe\Delta_{e} commute with one another, putting z=etz = e^{-t} gives

exp(tΔ)=eEexp(tΔe)eEexp(tΔ1)=eEMz.\exp(-t\Delta) = \prod_{e \in E} \exp(-t\Delta_{e}) \cong \bigotimes_{e \in E} \exp(-t\Delta_{1}) = \bigotimes_{e \in E} M_{z}.

Thus the following operator is the natural heat operator on the Hamming graph. Under this identification, define the heat operator on the Hamming graph by

KzeEMz.\Kop_{z} \coloneqq \bigotimes_{e \in E} M_{z}.

This applies the same one-coordinate heat operator MzM_{z} independently in all coordinates. Although we use tensor-product notation here, the only concrete meaning needed in this note is the following. For x=(xe)eEx=(x_{e})_{e \in E} and y=(ye)eEy=(y_{e})_{e \in E}, set

Kz(x,y)=eEMz(xe,ye)\Kop_{z}(x,y) = \prod_{e \in E} M_{z}(x_{e},y_{e})

and define its action on a function fCVf \in \C^{V} by

(Kzf)(x)=yVKz(x,y)f(y).(\Kop_{z}f)(x) = \sum_{y \in V} \Kop_{z}(x,y) f(y).

Thus even without knowing the general theory of tensor products, all trace computations below can be read using only this product formula. In particular, when 0z10 \leq z \leq 1, Kz\Kop_{z} can be viewed as a Markov operator that independently, in each coordinate, either keeps the value or replaces it by a uniformly chosen value. This is an explanation as an expectation operator acting on functions, that is, observables. The same symmetric matrix can also be made to act on distributions. The probabilistic interpretation here is for intuition; in the proof, we use trace computations and polynomial identities.

Lemma 5.1.

The kernel of Kz\Kop_{z} is given by

Kz(x,y)=qn(1+(q1)z)ndH(x,y)(1z)dH(x,y).(5.1)\Kop_{z}(x,y) = q^{-n} \bigl( 1 + (q - 1)z \bigr)^{n - \dist(x, y)} (1 - z)^{\dist(x, y)}. \tag{5.1}
Proof

By the product formula just above, the kernel of Kz\Kop_{z} is the product of the one-coordinate kernels. Namely,

Kz(x,y)=eEMz(xe,ye).\Kop_{z}(x, y) = \prod_{e \in E} M_{z}(x_{e}, y_{e}).

A coordinate with xe=yex_{e} = y_{e} contributes 1+(q1)zq\dfrac{1 + (q - 1)z}{q}, while a coordinate with xeyex_{e} \neq y_{e} contributes 1zq\dfrac{1 - z}{q}. Since the number of coordinates in which xx and yy differ is dH(x,y)\dist(x, y), we obtain (5.1).

End of proof

This formula shows that Kz(x,y)\Kop_{z}(x, y) depends not on the particular values of xx and yy, but only on the Hamming distance dH(x,y)\dist(x,y). Thus Kz\Kop_{z} is an operator compatible with the symmetries of the Hamming graph. In the language of association schemes, Kz\Kop_{z} belongs to the Bose–Mesner algebra of the Hamming scheme. However, in this note we do not use the general theory of association schemes; we proceed only by computations with heat operators, heat kernels, and traces.

Translations on VV are defined in the same way. For aVa \in V, define τa ⁣:HH\tau_{a} \colon \Hspace \to \Hspace by

(τaf)(x)=f(xa).(\tau_{a} f)(x) = f(x - a).

This is the tensor product of the one-coordinate translations.

Proposition 5.2.

For every aVa \in V,

Tr(τaKz)=(1+(q1)z)nwt(a)(1z)wt(a)(5.2)\Tr(\tau_{a} \Kop_{z}) = \bigl( 1 + (q - 1)z \bigr)^{n - \wt(a)}(1 - z)^{\wt(a)} \tag{5.2}

holds.

Proof

Using the kernel of Kz\Kop_{z}, we have

Tr(τaKz)=xVKz(xa,x).\Tr(\tau_{a} \Kop_{z}) = \sum_{x \in V} \Kop_{z}(x - a, x).

The coordinates in which xax - a and xx differ are precisely the coordinates with ae0a_{e} \neq 0. Therefore dH(xa,x)=wt(a)\dist(x - a, x) = \wt(a), and this is independent of xx. By Lemma 5.1, the contribution from each xx is

qn(1+(q1)z)nwt(a)(1z)wt(a).q^{-n} \bigl( 1 + (q - 1)z \bigr)^{n - \wt(a)}(1 - z)^{\wt(a)}.

Since VV has qnq^{n} elements, summing gives (5.2).

End of proof

The meaning of this proposition is transparent. If we take the trace of the heat operator Kz\Kop_{z} after composing with the translation aa, the zero and non-zero coordinates of aa produce different factors. Thus the Hamming weight of aa is recorded in the trace. This is why the weight enumerator of CC appears later.

Traces on Quotient Spaces

Next, consider the action of the code CV=FqEC \leq V = \F_{q}^{E} by translations. As an additive group, CC acts on VV. Write the quotient set as V/CV/C. Functions on the quotient set can be identified with CC-invariant functions on VV.

Definition 6.1.

The subspace

HC{fH:f(x+c)=f(x) for all xV,cC}\Hspace^{C} \coloneqq \{ f \in \Hspace : f(x + c) = f(x) \text{ for all } x \in V,\, c \in C \}

of H=CV\Hspace = \C^{V} is called the space of CC-invariant functions.

The space HC\Hspace^{C} can be identified with the function space CV/C\C^{V/C} on V/CV/C. Indeed, a CC-invariant function is constant on cosets, so it is the same thing as a function with one value for each coset. Concretely, given gCV/Cg \in \C^{V/C}, define a function g~\widetilde{g} on VV by

g~(x)g(x+C).\widetilde{g}(x) \coloneqq g(x + C).

Then g~\widetilde{g} is CC-invariant. Conversely, if fHCf \in \Hspace^{C}, then ff is constant on each coset x+Cx+C, and hence a function gg on V/CV/C is defined by

g(x+C)f(x).g(x + C) \coloneqq f(x).

Through these two correspondences, we identify CV/C\C^{V/C} with HC\Hspace^{C}. What we are doing here is not constructing a new quotient graph or its Laplacian separately. Rather, we identify the subspace of CC-invariant functions inside the original function space H=CV\Hspace = \C^{V} with the function space on the quotient set V/CV/C, and compute the trace of the restriction KzHC\res{\Kop_{z}}{\Hspace^{C}} of the original heat operator Kz\Kop_{z}. If one writes the kernel on the quotient set explicitly, then for cosets x+Cx+C and y+Cy+C it is

Kz(x+C,y+C)=cCKz(x,y+c).\overline{\Kop}_{z}(x+C, y+C) = \sum_{c \in C}\Kop_{z}(x, y+c).

This expression is independent of the choice of representatives xx and yy. This is because Kz\Kop_{z} is translation-invariant, and, as cc ranges over all of CC, the points y+cy+c range over the same coset. Taking the diagonal sum of this kernel on the quotient set is the same content as taking the trace of PCKzP_{C}\Kop_{z} on VV. In the text, however, we do not define a quotient graph anew; instead, we compute the trace using the restriction to HC\Hspace^{C} and the averaging projection. This trace does not count the points of VV individually. It is the trace in which each coset is counted as one degree of freedom. In other words, we are not simply summing diagonal entries over all qnq^{n} points of VV; rather, we are taking the trace corresponding to the degrees of freedom of the CC-invariant function space HC\Hspace^{C}, namely to the number of cosets. This distinction is important when we later rewrite the trace by using the averaging projection PCP_{C} as

Tr(KzHC)=Tr(PCKz).\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \Tr(P_{C}\Kop_{z}).

Here the condition f(x+c)=f(x)f(x + c)=f(x) appearing in the definition is the same as τcf=f\tau_{c}f=f. Indeed, τcf=f\tau_{c}f=f means f(xc)=f(x)f(x - c)=f(x). Since CC is an additive subgroup, as cc ranges over all of CC, so does c-c. Therefore f(x+c)=f(x)f(x + c)=f(x) and τcf=f\tau_{c}f=f are equivalent.

Define the averaging projection from H\Hspace to HC\Hspace^{C} by

PC1CcCτc.(6.1)P_{C} \coloneqq \frac{1}{\card{C}}\sum_{c \in C} \tau_{c}. \tag{6.1}

This operator averages over translations by CC. Acting on functions, it is

(PCf)(x)=1CcCf(xc).(P_{C}f)(x) = \frac{1}{\card{C}}\sum_{c \in C} f(x - c).

This means that it averages the values on the coset x+Cx + C. As cc ranges over all of CC, both xcx-c and x+cx+c range over the same coset x+Cx+C, so the sign difference does not affect the average. The operator PCP_{C} averages the values of a function on each coset x+Cx+C, and then extends that average value over the whole coset. Thus, once a function has been averaged, averaging it again does not change it. This is the intuition for PC2=PCP_{C}^{2}=P_{C}, namely for the fact that it is a projection. The coefficient 1/C1/\card{C} appears because we normalise the average in the translation directions by CC. A point of the quotient set V/CV/C appears inside VV as a coset consisting of C\card{C} points. By averaging the values along that coset direction, we extract from a function on VV only its CC-invariant part.

Lemma 6.2.

The operator PCP_{C} is the projection onto HC\Hspace^{C}. Moreover, Kz\Kop_{z} commutes with every translation τa\tau_{a}, and in particular with PCP_{C}.

Proof

First, PCfP_{C} f is CC-invariant. Indeed, for dCd \in C,

τdPCf=1CcCτdτcf=1CcCτc+df=1CcCτcf=PCf.\begin{aligned} \tau_{d} P_{C} f &= \frac{1}{\card{C}} \sum_{c \in C} \tau_{d} \tau_{c} f = \frac{1}{\card{C}} \sum_{c \in C}\tau_{c+d} f = \frac{1}{\card{C}} \sum_{c^{\prime} \in C} \tau_{c^{\prime}} f = P_{C} f. \end{aligned}

Conversely, if fHCf \in \Hspace^{C}, then τcf=f\tau_{c} f = f for every cCc \in C, and so PCf=fP_{C} f = f. Directly, we also compute

PC2=1C2c,dCτcτd=1C2c,dCτc+d=1ChCτh=PC.\begin{aligned} P_{C}^{2} &= \frac{1}{\card{C}^{2}}\sum_{c, d \in C} \tau_{c}\tau_{d} \\ &= \frac{1}{\card{C}^{2}}\sum_{c, d \in C} \tau_{c + d} \\ &= \frac{1}{\card{C}}\sum_{h \in C} \tau_{h} = P_{C}. \end{aligned}

In the last equality we used the fact that, for each fixed hCh \in C, there are exactly C\card{C} pairs (c,d)(c,d) with c+d=hc+d=h. Hence PCP_{C} is the projection onto HC\Hspace^{C}.

Next, since the kernel of Kz\Kop_{z} depends only on dH(x,y)\dist(x, y), it is invariant under translations. In other words, for all a,x,yVa, x, y \in V,

Kz(x+a,y+a)=Kz(x,y).\Kop_{z}(x + a, y + a) = \Kop_{z}(x, y).

Checking this with the sign convention included, we have

(τaKzf)(x)=yVKz(xa,y)f(y),(Kzτaf)(x)=yVKz(x,y)f(ya)=yVKz(x,y+a)f(y).\begin{aligned} (\tau_{a}\Kop_{z}f)(x) &= \sum_{y \in V}\Kop_{z}(x - a, y)f(y), \\ (\Kop_{z}\tau_{a}f)(x) &= \sum_{y \in V}\Kop_{z}(x, y)f(y - a) \\ &= \sum_{y^{\prime} \in V}\Kop_{z}(x, y^{\prime} + a)f(y^{\prime}). \end{aligned}

By translation-invariance of Hamming distance, Kz(xa,y)=Kz(x,y+a)\Kop_{z}(x - a, y^{\prime})=\Kop_{z}(x, y^{\prime} + a), and hence τaKz=Kzτa\tau_{a}\Kop_{z}=\Kop_{z}\tau_{a}. Therefore Kz\Kop_{z} commutes with each τa\tau_{a}. In particular, it also commutes with PCP_{C}.

End of proof

By this commutativity, if ff is CC-invariant, then Kzf\Kop_{z}f is also CC-invariant. Thus Kz\Kop_{z} preserves HC\Hspace^{C}, and we can consider the restricted operator KzHC\res{\Kop_{z}}{\Hspace^{C}}. Therefore, by Lemma 2.2,

Tr(KzHC)=Tr(PCKz).\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \Tr(P_{C} \Kop_{z}).

Computing the right-hand side produces the weight enumerator of CC. From here, we compute the same left-hand side Tr(KzHC)\Tr(\res{\Kop_{z}}{\Hspace^{C}}) by averaging over translations and then summing the diagonal entries of the kernel.

Theorem 6.3 (Geometric Side of the Trace).

For a code CFqEC \leq \F_{q}^{E},

Tr(KzHC)=1CWC(1+(q1)z,1z)(6.2)\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \frac{1}{\card{C}} W_{C} \bigl( 1 + (q - 1)z, 1 - z \bigr) \tag{6.2}

holds.

Proof

By Lemma 2.2 and Lemma 6.2,

Tr(KzHC)=Tr(PCKz)=1CcCTr(τcKz).\begin{aligned} \Tr(\res{\Kop_{z}}{\Hspace^{C}}) &= \Tr(P_{C} \Kop_{z}) \\ &= \frac{1}{\card{C}} \sum_{c \in C} \Tr(\tau_{c} \Kop_{z}). \end{aligned}

Substituting Proposition 5.2 gives

Tr(KzHC)=1CcC(1+(q1)z)nwt(c)(1z)wt(c)=1CWC(1+(q1)z,1z).\begin{aligned} \Tr(\res{\Kop_{z}}{\Hspace^{C}}) &= \frac{1}{\card{C}} \sum_{c \in C} \bigl( 1 + (q - 1)z \bigr)^{n - \wt(c)} (1 - z)^{\wt(c)} \\ &= \frac{1}{\card{C}} W_{C} \bigl( 1 + (q - 1)z, 1 - z \bigr). \end{aligned}
End of proof

We call this computation the geometric side. We composed the heat operator with translations cCc \in C, took their traces, and averaged over cc. Since the weight of cc appeared inside the trace, the weight enumerator of CC appeared.

As a check on the coefficients, let us look at z=1z=1 and z=0z=0. When z=1z=1, we have K1=Id\Kop_{1}=\Id, so the left-hand side is

dimHC=V/C=qnC.\dim \Hspace^{C} = \card{V/C} = \frac{q^{n}}{\card{C}}.

The right-hand side is

1CWC(q,0)=qnC,\frac{1}{\card{C}}W_{C}(q,0)=\frac{q^{n}}{\card{C}},

so the two agree. When z=0z=0, the one-coordinate heat operator becomes the averaging projection Π0\Pi_{0}, and in several coordinates it corresponds to averaging over all of VV and producing a constant function. As heat time, this is not a finite time but the limit tt \to \infty. On the other hand, the formulas here are polynomials in zz, so we may substitute z=0z=0. Thus on the quotient space only the constant direction contributes, and the left-hand side is 11. The right-hand side is also

1CWC(1,1)=1.\frac{1}{\card{C}}W_{C}(1,1)=1.

This is not a proof, but a check that the coefficients in the formula fit naturally.

Spectral Side: Characters as Eigenfunctions

Next, we compute the same trace as a sum of eigenvalues. Here we use the eigenfunctions of the heat operator on the Hamming graph. These eigenfunctions are additive characters of the finite abelian group V=FqEV = \F_{q}^{E}.

Fix a non-trivial additive character

ψ ⁣:FqC×\psi \colon \F_{q} \to \C^{\times}

of Fq\F_{q}. That is, assume that ψ(a+b)=ψ(a)ψ(b)\psi(a + b) = \psi(a)\psi(b) holds and that ψ\psi is not identically 11. If q=pmq = p^{m}, such a character can be constructed, for example, using the trace map in the form

ψ(a)=exp(2π1ptrFq/Fp(a)).\psi(a)= \exp\left(\frac{2\pi\sqrt{-1}}{p}\operatorname{tr}_{\F_{q}/\F_{p}}(a)\right).

In this expression, elements of Fp\F_{p} are read as the representatives 0,1,,p10,1,\dots,p-1. The symbol trFq/Fp\operatorname{tr}_{\F_{q}/\F_{p}} appearing here is the trace map of finite fields, and is different from Tr\Tr, which denotes the trace of an operator. In this text, the trace of an operator is written as Tr\Tr, while the trace map of finite fields is written as trFq/Fp\operatorname{tr}_{\F_{q}/\F_{p}}. The property needed in this note is the following one-coordinate orthogonality relation.

Lemma 7.1.

For bFqb \in \F_{q},

aFqψ(ab)={q,b=0,0,b0\sum_{a \in \F_{q}} \psi(ab) = \begin{cases} q, & b = 0,\\ 0, & b \neq 0 \end{cases}

holds.

Proof

If b=0b = 0, then every term is 11, and so the sum is qq. Suppose b0b \neq 0. Then the map aaba \mapsto ab is a bijection of Fq\F_{q}, and hence

aFqψ(ab)=tFqψ(t).\sum_{a \in \F_{q}} \psi(ab) = \sum_{t \in \F_{q}} \psi(t).

Denote the right-hand side by SS. Since ψ\psi is non-trivial, there exists dFqd \in \F_{q} such that ψ(d)1\psi(d) \neq 1. As tt ranges over all of Fq\F_{q}, so does t+dt + d, and therefore

S=tFqψ(t+d)=ψ(d)tFqψ(t)=ψ(d)S.S = \sum_{t \in \F_{q}} \psi(t + d) = \psi(d) \sum_{t \in \F_{q}} \psi(t) = \psi(d)S.

Since ψ(d)1\psi(d) \neq 1, we have S=0S = 0.

End of proof

For uVu \in V, define a function χuCV\chi_{u} \in \C^{V} by

χu(x)ψ(ux)=ψ(eEuexe).\chi_{u}(x) \coloneqq \psi(u \cdot x) = \psi\left( \sum_{e \in E} u_{e} x_{e} \right).

We call this the character corresponding to uu. Here xx is the spatial variable, while uu may be regarded as an index representing a frequency on that space. The heat operator acts with a different multiplier for each such frequency uu.

Lemma 7.2.

The family of functions {χu:uV}\{ \chi_{u} : u \in V \} is an orthogonal basis of CV\C^{V}.

Proof

Put the standard inner product

f,gxVf(x)g(x)\langle f, g\rangle \coloneqq \sum_{x \in V} f(x) \overline{g(x)}

on CV\C^{V}. We compute this standard inner product for u,vVu, v \in V. Character values are roots of unity in the complex numbers, so ψ(a)=ψ(a)\overline{\psi(a)} = \psi(-a). Therefore, using complex conjugation, we obtain

χu,χv=xVχu(x)χv(x)=xVψ((uv)x)=eE(aFqψ((ueve)a)).\begin{aligned} \langle \chi_{u}, \chi_{v} \rangle &= \sum_{x \in V} \chi_{u}(x) \overline{\chi_{v}(x)} \\ &= \sum_{x \in V} \psi((u - v) \cdot x) \\ &= \prod_{e \in E} \left( \sum_{a \in \F_{q}} \psi((u_{e} - v_{e})a) \right). \end{aligned}

By Lemma 7.1, if u=vu = v this value is qnq^{n}, while if uvu \neq v, then in at least one coordinate the inner sum is 00, and hence the whole product is 00. Thus {χu:uV}\{ \chi_{u} : u \in V \} is a family of mutually orthogonal non-zero vectors. Its cardinality is qn=dimCCVq^{n} = \dim_{\C} \C^{V}, so it is a basis.

End of proof

The basis obtained here is an orthogonal basis, not an orthonormal basis. The norm of each χu\chi_{u} is qn/2q^{n/2}. However, the trace is the sum of the eigenvalues in an eigenspace decomposition, and it does not depend on the normalisation of eigenvectors. Thus there is no problem for the trace computations below even without replacing this by an orthonormal basis.

Next, we see that these functions are eigenfunctions of the heat operator.

Lemma 7.3.

For every uVu \in V,

Kzχu=zwt(u)χu\Kop_{z} \chi_{u} = z^{\wt(u)} \chi_{u}

holds.

Proof

Work in one coordinate. For bFqb \in \F_{q}, define a function φbU=CFq\varphi_{b} \in U = \C^{\F_{q}} by

φb(a)ψ(ba).\varphi_{b}(a) \coloneqq \psi(ba).

If b=0b = 0, then φb\varphi_{b} is a constant function, so MzM_{z} acts on it with eigenvalue 11. If b0b \neq 0, then by Lemma 7.1,

aFqφb(a)=0,\sum_{a \in \F_{q}} \varphi_{b}(a) = 0,

and hence φbU1\varphi_{b} \in U_{1}. Therefore MzM_{z} acts on φb\varphi_{b} with eigenvalue zz.

In several coordinates,

χu(x)=eEψ(uexe),\chi_{u}(x) = \prod_{e \in E} \psi(u_{e} x_{e}),

and Kz=eEMz\Kop_{z} = \bigotimes_{e \in E} M_{z}. A coordinate with ue=0u_{e} = 0 contributes the eigenvalue 11, and a coordinate with ue0u_{e} \neq 0 contributes the eigenvalue zz. Hence the total eigenvalue is zwt(u)z^{\wt(u)}.

End of proof

Finally, we determine which characters remain inside the space HC\Hspace^{C} of CC-invariant functions.

Lemma 7.4.

For uVu \in V, the character χu\chi_{u} is CC-invariant if and only if uCu \in C^{\perp}.

Proof

The statement that χu\chi_{u} is CC-invariant means that

χu(x+c)=χu(x)\chi_{u}(x + c) = \chi_{u}(x)

holds for every xVx \in V and cCc \in C. But

χu(x+c)=ψ(ux+uc)=χu(x)ψ(uc),\chi_{u}(x + c) = \psi(u \cdot x + u \cdot c) = \chi_{u}(x) \psi(u \cdot c),

so this is equivalent to ψ(uc)=1\psi(u \cdot c) = 1 for every cCc \in C.

If uCu \in C^{\perp}, then uc=0u \cdot c = 0 for every cCc \in C, and hence clearly ψ(uc)=1\psi(u \cdot c) = 1. Conversely, suppose that ψ(uc)=1\psi(u \cdot c) = 1 for all cCc \in C. Assume that for some c0Cc_{0} \in C we have buc00b \coloneqq u \cdot c_{0} \neq 0. Since CC is Fq\F_{q}-linear, λc0C\lambda c_{0} \in C for every λFq\lambda \in \F_{q}. Therefore ψ(λb)=1\psi(\lambda b) = 1 must hold for every λFq\lambda \in \F_{q}. But if b0b \neq 0, the map λλb\lambda \mapsto \lambda b is a bijection of Fq\F_{q}, so this would mean that ψ\psi is identically 11. This contradicts the non-triviality of ψ\psi. Hence uc=0u \cdot c = 0 for every cCc \in C, and so uCu \in C^{\perp}.

End of proof

The reverse implication in the proof essentially uses the fact that CC is Fq\F_{q}-linear. It is not the case that uc=0u \cdot c=0 follows immediately from ψ(uc)=1\psi(u \cdot c)=1. A non-trivial additive character ψ\psi may send a non-zero element to 11. However, since CC is Fq\F_{q}-linear, if c0Cc_{0} \in C, then all λc0\lambda c_{0} also lie in CC. Thus, if one assumes uc00u \cdot c_{0}\neq 0, then ψ(λ(uc0))=1\psi(\lambda (u \cdot c_{0}))=1 holds for all λFq\lambda \in \F_{q}. The elements λ(uc0)\lambda (u \cdot c_{0}) range over all of Fq\F_{q}, which would mean that ψ\psi is identically 11, contradicting non-triviality.

We can now perform the spectral-side computation.

Theorem 7.5 (Spectral Side of the Trace).

For a code CFqEC \leq \F_{q}^{E},

Tr(KzHC)=uCzwt(u)=WC(1,z)(7.1)\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \sum_{u \in C^{\perp}} z^{\wt(u)} = W_{C^{\perp}}(1, z) \tag{7.1}

holds.

Proof

By Lemma 7.2, every fHf \in \Hspace has a unique expansion

f=uVαuχu.f = \sum_{u \in V} \alpha_{u}\chi_{u}.

For cCc \in C,

(τcχu)(x)=χu(xc)=ψ(uc)χu(x).(\tau_{c}\chi_{u})(x) = \chi_{u}(x-c) = \psi(-u\cdot c)\chi_{u}(x).

If fHCf \in \Hspace^{C}, then τcf=f\tau_{c}f = f for every cCc \in C, and hence

uVαu(ψ(uc)1)χu=0.\sum_{u \in V}\alpha_{u}\bigl(\psi(-u\cdot c)-1\bigr)\chi_{u}=0.

Since the characters χu\chi_{u} are linearly independent, if αu0\alpha_{u} \neq 0, then ψ(uc)=1\psi(-u\cdot c)=1 for every cCc \in C. By Lemma 7.4, this is equivalent to uCu \in C^{\perp}. Conversely, if uCu \in C^{\perp}, then χu\chi_{u} is CC-invariant. Therefore HC\Hspace^{C} has {χu:uC}\{ \chi_{u} : u \in C^{\perp} \} as a basis. Indeed, the dimensions also agree. We have dimHC=V/C=qn/C\dim \Hspace^{C}=\card{V/C}=q^{n}/\card{C}, and by linear algebra over finite fields, C=qn/C\card{C^{\perp}}=q^{n}/\card{C}. This follows from the non-degeneracy of the standard inner product, which gives dimFqC+dimFqC=n\dim_{\F_{q}} C+\dim_{\F_{q}} C^{\perp}=n. Hence the number of degrees of freedom of functions on the quotient space agrees with the number of remaining characters.

Also, by Lemma 7.3, the operator Kz\Kop_{z} has eigenvalue zwt(u)z^{\wt(u)} on χu\chi_{u}. Therefore the trace of KzHC\res{\Kop_{z}}{\Hspace^{C}} is

uCzwt(u).\sum_{u \in C^{\perp}} z^{\wt(u)}.

This is exactly WC(1,z)W_{C^{\perp}}(1, z).

End of proof

We call this computation the spectral side. When the trace is computed using eigenfunctions of the heat operator, only the CC-invariant eigenfunctions remain, and these are indexed precisely by CC^{\perp}. Their eigenvalues are zwt(u)z^{\wt(u)}, so the weight enumerator of the dual code appears.

The MacWilliams Identity as a Trace Formula

We have now computed the same trace Tr(KzHC)\Tr(\res{\Kop_{z}}{\Hspace^{C}}) in two ways. The important point is that the spectral side and the geometric side are not computing different quantities; they are computing the trace of exactly the same operator KzHC\res{\Kop_{z}}{\Hspace^{C}} in two ways. In one computation CC^{\perp} appears, and in the other computation CC appears. On the spectral side,

Tr(KzHC)=WC(1,z),\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = W_{C^{\perp}}(1, z),

while on the geometric side,

Tr(KzHC)=1CWC(1+(q1)z,1z).\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \frac{1}{\card{C}} W_{C} \bigl(1 + (q - 1)z, 1 - z \bigr).

Thus we obtain the following.

Theorem 8.1 (Inhomogeneous Form of the MacWilliams Identity).

For every linear code CFqEC \leq \F_{q}^{E},

WC(1,z)=1CWC(1+(q1)z,1z)(8.1)W_{C^{\perp}}(1, z) = \frac{1}{\card{C}} W_{C} \bigl( 1 + (q - 1)z, 1 - z \bigr) \tag{8.1}

holds.

Proof

The equality used here has already been read as a polynomial identity in zz. To return to the usual two-variable form, we homogenise. The weight enumerator WB(X,Y)W_{B}(X, Y) of a length nn code BB is a homogeneous polynomial whose terms all have total degree nn. Therefore, if X0X \neq 0, then

WB(X,Y)=XnWB(1,Y/X)W_{B}(X, Y) = X^{n} W_{B}(1, Y/X)

holds. Apply this property to B=CB=C^{\perp} and B=CB=C, put z=Y/Xz = Y/X, and multiply both sides by XnX^{n}. Then

WC(X,Y)=XnWC(1,Y/X)=XnCWC(1+(q1)YX,1YX)=1CWC(X+(q1)Y,XY)\begin{aligned} W_{C^{\perp}}(X, Y) &= X^{n} W_{C^{\perp}}(1, Y/X) \\ &= \frac{X^{n}}{\card{C}} W_{C}\left( 1 + (q - 1)\frac{Y}{X}, 1 - \frac{Y}{X} \right) \\ &= \frac{1}{\card{C}} W_{C}\bigl( X + (q - 1)Y, X - Y \bigr) \end{aligned}

is obtained. In the last equality, we used the fact that WCW_{C} is a homogeneous polynomial of total degree nn. In other words, by multiplying both arguments simultaneously by the outer factor XnX^{n}, we get

XnWC(1+(q1)YX,1YX)=WC(X+(q1)Y,XY).X^{n} W_{C}\left( 1 + (q - 1)\frac{Y}{X}, 1 - \frac{Y}{X} \right) = W_{C}\bigl( X + (q - 1)Y, X - Y \bigr).

Both sides are polynomials in X,YX,Y, and they agree on the range X0X \neq 0. Hence they agree as a polynomial identity, and the same equality also holds when X=0X = 0. This is the MacWilliams identity.

Theorem 8.2 (MacWilliams Identity).

For a linear code CFqEC \leq \F_{q}^{E} over the finite field Fq\F_{q},

WC(X,Y)=1CWC(X+(q1)Y,XY)W_{C^{\perp}}(X, Y) = \frac{1}{\card{C}} W_{C}\bigl( X + (q - 1)Y, X - Y \bigr)

holds.

In one sentence, the proof can be summarised as follows.

The MacWilliams identity is a trace formula saying that, when the heat operator on the Hamming graph is viewed on the quotient space FqE/C\F_{q}^{E}/C, its spectral side gives the weight enumerator of CC^{\perp}, while its geometric side gives the MacWilliams transform of the weight enumerator of CC.

A Small Example: The Binary Repetition Code of Length Three

In the general theory above, the key point was that the same trace on the quotient space was computed in two ways, with CC appearing on the geometric side and CC^{\perp} appearing on the spectral side. Below, for the binary repetition code of length three, we directly check that the geometric side and the spectral side give the same polynomial. Let E={1,2,3}E = \{ 1, 2, 3 \} and q=2q = 2, and consider the binary repetition code

C={000,111}F23.C = \{ 000, 111 \} \leq \F_{2}^{3}.

Then

WC(X,Y)=X3+Y3.W_{C}(X, Y) = X^{3} + Y^{3}.

The dual code is the even-weight code

C={000,110,101,011},C^{\perp} = \{ 000, 110, 101, 011 \},

and

WC(X,Y)=X3+3XY2.W_{C^{\perp}}(X, Y) = X^{3} + 3XY^{2}.

The matrix of the one-coordinate heat operator, that is, its heat kernel, is

Mz=12(1+z1z1z1+z).M_{z} = \frac{1}{2} \begin{pmatrix} 1 + z & 1 - z \\ 1 - z & 1 + z \end{pmatrix}.

Therefore, for aF23a \in \F_{2}^{3},

Tr(τaKz)=(1+z)3wt(a)(1z)wt(a).\Tr(\tau_{a}\Kop_{z}) = (1 + z)^{3 - \wt(a)}(1 - z)^{\wt(a)}.

The elements of CC are 000000 and 111111, so the trace on the geometric side is

Tr(KzHC)=12((1+z)3+(1z)3)=1+3z2.\begin{aligned} \Tr(\res{\Kop_{z}}{\Hspace^{C}}) &= \frac{1}{2}\bigl( (1 + z)^{3} + (1 - z)^{3} \bigr) \\ &= 1 + 3z^{2}. \end{aligned}

On the other hand, on the spectral side the weights of the elements of CC^{\perp} are 00, 22, 22, and 22, so

uCzwt(u)=1+3z2.\sum_{u \in C^{\perp}} z^{\wt(u)} = 1 + 3z^{2}.

Indeed, the two trace computations agree. After homogenising, we get

WC(X,Y)=12WC(X+Y,XY)=12((X+Y)3+(XY)3)=X3+3XY2,\begin{aligned} W_{C^{\perp}}(X, Y) &= \frac{1}{2} W_{C}(X + Y, X - Y) \\ &= \frac{1}{2} \bigl((X + Y)^{3} + (X - Y)^{3} \bigr) \\ &= X^{3} + 3XY^{2}, \end{aligned}

which confirms the MacWilliams identity.

What this example shows is as follows. The two translations 000000 and 111111 in CC shift the diagonal entries of the kernel of the heat operator and then read them. When the shift is zero, 1+z1 + z appears; when it is non-zero, 1z1 - z appears. On the other hand, the eigenfunctions on the quotient space are precisely the characters invariant on CC, and these correspond to CC^{\perp}. Because these two readings compute the same trace, an identity of weight enumerators is produced.

What the Heat Operator, Heat Kernel, and Trace Formula Did in This Proof

Let us review the proof in this note.

First, we read the Hamming weight from the diagonal entries of the kernel of the heat operator after composing with a translation. When the one-coordinate heat operator MzM_{z} is composed with a translation and we take the trace, depending on whether the translation amount is zero or non-zero, the factors

1+(q1)z,1z1 + (q - 1)z, \qquad 1 - z

appear. In several coordinates, these are multiplied coordinate by coordinate, and the Hamming weight is recorded.

Second, we used the code CC as a translation group. Using the averaging projection by CC,

PC=1CcCτc,P_{C} = \frac{1}{\card{C}} \sum_{c \in C} \tau_{c},

we pass to the function space on V/CV/C, that is, to the space of CC-invariant functions. Computing the trace through this projection averages the contributions of the translations corresponding to codewords in CC. This is the geometric side.

Third, we diagonalised the heat operator on the Hamming graph using eigenfunctions. The eigenfunctions are characters of the form χu(x)=ψ(ux)\chi_{u}(x) = \psi(u \cdot x), and the corresponding eigenvalues are zwt(u)z^{\wt(u)}. On the quotient space, only the CC-invariant characters remain. These correspond exactly to uCu \in C^{\perp}. This is the spectral side.

Fourth, we computed the same trace in two ways. On the spectral side we sum the eigenvalues indexed by CC^{\perp}, while on the geometric side we average the contributions of translations by elements of CC. The result is the equality

Tr(KzHC)=uCzwt(u)=1CcC(1+(q1)z)nwt(c)(1z)wt(c).\Tr(\res{\Kop_{z}}{\Hspace^{C}}) = \sum_{u \in C^{\perp}} z^{\wt(u)} = \frac{1}{\card{C}} \sum_{c \in C}(1 + (q - 1)z)^{n - \wt(c)}(1 - z)^{\wt(c)}.

This equation is the core of the proof in this note.

Thus the MacWilliams identity can be read as the following trace formula for a heat operator.

The dual code CC^{\perp} appears on the spectral side of the quotient space V/CV/C, while the original code CC appears on the geometric side, where the trace on the same quotient space is computed as a translation average.

This viewpoint has the same underlying principle as the usual character-theoretic proof, while emphasising the analytic form of “spectral side versus geometric side”.

Concepts Seen in This Part

In this part, while aiming at a proof of the MacWilliams identity, we introduced the basic tools of heat operators, heat kernels, and trace formulas. They can be organised as follows.

Kernels on finite sets

These are the matrix entries KT(x,y)K_{T}(x, y) of a linear operator T ⁣:CΩCΩT \colon \C^{\Omega} \to \C^{\Omega} on a finite set Ω\Omega. On a finite set, a kernel is the matrix itself.

Trace

This is the sum of the diagonal entries of an operator. It can also be computed as a sum of eigenvalues. The equality of these two viewpoints is the entrance to trace formulas.

Heat operators and heat kernels

The operator constructed from a Laplacian Δ\Delta as exp(tΔ)\exp(-t\Delta) is the heat operator, and its matrix entries form the heat kernel. In this note, putting z=etz = e^{-t}, we wrote the one-coordinate heat operator as

Mz=Π0+z(IdΠ0).M_{z} = \Pi_{0} + z(\Id - \Pi_{0}).
Hamming graph

This is the graph with vertex set FqE\F_{q}^{E} in which two vertices at distance 11 are joined by an edge. It can be viewed as the coordinatewise Cartesian product of one-coordinate complete graphs.

Translation action

This is the action that moves a point by xx+ax \mapsto x + a for aFqEa \in \F_{q}^{E}. On the function space, we let it act by (τaf)(x)=f(xa)(\tau_{a} f)(x) = f(x - a).

CC-invariant functions

These are functions unchanged by translations by the code CC. They are the same thing as functions on the quotient set FqE/C\F_{q}^{E}/C.

Averaging projection

This is the projection onto CC-invariant functions,

PC=1CcCτc.P_{C} = \frac{1}{\card{C}} \sum_{c \in C} \tau_{c}.

Using this projection, we brought the trace on the quotient space back to a trace on the original space.

Spectral side

This is the side where the heat operator is diagonalised by eigenfunctions and the trace is computed. In this note, because the CC-invariant eigenfunctions were indexed by CC^{\perp}, the weight enumerator of the dual code appeared.

Geometric side

This is the side where the diagonal entries of the kernel of the heat operator composed with translations are summed directly. In this note, according to the Hamming weight of cCc \in C, the factors 1+(q1)z1 + (q - 1)z and 1z1 - z appeared coordinate by coordinate, and the weight enumerator of the original code CC appeared.

Looking Back at This Proof Family

From here on, we are no longer in the proof itself, but are placing this proof within the map of the series as a whole. This section is supplementary; it may be skipped without affecting the understanding of the proof in this note.

On the surface, the proof in this note is a proof using heat operators, heat kernels, and trace formulas. We constructed the heat operator Kz\Kop_{z} on the Hamming graph and computed the trace obtained by viewing it on the quotient space FqE/C\F_{q}^{E}/C in two ways. The spectral side produced CC^{\perp}, and the geometric side produced CC.

Compressed into the five families, this proof belongs to the

Fourier, character, and Poisson family.

The reason is that the eigenfunctions diagonalising the heat operator on the Hamming graph are characters of the finite abelian group FqE\F_{q}^{E}. Indeed, once the eigenfunctions

χu(x)=ψ(ux)\chi_{u}(x) = \psi(u \cdot x)

are used, finite Fourier analysis is already in the background.

However, the viewpoint in this note has a different appearance from the usual character-theoretic proof. In the usual character-theoretic proof, one directly uses the orthogonality relation

cCψ(uc).\sum_{c \in C} \psi(u \cdot c).

In contrast, this note constructs the heat operator on the Hamming graph and computes its trace on the quotient space in two ways:

as a sum of eigenvalues and as a diagonal sum of kernels after composing with translations.

Thus the Fourier principle is repackaged in the analytic form of a trace formula.

The following supplement is not needed for reading this note, but for readers who know the language of association schemes, the heat operator Kz\Kop_{z} here is an element of the Bose–Mesner algebra of the Hamming scheme. For that reason, this proof also touches the orthogonal-polynomial and association-scheme family. However, in the proof in this note, we placed in the foreground the viewpoint of computing the trace of a heat operator in two ways, rather than the general theory of Bose–Mesner algebras.

This difference is the phenomenon that this series aims to highlight: the same theorem can be seen in the languages of different fields. Even for the same MacWilliams identity,

one can see it as character orthogonality, or as a trace formula for a heat operator.

The proof in this note extracts that analytic form.

Next Time

At this point, the derivation of the MacWilliams identity from heat operators, heat kernels, and trace formulas, which is the main claim of this note, is complete. What follows is a preview within the series.

Next time, we look at the MacWilliams identity from the side of lattices and theta functions. In the proof in this note, we used heat operators and heat kernels on the finite set FqE\F_{q}^{E} and derived the MacWilliams identity as a finite trace formula. Next time, through Construction A, which constructs a lattice from a code, we embed weight enumerators into theta functions. Then we will view the MacWilliams identity through the transformation formula for lattice theta functions, namely the continuous version of the Poisson summation formula.

The main actors next time are

Construction A → lattices → dual lattices → theta functions → the Poisson summation formula → the MacWilliams identity

Even though the proof belongs to the same Fourier, character, and Poisson family, next time the MacWilliams identity will appear not as a heat operator and heat kernel on a finite set, but as a transformation formula for continuous lattices and theta functions.

References

  1. [Chu97] Fan R. K. Chung. Spectral graph theory. Conference Board of the Mathematical Sciences, Washington, DC; by the American Mathematical Society, Providence, RI, vol. 92, pp. xii+207, 1997
  2. [GR01] Chris Godsil and Gordon Royle. Algebraic graph theory. Springer-Verlag, New York, vol. 207, pp. xx+439, 2001. doi:10.1007/978-1-4613-0163-9
  3. [CY99] Fan Chung and S.-T. Yau. Coverings, heat kernels and spanning trees. Electron. J. Combin., vol. 6, pp. Research Paper 12, 21, 1999. doi:10.37236/1444
  4. [Ter99] Audrey Terras. Fourier analysis on finite groups and applications. Cambridge University Press, Cambridge, vol. 43, pp. x+442, 1999. doi:10.1017/CBO9780511626265
  5. [MS77] F. J. MacWilliams and N. J. A. Sloane. The theory of error-correcting codes. II. North-Holland Publishing Co., Amsterdam-New York-Oxford, vol. Vol. 16, pp. i–ix and 370–762, 1977

This series

A Series Learning through the MacWilliams Identity · Part 10 of 12

Back to series list

Disclaimer

Articles on this site are based on the operator's personal understanding, investigation, and research notes. I try to keep the content accurate, but it may contain errors or incomplete explanations. I do not guarantee its accuracy, completeness, usefulness, or currentness.

Please use the information on this site at your own judgment and responsibility. To the extent permitted by law, the operator is not liable for damages, losses, or disadvantages arising from using, or being unable to use, information on this site.

If you notice an error, unclear explanation, broken link, or insufficient citation, please contact the operator. I will review the content and, when appropriate, correct, update, or remove it.