Papers
Topics
Authors
Recent
2000 character limit reached

Generalized Hamming Weights (GHWs) Overview

Updated 18 November 2025
  • Generalized Hamming Weights (GHWs) are parameters that extend the minimum distance concept to r-dimensional subcodes, forming a strictly increasing weight hierarchy for linear codes.
  • They are computed using combinatorial, number-theoretic, and algorithmic methods, with efficient approaches like the extended Brouwer–Zimmermann algorithm aiding practical enumeration.
  • GHWs have broad applications in secure communications, trellis decoding, list- and erasure-decoding, and they establish deep links with algebraic combinatorics and matroid theory.

A generalized Hamming weight (GHW) is a fundamental parameter associated with a linear code that generalizes the notion of minimum distance to higher-dimensional subcodes. For a linear code CC of length nn and dimension kk over a finite field, the rr-th generalized Hamming weight dr(C)d_r(C) is defined as the minimal number of coordinate positions that support a nonzero codeword in every rr-dimensional subspace of CC. The sequence (d1(C),d2(C),...,dk(C))(d_1(C), d_2(C), ..., d_k(C)) is called the weight hierarchy of CC, with d1(C)d_1(C) the minimum distance. The theory of GHWs, initiated by Wei in 1991, plays a critical role in quantifying code security in wire-tap channels, describing trellis and state complexity profiles for decoding, and evaluating the performance of list- and erasure-decoding and secret-sharing schemes. GHWs also form deep links with algebraic combinatorics, matroid theory, and commutative algebra.

1. Definition and Fundamental Properties

Let CFqnC \subset \mathbb{F}_q^n be an [n,k][n,k] linear code over the finite field Fq\mathbb{F}_q. For any subspace DCD \leq C, define its support as

Supp(D)={i{1,,n}:c=(c1,...,cn)D with ci0}.\mathrm{Supp}(D) = \{ i \in \{1,\dots,n\} : \exists\,c = (c_1, ..., c_n) \in D \text{ with } c_i \neq 0 \}.

Then the rr-th generalized Hamming weight is

dr(C)=min{Supp(D):DC, dim(D)=r},1rk.d_r(C) = \min \{ |\mathrm{Supp}(D)| : D \leq C,\ \dim(D)=r \}, \qquad 1 \leq r \leq k.

This captures the minimal number of coordinates on which an rr-dimensional subcode can be nonzero. The sequence d1(C)<d2(C)<<dk(C)nd_1(C) < d_2(C) < \cdots < d_k(C) \leq n is strictly increasing by linearity. The classical Singleton bound extends: dr(C)nk+r.d_r(C) \leq n - k + r. Codes meeting this bound for all rr are termed kk-MDS. The Griesmer-type lower bound also holds: dr(C)i=0r1d1(C)qi.d_r(C) \geq \sum_{i=0}^{r-1} \left\lceil \frac{d_1(C)}{q^i} \right\rceil. The duality property states that for CC^\perp the dual code,

{dr(C):1rk}{n+1ds(C):1snk}={1,,n},\{d_r(C): 1 \leq r \leq k\} \cup \{n+1 - d_s(C^\perp) : 1 \leq s \leq n-k\} = \{1,\ldots,n\},

with the two sets disjoint. This is the celebrated Wei duality (Martínez-Peñas, 2015).

2. Computation and Algorithmic Foundations

Direct computation of dr(C)d_r(C) is generally computationally hard due to the exponential number of rr-dimensional subspaces. For a generator matrix GG and EFqkE \leq \mathbb{F}_q^k of dimension rr, one can consider the image EncG(E)\operatorname{Enc}_G(E); naive enumeration over all (kr)q\binom{k}{r}_q subspaces is tractable only for small codes.

However, the extended Brouwer–Zimmermann (GZ) algorithm provides an efficient general-purpose approach for computing all GHWs by exploiting multiple systematic forms and combinatorial subspace enumeration (San-José, 22 Mar 2025). This algorithm searches reduced row-echelon forms with fixed pivot patterns and efficiently prunes the subspace search using lower and upper bounds. It dramatically outperforms naive enumeration and has been implemented in SageMath via the GHWs package, which supports full weight hierarchy, relative GHWs, and duality computations:

