---
title: Twisted GRS (TGRS) Codes
url: https://www.emergentmind.com/topics/twisted-grs-tgrs-codes
type: topic
---

# Twisted GRS (TGRS) Codes

Twisted GRS (TGRS) Codes are a family of maximum distance separable (MDS) and near-MDS (NMDS) linear codes over finite fields, constructed as extensions of classical Generalized Reed–Solomon (GRS) codes by algebraically "twisting" the message polynomial space. These codes play a central role in algebraic coding theory, yielding large sets of non-GRS MDS codes with explicit algebraic structure, families of Hermitian self-dual codes, near-MDS codes, complementary dual (LCD) codes, and possessing rich duality, error-locator, decoding, and combinatorial properties [2508.02382, 2211.04511].

## 1. Formalism, Construction, and Generator Matrix

A TGRS code is defined by selecting a collection of distinct field elements $\mathbf{a}=(a_1,\dots,a_n)\subset F_q$, a vector of nonzero multipliers $\mathbf{v}=(v_1,\dots,v_n)\in (F_q^*)^n$, and a "twisted" polynomial message space. For the $(+)$–TGRS (“plus-twisted”) case (the archetypal single-twist construction), the polynomial space is
\[
\mathcal{V}_q[x]_k = \left\{f(x) = \sum_{i=0}^{k-1} f_i x^i + \eta f_{k-1} x^k : f_i \in F_q,\, \eta \in F_q^* \right\},
\]
i.e. $f_k$ is algebraically tied to $f_{k-1}$ by the twist parameter $\eta$. The TGRS code is the evaluation code
\[
\mathrm{TGRS}_k(\mathbf{a}, \mathbf{v}, \eta) = \{ (v_1f(a_1), ..., v_n f(a_n)) : f \in \mathcal{V}_q[x]_k \} \subset F_q^n,
\]
with generator matrix $G$ in standard “twisted” form: the first $k-1$ rows are as in GRS, and the $k$-th is $[v_1 (a_1^{k-1}+\eta a_1^{k}), ..., v_n (a_n^{k-1}+\eta a_n^{k})]$ [2508.02382, 2211.04511]. The $(+)$–extended TGRS (ETGRS) code appends the coefficient $f_{k-1}$, yielding an $[n+1,k]$ code.

More general “multi-twist” constructions and arbitrary-twist variants (A-TGRS, $(\mathcal{L},\mathcal{P})$–TGRS) are parameterized by discrete twist sets, hook sets, and matrices, generalizing the single-twist case and subsuming all known TGRS families [2408.12049, 2502.04746].

## 2. MDS and NMDS Property, Weight Distribution

A $(+)$–TGRS $[n,k]$ code is MDS (i.e., minimum Hamming distance $d=n-k+1$) if and only if
\[
-\eta^{-1} \not\in \mathcal{S}_k, \quad\text{where}\quad \mathcal{S}_k = \left\{ \sum_{a_i \in I} a_i : |I|=k\right\} \subset F_q.
\]
Otherwise, the code is NMDS with $d=n-k$.

For the extended TGRS, the analogous condition is
\[
\#\left\{A\subset\{\alpha_i\}:|A|=k,\;\sum_{a\in A}a=-\eta^{-1}\right\}=0
\]
for MDS [2211.04511, 2508.02382]. The entire weight distribution is computed in closed form based on the $k$-subset sum structure [2508.02382].

## 3. Non-GRS Structure and Schur Product

Almost all TGRS/ETGRS codes, when MDS, are not equivalent to any GRS code over $F_q$, as established by explicit Schur square (coordinatewise product) dimension arguments. For $k< \frac{n+1}{2}$,
\[
\dim(\mathcal{C} * \mathcal{C}) = 2k-1 \quad\text{for GRS,}\qquad \dim(\mathcal{C}_{\text{TGRS}} * \mathcal{C}_{\text{TGRS}})\ge 2k.
\]
Dually, the Schur square of the dual has distance 1 for high rates. This property holds for all $3\leq k < n/2$ or $n/2<k\leq n-3$ in TGRS, and for all $3\le k\le n-2$ in ETGRS [2508.02382]. The $(+)$–ETGRS code is not GRS or EGRS for $3 \leq k \leq n-2$ [2211.04511].

## 4. Duality, Self-Dual, and Self-Orthogonal Codes

