Papers
Topics
Authors
Recent
Search
2000 character limit reached

MacWilliams-Type Identity in Coding Theory

Updated 14 July 2026
  • MacWilliams-type identity is a duality principle that relates a code’s weight enumerator to that of its dual using finite Fourier analysis and character sums.
  • It extends the classical Hamming transform to settings like poset, rank, and convolutional codes, adapting to varied metrics and generating functions.
  • Its applicability hinges on precise structural conditions—such as hierarchical posets and uniform block sizes—ensuring the compatibility required for duality.

Searching arXiv for recent and foundational papers on MacWilliams-type identities relevant to coding theory, poset metrics, rank metrics, convolutional codes, and generalized settings. MacWilliams-type identity denotes a family of duality formulas that relate a weight enumerator, weight distribution, or analogous generating function of a code to the corresponding invariant of its dual code. In the classical Hamming setting, the identity gives a direct transform from WCW_C to WCW_{C^\perp}. In broader settings—such as convolutional codes, poset and poset-block metrics, rank and skew-rank metrics, mm-spotty and Rosenbloom–Tsfasman weights, Lee and Euclidean weights over rings, Krawtchouk association schemes, and quantum convolutional or intrinsic quantum codes—the term refers to structurally analogous transforms, often obtained through character sums, Fourier or Hadamard transforms, Poisson summation, association-scheme duality, or state-space realizations (0805.3484, 0706.1751, Pinheiro et al., 2012, Lai et al., 2014, Friedlander, 2024, Kubischta et al., 17 Apr 2026).

1. Classical paradigm and the meaning of “type”

The classical MacWilliams identity for a linear [n,k][n,k] code CFqnC\subseteq \mathbb F_q^n with Hamming weight enumerator

WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i

states that

WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).

This is the archetype for later generalizations (Zheng et al., 2024, Bariffi et al., 2024).

The expression “MacWilliams-type identity” is used when an analogous principle survives after changing one or more of the following ingredients: the metric, the ambient alphabet or ring, the object being enumerated, or the notion of duality. In many cases, the transformed object is no longer an ordinary two-variable weight enumerator. Instead it may be a weight adjacency matrix for convolutional codes, an EE-weight distribution for poset codes, a split or joint enumerator, a generalized rank-weight enumerator, or a matrix-valued quantum enumerator (0805.3484, Choi et al., 2012, Lai et al., 2014, Molina, 11 Feb 2026, Kubischta et al., 17 Apr 2026).

A recurrent structural feature is that the identity exists precisely when the partition of the ambient space induced by the chosen weight notion is compatible with Fourier duality. In the Hamming case this compatibility is automatic; in more general settings it may require strong hypotheses, finer partitions, or may fail altogether (Bariffi et al., 2024, Pinheiro et al., 2017, Tang et al., 2016, Wood, 5 Jan 2026).

2. Mechanisms underlying MacWilliams-type transforms

A large part of the theory is organized around finite Fourier analysis. For block codes over finite fields or Frobenius rings, one chooses a nontrivial additive or generating character and applies a Poisson-summation or Hadamard-transform argument. In the rank-metric setting, the Hadamard transform is combined with a qq-product and qq-transform calculus, producing the identity

WCW_{C^\perp}0

for linear codes over WCW_{C^\perp}1 (0706.1751).

In association-scheme formulations, Delsarte’s eigenvalue duality is recast as a functional transform. For Krawtchouk association schemes, the transform is expressed באמצעות a WCW_{C^\perp}2-algebra, WCW_{C^\perp}3-products, and the fundamental polynomials

WCW_{C^\perp}4

The resulting generalized identity is

WCW_{C^\perp}5

and specializes to the classical Hamming formula when WCW_{C^\perp}6, WCW_{C^\perp}7 (Friedlander, 2024).

