---
title: 'Extended Han-Zhang Codes: MDS/NMDS Dichotomy'
url: https://www.emergentmind.com/topics/extended-han-zhang-codes
type: topic
---

# Extended Han-Zhang Codes: MDS/NMDS Dichotomy

Searching arXiv for recent papers on extended Han-Zhang codes and related constructions.
Extended Han-Zhang codes are a class of linear codes defined by a one-coordinate extension of a constrained polynomial-evaluation space. In the formulation studied in 2025, each code in the family is either a non-generalized Reed-Solomon maximum distance separable code or a near-MDS code, and the family is analyzed through $\ell$-error-correcting pairs, covering radii, and deep holes. The same line of work also shows how deep holes can be used to construct further non-GRS MDS codes and to clarify when the resulting extensions are monomially equivalent to Roth-Lempel codes [2508.18845].

## 1. Definition and algebraic form

Let $\mathcal{A}=\{a_1,\ldots,a_n\}\subseteq \mathbb{F}_q$ be an evaluation-point sequence and let $\mathbf{v}=(v_1,\ldots,v_n)\in (\mathbb{F}_q^*)^n$. The extended Han-Zhang code is
\[
\mathcal{C}_k(\mathcal{A}, \mathbf{v}, \infty)
=
\big\{ (v_1 f(a_1), \ldots, v_n f(a_n), f_k) : f(x)\in \mathcal{V}_k \big\},
\]
where
\[
\mathcal{V}_k
=
\left\{
f(x)=\sum_{i=0}^{k-2} f_i x^i + f_k x^k : f_i\in \mathbb{F}_q
\right\}.
\]
Its length is $n+1$, and its dimension is $k$ [2508.18845].

The defining feature is the omission of the $x^{k-1}$ term from the message space together with the addition of the coefficient $f_k$ as the final coordinate. This places the family close to evaluation-code constructions while preventing it from collapsing to a standard GRS representation. The associated structural question is not whether the code is evaluation-based, but whether the evaluation set $\mathcal{A}$ satisfies the combinatorial condition governing the MDS/NMDS transition.

A central organizing principle is whether $\mathcal{A}$ is $k$-zero-sum free or contains a $k$-zero-sum subset. In the literature on this family, that dichotomy completely determines whether the code lies on the MDS side or on the NMDS side of the construction.

## 2. MDS/NMDS dichotomy and non-GRS status

The basic classification is explicit. If $\mathcal{A}$ is $k$-zero-sum free, then $\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty)$ is an $[n+1,k,n-k+2]_q$ non-GRS MDS code. If $\mathcal{A}$ contains a $k$-zero-sum subset, then it is an $[n+1,k,n-k+1]_q$ NMDS code. The same source states that all extended Han-Zhang codes are not monomially equivalent to GRS codes [2508.18845].

This dichotomy is unusually sharp. The family does not interpolate among many distance regimes: it lands exactly in one of two classes, MDS or NMDS. For code classification, this is significant because non-GRS MDS families are comparatively rare, while NMDS families are structurally close to the Singleton boundary and often admit explicit weight and dual-structure analysis.

A plausible implication is that the family is useful as a controlled testbed for studying the transition between strict Singleton optimality and Singleton defect one. That interpretation is consistent with the later use of covering-radius and deep-hole arguments, which rely on the extension preserving strong distance structure rather than merely improving minimum distance heuristically.

## 3. Error-correcting pairs and polynomial-time decoding

The 2025 decoding work studies extended Han-Zhang codes via $\ell$-error-correcting pairs. For an $[n,k]_q$ linear code $\mathcal{C}$, an $\ell$-ECP is a pair of length-$n$ codes $(\mathcal{A},\mathcal{B})$ satisfying
1. $\mathcal{A}\star \mathcal{B}\subseteq \mathcal{C}^\perp$,
2. $d(\mathcal{B}^\perp)>\ell$,
3. $\dim(\mathcal{A})>\ell$,
4. $d(\mathcal{A})+d(\mathcal{C})>n$,
with $\star$ denoting the coordinate-wise Schur product. The decoding radius is taken as
\[
\ell=\left\lfloor \frac{d(\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty))-1}{2}\right\rfloor.
\]
The existence and precise form of the relevant ECPs depend on both the MDS/NMDS status and the parity of $n-k$ [2508.18845].

