---
title: First-Order Generalized Reed–Muller Codes
url: https://www.emergentmind.com/topics/first-order-generalized-reed-muller-codes
type: topic
---

# First-Order Generalized Reed–Muller Codes

First-order generalized Reed–Muller codes are the \(q\)-ary linear codes obtained by evaluating all affine functions on \(\mathbb{F}_q^m\). In one standard notation,
\[
\mathrm{RM}_q(1,m)=\{\Eval(f): f\in \mathbb{F}_q[x_1,\dots,x_m],\ \deg(f)\le 1\},
\]
while equivalent formulations write the same family as \(R_q(1,m)\) or \(C_1(m,q)\), depending on whether the emphasis is on evaluation, affine-invariant, cyclic, or modular-algebra realizations. In the full-length form the code has length \(q^m\), dimension \(m+1\), and minimum distance \(q^{m-1}(q-1)\); in the binary specialization \(\mathrm{RM}(1,m)\) these become \([2^m,1+m,2^{m-1}]\), and the punctured or primitive version of length \(q^m-1\) is frequently used in cyclic and affine-invariant treatments [1512.04788][2401.16911][1601.07633].

## 1. Definition, parameters, and notation

Let \(V=\mathbb{F}_q^m\). A first-order generalized Reed–Muller codeword is the evaluation vector of an affine function
\[
g_{v,t}(u)=(u,v)+t,\qquad v\in\mathbb{F}_q^m,\ t\in\mathbb{F}_q,
\]
over all \(u\in\mathbb{F}_q^m\). The resulting code is the set of all affine maps on \(V\), and its most basic parameters are therefore determined by the \(m\) linear coefficients together with one constant coefficient: the dimension is \(m+1\), the length is \(q^m\), and the minimum distance is \(q^{m-1}(q-1)\) [1512.04788][1601.07633].

Several notational conventions coexist. The full evaluation code is commonly written \(\mathrm{RM}_q(1,m)\). In affine-invariant and cyclic formulations, the primitive version is written \(R_q(1,m)\) and has length \(n=q^m-1\). In that setting the code is described as an affine-invariant code in \(\mathbb{F}_qG\), where \(G\) is the additive group of \(\mathbb{F}_{q^m}\), with defining set
\[
D(R_q(1,m))=\{0\le i<n\mid {\rm wt}_q(i)<m(q-1)-1\},
\]
dimension \(m+1\), minimum distance \(q^{m-1}(q-1)\), and dual
\[
R_q(1,m)^\perp=R_q(m(q-1)-2,m).
\]
This punctured/primitive description is the one used in recent work on information sets and permutation decoding [2509.11757].

The binary specialization is exceptionally rigid. The first-order Reed–Muller code \(R(1,m)\) is a binary linear \([2^m,1+m,2^{m-1}]\) code, and any binary linear code with these parameters is equivalent to the first-order Reed–Muller code. The punctured code is the binary Simplex code, its dual is the Hamming code, and the full code has weight distribution consisting of one all-zero codeword, one all-one codeword, and \(2(2^m-1)\) codewords of weight \(2^{m-1}\) [0901.2062].

## 2. Algebraic realizations and structural descriptions

A central feature of first-order generalized Reed–Muller codes is that they admit several mutually compatible algebraic descriptions. In the affine-invariant viewpoint, the code is determined by its defining set and is naturally related to punctured cyclic codes and multidimensional abelian codes. For first-order codes the defining set structure simplifies substantially: in recent constructions of information sets, the first-order case is singled out precisely because the defining set is governed by indices of \(q\)-weight less than \(m(q-1)-1\), and this permits direct constructions in terms of the basic parameters \(q\), \(m\), and factorizations of \(q^m-1\) [2401.16911][2401.10109].

