---
title: AFER-Optimal Linear Codes
url: https://www.emergentmind.com/topics/afer-optimal-linear-codes
type: topic
---

# AFER-Optimal Linear Codes

AFER-optimal linear codes are optimal linear codes whose **error coefficients** are as small as possible. For a linear \([n,k,d]_q\) code \(C\), the error coefficient is the number \(A_d(C)\) of minimum-weight codewords, and over the additive white Gaussian noise channel under maximum likelihood decoding the high-SNR frame error rate satisfies
\[
P_e \simeq A_d(C)\, Q\!\left(\sqrt{\frac{2 d k E_b}{n N_0}}\right).
\]
Consequently, among all distance-optimal \([n,k,d(n,k,q)]_q\) codes, those with the smallest \(A_d\) achieve the best possible asymptotic frame error rate; these are the AFER-optimal linear codes [2507.05567].

## 1. Definition and performance criterion

For a \(q\)-ary linear code \(C\subseteq \mathbb{F}_q^n\), the minimum distance is
\[
d(C)=\min\{wt(\mathbf{c}) : \mathbf{c}\in C\setminus\{\mathbf{0}\}\},
\]
and the weight distribution is given by
\[
A_i(C)=|\{\mathbf{c}\in C: wt(\mathbf{c})=i\}|.
\]
The **error coefficient** is
\[
e(C)=A_{d(C)}(C).
\]
When parameters are fixed, the paper on error coefficients writes a code as \([n,k,d;e]_q\) to emphasize this quantity [2507.05567].

AFER-optimality is a refinement of distance-optimality. If \(d(n,k,q)\) denotes the largest minimum distance among all \([n,k]_q\) linear codes, then an \([n,k,d(n,k,q)]_q\) code is distance-optimal. Among those distance-optimal codes, define \(e(n,k,q)\) to be the smallest attainable error coefficient. A code is AFER-optimal precisely when it achieves this minimum. This distinction matters because two codes may have the same \((n,k,d)\) and therefore the same dominant Euclidean exponent over AWGN, but different \(A_d\), hence different asymptotic frame error rates [2507.05567].

A common conflation is to treat “best minimum distance” and “best AFER” as identical notions. They are not identical. The 2025 error-coefficient study makes the distinction explicit: optimality in \(d\) is only the first layer, whereas AFER-optimality additionally minimizes the multiplicity of minimum-weight codewords [2507.05567].

## 2. Griesmer optimality and related notions

The principal structural bound in this area is the **Griesmer bound**
\[
n \ge g_q(k,d):=\sum_{i=0}^{k-1}\left\lceil \frac{d}{q^i}\right\rceil.
\]
A code meeting this bound is a **Griesmer code**, and its **Griesmer defect** is
\[
g(C)=n-g_q(k,d).
\]
A **near Griesmer code** satisfies \(n-1=g_q(k,d)\). In one 2024 construction paper, “AFER-optimal code” is used for codes with small positive Griesmer defect that are still optimal or almost optimal for given \((n,k)\) [2406.10825].

The surrounding literature uses several closely related notions. A code is **optimal** if there is no \([n,k,d+1]_q\) code; it is **almost optimal** if there exists an \([n,k,d+1]_q\) code but no \([n,k,d+2]_q\) code; and it is **near optimal** if there exists an \([n,k,d+2]_q\) code but no \([n,k,d+3]_q\) code [2406.10825]. Another subfield-based study uses the same distance-optimal and almost distance-optimal terminology and shows that a near Griesmer code is distance-optimal when \(q\mid d\), and almost distance-optimal when \(q\nmid d\) [2108.09428].

| Notion | Criterion | Context |
|---|---|---|
| AFER-optimal | minimizes \(A_d\) among optimal \([n,k]_q\) codes | AWGN, ML decoding |
| Griesmer code | \(n=g_q(k,d)\) | length–distance optimality |
| Near Griesmer | \(n-1=g_q(k,d)\) | one unit from Griesmer |
| Distance-optimal | no \([n,k,d+1]_q\) code exists | fixed \((n,k,q)\) |
| Almost optimal | \([n,k,d+1]_q\) exists but no \([n,k,d+2]_q\) code exists | fixed \((n,k,q)\) |

This vocabulary is central because AFER-optimality is typically studied inside the class of distance-optimal or Griesmer-optimal codes rather than across arbitrary linear codes [2507.05567].

## 3. Error-coefficient lower bounds and small-dimension classification

Establishing tight lower bounds on \(A_d\) for Griesmer optimal codes is difficult, and the 2025 study states that the linear programming bound often performs inadequately [2507.05567]. Its main contribution is a family of **five iterative lower bounds** for error coefficients, derived from residual codes, Griesmer subcode chains, and finite-geometry objects called minihypers.