When $\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty)$ is MDS and $2\nmid (n-k)$, the code has only $(\ell-1)$-ECPs, not full $\ell$-ECPs. In that case one such pair is
\[
\mathcal{A}=\mathsf{GRS}_{\ell}(\mathcal{A}', \mathbf{1}),\qquad
\mathcal{B}=\mathsf{GRS}_{\ell-1}(\mathcal{A}', (\mathbf{v}')^{-1}\star \mathbf{u}').
\]
If $2\mid (n-k)$, then the code admits an $\ell$-ECP of the form
\[
\mathcal{A}=\mathsf{EGRS}_{\ell+1}(\mathcal{A}, \mathbf{1}, \infty),
\]
\[
\mathcal{B}=\mathsf{EGRS}_{\ell}(\mathcal{A}, \mathbf{v}^{-1}\star \mathbf{u}, \infty)\cdot (\underbrace{1,\ldots,1}_n,-1).
\]

When $\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty)$ is NMDS and $2\nmid (n-k)$, there exists an $\ell$-ECP with
\[
\mathcal{A}=\{ (f(a_1),\ldots,f(a_n),0): f(x)\in \mathbb{F}_q[x]_{\ell+1} \},
\qquad
\mathcal{B}=\mathsf{EGRS}_{\ell}(\mathcal{A}, \mathbf{v}^{-1}\star \mathbf{u}, \infty).
\]
If $2\mid (n-k)$, the same $\ell$-ECP form as in the MDS even case applies.

These ECPs lead to an explicit decoding algorithm, presented as Algorithm 1, that corrects up to $\ell$ errors in polynomial time, with $\ell$ about half of the minimum distance. The algorithm computes the syndrome, sets up the matrices prescribed by the relevant ECP, solves a linear system to obtain an error-locator vector, extracts the error support from its zeros, reconstructs the error values through syndrome equations, and then corrects the received word. Its complexity is $O(n^3)$ [2508.18845].

The decoding theory is important for two reasons. First, it gives the first explicit decoding algorithms for extended Han-Zhang codes. Second, it shows that the family is not only structurally interesting as a source of non-GRS MDS and NMDS codes, but also algorithmically accessible through standard algebraic-decoding primitives adapted to its non-GRS geometry.

## 4. Covering radius and deep holes

The covering radius of the family is completely determined:
\[
\rho(\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty))=n-k+1.
\]
This holds for all instances, MDS or NMDS [2508.18845].

Deep holes are characterized through an extension criterion. A vector $\mathbf{u}\in \mathbb{F}_q^{n+1}$ is a deep hole if and only if the code generated by adding $\mathbf{u}$ as a new row to the generator matrix of $\mathcal{C}_k(\mathcal{A},\mathbf{v},\infty)$ is an $[n+1,k+1,n-k+1]_q$ MDS code [2508.18845]. This criterion converts a nearest-codeword extremal problem into an MDS-extension problem.

Two explicit deep-hole classes are given. For
\[
g(x)=g_{k-1}x^{k-1}+f(x),
\qquad g_{k-1}\neq 0,\quad f(x)\in \mathcal{V}_k,
\]
the vector
\[
(v_1g(a_1),\ldots,v_ng(a_n),u_{n+1}v_{n+1})
\]
is a deep hole if and only if either $u_{n+1}v_{n+1}=f_k$, or $u_{n+1}v_{n+1}\neq f_k$ and $\mathcal{A}$ is an $(n,k,g_{k-1}(u_{n+1}v_{n+1}-f_k)^{-1})$-set. For
\[
g(x)=g_{k+1}x^{k+1}+g_{k-1}x^{k-1}+f(x),
\qquad g_{k+1}\neq 0,
\]
the criterion is expressed through the absence of certain parameter values in a set constructed from the elementary symmetric polynomials of subsets of $\mathcal{A}$ [2508.18845].