A second formulation places generalized Reed–Muller codes inside a modular algebra
\[
A=F_q[X_1,\dots,X_m]/(X_1^q-1,\dots,X_m^q-1),
\]
whose radical \(M=\operatorname{Rad}(A)\) is generated by the classes \(x_i-1\). Over a prime field \(F_p\), the classical Berman–Charpin identification holds:
\[
C_v(m,p)=M^{m(p-1)-v}.
\]
Hence, in the prime-field case the first-order code satisfies
\[
C_1(m,p)=M^{m(p-1)-1}.
\]
Over non-prime fields \(q=p^r\) with \(r>1\), however, the identification with radical powers fails in general: only
\[
M^{m(q-1)}=C_0(m,q),\qquad M=C_{m(q-1)-1}(m,q),\qquad M^0=C_{m(q-1)}(m,q)
\]
remain valid, and \(C_1(m,q)\neq M^{m(q-1)-1}\) in general. This distinction is one of the principal algebraic differences between prime-field and non-prime-field first-order generalized Reed–Muller codes [1601.07633].

A closely related group-algebra formulation uses
\[
R=\mathbb{F}_{p^r}[G],
\]
where \(G\) is the additive group of a Galois ring. In this setting the first-order code \(C_1(m,q)\) is the image, under a linear map \(\phi\), of the ideal generated by
\[
f_1(z)=\prod_{0<w_q(i)\le m(q-1)-1}(z-y^i),
\]
and a basis is given by
\[
K_1=\{\theta_0,\theta_1,\dots,\theta_{N(m(q-1)-1)-1}\},\qquad \theta_j=\phi(z^j f_1(z)).
\]
The same framework also provides the Jennings monomials
\[
V_i=(X_0-1)^{i_0}\cdots (X_{m-1}-1)^{i_{m-1}},
\]
which organize the radical powers and clarify why the first-order code generally fails to coincide with the full radical outside the prime-field case [1609.09531].

## 3. Enumerators, Jacobi polynomials, and design-theoretic properties

The shells
\[
C_l=\{c\in C\mid \mathrm{wt}(c)=l\}
\]
of first-order generalized Reed–Muller codes have been studied through refined enumerator polynomials. For a code \(C\) of length \(n\) and a subset \(T\subset [n]\), the Jacobi polynomial is
\[
J_{C,T}(w,z,x,y)=\sum_{c\in C} w^{m_0(c)} z^{m_1(c)} x^{n_0(c)} y^{n_1(c)},
\]
where \(m_0,m_1\) count zero and nonzero entries on \(T\), and \(n_0,n_1\) count zero and nonzero entries on the complement of \(T\). For linear codes there is a MacWilliams-type relation
\[
J_{C^\perp,T}(w,z,x,y)=\frac{1}{|C|}J_{C,T}(w+(q-1)z,w-z,x+(q-1)y,x-y),
\]
and a shell \(C_l\) is a combinatorial \(t\)-design if and only if the coefficient of \(z^t x^{n-t} y^{l-t}\) in \(J_{C,T}\) is independent of \(T\) with \(|T|=t\) [2309.01119].

For first-order \(q\)-ary generalized Reed–Muller codes, explicit Jacobi polynomials have been obtained for \(|T|=2,3,4\). The principal consequence is a sharp design-theoretic boundary. The shells are combinatorial \(2\)-designs for any weight, but if \(q\ge 3\) and \(m\ge 2\), then for every \(l\) the shell \(C_l\) is not a combinatorial \(3\)-design. The same work also identifies refined nonuniform design behavior: for the shell of weight \((q-1)q^{m-1}\), the shell is a combinatorial \(3\text{-}(v,k,(\lambda_1,\lambda_2))\)-design and similarly a combinatorial \(4\text{-}(v,k,(\lambda_1,\lambda_2,\lambda_3,\lambda_4))\)-design, but not a uniform \(3\)- or \(4\)-design [2309.01119].