1
2
3
from GHWs import GHW, hierarchy
C = codes.ReedSolomonCode(GF(13), 10)
hierarchy(C)  # returns [4,5,6,...,13] for this MDS code
Relative GHWs for nested pairs (C1,C2)(C_1, C_2) and higher-weight spectra are computed analogously. Benchmarks show speedups of multiple orders of magnitude for practical code parameters.

3. Explicit Constructions and Formulas for GHWs

Analytic determination of GHWs is achieved in several families via number-theoretic and combinatorial techniques. A general approach for codes defined by trace and defining sets is the formula

dr(CD)=nmax{DH:HFqm, dimFqH=mr}d_r(C_D) = n - \max \{ |D \cap H| : H \leq \mathbb{F}_{q^m},\ \dim_{\mathbb{F}_q} H = m - r \}

(Jian, 2019). In particular, for codes with D={xFq:Trq/p(xd)=0}D = \{x \in \mathbb{F}_q^* : \operatorname{Tr}_{q/p}(x^d) = 0\} and d=1d = 1, this gives for 1rm11 \leq r \leq m-1: dr(CD)=(pm11)(pm1r1)=pm1(1pr),d_r(C_D) = (p^{m-1} - 1) - (p^{m-1-r} - 1) = p^{m-1}(1 - p^{-r}), and CDC_D is (m1)(m-1)-MDS.

For codes with d=(q1)/(p+1)d = (q-1)/(p+1) (with p3(mod4),m/2p \equiv 3 \pmod 4, m/2 odd), the weight hierarchy is given by a two-regime formula, using cyclotomic classes and Gauss periods. Closed-form explicit weight hierarchies are also achieved for classes of reducible and irreducible cyclic codes (Li, 2017, Xiong et al., 2015, Yang et al., 2014), cyclotomic defining set codes (Li, 2017), and codes from quadratic forms (Liu et al., 2022). For projective and higher-order Reed–Muller codes, combinatorial shadow and shortening algorithms yield explicit hierarchies (Ramkumar et al., 2018).

The table below summarizes several key formula types:

Code Family GHW Formula Type Reference
Trace-defining set codes dr=nmaxDHd_r = n - \max |D \cap H| for dimH=mr\dim H = m-r (Jian, 2019)
Irreducible cyclic codes Gauss sum/intersection, two-regime via subfield degree (Yang et al., 2014)
Cyclotomic codes Gauss sum, Gaussian period, or combinatorial intersection (Li, 2017)
Quadratic-form codes Solution count to f(x)=af(x)=a on subspaces (Liu et al., 2022)
Cartesian square-free codes Footprint bound, explicit combinatorics (Carvalho et al., 11 Nov 2025)

4. GHWs in Nonlinear and Almost Affine Codes

The GHW concept extends to almost affine codes, which are sets CFnC \subseteq F^n (F=q|F| = q) with C=qk|C|=q^k such that every puncturing CXC_X to coordinates XX has size qrq^r for some rkr \leq k. The matroid-theoretic framework yields

di(C)=min{X:XrC(X)=i},d_i(C) = \min \{ |X| : |X| - r_{C^*}(X) = i \},

where rCr_{C^*} is the rank of the dual matroid (Johnsen et al., 2016). Wei duality generalizes as

{d1,...,dk}{n+1d1,...,n+1dnk}={1,...,n},\{d_1,...,d_k\} \cup \{n+1-d'_1,...,n+1-d'_{n-k}\} = \{1,...,n\},

