add notes on Reed-Solomon codes
arnaucube git@arnaucube.com
Tue, 19 May 2026 19:04:26 +0200
2 files changed,
131 insertions(+),
2 deletions(-)
M
algebraic-coding-theory-notes.tex
→
algebraic-coding-theory-notes.tex
@@ -107,7 +107,7 @@
\maketitle \begin{abstract} - Notes taken while studying Algebraic Coding Theory, mostly from Hill book \cite{hill} and Lint book \cite{lint}. + Notes taken while studying Algebraic Coding Theory, mostly from Hill's book \cite{hill} and Lint's book \cite{lint}. Usually while reading books and papers I take handwritten notes in a notebook, this document contains some of them re-written to $LaTeX$.@@ -2347,7 +2347,7 @@
Usually $l=1$; if $n=q^m-1$ (ie. $\beta$ a primitive element of $\mathbb{F}_q^m$), then the BCH code is called \emph{primitive}. -\begin{thm}{6.6.2}[BCH Bound] +\begin{thm}{6.6.2}[BCH Bound] \label{6.6.2} the minimum distance of a BCH code with designed distance $d$ is $\geq d$. \end{thm} \begin{proof}@@ -2392,6 +2392,135 @@ \end{cor}
\begin{cor}{6.6.16} the minimum weight of a primitive binary BCH code is odd. \end{cor} + + + + +\section{Reed-Solomon Codes} + +\begin{defn}{6.8.1}[Reed-Solomon code] + a \emph{Reed-Solomon code} (RS code) is a primitive BCH code of length $n=q-1$ over $\mathbb{F}_q$. + + With generator + $$g(x) = \prod_{i=1}^{d-1} (x - \alpha^i)$$ + where $\alpha$ is primitive in $\mathbb{F}_q$. +\end{defn} + +\begin{remark}{}observe:\\ + \begin{itemize} + \item by \ref{6.6.2}, minimum distance $\geq d$ + \item by 6.2, has dimension $k=n-d+1$ + \end{itemize} + Therefore, Corollary 5.2.2 implies that minimum distance is $d$ and the RS code is a MDS. + + This is useful for when errors are in bursts (ie. several errors together). +\end{remark} + +\vspace{0.6cm} +Let $n=q-1$, $\alpha$ a primitive element of $\mathbb{F}_q$. + +$$a=(a_0, a_1, \ldots, a_{k-1}) \in \mathbb{F}_q^k \Longleftrightarrow a(x) = a_0 + a_1 x + \ldots + a_{k-1}x^{k-1}$$ + +Then +$$C= \{ (c_0, c_1, \ldots, c_{n-1}) ~|~ c_i = a(\alpha^i),~ 0 \leq i <n,~ a \in \mathbb{F}_q^k \}$$ +is the RS code with $d = n - k +1$. + +To see it: $C$ is cyclic. By definition of $C$ and Lemma \ref{6.5.3}, implies that a codeword $c$ has $n \cdot a(x)$ as its Mattson-Solomon polynomial. + +Since $deg(a(x)) \leq k-1$, +$$c(\alpha^i) = 0 ~~\forall i \in [1, n-k]$$ + +Extend the words of $C$ by adjoining a symbol $c_n = a(0)$, then +$$\sum_{i=0}^n c_i = a_0 q = 0$$ +$\Longrightarrow~$ we obtain $\overline{C}$. + + +If $c_n=0$, ie. $c(1)=0$, then the word has weight $\geq n-k+2$. Also true if $c_n \neq 0$. +$\Longrightarrow~$ so $\overline{C}$ is also a MDS code. + + +\begin{defn}{6.8.2} + the generalized R-S code, $GRS_k(a, v)$, has codewords all + $$(v_1 f(\alpha_1), v_2 f(\alpha_2), \ldots, v_n f(\alpha_n))$$ + where $f$ runs through the set of polynomials of degree $<k$ in $\mathbb{F}_{q^m}[X]$, ie. $f \in \mathbb{F}_{q^m}[X]^{<k}$. +\end{defn} + +A GRS and its dual are MDS codes. + +\begin{thm}{6.8.3} + the dual of an MDS code is also an MDS code. +\end{thm} +\begin{proof} + let $G=(I_k~ P)$ be GM of $C$. + + Since $C$ has min. weight $d$, every set of $d-1=n-k$ columns of the PCM $H:=(-P^T ~ I_{n-k})$ is linearly independent. + + Hence every square submatrix of $H$ is nonsingular, ie. no codeword of $C^{\perp}$ has $n-k$ zeros. + + So $C^{\perp}$ is an $[n, n-k, k+1]$ code, ie. MDS. +\end{proof} + + + +\vspace{1.0cm} +\subsection{Example of Hamming code (cyclic) and of Reed-Solomon code (cyclic and MDS)} + +\paragraph{(7,4)-Hamming code over $\mathbb{F}_2$} + +$$(n, k) \Longrightarrow~ n=7 (\text{length}), k=4 (\text{message length})$$ + +Generator polynomial: $g(x) = x^3 + x +1$. + +Parity bits: $r=3$ + +Message: $m(x) \in \mathbb{F}_2[X]^{\leq 3}$, encoded as $c(x) = m(x) g(x) \pmod{(x^7-1)}$ + +eg: for $m(x) = x^3 + x + 1$, +$$c(x) = (x^3 + x +1) \cdot (x^3 +x+1) \pmod({x^7-1}) = x^6 + x^2 + 1$$ +$$\Longrightarrow~ c=(1000101)$$ + +Hamming code is cyclic:\\ +when $c(x) \in C$, then $x \cdot c(x) \pmod({x^n-1}) \in C$, + +because $C=\langle g(x) \rangle$, ie. all codewords are multiples of $g(x)$, + +so for $c(x) = m(x) \cdot g(x)$, then +$$x \cdot c(x) = x \cdot m(x) \cdot g(x)$$ +is still a multiple of $g(x)$, hence a valid codeword. + + +\paragraph{(6,4)-Reed-Solomon code over $\mathbb{F}_7$} + +$$n=6,~ k=4,~ \text{minimum distance:}~ d=n-k+1 = 6-4+1 = 3$$ + +Choose a primitive element, $\alpha=3 \in \mathbb{F}_7$. + +Generator polynomial: +\begin{align*} + g(x) &= (x-\alpha) \cdot (x - \alpha^2)\\ + &= x^2 -2x -3x +6\\ + &= x^2 -5x +6 = x^2 +2x +6 \pmod{7} +\end{align*} + +message: $m(x) = 1 + 2x + x^2 + x^3$ + +Then, +\begin{itemize} + \item[cyclic form:] $c(x) = m(x) g(x) \pmod{(x^6-1)}$\\ + $c(x) \in C$ iff $c(\alpha^i)=0 ~\forall~ i \in [n-k]$ +\item[evaluation form:] $c = (m(1), m(\alpha), m(\alpha^2), \ldots, m(\alpha^6))$ +\end{itemize} + +RS code is cyclic. And it is MDS: +\begin{itemize} + \item a polynomial of degree $<k$ is uniquely determined by $k$ points + \item if two polynomials agree in $k$ positions, are the same polynomial\\ + $\Longrightarrow$ maximum number of equal positions between distinct codewords $= k-1$ +\end{itemize} + +Therefore, $d=n-(k-1) = n-k+1$, ie. Singleton bound (with equality!). + + \bibliographystyle{unsrt}