In the binary case, Jacobi polynomials and harmonic weight enumerators have been computed explicitly for \(\mathrm{RM}(1,m)\) and for its dual, the extended Hamming code \(H_{2^m}\). The harmonic weight enumerator associated with a harmonic function \(f\) of degree \(k\) is
\[
W_{C,f}(x,y)=\sum_{c\in C} f(c)\,x^{n-\mathrm{wt}(c)}y^{\mathrm{wt}(c)},
\]
and satisfies a MacWilliams relation of the form
\[
W_{C,f}(x,y)=(xy)^k Z_{C,f}(x,y),\qquad Z_{C^\perp,f}(x,y)=(-1)^k Z_{C,f}(y,-x).
\]
These tools recover the previously known fact that the shells of \(\mathrm{RM}(1,m)\) support \(3\)-designs via the Assmus–Mattson theorem, and they prove that no shell of \(\mathrm{RM}(1,m)\) or of \(H_{2^m}\) supports a combinatorial \(4\)-design [2303.16349].

## 4. Distance to affine codewords and covering radius

Because first-order generalized Reed–Muller codes are precisely the affine functions, distance computation to the code can be organized as a simultaneous distance-to-affinity problem. For a function \(f:\mathbb{F}_q^m\to\mathbb{F}_q\), define
\[
N_{v,t}(f)=|\{u\in\mathbb{F}_q^m\mid f(u)=(u,v)+t\}|,
\]
so that
\[
d(f,g_{v,t})=q^m-N_{v,t}(f).
\]
The transform-based method developed for this problem works in the group algebra \(\mathbb{C}[\mathbb{F}_q]\): with \(F(u)=z^{f(u)}\), the transform
\[
(TF)(v)=\sum_{u\in\mathbb{F}_q^m}F(u)z^{-(u,v)}
\]
has coefficients exactly equal to the numbers \(N_{v,t}(f)\). The double transform yields a linear system with \(q^{m+1}\) equations in the \(q^{m+1}\) unknowns \(N_{v,t}(f)\), augmented by the normalization equations
\[
\sum_{t\in\mathbb{F}_q} N_{v,t}(f)=q^m\qquad \forall v\in\mathbb{F}_q^m.
\]
The resulting Cramer system has a unique solution, and therefore all Hamming distances from \(f\) to all codewords of \(\mathrm{RM}_q(1,m)\) can be computed simultaneously [1512.04788].

The covering radius problem has also been analyzed directly. Writing \(\rho(1,m)\) for the covering radius of the first-order generalized Reed–Muller code and
\[
\rho_2(1,m)=\max_{x\in R_q(2,m)} \min_{c\in R_q(1,m)} |x-c|,
\]
one has the explicit formula
\[
\rho_2(1,m)=(q-1)q^{m-1}-q^{\lceil m/2\rceil-1}.
\]
The stated general bounds are
\[
(q-1)q^{m-1}-q^{\lceil m/2\rceil-1}\le \rho(1,m)\le (q-1)q^{m-1}-q^{2\lceil m/2\rceil-1},
\]
and when \(m\) is even,
\[
\rho(1,m)=(q-1)q^{m-1}-q^{\frac{m}{2}-1}.
\]
For \(q=3\) the paper further gives \(\rho(1,3)=16\) and \(\rho(1,5)=156\), obtained through explicit computation and recursive arguments [1102.2122].

## 5. Information sets and permutation decoding

First-order generalized Reed–Muller codes occupy a particularly tractable position among affine-invariant codes because recent work constructs information sets directly from the defining set. A typical setup factors
\[
n=q^m-1=r_1r_2,\qquad \gcd(r_1,r_2)=1,
\]
and fixes an isomorphism \(\varphi:\mathbb{Z}_n\to \mathbb{Z}_{r_1}\times \mathbb{Z}_{r_2}\). One construction defines
\[
\Gamma=\{(i_1,i_2)\in \mathbb{Z}_{r_1}\times \mathbb{Z}_{r_2}\mid 0\le i_1<m,\ i_2=0\},
\]
and then
\[
I=\{0,\alpha^i\mid i\in \varphi^{-1}(\Gamma)\},
\]
which is an information set for \(R_q(1,m)\). A related construction starts from a set of check positions for the dual code and obtains the information set as \(\{0,\alpha^i\mid i\in T^{-1}(\mathcal{T})\}\). For first-order codes these constructions are described as valid for any \(q\ge 2\) [2509.11757][2401.16911].