For convolutional codes, the role of the weight enumerator is played by the weight adjacency matrix (WAM), indexed by memory states. The transform therefore acts entrywise only after conjugation by a Fourier or state-space operator. In one formulation, the WAMs WCW_{C^\perp}8 and WCW_{C^\perp}9 of a convolutional code and its dual satisfy a MacWilliams identity via the classical MacWilliams transform mm0 together with an invertible state transformation mm1 (0805.3484). In another formulation based on exact weight generating functions in bra–ket notation, the WAM of a minimal-encoder convolutional code satisfies

mm2

(Lai et al., 2014).

These examples suggest a common interpretation: the MacWilliams-type identity is not tied to a specific metric so much as to a dual pair of partitions, modules, or intertwiners on which Fourier analysis closes.

3. Metrics and structures admitting such identities

The existence problem is central. In several nonclassical metric spaces, a MacWilliams-type identity holds only under exact structural conditions.

For poset-block spaces, the decisive classification is that a poset-block space admits a MacWilliams-type identity if and only if the poset is hierarchical and at any level of the poset, all the blocks have the same dimension (Pinheiro et al., 2012). Under these hypotheses one obtains an explicit transform involving levelwise Krawtchouk polynomials mm3, with dual enumerator coefficients determined by the mm4-coefficients of the original code (Pinheiro et al., 2012).

For linear poset codes, the relevant object is an equivalence relation mm5 on the set of order ideals mm6. The relation is called MacWilliams-type if equality of mm7-weight distributions for two mm8-codes implies equality of mm9-weight distributions for their duals. The theory identifies three natural classes of such relations: equivalence defined by automorphisms of [n,k][n,k]0, equivalence by ideal-cardinality, and equivalence by order-isomorphism of ideals (Choi et al., 2012). The cardinality relation is MacWilliams-type exactly when [n,k][n,k]1 is hierarchical, while the order-isomorphism relation is MacWilliams-type exactly when [n,k][n,k]2 is a complement-isomorphism poset (Choi et al., 2012).

For combinatorial metrics defined by coverings [n,k][n,k]3, the metric admits a MacWilliams-type identity if and only if [n,k][n,k]4 is a partition of [n,k][n,k]5 into disjoint blocks of equal size [n,k][n,k]6. In that case the transform is

[n,k][n,k]7

(Pinheiro et al., 2017).

These results collectively show that MacWilliams-type duality is highly restrictive. Hierarchicality, uniform block size, automorphism invariance, or formal self-duality are not incidental technical hypotheses; they are often exactly the boundary between existence and failure.

4. Expansions beyond Hamming: rank, skew-rank, and convolutional settings

The rank metric yields one of the most developed non-Hamming analogues. For [n,k][n,k]8, the rank weight is

[n,k][n,k]9

For an CFqnC\subseteq \mathbb F_q^n0 linear rank-metric code CFqnC\subseteq \mathbb F_q^n1, the MacWilliams identity takes a different functional form than Delsarte’s but is parallel to the Hamming case after introducing the CFqnC\subseteq \mathbb F_q^n2-product and CFqnC\subseteq \mathbb F_q^n3-transform (0706.1751). The same framework yields CFqnC\subseteq \mathbb F_q^n4-analogues of binomial and power-moment identities (0706.1751).

A further development concerns generalized rank weights. For an CFqnC\subseteq \mathbb F_q^n5-linear CFqnC\subseteq \mathbb F_q^n6 code CFqnC\subseteq \mathbb F_q^n7, the quantities

CFqnC\subseteq \mathbb F_q^n8

count CFqnC\subseteq \mathbb F_q^n9-dimensional subspaces of rank weight WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i0. The MacWilliams-type identity is then a moment relation between the generalized distributions of WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i1 and WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i2: WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i3 for every integer WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i4 and every WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i5 (Molina, 11 Feb 2026). The same work gives a closed form for WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i6 and an explicit specialization for MRD codes (Molina, 11 Feb 2026).