These results connect extended Han-Zhang codes directly to maximum-likelihood decoding. Deep holes are the worst-case points for MLD, so their explicit determination gives structural information about the extremal geometry of the code, not merely its unique-decoding region.

## 5. Construction of larger non-GRS MDS codes and Roth-Lempel relations

The deep-hole characterization yields a constructive mechanism. By augmenting the generator matrix with a deep hole, one obtains a new code with parameters $[n+2,k+1,n-k+2]_q$, and this new code is non-GRS MDS [2508.18845].

The resulting codes are not uniform with respect to equivalence. In some cases, notably when the deep hole is associated to $g(x)=g_{k-1}x^{k-1}+f(x)$ and the parameter fits, the new codes are monomially equivalent to Roth-Lempel codes
\[
\mathrm{RL}_{k+1,0}(\mathcal{A}).
\]
In other explicit cases they are not monomially equivalent to Roth-Lempel codes, so they furnish genuinely new non-GRS MDS examples [2508.18845].

This aspect places extended Han-Zhang codes at a junction between extension theory and the classification of non-GRS MDS families. The deep-hole method does not simply repackage a known RL construction; depending on the parameter regime, it either recovers an RL-equivalent code or escapes the RL equivalence class. That distinction matters in classification problems, where monomial equivalence is the operative notion of sameness.

## 6. Related constructions and broader coding-theoretic context

Several contemporaneous papers place extended Han-Zhang codes within a broader landscape of generalized Roth-Lempel and twisted-evaluation constructions. In the study of $(+)$-TGRS and $(+)$-ETGRS codes, every such code is either MDS or NMDS, and all $[n+1,k]$ MDS ETGRS codes are non-GRS; the same work also gives an explicit $O(n^3)$ decoding algorithm for ETGRS codes and determines covering radii and a class of deep holes for the duals of TGRS codes, including Han-Zhang codes [2508.02382]. This suggests a close structural affinity between extended Han-Zhang codes and other twisted evaluation families that are governed by the same MDS/NMDS dichotomy.

Generalized Roth-Lempel work enlarges the corresponding hook-matrix viewpoint. One paper replaces the fixed matrix
\[
M_0=\begin{pmatrix}0&1\\1&0\end{pmatrix}
\]
with any invertible $2\times 2$ matrix $M_{2\times 2}\in \mathrm{GL}_2(\mathbb{F}_q)$, obtaining two classes of NMDS codes from generalized RL generator matrices and completely determining their weight distributions. In that framework, setting $M_{2\times 2}=M_0$ recovers Han and Fan or Zhang and Zheng codes [2506.19346]. A subsequent paper defines extended generalized Roth-Lempel codes and shows that, for $\ell=2$, $t=0$, $\boldsymbol{\alpha}=\mathbb{F}_q^*$, $\boldsymbol{v}=\boldsymbol{1}$, $b=1$, and
\[
\boldsymbol{M}_{2\times 2}=\begin{pmatrix}0&1\\1&0\end{pmatrix},
\]
the resulting code is monomially equivalent to Han-Zhang’s 2023 construction; it also establishes MDS/AMDS criteria and completely determines the weight distribution of a class of NMDS EGRL codes [2508.12302].

A different but related usage appears in the literature on generalized and extended product codes. There, Extended Han-Zhang codes are described as optimal codes that maximize erasure correction with two or a few extra global parities added to product codes, and can be viewed as optimal EPC codes in the $EP(m,1;n,1;g)$ format, matching the minimum-distance upper bound and using field sizes at least $mn$ [1610.04273]. This does not duplicate the polynomial-evaluation definition above, but it shows that the term has also been used in a parity-augmented product-code setting.

Taken together, these results position extended Han-Zhang codes within a dense cluster of non-GRS MDS, NMDS, RL-type, and extended-evaluation constructions. Their distinctive features are the rigid MDS/NMDS bifurcation, explicit ECP-based decoding, complete covering-radius determination, and the use of deep holes as a mechanism for producing larger non-GRS MDS codes.

Source: https://www.emergentmind.com/topics/extended-han-zhang-codes