These information sets support strengthened permutation-decoding algorithms. In the binary case, a variation of classical permutation decoding is formulated for affine-invariant codes and applied to first-order Reed–Muller codes through \(s\)-PD-like sets. If \(I\) is a suitable information set and \(P\) an \(s\)-PD-like set, Algorithm II corrects up to \(s\) errors. For first-order binary Reed–Muller codes, the group generated by the automorphism \(T_\alpha\) forms the relevant PD-like set, and the number of correctable errors is
\[
s=(t_0+1)r_2-1,\qquad t_0=\max\{j\mid m<[jr_2]_{r_1}\}.
\]
The paper reports that this improves considerably the number of errors that can be corrected in comparison with known results [2302.05189].

The q-ary extension studies the same idea for first-order generalized Reed–Muller codes. With the information set above and the translation group generated by \(T_\alpha\), the punctured code \(R_q(1,m)^*\) admits an \(s\)-PD-like set with
\[
s=(\lambda_0+1)r_2-1,\qquad 
\lambda_0=\max\left\{\lambda\mid m<\left\lceil \frac{r_1}{\lambda}\right\rceil\right\}.
\]
The stated comparison bound for previous translation-based permutation decoding is
\[
s=\min\left\{\left\lfloor \frac{q^m-1}{m+1}\right\rfloor,\left\lfloor \frac{q^{m-1}(q-1)-1}{2}\right\rfloor\right\},
\]
and the newer construction achieves \(s>\frac{q^m-1}{m+1}\) for many parameter choices. The same paper also analyzes when a smaller subgroup generated by \(T_2\) suffices probabilistically, with success probability
\[
\mathbf{p}=\frac{|A|}{\binom{n}{s}},
\]
where \(A\) is the set of \(s\)-subsets whose second-coordinate projection does not cover all of \(\mathbb{Z}_{r_2}\) [2509.11757].

## 6. Associated algebraic invariants and exceptional features

First-order generalized Reed–Muller codes also appear as a distinguished case in the commutative-algebraic study of code invariants. To a linear code \(C\) one associates a simplicial complex and its Stanley–Reisner ring
\[
R_C=\mathbb{F}_q[x_1,\ldots,x_n]/I_C.
\]
The minimal graded free resolution of \(R_C\) is called pure when, in each homological degree, all nonzero graded Betti numbers occur in a single shift. For generalized Reed–Muller codes \(\mathrm{RM}_q(r,m)\), the complete characterization is that the resolution is pure if and only if \(m=1\), \(r=1\), \(r=0\), \(r=m(q-1)\), or \(r=m(q-1)-1\). Thus the first-order case \(r=1\) is uniformly pure for all \(q\) and all \(m\ge 1\), and its shifts are the generalized Hamming weights of the code [2102.00308].

The first-order level is therefore exceptional in several independent senses. It is the point at which the code remains describable by affine functions, retains dimension \(m+1\), supports direct information-set constructions from the defining set, admits explicit simultaneous distance computation to all codewords, and yields strong negative design-theoretic results that are sharp at low \(t\): \(2\)-designs do occur in the \(q\)-ary setting, \(3\)-designs do not for \(q\ge 3\), and in the binary setting \(3\)-designs occur while \(4\)-designs do not [2309.01119][2303.16349]. Over prime fields it also coincides with a radical power of the modular algebra, whereas over non-prime fields that identification fails in general, which marks a fundamental algebraic boundary inside the generalized Reed–Muller hierarchy [1601.07633].

Within the broader Reed–Muller family, the first-order generalized code is thus both the simplest nontrivial member and a structurally singular one: its geometry is controlled by affine hyperplanes, its algebra is unusually explicit, and a large part of the modern literature uses it as the baseline case for duality, design theory, information-set constructions, covering-radius analysis, and permutation decoding.

Source: https://www.emergentmind.com/topics/first-order-generalized-reed-muller-codes