Table of Contents
Fetching ...

An algorithm for computing generalized Hamming weights and the Sage package GHWs

Rodrigo San-José

TL;DR

This work addresses the computational challenge of generalized Hamming weights $d_r(C)$ and relative generalized Hamming weights $M_r(C_1,C_2)$ for linear codes by generalizing the Brouwer-Zimmermann algorithm and implementing it in a Sage package, GHWs. The method enumerates subspaces $E eq ext{F}_q^k$ of dimension $r$ in order of increasing $| ext{supp}(E)|$, leveraging multiple information sets and duality to prune search and tighten bounds. Empirical results show substantial speedups over naive definitions across RS, RM, and cyclic codes, with both full and low-memory variants discussed. The open-source tool facilitates practical analysis of weight hierarchies and related parameters for secrecy and quantum-code applications, and the authors outline avenues for further optimizations, particularly for $q=2$ and specific $r$.

Abstract

We generalize the Brouwer-Zimmermann algorithm, which is the most efficient general algorithm for computing the minimum distance of a random linear code, to the case of generalized Hamming weights. We also adapt this algorithm to compute the relative generalized Hamming weights of a nested pair of linear codes. In the package GHWs we provide an implementation of this algorithm in Sage, as well as several other utilities for working with generalized Hamming weights. With this implementation, we show that the proposed algorithm is faster than the naive approach of computing the generalized Hamming weights using the definition.

An algorithm for computing generalized Hamming weights and the Sage package GHWs

TL;DR

This work addresses the computational challenge of generalized Hamming weights and relative generalized Hamming weights for linear codes by generalizing the Brouwer-Zimmermann algorithm and implementing it in a Sage package, GHWs. The method enumerates subspaces of dimension in order of increasing , leveraging multiple information sets and duality to prune search and tighten bounds. Empirical results show substantial speedups over naive definitions across RS, RM, and cyclic codes, with both full and low-memory variants discussed. The open-source tool facilitates practical analysis of weight hierarchies and related parameters for secrecy and quantum-code applications, and the authors outline avenues for further optimizations, particularly for and specific .

Abstract

We generalize the Brouwer-Zimmermann algorithm, which is the most efficient general algorithm for computing the minimum distance of a random linear code, to the case of generalized Hamming weights. We also adapt this algorithm to compute the relative generalized Hamming weights of a nested pair of linear codes. In the package GHWs we provide an implementation of this algorithm in Sage, as well as several other utilities for working with generalized Hamming weights. With this implementation, we show that the proposed algorithm is faster than the naive approach of computing the generalized Hamming weights using the definition.

Paper Structure

This paper contains 10 sections, 5 theorems, 35 equations, 3 figures, 6 tables, 3 algorithms.

Key Result

Theorem 2.3

For an $[n,k]$ linear code $C$ with $k>0$ we have

Figures (3)

  • Figure 1: Semi-logarithmic plots of Tables \ref{['t:changek']} and \ref{['t:changeq']}.
  • Figure 2: Time in seconds to compute the GHWs of some RM codes using GHW and GHW_low_mem.
  • Figure 3: Peak RAM usage of GHW for several RM codes.

Theorems & Definitions (13)

  • Definition 2.1
  • Remark 2.2
  • Theorem 2.3: (Monotonicity)
  • Corollary 2.4: (Generalized Singleton Bound)
  • Theorem 2.5: (Duality)
  • Remark 2.6
  • Definition 2.7
  • Theorem 2.8
  • Remark 2.9
  • Example 2.10
  • ...and 3 more