One starting point is the residual-code mechanism. For an optimal \([n,k,d]_q\) code \(C\), puncturing on the support of a minimum-weight codeword produces a residual code with parameters \([n-d,k-1,\ge \lceil d/q\rceil]_q\), and the minimum-weight codewords in the residual lift to structured families of minimum-weight codewords in \(C\). This yields the first iterative lower bound \(L_q^{(1)}(n,k)\) in terms of \(e_{\lceil d/q\rceil}(n-d,k-1,q)\) [2507.05567].

For Griesmer optimal codes, the paper introduces \(\Gamma_q(n,k,d)\), which measures how tightly a code is constrained by the Griesmer bound at intermediate dimensions. If \(\Gamma_q(n,k,d)<k\), then \(q\mid d\), and one obtains a simpler lower bound
\[
A_d(C)\ge L_q^{(2)}(n,k):=e(n-d-1,k-1,q).
\]
A stronger family of bounds \(L_q^{(3)}\) and \(L_q^{(4)}\) combines residual codes with nested chains
\[
C_1\subset C_2\subset \cdots \subset C_{k_1}\subset C
\]
of Griesmer subcodes, where \(n(C_i)=g_q(i,d)\). A fifth bound \(L_q^{(5)}\) uses the correspondence between Griesmer codes and minihypers in projective space; if the associated minihyper has maximum rank \(k'<k\), then
\[
A_d(C)\ge q^{k-k'}\, e\bigl(n+s v_{k'}-s v_k,\; k',\; q\bigr),
\]
with \(s=\left\lceil d/q^{k-1}\right\rceil\) and \(v_k=(q^k-1)/(q-1)\) [2507.05567].

For binary codes these bounds are especially effective. The paper states that they are tight in most cases when the dimension does not exceed \(5\), and for the remaining \(5\)-dimensional AFER-optimal linear codes the gap between the lower bound and the actual error coefficient is less than or equal to \(2\) [2507.05567]. It also gives a complete \(2\)-dimensional classification:
\[
[s(q+1)+t+1,\,2,\,sq+t]_q
\]
with error coefficient \((q-1)(t+1)\), and tabulates binary AFER-optimal families in dimensions \(3\), \(4\), and \(5\), including sequences such as \([7s_1,3,4s_1;7]_2\), \([15s_1,4,8s_1;15]_2\), and \([31s_1,5,16s_1;31]_2\) [2507.05567].

This classification clarifies an important point: the Griesmer bound certifies distance optimality or length efficiency, but AFER-optimality requires additional control of the weight enumerator at the minimum distance.

## 4. Anticode duality and the antiGriesmer viewpoint

A complementary route to AFER-relevant constructions comes from **projective linear anticodes**. A linear anticode is a linear code viewed through its maximum weight rather than its minimum distance, and for a projective linear \([n,k]_q\) code \(C\) with \(n<q^{k-1}\), the 2024 anticode paper proves the **antiGriesmer bound**
\[
\sum_{i=0}^{k-1}\left\lfloor \frac{\delta(C)}{q^i}\right\rfloor \ge n,
\]
where \(\delta(C)\) is the maximum weight. A corollary is
\[
\delta(C)\ge \frac{q-1}{q}\,n.
\]
The authors define the **antiGriesmer defect**
\[
S(C):=\sum_{i=0}^{k-1}\left\lfloor \frac{\delta(C)}{q^i}\right\rfloor - n,
\]
and show a duality with the usual Griesmer defect through complementary codes inside the simplex code [2406.07112].

If \(C^*\) denotes the complementary code of a projective anticode \(C\), then
\[
C^* \text{ has parameters } \left[\frac{q^k-1}{q-1}-n,\ k,\ q^{k-1}-\delta(C)\right]_q,
\]
and \(C^*\) is a Griesmer code if and only if \(C\) is an antiGriesmer code. The same paper further shows that a projective \(t\)-weight code yields both a complementary \(t\)-weight code and, for larger ambient dimension, a \((t+1)\)-weight code with explicitly transformed weights and multiplicities [2406.07112].

The paper explicitly frames this as an AFER-like mechanism: if a projective anticode comes close to the antiGriesmer lower bound, then its complementary code comes close to the Griesmer bound and often has optimal or almost optimal minimum distance. This suggests an indirect strategy for producing AFER-optimal candidates: optimize maximum weight on the anticode side, then transfer the structure to a small-defect distance-optimal few-weight code on the code side [2406.07112].

## 5. Constructive families of Griesmer, near-Griesmer, and distance-optimal codes

Several recent construction programs produce the kinds of codes from which AFER-optimal examples are expected to emerge.

The affine and modified affine Solomon–Stiffler framework gives infinite families of \(q\)-ary Griesmer, optimal, almost optimal two-weight, three-weight, four-weight, and five-weight linear codes, with explicit weight distributions. It reconstructs many optimal linear codes in Grassl’s list and shows that codimension-one or codimension-two subcodes of Griesmer codes are distance-optimal with Griesmer defect \(1\) or \(2\) [2406.10825].

A ring-based simplicial-complex construction over \(\mathbb{F}_q+u\mathbb{F}_q\) yields four families of trace codes whose Gray images over \(\mathbb{F}_q\) include near-Griesmer and distance-optimal codes. The paper gives, for example, a binary two-weight Griesmer code
\[
[2^{2m-1},\,2m,\,2^{2m-2}]_2,
\]
and distance-optimal families such as \([420,8,208]_2\), \([196,7,96]_2\), and near-Griesmer \([384,8,192]_2\) [2407.10074].

Subfield-based constructions from complements of unions of subfields or subfield cosets produce infinite families of optimal linear codes, including Griesmer and near-Griesmer codes, together with completely determined weight distributions. Examples include \([56,6,28]_2\), \([64,4,42]_3\), \([117,5,78]_3\), and \([225,8,112]_2\); many are also self-orthogonal or minimal [2108.09428].

Projective codes from simplicial complexes over \(\mathbb{F}_q^m\) provide a general defining-set framework in which the parameters and complete weight distribution are computable from the maximal supports of the simplicial complex. In the cases of one, two, and three maximal elements, the resulting codes are at most \(2\)-weight, \(5\)-weight, and \(19\)-weight, respectively, and the paper gives necessary and sufficient conditions for Griesmer optimality, a special criterion for near-Griesmerity, and sufficient conditions for distance-optimality [2305.07206].

| Construction program | Typical optimality outcome | Sample parameters |
|---|---|---|
| Affine Solomon–Stiffler | Griesmer, optimal, almost optimal | \([20,5,9]_2\), \([208,5,138]_3\) |
| Gray images from simplicial complexes over \(\mathbb{F}_q+u\mathbb{F}_q\) | Griesmer, near-Griesmer, distance-optimal | \([128,8,64]_2\), \([384,8,192]_2\) |
| Subfield-based defining sets | Griesmer, near Griesmer, distance-optimal | \([56,6,28]_2\), \([117,5,78]_3\) |
| Projective simplicial-complex codes | Griesmer, near Griesmer, distance-optimal | \([117,5,78]_3\), \([113,5,75]_3\) |

These families do not by themselves prove AFER-optimality in the narrow 2025 sense, because that requires minimizing \(A_d\) among all distance-optimal codes. They nevertheless supply a large reservoir of candidates with small Griesmer defect, controlled few-weight spectra, and explicit weight enumerators, which is precisely the structural information needed for error-coefficient analysis.

## 6. Scope, adjacent meanings, and common misconceptions

The phrase “AFER-optimal linear codes” is not used uniformly across coding theory. In the narrow sense established by the 2025 error-coefficient paper, it refers to optimal linear codes with the smallest error coefficients, hence the best asymptotic frame error rate under maximum likelihood decoding on AWGN [2507.05567].

In related areas, “optimality” refers to different criteria. For binary constant-weight codes constructed from \(\mathrm{AGL}(1,\mathbb{F}_q)\), optimality means meeting the Johnson bound, and the resulting codes are not necessarily linear over \(\mathbb{F}_2\); the paper explicitly says that the optimality there is combinatorial rather than algebraic [1707.02315]. For locally repairable codes with all-symbol \((r,\delta)\)-locality, an optimal code is one that attains
\[
d = n-k+1-\left(\left\lceil\frac{k}{r}\right\rceil-1\right)(\delta-1),
\]
the maximum global minimum distance compatible with locality constraints [1307.1961]. For adversarial erasure codes and codes on graphs, optimality means approaching the Singleton bound or the row/column-erasure capacity trade-off, such as rate \(1-\delta-\eta\) for erasure-code families or rate \((1-\alpha)(1-\beta)(1-\eta)\) for bipartite graph codes [2504.03090].

A plausible implication is that “AFER-optimal” functions as a family resemblance term across several subliteratures, all centered on extremal distance-performance trade-offs. The strict technical meaning, however, is narrower: it is the minimization of \(A_d\) inside the class of optimal linear codes. Distance-optimality, Griesmer optimality, Johnson optimality, locality optimality, and erasure-capacity optimality are therefore related but not interchangeable notions.

Source: https://www.emergentmind.com/topics/afer-optimal-linear-codes