MacWilliams-Type Identity in Coding Theory
- 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 to . In broader settings—such as convolutional codes, poset and poset-block metrics, rank and skew-rank metrics, -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 code with Hamming weight enumerator
states that
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 -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 -product and -transform calculus, producing the identity
0
for linear codes over 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 2-algebra, 3-products, and the fundamental polynomials
4
The resulting generalized identity is
5
and specializes to the classical Hamming formula when 6, 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 8 and 9 of a convolutional code and its dual satisfy a MacWilliams identity via the classical MacWilliams transform 0 together with an invertible state transformation 1 (0805.3484). In another formulation based on exact weight generating functions in bra–ket notation, the WAM of a minimal-encoder convolutional code satisfies
2
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 3, with dual enumerator coefficients determined by the 4-coefficients of the original code (Pinheiro et al., 2012).
For linear poset codes, the relevant object is an equivalence relation 5 on the set of order ideals 6. The relation is called MacWilliams-type if equality of 7-weight distributions for two 8-codes implies equality of 9-weight distributions for their duals. The theory identifies three natural classes of such relations: equivalence defined by automorphisms of 0, equivalence by ideal-cardinality, and equivalence by order-isomorphism of ideals (Choi et al., 2012). The cardinality relation is MacWilliams-type exactly when 1 is hierarchical, while the order-isomorphism relation is MacWilliams-type exactly when 2 is a complement-isomorphism poset (Choi et al., 2012).
For combinatorial metrics defined by coverings 3, the metric admits a MacWilliams-type identity if and only if 4 is a partition of 5 into disjoint blocks of equal size 6. In that case the transform is
7
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 8, the rank weight is
9
For an 0 linear rank-metric code 1, the MacWilliams identity takes a different functional form than Delsarte’s but is parallel to the Hamming case after introducing the 2-product and 3-transform (0706.1751). The same framework yields 4-analogues of binomial and power-moment identities (0706.1751).
A further development concerns generalized rank weights. For an 5-linear 6 code 7, the quantities
8
count 9-dimensional subspaces of rank weight 0. The MacWilliams-type identity is then a moment relation between the generalized distributions of 1 and 2: 3 for every integer 4 and every 5 (Molina, 11 Feb 2026). The same work gives a closed form for 6 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,
7
but the underlying calculus is a skew-8 algebra and the coefficients are generalized 9-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 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).
5. 1-spotty, Lee, RT, poset-level, and related enumerators over rings
A substantial branch of the subject is motivated by byte-oriented error control in memory systems. In this context, 2-spotty byte errors lead to enumerators that group errors bytewise and apply a ceiling rule such as
3
for a byte size 4 and a spotty parameter 5 (Shi, 2013).
Over finite commutative Frobenius rings, MacWilliams-type identities have been derived for the 6-spotty Hamming weight enumerator, joint 7-spotty Hamming weight enumerator, split 8-spotty Hamming weight enumerator, and 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 0-spotty Hamming weight enumerator, the dual transform is expressed through bytewise polynomials
1
(Shi, 2013). For 2-spotty Rosenbloom–Tsfasman weight enumerators over finite commutative Frobenius rings, the kernel polynomials are
3
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 4, one defines a multivariate level-weight enumerator
5
The complete poset-level MacWilliams identity is then governed by levelwise kernel polynomials
6
(Seda et al., 2014). Hamming, RT, complete, and 7-spotty enumerators appear as specializations (Seda et al., 2014).
A related generalization concerns pomset block metrics over 8, where one defines Lee-block weights, pomset-block support, and a weight enumerator
9
For chain pomsets there are explicit two-case formulas for 0 odd and 1 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 2 to 3” (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 4, a homogeneous-unit partition 5, and a subfield-orbit partition 6 are introduced so that MacWilliams-type transformations hold for the resulting decomposition counts 7, 8, and 9 (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 0. Necessary and sufficient conditions show that the Shiromoto-style Lee identity exists exactly when 1 with 2 a prime-power divisor of 3, and the Euclidean analogue exists exactly when 4 with 5 dividing 6 (Tang et al., 2016). Consequently, “for all 7 no such factorization 8 with 9 exists,” so no Lee MacWilliams identity in that sense can hold for 00; likewise, “for every 01 there is no decomposition 02 with 03, so no Euclidean-weight MacWilliams identity in the Shiromoto style exists for 04” (Tang et al., 2016). The nontrivial cases singled out are 05 for Lee weight and 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 07 respects duality if and only if the local transform
08
is constant as long as 09 (Wood, 5 Jan 2026). The same source presents explicit counterexamples over 10: two dimension-2 codes in 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 12 is the 13 Pauli Fourier matrix, then an entanglement-assisted quantum convolutional code satisfies
14
A further abstraction appears in intrinsic quantum codes. Given an orthogonal decomposition
15
of operator space, one defines projector enumerators 16 and twirl enumerators 17 for a code projector 18. In the multiplicity-free equivariant setting, these are related by a unitary change of basis in 19, producing the intrinsic MacWilliams identity
20
with weighted orthogonality 21 (Kubischta et al., 17 Apr 2026). For 22, the transform matrix is expressed explicitly through Wigner 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 24-norm 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.