Euclidean and Hermitian duals of TGRS and ETGRS admit explicit matrix expressions. The dual of ETGRS has a parity-check matrix composed of weighted evaluations and twist-dependent terms [2508.02382, 2211.04511]. Hermitian self-dual TGRS and non-GRS MDS Hermitian self-dual TGRS codes are constructed by special choice of $\eta$ satisfying $\eta^q=-\eta$ over $F_{q^2}$, yielding two major explicit classes [2508.02382]. There are no Galois self-dual ETGRS codes of length $n+1$ and dimension $(n+1)/2$.

For $(+)$–TGRS with even $q$ and suitable parameters, self-dual and almost self-dual families exist by choice of evaluation set and twisting values. Explicit criteria (based on evaluation point sum) and construction algorithms guarantee self-duality and prescribe multipliers [2211.04511].

## 5. Decoding Algorithms: Error-Correcting Pairs, Gaussian Elimination, List Decoding

Decoding TGRS and ETGRS codes employs algebraic error-correcting pairs (ECPs) and enables fast decoding. ETGRS codes always admit suitable ECPs: if $n-k$ is odd, an $(n-k-1)/2$–ECP exists; if even, an $(n-k)/2$–ECP. This allows polynomial-time (often $O(n^3)$) decoders correcting up to half the minimum distance. MDS $(+)$–TGRS codes with $n=4\ell,\,k=2\ell$ do not admit $\ell$–ECPs, distinguishing them from GRS [2508.02382]. Decoders based on Gaussian elimination solve certain structured polynomial systems associated with received words for both MDS and NMDS TGRS codes [2508.03552]. Complexity compares favorably to classical polynomial-time GRS decoders, and handles arbitrary twist positions.

There is no unique decoding algorithm based on ECPs for MDS $(+)$–TGRS codes when certain symmetry conditions are met, as any such would incorrectly imply GRS equivalence [2508.02382]. 

## 6. Covering Radius, Deep Holes, and Extension Theory

For MDS TGRS codes, the covering radius of the dual code is exactly $k$ (the code dimension), and explicit $F_q$-affine families of deep holes are described. The $(+)$–ETGRS code can be interpreted as a second extension of $(+)$–TGRS and remains MDS if and only if a vector appended is a deep hole. The duals of TGRS codes constructed by Han and Zhang are shown to have covering radius $k$ and a complete family of deep holes via affine shifts [2508.02382]. This completes the analysis of maximal-likelihood decoding and geometric structure for non-GRS MDS codes in the TGRS/ETGRS family.

## 7. Concrete Examples and Practical Implications

Explicit small-field examples demonstrate all phenomena, including MDS/NMDS status, non-GRS nature, construction of ECPs and execution of decoding algorithms, and enumeration of deep holes. For instance, for $q=11$, $n=6$, $k=3$, $\mathbf{a} = \{2,5,7,9,10,12\}\subset F_{13}$, $\mathbf{v} = \mathbf{1}$, $\eta=1$, $-\eta^{-1}=12 \notin \mathcal{S}_3$, so $\mathrm{TGRS}_3$ is $[6,3,4]$–MDS and not GRS by Schur-square computation [2508.02382].

### Table: Key Theoretical Properties of $(+)$–TGRS and ETGRS Codes

| Property                | Conditions                                      | Reference Section      |
|-------------------------|-------------------------------------------------|-----------------------|
| MDS                     | $-\eta^{-1}\notin \mathcal{S}_k$                | [2508.02382, §3]      |
| Non-GRS MDS             | $3\leq k<n/2$ or $n/2<k\leq n-3$                | [2508.02382, §4]      |
| Hermitian self-dual MDS | $\eta^q=-\eta$ (over $F_{q^2}$), explicit sets  | [2508.02382, §5]      |
| Dual code structure     | Explicit parity-check matrix incl. twist terms   | [2508.02382, §6]      |
| ECP-based decoding      | ECP exists for ETGRS for all $k$                | [2508.02382, §7]      |
| Covering radius         | $\rho(\mathrm{TGRS}_k^*)=k$                     | [2508.02382, §8]      |

## References

- “Properties and Decoding of Twisted GRS Codes and Their Extensions” [2508.02382]
- “The $(+)$-extended twisted generalized Reed-Solomon code” [2211.04511]

Source: https://www.emergentmind.com/topics/twisted-grs-tgrs-codes