In the skew rank metric, codewords are skew-symmetric matrices and the weight is half the rank. Here the MacWilliams transform again has a Hamming-like appearance,

WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i7

but the underlying calculus is a skew-WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i8 algebra and the coefficients are generalized WC(X,Y)=i=0nAi(C)XniYiW_C(X,Y)=\sum_{i=0}^n A_i(C)\,X^{n-i}Y^i9-Krawtchouk polynomials for skew-symmetric matrices (Friedlander et al., 2022).

For convolutional codes, the identity no longer compares scalar enumerators alone. The WAM encodes per-time-step state transitions, and the duality must respect the controller-canonical or seed realization. This leads to matrix transforms involving either a state transformation WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).0 (0805.3484) or tensor Fourier operators on the memory-state space (Lai et al., 2014). The same bra–ket formalism also yields MacWilliams identities for split weight generating functions such as input–parity and input–output enumerators, and extends to quantum convolutional codes (Lai et al., 2014).

A substantial branch of the subject is motivated by byte-oriented error control in memory systems. In this context, WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).2-spotty byte errors lead to enumerators that group errors bytewise and apply a ceiling rule such as

WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).3

for a byte size WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).4 and a spotty parameter WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).5 (Shi, 2013).

Over finite commutative Frobenius rings, MacWilliams-type identities have been derived for the WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).6-spotty Hamming weight enumerator, joint WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).7-spotty Hamming weight enumerator, split WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).8-spotty Hamming weight enumerator, and WC(X,Y)=1CWC ⁣(X+(q1)Y,  XY).W_{C^\perp}(X,Y)=\frac1{|C|}\,W_C\!\bigl(X+(q-1)Y,\;X-Y\bigr).9-spotty Lee weight enumerator (Shi, 2013). The proof strategy is uniform: define an appropriate function on the ambient abelian group, compute its Fourier transform byte-by-byte using a generating character, and invoke Poisson summation (Shi, 2013).

For the EE0-spotty Hamming weight enumerator, the dual transform is expressed through bytewise polynomials

EE1

(Shi, 2013). For EE2-spotty Rosenbloom–Tsfasman weight enumerators over finite commutative Frobenius rings, the kernel polynomials are

EE3

and the MacWilliams identity follows from the same character-sum mechanism (Shi, 2013).

Poset level weight enumerators over Frobenius commutative rings unify many earlier constructions. For a code partitioned into levels of sizes EE4, one defines a multivariate level-weight enumerator

EE5

The complete poset-level MacWilliams identity is then governed by levelwise kernel polynomials

EE6

(Seda et al., 2014). Hamming, RT, complete, and EE7-spotty enumerators appear as specializations (Seda et al., 2014).

A related generalization concerns pomset block metrics over EE8, where one defines Lee-block weights, pomset-block support, and a weight enumerator

EE9

For chain pomsets there are explicit two-case formulas for qq0 odd and qq1 even, obtained by additive-character orthogonality and Poisson summation (Ma et al., 2023).

6. Failures, obstructions, and refinements

A persistent theme is that classical two-variable MacWilliams identities often fail outside the Hamming or highly structured settings. This is explicit for Lee, homogeneous, and subfield metrics, where “many counter-examples” show that “no analogous 1–1 transform on the two-variable weight-enumerator can in general carry qq2 to qq3” (Bariffi et al., 2024). The reason is that the partitions by equal non-Hamming weight are not Fourier-invariant (Bariffi et al., 2024).

One response is to refine the partition. Over a finite chain ring, a Lee partition qq4, a homogeneous-unit partition qq5, and a subfield-orbit partition qq6 are introduced so that MacWilliams-type transformations hold for the resulting decomposition counts qq7, qq8, and qq9 (Bariffi et al., 2024). Thus the failure of the classical two-variable form does not preclude a finer MacWilliams-type identity.

