Article and note
A Series Learning through the MacWilliams IdentityPart 9 of 12
An Introduction to Factor Graphs and Partition Functions through the MacWilliams Identity
- Published:
- Updated:
- Reading time:
- 33 min (about 7,187 words)
Introduction
One of the fundamental theorems in coding theory is the MacWilliams identity. Let be the coordinate set, let , and, for a linear code over the finite field , consider its dual code
where
For a codeword , write its support and Hamming weight as
respectively. Define the weight enumerator of the linear code by
The MacWilliams identity is the formula saying that the weight enumerator of the dual code can be computed from the weight enumerator of as follows:
This is the MacWilliams identity.
In this note, we prove this MacWilliams identity in the language of factor graphs and partition functions. The note introduces the necessary notation and concepts in the text so that it can be read on its own. The only prerequisites are the basics of linear codes over finite fields, Hamming weight, and dual codes. More concretely, we assume familiarity with the following level of material:
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–8. In the series as a whole, we compare several proofs of the MacWilliams identity, but the classification across the whole series is not needed in order to read the proof in this note. Parity-check matrices, Tanner graphs, factor graphs, partition functions, and Fourier transforms are explained in the text to the extent needed. Even if you have not read the other parts of the series, the necessary notation and calculations are introduced in order so that you can follow the proof of the MacWilliams identity itself. The aim of this note is to use a proof of the MacWilliams identity as a guide to an introduction to factor graphs and partition functions.
A factor graph is a tool for representing a large function depending on many variables as a product of small factors, each depending on only a few variables, and for visualising those dependencies by a graph. A partition function is obtained by summing that product over all values of all variables. In statistical physics it appears as a total weight over all states, and in coding theory it appears as a total weight over words satisfying constraints.
When a linear code is written by a parity-check matrix , is the set of all words satisfying . This condition decomposes into local constraints, one for each check equation. Then the weight enumerator can be represented as
the partition function obtained by multiplying the coordinate weights for each word satisfying all check equations, and then summing over all such words.
When each local constraint in this partition function is Fourier-expanded, the dual code appears naturally. This is the MacWilliams identity as seen from factor graphs and partition functions.
The flow of the note is as follows.
partition functions → factor graphs → constraint factors → Tanner-graph-type factor graphs → local Fourier transform → dualisation → the MacWilliams identity
As a standard introduction to factor graphs and the sum–product algorithm, see Kschischang–Frey–Loeliger [KFL01]. For Forney-style normal factor graphs, Loeliger [Loe04] is readable, and Forney [For01] is a basic reference for normal realisations of codes on graphs. For the relation between partition-function duality for normal factor graphs and the MacWilliams identity, see Forney [For11]. 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.
Partition Functions: Weighted Sums with Constraints
We begin with the term partition function. Rather than entering into its physical interpretation, we use it here as a particular kind of finite sum. The word weight is not restricted here to probabilities or positive real numbers: polynomial-valued and complex-valued weights will be treated in the same way. Following the notation often used in statistical physics, we denote it by . Every partition function in this note is a finite sum. Consequently, we may later change the order of summation, or decompose a sum over a finite direct product into a product of coordinatewise sums, without any analytic issue.
Consider finitely many variables . Assume that each variable takes values in a finite set . The total state space is
If a weight is assigned to each state , consider the total sum
In this note, we call such a quantity a partition function.
This definition alone may make a partition function look like just a finite sum. The important point is that, in many cases, the weight can be written as a product of small factors. For example, suppose that it can be written as
Then the partition function is
This expression is not merely the sum of an arbitrary function of four variables, but the sum of a product of local factors, each depending only on neighbouring variables. A factor graph is a graph representation of this “local dependency relation”.
Partition functions also appear naturally in coding theory. For example, let be a linear code, and assign a weight to each coordinate value . Then
is a weighted sum over codewords. This is exactly a partition function. If and (), then this partition function becomes the ordinary weight enumerator . In other words, a weight enumerator is a partition function on the codeword space.
Factor Graphs
A factor graph is a tool for representing a factorisation of a function as a graph. Here we define the most basic bipartite-graph type factor graph.
Definition 3.1 (Factor graph).
Let the variable set be , and let the factor set be . Suppose that a finite set is assigned to each variable . Suppose that, for each factor , we are given both the set of variables on which the factor depends, , and a function
1.
Represent this data by a bipartite graph consisting of variable vertices and factor vertices , and join the variable vertex and the factor vertex by an edge when . This is called a factor graph.
The large function represented by the factor graph is
Here is the value of all variables, and is obtained by taking only the variables belonging to .
Define the partition function of this function by
Thus a factor graph is a diagrammatic representation of
a function locally decomposed as a product, and the sum of that function over all states.
Example 3.2 (Three local factors).
Suppose that the variables are , , , , and that the factors are , , . Then the partition function is
In the factor graph, is connected only to , , only to , , and only to , .
Figure 1 is the dependency relation in the expression
drawn as a diagram.
As this example shows, a factor graph makes the structure of an expression visible. If the graph is a tree, the sum–product algorithm can compute the partition function and marginal sums efficiently. Even when the graph has cycles, factor graphs are useful as a language for describing dependency relations. In this note, we do not go deeply into the sum–product algorithm as a computational algorithm, and instead use factor graphs as a language for transforming partition functions and deriving the MacWilliams identity.
Representing Constraints as Factors
In factor graphs, not only weights but also constraints can be represented as factors. For this purpose, we use indicator functions.
Definition 4.1 (Indicator function).
For a set and a subset , define the indicator function of by
Over the finite field , we write the indicator function of the zero element as
That is, . This is the finite-field version of the Kronecker delta.
For example, if we want to keep only the pairs satisfying the condition , it is enough to multiply by the factor . This factor is when , and otherwise. Therefore, in the sum defining the partition function, contributions from states not satisfying the condition vanish. For example, over , we have the following.
In other words, only and remain, and the contributions of and vanish.
Example 4.2 (One linear constraint).
Suppose that, for , we want to impose the constraint
This constraint can be represented by the factor
This factor is only when the constraint is satisfied, and is when it is not satisfied.
Using constraint factors, one can represent a linear code as a product of local constraints. This is the Tanner-graph-type factor graph in the next section.
Viewing a Code as a Tanner-Graph-Type Factor Graph
Let be a linear code. Set . The dual code has dimension . Choose a basis of , and let be the matrix obtained by arranging that basis as its rows. Since , this gives
Here means that is orthogonal to every row of . Since the rows of are a basis of , this means that is orthogonal to every element of . Therefore , and conversely, if , then is orthogonal to every element of , so holds. When writing the abstract coordinate set and the row set in matrix notation, one may think of having chosen an order on each of them. From now on we use indexed notation and write things in a form independent of that order.
Let the row set be , and write . Here , and the rows of are a basis of . Then
Remark 5.1.
In general, one also uses parity-check matrices containing redundant check equations. In this note, in order that the map appearing later runs through exactly once, we use an with no redundant rows, namely an whose rows form a basis of . Under this assumption, choices of and dual codewords correspond one-to-one, so later we do not have to consider extra multiplicities. Even when redundant rows are included, the conclusion is the same, but the map is no longer one-to-one, so multiplicities must be handled. Also, even for the same code, the shape of the Tanner graph and the edge labels change depending on the choice of parity-check matrix. To keep the proof simple, in this note we fix one whose rows form a basis of .
In coding theory, this bipartite graph consisting of variable nodes corresponding to coordinates and check nodes corresponding to check equations is called a Tanner graph [Tan81]. The variable nodes correspond to coordinates , and the check nodes correspond to parity-check equations . We join the check node and the variable node by an edge exactly when . In the language of factor graphs, this is viewed as a Tanner graph whose check nodes carry zero-constraint factors. For a binary code, all non-zero coefficients are , so the check equations can largely be represented by the presence or absence of edges alone. Over a general , however, the values of the non-zero coefficients also affect the check equations. Therefore, for a -ary Tanner graph, we regard the edge – as carrying the coefficient as a label.
For each , write
for the set of coordinates connected to the check node , that is, the set of variables on which the check factor depends. Here is not a derivative, but a notation often used in factor graphs for a “neighbourhood” or “set of adjacent variables”. Then the check factor is
It is the same if the sum is written over all of , because the terms with vanish. In the factor graph, it is connected only to those variables for which .
For example, over , if
then the two check factors are
In this example, is connected only to , , , and is connected only to , .
In addition, put a one-coordinate weight factor at each coordinate . Here is an arbitrary weight function. Later we specialise to and (). An ordinary Tanner graph consists of variable nodes and check nodes, but in the partition function considered here we additionally attach a one-variable weight factor to each coordinate. Strictly speaking, we are considering the factor graph obtained by adding coordinate weight factors to the Tanner graph.
In Figure 2, the rectangular check nodes , represent zero-constraint factors, and the small rectangles below or above represent one-coordinate weight factors.
The partition function of this factor graph is
The product of the constraint factors is exactly when , and is otherwise. Therefore
Thus is a weighted sum over codewords. From now on, for any linear code , we write
The first definition (5.1) is a constrained sum using a parity-check matrix, and (5.2) confirms that it agrees with the weighted sum over codewords. With this notation, appearing later means the partition function obtained by summing the product of the weights over the dual codewords. In particular, if
then
In words, the discussion so far says the following.
A weight enumerator is the partition function of a Tanner-graph-type factor graph.
This observation is the starting point of this note.
One-Coordinate Fourier Transform
We now prepare the Fourier transform used to dualise local factors. Fix once and for all a non-trivial additive character of the finite field , that is, a map satisfying
and not identically equal to . When , one may think of
Here is represented by one of . For general , one can use the trace map and define
The basic property we need is the following orthogonality relation.
Lemma 6.1.
For ,
holds.
Proof
If , every term is , and the sum is . Suppose . Then the map is a bijection of , so
Put the right-hand side equal to . Since is non-trivial, there exists such that . As runs through all of , so does , and hence
Since , we have .
For a one-coordinate weight function , define its Fourier transform by
In the Fourier transform, the values are complex numbers, so we enlarge the coefficient ring to a ring containing as needed. For the Hamming weight enumerator, it is enough to work in , and for the complete weight enumerator, in , which appears later. Here the Fourier transform is defined in the unnormalised form. Therefore, a factor appears in the expansion of the zero constraint. The coefficient appearing later is obtained by multiplying this once for each check equation.
Let us compute the Fourier transform of the weight
appearing in the Hamming weight enumerator.
Lemma 6.2.
Proof
This local calculation is precisely the source of the change of variables in the MacWilliams identity,
In the language of factor graphs, it is the result of Fourier-transforming a one-coordinate weight factor.
Fourier Expansion of the Zero-Constraint Factor
Next, we Fourier-expand the zero constraint appearing in the check factors.
Lemma 7.1.
For any ,
holds.
Proof
If , the right-hand side is . If , then by Lemma 6.1,
This agrees with the left-hand side .
This formula rewrites a constraint factor as a sum over a dual variable . In factor-graph terms, it says that when a check factor is Fourier-expanded, one dual variable appears at that check factor. This dual variable will later form a linear combination of the rows of the parity-check matrix and produce a codeword of the dual code .
Fourier-Expanding the Partition Function
Apply Lemma 7.1 to the partition function
of the Tanner-graph-type factor graph. Here we write the sum over all of , including terms with . This is the same as summing over , but it makes the later coordinatewise organisation easier to see. All sums are finite sums, so below we freely change the order of summation. Also, when a product separates coordinate by coordinate, we rewrite a sum over a finite direct product as a product of coordinatewise sums.
For each ,
Substituting this into all check equations gives
Let us pause to organise the roles of the notation. is the -coordinate of the original candidate codeword . On the other hand, the capital letters , are formal variables used later in the Hamming weight enumerator, and are different from and from appearing here. is the dual variable corresponding to the check factors, and is the coefficient appearing when check equation is Fourier-expanded. is not a coordinate of a dual codeword. The actual dual codeword is obtained later as , and its -coordinate is
Thus, in this calculation, the role of the notation moves from the original coordinate variable , through the coefficients attached to check equations, to the coordinates of a dual codeword.
\begin{tabular}{c|p{0.68\linewidth}} Notation & Role \\ \hline & the -coordinate of the original candidate codeword \\ & the summation variable appearing when check equation is Fourier-expanded, or the coefficient used to linearly combine row of \\ & the -coordinate of the dual codeword \\ & formal variables in the Hamming weight enumerator \end{tabular}
By the property of an additive character, the inner character factors separate coordinate by coordinate. Indeed,
Here we are using the basic decomposition of a sum over a finite direct product. For one-variable functions for each , one has
This is obtained by repeating the two-variable identity
for the number of coordinates. Therefore the inner sum over in (8.1) is
Define by
This is a linear combination of the rows of . Thus the above calculation gives
Now the rows of have been chosen as a basis of , so the map
is a bijection. Also , and hence
Therefore (8.2) becomes
The right-hand side is the partition function over the dual code . In other words,
This is the central formula in the direction obtained directly from the calculation. In other words, it writes the partition function of in terms of the partition function on the side. By contrast, the MacWilliams identity is usually written in the opposite direction: it expresses the weight enumerator of in terms of that of . To obtain that standard direction, we apply this general formula to and reverse the direction. In general, applying the same formula to a linear code gives
Now set . Since , we obtain
The coefficient changes from to because, in the standard direction, we put , and the dual code in that case is .
In words, the directly obtained direction says the following.
More precisely, the partition function of the code is times the partition function over the dual code using the Fourier-transformed one-coordinate weight .
Reading This as Factor-Graph Duality
(8.4) is partition-function duality for linear codes over finite fields. Here we reread this formula in the language of factor graphs.
The original factor graph had the following two types of factors.
- Check factors
For each , the factor representing the linear constraint
- Weight factors
For each coordinate , the one-coordinate weight factor .
When a check factor is Fourier-expanded, a dual variable appears for each check. Using the values of these dual variables, for each coordinate we obtain
This is a linear combination of the rows of the parity-check matrix . Therefore, as varies, runs through all of .
On the other hand, the sum over the coordinate variable locally becomes
Thus the coordinate weight factor is changed into the Fourier-transformed weight factor .
In factor-graph terms, when the original check factors are Fourier-expanded, summation variables corresponding to those check factors appear. These are coefficients used to linearly combine the rows of and form . The coordinates of a dual codeword are the indexed by , and not the . Also, the original coordinate weight factor , after summing over , becomes the Fourier-transformed weight factor .
In the general theory of normal factor graphs, one performs this simultaneously for each local factor. Depending on the convention, sign-inversion factors and normalisation constants appear, but roughly speaking, one Fourier-transforms each local factor and replaces edge variables by dual variables. The partition function of the factor graph on the dual side obtained in this way is related to the original partition function by an explicit constant factor. The calculation in this note is the specialisation of that general theory to a Tanner-graph-type factor graph.
Specialisation to the Hamming Weight Enumerator
We now return to the ordinary Hamming weight enumerator. Let the one-coordinate weight be from (5.3). Then, for any code ,
Also, by Lemma 6.2, we had
This is a one-coordinate weight which returns when the input is , and returns when the input is non-zero. Therefore, multiplying this weight over and summing is the same as substituting for , and for , in . Thus, substituting into (8.6), we obtain
That is,
This is precisely the MacWilliams identity.
The important point in this proof is that the change of variables
does not appear suddenly at the global level. It is the result of applying the one-coordinate Fourier transform to the weight factor at each coordinate. In other words, the MacWilliams transform is obtained by gluing together the local Fourier transforms at the coordinates of the factor graph across the whole graph.
A Small Example: The Binary Repetition Code
Finally, let us check the formula in a small example. Let , and consider the binary repetition code
This code is self-dual, that is, it satisfies . Indeed, the condition that be orthogonal to every codeword of is
and over this means that . Therefore .
We may take
as a parity-check matrix. The partition function is
If and , then
The one-coordinate Fourier transform in the binary case is
In this example too, the same local calculation as in the general case appears directly. Writing the additive character of as , we have
Substituting this into the partition function, for fixed we get
Thus, even in this small example, the general calculation appears: after Fourier-expanding the constraint factor and taking the coordinatewise sums, the one-coordinate weight factor changes into . Formula (8.4) asserts, since and , that
Computing the right-hand side gives
It indeed agrees with the original weight enumerator.
Since this example is self-dual, the distinction between the side and the side is not very visible. In general, one first obtains
and then applies the same formula to in order to put it in the usual direction of the MacWilliams identity.
Although the graph in this example is very small, the structure is the same as in the general case. Fourier-expand the constraint factor and take the coordinatewise sums; then the one-coordinate weight factor is Fourier transformed. As a result, the partition function over the dual code appears.
Let us also look at a non-self-dual example where the standard direction is easier to see. Over , take
Then
The dual code is
and
For example, we can take
as a parity-check matrix. Then
As vary,
appear exactly once each. Here again, are not coordinates of a dual codeword, but coefficients used to linearly combine the two rows of and produce the dual codeword . The right-hand side of the MacWilliams identity is
which indeed agrees with . Since this example is not self-dual,
shows the standard direction more clearly.
Supplement: How to View Normal Factor Graphs
This section supplies background that was not used in the proof in the main text. It is included as a supplement for placing the calculation in this note within the general theory of normal factor graphs, after one has read the derivation of the MacWilliams identity. The proof above did not invoke a general theorem on normal factor graphs; it directly Fourier-expanded the partition function of a Tanner-graph-type factor graph. For readers unfamiliar with normal factor graphs, it is enough to read this section as background explanation.
The proof itself proceeded by following formulae for an ordinary bipartite factor graph of Tanner-graph type. On the other hand, normal factor graphs provide background for understanding that this local Fourier transform is a special case of a more general graph duality.
In a Forney-style normal factor graph, variables are drawn as edges and factors as vertices. In an ordinary factor graph, both variables and factors are vertices. In a normal factor graph, variables become edges connecting factors to factors. In a Forney-style normal factor graph, internal variables are drawn as edges and external variables as half-edges.
The basic advantage of a normal factor graph is that the operation of taking a dual can be described locally. Depending on the convention, sign-inversion factors and normalisation constants appear, but roughly speaking, by Fourier-transforming each factor and replacing each edge variable by a dual variable, one obtains what is called the dual graph in the general theory of normal factor graphs. Its partition function is related to the original partition function by a constant factor. This general theorem is Forney-style normal-factor-graph duality.
We do not develop the general theory of normal factor graphs in full here. Instead, we record the underlying idea.
In an ordinary factor graph, a variable can appear in three or more factors. In normal form, one creates copies of that variable and inserts an equality factor forcing all of them to be equal. Here
In this way, each variable copy can be made adjacent to at most two factors.
For the Tanner-graph-type factor graph in this note as well, if one wants a strict Forney-style normal factor graph, one introduces copies of each coordinate variable and equality factors. However, the essence of the calculation deriving the MacWilliams identity lies in Fourier-expanding each check factor and locally separating the coordinatewise sums. For this reason, this note did not go deeply into the details of diagrammatic normalisation, but followed the local dualisation inside the formulae.
Let us emphasise this point. The proof here uses the same Fourier principle as the ordinary character-theoretic proof. However, instead of writing one large character sum all at once, it proceeds as the local operation
Fourier-expand each check factor, and separate the sum for each coordinate variable.
This is the factor-graph viewpoint.
Supplement: Complete Weight Enumerator Version
This section is supplementary. If you only want to read about the ordinary Hamming weight enumerator, you may skip it. Here we look at the finer weight enumerator before all non-zero elements are collected into the same variable .
Writing the one-coordinate weight with separate variables gives the complete weight enumerator. Introduce a variable for each , and put . Then
This is the complete weight enumerator of . In this note, we write it as
The one-coordinate Fourier transform appears as the change of variables
The superscript is a symbol indicating that the variable is after Fourier transform, and is different from the symbol denoting a finite field. Here we enlarge the coefficient ring to and compute there. Therefore (8.4) can be written as
This is one direction of the MacWilliams identity for the complete weight enumerator.
To put it in the form usually seen, apply (13.1) to . Since and , we obtain
This formula is the MacWilliams identity for the complete weight enumerator.
One point is worth noting: depending on the convention for the Fourier transform, may appear instead of . For the complete weight enumerator, this difference appears as the replacement of the index of the transformed variable from to . On the other hand, when specialising to the Hamming weight enumerator, all non-zero values are sent to the same variable , so this replacement of indices becomes invisible. Therefore it does not affect the final Hamming-weight version of the MacWilliams identity.
What Factor Graphs and Partition Functions Did in This Proof
Let us look back at the proof in this note.
First, we viewed the weight enumerator as a partition function. The weight enumerator is obtained by multiplying coordinatewise weights for each codeword and summing all of them. That is,
This viewpoint lets us regard the weight enumerator as a “weighted sum over states satisfying constraints”.
Second, we represented the code as a product of local constraints. Using a parity-check matrix , the code is the simultaneous solution set of the constraints, one for each row ,
In a -ary Tanner graph, not only the presence or absence of an edge, but also the edge label , is part of the data determining the check equation. This constraint is incorporated into the partition function as the factor
Thus the code is represented not as one large set, but as a collection of local constraints, one for each check equation. The factor graph actually used in this note was obtained by adding the one-coordinate weight factor at each coordinate to this Tanner graph.
Third, we Fourier-expanded the zero constraint. The constraint factor can be written as
This is an operation that transforms a constraint into a sum over a dual variable . Applying this transformation for each check equation produces the dual variables . Here again, is not a coordinate of a dual codeword, but a coefficient used to linearly combine check rows.
Fourth, the coordinatewise sums became one-coordinate Fourier transforms. When the dual variables from the check equations are collected together, each coordinate contains
Taking the sum over at that coordinate gives
Thus the original weight factor changes into the Fourier-transformed weight factor .
Fifth, ran through the dual code. Since the rows of have been chosen as a basis of , as runs through , runs through all of exactly once. Writing the dual codeword as , its coordinates are . Thus the partition function of the original code is rewritten, with the coefficient and the Fourier-transformed one-coordinate weight , as a partition function over the dual code . In the usual direction of the MacWilliams identity, the same general formula is applied to , so the coefficient becomes .
In one sentence, the point is as follows.
The MacWilliams identity is the fact that, for the partition function of a Tanner-graph-type factor graph, if one locally Fourier-expands the zero-constraint factors and then takes the coordinatewise sums, a partition function over the dual code appears, together with a constant factor and the Fourier-transformed one-coordinate weight.
Concepts Seen in This Note
Along the way to proving the MacWilliams identity, this note introduced the basic tools of factor graphs and partition functions. They can be organised as follows.
- Partition function
The total sum of weights over all states. In this note, we treated it as a sum over finite sets,
- Factor
A local function depending on only a small number of variables. By decomposing a large function into a product of factors, one can make the dependency relations easier to see.
- Factor graph
A representation of the dependency relation between variables and factors as a bipartite graph. One prepares variable vertices and factor vertices, and joins a factor to the variables on which it depends.
- Constraint factor
A factor which is when a condition is satisfied and when it is not. We represented linear constraints using .
- Tanner-graph-type factor graph
A factor graph representing a linear code as local constraints on a Tanner graph consisting of variable nodes corresponding to coordinates and check nodes corresponding to check equations. For a -ary code, the edge labels are also data determining the check equations. In this note, we further added the one-coordinate weight factor at each coordinate. The weight enumerator can be represented as the partition function of this graph.
- Normal factor graph
A Forney-style factor graph in which variables are drawn as edges and factors as vertices. It is a framework in which dualisation can be described factor by factor locally.
- One-coordinate Fourier transform
The operation transforming a one-coordinate weight factor by
For the Hamming weight factor, and appear.
- Fourier expansion of the zero constraint
The formula writing the constraint factor as
This produces dual variables from local constraints.
- Partition-function duality
The principle that, when local factors are Fourier-transformed, the original partition function and the partition function of the factor graph on the dual side are related by a constant factor. In the general theory of normal factor graphs, this factor graph on the dual side is treated as the dual graph. In this note, as the most basic example of this, we derived the MacWilliams identity for linear codes.
Review of the Proof Family in This Note
On the surface, the proof in this note is a proof using factor graphs and partition functions. We represented a code as local constraints, one for each parity-check equation, and read the weight enumerator as the corresponding constrained partition function. Then we Fourier-expanded each constraint factor and separated the coordinatewise sums.
Within the five-family classification used in this series, the proof in this note belongs to the
Fourier, character, and Poisson family.
The reason is that the fundamental principle by which the dual code appears is the orthogonality relation for additive characters of finite fields. Indeed, the expansion of the zero-constraint factor,
is precisely a finite Fourier transform formula.
However, the viewpoint in this note differs from the ordinary character-theoretic proof. In the usual proof, one treats the character sum over the whole code ,
all at once. By contrast, in this note we started from local Fourier expansions for each check factor and transformed the one-coordinate weight factors through coordinatewise sums. That is, instead of applying the Fourier transform “once globally”, we glued together local operations on the factor graph.
This difference is the value of the factor-graph viewpoint. Even for the same MacWilliams identity, one can view it as “global character orthogonality”, or as “duality of partition functions with local constraints”. The latter viewpoint extends naturally to convolutional codes, tail-biting codes, codes on graphs, and models in statistical physics.
Towards the Next Part
At this point, the derivation of the MacWilliams identity from factor graphs and partition functions, which is the main claim of this note, is complete.
In the next note, we look at the MacWilliams identity from the perspective of analytic trace formulae.
In this proof, we represented the weight enumerator as the partition function of a Tanner-graph-type factor graph, and moved to the partition function of the dual code by a local Fourier transform. In the next note, we consider operators on Hamming spaces, especially heat kernels and Markov operators on Hamming graphs, and compute their traces in two ways. In one calculation, the dual code appears from the spectral side, and in the other calculation, the weight enumerator of the original code appears from the trace of a translation action.
Thus the main ingredients next time are
Hamming graph → operators → heat kernel → trace formula → the MacWilliams identity
Even though the proof belongs to the same Fourier, character, and Poisson family, the next note will show not a “partition function with local constraints”, but the analytic viewpoint of “computing the trace of an operator in two ways”.
Footnotes
- Here is a range of coefficients in which addition and multiplication can be performed, for example or a polynomial ring. At first it is enough to think of a commutative semiring or a commutative ring. From the section where Fourier expansion is used onward, because we handle and character values, we enlarge the coefficient ring to one containing as needed. ↩
References
- [KFL01] Frank R. Kschischang, Brendan J. Frey, and Hans-Andrea Loeliger. Factor graphs and the sum-product algorithm. IEEE Trans. Inform. Theory, vol. 47, no. 2, pp. 498–519, 2001. doi:10.1109/18.910572 ↩
- [Loe04] Hans-Andrea Loeliger. An introduction to factor graphs. IEEE Signal Process. Mag., vol. 21, no. 1, pp. 28-41, 2004. doi:10.1109/MSP.2004.1267047 https://api.semanticscholar.org/CorpusID:7722934 ↩
- [For01] Jr. G. David Forney. Codes on graphs: normal realizations. IEEE Trans. Inform. Theory, vol. 47, no. 2, pp. 520–548, 2001. doi:10.1109/18.910573 ↩
- [For11] Jr. G. David Forney. Codes on graphs: duality and MacWilliams identities. IEEE Trans. Inform. Theory, vol. 57, no. 3, pp. 1382–1397, 2011. doi:10.1109/TIT.2011.2104994 ↩
- [Tan81] R. Michael Tanner. A recursive approach to low complexity codes. IEEE Trans. Inform. Theory, vol. 27, no. 5, pp. 533–547, 1981. doi:10.1109/TIT.1981.1056404 ↩
This series
A Series Learning through the MacWilliams Identity · Part 9 of 12
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.