where did_i (resp. djd'_j) are the GHWs of CC (resp. its dual). Multilinear codes (block-folded codes) admit a true dual and explicit GHWs, typically di=r(nk)+rid_i = r(n-k) + r i for rank rr.

Trellis complexity, profiles, list- and equivocation thresholds all admit analogues for the almost affine setting, showing the deep generality of GHWs outside strictly linear codes, with the mathematical structure governed by matroid invariants rather than explicit vector spaces.

5. Applications in Coding, Information, and Combinatorics

Generalized Hamming weights control critical performance and security features in modern coding theory:

  • Wiretap Channels (Type II): The rr-th GHW quantifies the minimal symbol positions an adversary needs to fully reconstruct rr bits of the secret (equivocation rate) (Martínez-Peñas, 2015, Jian, 2016). In secret sharing, the GHWs determine the access structure thresholds.
  • Trellis (state) complexity: Minimal state/branch profiles in Viterbi or list decoding are governed by the GHWs, with djd_j controlling the minimal transition set at stage jj (Ramkumar et al., 2018).
  • List-decoding and erasure threshold: GHWs determine the maximal correctable erasures for list-decoding beyond the minimum distance (Lu et al., 30 May 2024).
  • Network and Secure Coding: For both classical and rank-metric codes, GHWs and their analogues determine information leakage and recoverability (Martínez-Peñas, 2015).
  • Algebraic Combinatorics: GHWs are in bijection with initial degrees of symbolic powers of the Stanley–Reisner ideal of the dual matroid, so they encode the combinatorics of circuits and cocircuits and control invariants like the Waldschmidt constant and resurgence (DiPasquale et al., 19 Jun 2024).
  • Quantum Codes: Relative GHWs directly determine the phase-flip and bit-flip error rates of quantum CSS codes constructed from nested pairs (Camps-Moreno et al., 20 Nov 2024).

6. Connections to Algebraic and Matroid Theory

GHWs have deep algebraic and geometric interpretations. For a code CC, the rr-th GHW equals the minimal degree among squarefree monomials in the rr-th symbolic power of the Stanley–Reisner ideal of the dual matroid M(C)M(C^\perp) (DiPasquale et al., 19 Jun 2024). This links GHWs directly to algebraic invariants such as Waldschmidt constants, and underlies various algebraic-combinatorial bounds.

Over binary fields, Betti numbers in the minimal graded free resolution of the test-monomial ideal associated to CC provide sharp formulas for d1d_1 and d2d_2 and upper bounds for higher GHWs (García-Marco et al., 2022). The matroid structure enables subadditivity results for weight hierarchies and allows applications to symbolic powers and projections in projective algebraic geometry.

Current research directions include:

  • Extensions to new code families: Ongoing work employs number-theoretic, combinatorial, and algebraic approaches to determine GHWs for increasingly complex code families, including classes with arbitrary numbers of nonzeroes, codes defined on geometric and projective sets, and matrix-product codes (Xiong et al., 2015, San-José, 16 Jul 2024, Carvalho et al., 11 Nov 2025).
  • Development of efficient algorithms and software: Recent advances in combinatorics, enumeration, and computational algebra have led to practical algorithmic tools for GHW enumeration even for large parameter codes (San-José, 22 Mar 2025).
  • Deeper connections to commutative algebra and algebraic geometry: GHWs now serve as concrete invariants connecting algebraic geometry of matroid configurations to coding-theoretic performance metrics via symbolic Rees algebra generation and degree statistics (DiPasquale et al., 19 Jun 2024).
  • Quantum and network codes: Explicit GHW and relative GHW hierarchies are now used directly in the design of new quantum codes with optimized asymmetric parameters (Camps-Moreno et al., 20 Nov 2024).
  • Generalization to nonlinear and almost affine frameworks: Matroidal methods enable the paper of GHW-like invariants for wide code classes including nonlinear, folded, and multilinear codes (Johnsen et al., 2016).

The known full-weight hierarchies for broad families of codes remain rare and are topics of intensive ongoing research (Jian, 2019, Camps-Moreno et al., 20 Nov 2024). Comprehensive understanding of GHWs governs both the fundamental limits of error-correction and the achievable tradeoffs of information-theoretic security in networked and adversarial communication.

Slide Deck Streamline Icon: https://streamlinehq.com

Whiteboard

Forward Email Streamline Icon: https://streamlinehq.com

Follow Topic

Get notified by email when new papers are published related to Generalized Hamming Weights (GHWs).