A more restrictive phenomenon occurs for Lee and Euclidean weight enumerators over qq0. Necessary and sufficient conditions show that the Shiromoto-style Lee identity exists exactly when qq1 with qq2 a prime-power divisor of qq3, and the Euclidean analogue exists exactly when qq4 with qq5 dividing qq6 (Tang et al., 2016). Consequently, “for all qq7 no such factorization qq8 with qq9 exists,” so no Lee MacWilliams identity in that sense can hold for WCW_{C^\perp}00; likewise, “for every WCW_{C^\perp}01 there is no decomposition WCW_{C^\perp}02 with WCW_{C^\perp}03, so no Euclidean-weight MacWilliams identity in the Shiromoto style exists for WCW_{C^\perp}04” (Tang et al., 2016). The nontrivial cases singled out are WCW_{C^\perp}05 for Lee weight and WCW_{C^\perp}06 for Euclidean weight (Tang et al., 2016).

Recent work on arbitrary integer-valued weights over finite fields sharpens the obstruction. A character-sum criterion states that a weight WCW_{C^\perp}07 respects duality if and only if the local transform

WCW_{C^\perp}08

is constant as long as WCW_{C^\perp}09 (Wood, 5 Jan 2026). The same source presents explicit counterexamples over WCW_{C^\perp}10: two dimension-2 codes in WCW_{C^\perp}11 have the same Euclidean weight enumerator, yet their duals have different weight distributions (Wood, 5 Jan 2026). This supports the broader conclusion that, among general weights, MacWilliams identities are exceptional rather than generic.

7. Quantum and code–lattice analogues

MacWilliams-type duality also extends beyond classical linear block codes. For quantum convolutional codes in the stabilizer formalism, the weight generating function is encoded in a quantum WAM indexed by memory Paulis. If WCW_{C^\perp}12 is the WCW_{C^\perp}13 Pauli Fourier matrix, then an entanglement-assisted quantum convolutional code satisfies

WCW_{C^\perp}14

(Lai et al., 2014).

A further abstraction appears in intrinsic quantum codes. Given an orthogonal decomposition

WCW_{C^\perp}15

of operator space, one defines projector enumerators WCW_{C^\perp}16 and twirl enumerators WCW_{C^\perp}17 for a code projector WCW_{C^\perp}18. In the multiplicity-free equivariant setting, these are related by a unitary change of basis in WCW_{C^\perp}19, producing the intrinsic MacWilliams identity

WCW_{C^\perp}20

with weighted orthogonality WCW_{C^\perp}21 (Kubischta et al., 17 Apr 2026). For WCW_{C^\perp}22, the transform matrix is expressed explicitly through Wigner WCW_{C^\perp}23-symbols (Kubischta et al., 17 Apr 2026). In the presence of multiplicities, the enumerators become matrix-valued and the transform becomes block unitary, leading to semidefinite feasibility problems rather than scalar LP constraints (Kubischta et al., 17 Apr 2026).

There is also a code–lattice dictionary. The classical MacWilliams identity for codes is presented as the discrete analogue of the Jacobi–Poisson formula for lattice theta series, while a MacWilliams-style identity for the WCW_{C^\perp}24-norm WCW_{C^\perp}25-function of Construction A lattices gives a positive solution of Solé’s conjecture (Zheng et al., 2024). In this framework, the MacWilliams distribution on a code plays the role of a finite analogue of the Gaussian on a lattice, and a smoothing-parameter statement yields statistical closeness to uniform on quotient spaces (Zheng et al., 2024).

These developments suggest that MacWilliams-type identity is best understood as a duality principle for enumerators under a suitable Fourier-analytic or representation-theoretic transform. The classical Hamming formula is the simplest member of a much wider family, but the family is sharply constrained: when the relevant partitions, schemes, or symmetry decompositions are not duality-compatible, either the identity fails or the enumerator must be refined.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (18)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to MacWilliams-Type Identity.