port initial notes on cyclic codes (from Hill's book)
arnaucube git@arnaucube.com
Wed, 15 Apr 2026 16:17:31 +0200
4 files changed,
220 insertions(+),
3 deletions(-)
M
algebraic-coding-theory-notes.tex
→
algebraic-coding-theory-notes.tex
@@ -34,6 +34,11 @@ @misc{vanddetproof2,
title = {Abstract Algebra, Theory and Applications. \emph{sec.22.2}}, author = {Thomas W. Judson}, } + +@misc{commutativealgebranotes, + title = {Commutative Algebra Notes}, + howpublished = "\url{https://github.com/arnaucube/math/blob/master/commutative-algebra-notes.pdf}", +} \end{filecontents} \nocite{*}@@ -788,7 +793,7 @@
$\longrightarrow$ for small $n$, it's fast to locate the received vector $y$ in the array, but for large $n$: use syndrome to find which coset (ie. which row of the array) contains $y$. \end{cor} -\begin{eg}{7.9} +\begin{eg}{7.10} (from example \ref{h.6.5}) $$G= \begin{bmatrix} 1 & 0 & 1 & 1\\@@ -1427,7 +1432,7 @@ \begin{defn}{}[Packing problem]
The \emph{packing problem} for $V(r,q)$ is that of determining the values of $max_s(r, q)$ and the optimal $(n,s)$-sets. \end{defn} -\begin{thm}{14.1} +\begin{thm}{14.1} \label{14.1} There exists an $[n,n-r,d]$-code over $GF(q)$ iff $\exists$ an $(n, d-1)$-set in $V(r, q)$. \end{thm} \begin{proof}@@ -1692,6 +1697,218 @@ $$
= \prod_{i=2}^n (x_i - x_1) ~~\cdot \prod_{2 \leq j < i \leq n} (x_i - x_j) ~~= \prod_{1 \leq j < i \leq n} (x_i - x_j) $$ \end{proof} + + +\vspace{1.0cm} + +\section{Cyclic Codes} + +\subsection{Cyclic Codes intro} + +\begin{defn}{}{cyclic code} + a code $C$ is cyclic if + \begin{enumerate}[i.] + \item $C$ is a linear code + \item any cyclic shift of a codeword is also a codeword\\ + ie. when $a_0 a_1 \ldots a_{n-1} \in C$,\\ + then so $a_{n-1} a_0 a_1 \ldots a_{n-2} \in C$. + \end{enumerate} +\end{defn} + +\begin{remark}{}[Notation] + From now on, + $$F = F_q = \mathbb{F} = GF(q)$$ + + $F_q[x]$ is a ring; and for $f(x)$ irreducible in $F_q[x]$, then $\frac{F_q[x]}{f(x)}$ is a field. + + From now on, +$$f(x) = x^n -1 ~~~\Longrightarrow~~ F_q[x]/(x^n-1) = R_n$$ + + \vspace{0.6cm} + Observe:\\ + since $x^n \cong 1 \bmod{x^n -1}$, to reduce any polynomial by modulo $x^n-1$ can just replace $x^n$ by $1$, $x^{n+1}$ by $x$, $x^{n+2}$ by $x^2$, etc. + + \vspace{0.6cm} + Correspondence: + $$a_0 a_1 \ldots a_{n-1} \in V(n,q) ~\Longleftrightarrow~ a(x)=a_0 + a_1 x + \ldots + a_{n-1} x^{n-1} \in R_n$$ + + In $R_n$, + \begin{align*} + x \cdot a(x) &= a_0 \cdot x + a_1 x^2 + \ldots + \underbrace{a_{n-1} x^n}_{=a_{n-1}\cdot 1}\\ + &=a_{n-1} + a_0 x + \ldots + a_{n-2} \cdot x^{n-1} \in R_n + \end{align*} + + ie. $a_{n-1} a_0 a_1 \ldots a_{n-2} \in V(n, q)$ + + \vspace{0.6cm} + In $R_n$: + \begin{itemize} + \item[$\rightarrow$] multiply by $x$ corresponds to performing a single cyclic shift + \item[$\rightarrow$] multiply by $x^m$ corresponds to a cyclcic shift through $m$ positions + \end{itemize} +\end{remark} + + +\vspace{1.0cm} +\begin{thm}{12.6}[Algebraic characterization of cyclic codes] \label{12.6} + a code $C \in R_n$ is a cyclic code iff + \begin{enumerate}[i.] + \item $a(x),b(x) \in C ~\Longrightarrow~ a(x)+b(x) \in C$ + \item $a(x) \in C$ and $r(x) \in R_n ~\Longrightarrow~ r(x) a(x) \in C$\\ + ie. $C$ closed under multiplication by any element of $R_n$ + \end{enumerate} +\end{thm} +\begin{proof} + \begin{enumerate}[i.] + \item let $C \in R_n$ cyclic code, then $C$ is linear, so (i) holds. + \item let $a(x) \in C$ and $r(x) = r_0 + r_1 x + \ldots + r_{n-1} x^{n-1} \in R_n$. + + Since mult. by $x$ corresponds to a cyclic shift, then $x \cdot a(x) \in C$, thus + $$x \cdot (x \cdot a(x)) = x^2 \cdot a(x) \in C$$ + and so on. + + Hence, + $$r(x) \cdot a(x) = r_0 \cdot a(x) + r_1 \cdot x \cdot a(x) + \ldots + r_{n-1} \cdot x^{n-1} \cdot a(x) \in C$$ + since each summand is in $C$; thus (ii) holds. + + \vspace{0.5cm} + Conversely, suppose (i) and (ii) hold;\\ + taking $r(x)$ to be a scalar, the conditions imply that $C$ is linear.\\ + Taking $r(x)=x$, in (ii) shows that $C$ is cyclic. + \end{enumerate} +\end{proof} + +\begin{remark}{} + \begin{enumerate}[i.] + \item Cyclic codes are the ideals of the ring $R_n$. + \item Every ideal in $R_n$ is a \emph{principal ideal}.\\ + ie. $R_n$ is a PID. + \end{enumerate} +\end{remark} + +\vspace{1.0cm} +Let $f(x) \in R_n$, $\langle f(x) \rangle$ the subset of $R_n$ consisting of all multiples of $f(x)$ (reduced modulo $x^n-1$). ie. +$$\langle f(x) \rangle = \{ r(x) \cdot f(x) ~|~ r(x) \in R_n \}$$ + + +\begin{thm}{12.7} + for any $f(x) \in R_n$, the set $\langle f(x) \rangle$ is a cyclic code; named the \emph{code generated by $f(x)$}. +\end{thm} +\begin{proof} + check conditions (i), (ii) of Theorem \ref{12.6}: + \begin{enumerate}[i.] + \item if $a(x)f(x),~ b(x)f(x) \in \langle f(x) \rangle$ then + $$a(x)f(x)+b(x)f(x)= (a(x)+ b(x)) f(x) \in \langle f(x) \rangle$$ + + \item if $a(x)f(x) \in \langle f(x) \rangle$ and $r(x) \in R_n$, then + $$r(x) (a(x)f(x))= (r(x) \cdot a(x)) f(x) \in \langle f(x) \rangle$$ + \end{enumerate} +\end{proof} + +\begin{eg}{12.8} + $C=\langle 1+x^2 \rangle \in R_3$, with $GF(2)$. + + $R_3$ has $2^3=8$ elements. + + Multiply $1+x^2$ by each of the 8 elements of $R_3$ (reducing modulo $x^3-1$), obtaining 4 distinct codewords: + $$0, 1+x, 1+x^2, x+x^2$$ + Thus $C$ is the code $\{ 000, 110, 101, 011 \}$. +\end{eg} + + +\begin{thm}{12.9} \label{12.9} + let $C$ a nonzero cyclic coded in $R_n$. Then + \begin{enumerate}[i.] + \item $\exists !~ g(x)$ monic, of smallest degree in $C$ + \item $C=\langle g(x) \rangle$ + \item $g(x)$ is a factor of $x^n -1$ + \end{enumerate} +\end{thm} +\begin{proof} + \begin{enumerate}[i.] + \item $\exists !~ g(x)$ monic, of smallest degree in $C$:\\ + let $g(x), h(x) \in C$ monic and of smallest degree. Then $g(x)-h(x) \in C$ with smaller degree, which is a contradiction if $g(x) \neq h(x)$ + + \item $C=<g(x)>$:\\ + let $a(x) \in C$. By division algorithm for $F_q[x]$, + $$a(x) = q(x) g(x) + r(x)$$ + with $deg(r(x)) < deg(g(x))$. + + But $r(x) = a(x) - q(x)g(x) \in C$ by the properties of cyclic codes (Theorem \ref{12.6}, $a,g \in C$ and $C$ an ideal) + + By minimality of $deg(g(x))$, must have $r(x) = 0$, therefore + $$a(x) \in \langle g(x) \rangle \forall a(x) \in C$$ + $$\Longrightarrow~ C=\langle g(x) \rangle$$ + + \item $g(x)$ is a factor of $x^n -1$:\\ + by division algorithm, + $$x^n -1 = q(x) g(x) + r(x)$$ + with $deg(r(x)) < deg(g(x))$. + + But then $r(x) = -q(x) g(x) \bmod{x^n -1}$, ie. $r(x)$ is a multiple of $g(x)$, and so $r(x) \in \langle g(X) \rangle$. + + By the minimality of $deg(g(x))$, we must have $r(X)=0$, which implies + $$x^n -1 = q(x) \cdot g(x) + 0$$ + $\Longrightarrow~ g(x)$ is a factor of $(x^n-1)$. + \end{enumerate} +\end{proof} + + +\begin{defn}{}[Generator polynomial] + let $C$ cyclic code, monic polynomial of least ddegree (given by Theorem \ref{12.9}) is called the \emph{generator polynomial} of $C$. + + Note: $C$ may contain other polynomials than the generator polynomial which also generate $C$. +\end{defn} + +\subsection{Recap on ideals} +More about ideals at the \emph{Commutative Algebra notes} \cite{commutativealgebranotes}. +\vspace{0.6cm} + +In the cyclic codes context, we're interested in ideals because +\begin{itemize} + \item cyclic codes are ideals of $R_n = \mathbb{F}_q[x]/(x^n-1)$. + \item $R_n$ is a PID: every ideal in $R_n$ is principal. +\end{itemize} + +\vspace{0.6cm} + +\begin{defn}{}[ideal] + $I \subset R$ ($R$ ring) such that $0 \in I$ and $\forall x \in I,~ r \in R,~ xr, rx \in I$.\\ + \hspace*{2em} ie. $I$ absorbs products in $R$. +\end{defn} + +\begin{defn}{}[prime ideal] + if $a, b \in R$ with $ab \in P$ and $P \neq R$ ($P$ a prime ideal), implies $a \in P$ or $b \in P$. +\end{defn} + +\begin{defn}{}[principal ideal] + generated by a single element, $(a)$. + + $(a)$: principal ideal, the set of all multiples $xa$ with $x \in R$. +\end{defn} + +\begin{defn}{}[prime spectrum - $Spec(A)$] + set of prime ideals of $A$. ie. + + $$Spec(A) = \{ P ~|~ P \subset A~ \text{is a prime ideal} \}$$ +\end{defn} + +\begin{defn}{}[integral domain] + Ring in which the product of any two nonzero elements is nonzero. + + ie. no zerodivisors. + + ie. $\forall~ 0 \neq a,~ 0 \neq b \in A,~ ab \neq 0 \in A$. + + Every field is an integral domain, not the converse. +\end{defn} + +\begin{defn}{}[principal ideal domain - PID] + integral domain in which every ideal is principal. ie. + ie. $\forall I \subset R,~ \exists~ a \in I$ such that $I = (a) = \{ ra ~|~ r \in R \}$. +\end{defn} + + \bibliographystyle{unsrt} \bibliography{algebraic-coding-theory-notes.bib}
M
commutative-algebra-notes.tex
→
commutative-algebra-notes.tex
@@ -225,7 +225,7 @@ Let $p(X) \in I$ be of minimal degree among nonzero elements of $I$.
Observe that $(p(X)) \subseteq I$, because $p(X) \in I$ and $I$ is an ideal. - Let $f(X) \in I$. By Euclidean division algorithm in $K[X]$, $\exists q, r \in K[X]$ such that $f(X) = q(X) \cdot p(X) + r(X)$ with eithr $r(X)=0$ or $deg(r) < deg(p)$. + Let $f(X) \in I$. By Euclidean division algorithm in $K[X]$, $\exists q, r \in K[X]$ such that $f(X) = q(X) \cdot p(X) + r(X)$ with either $r(X)=0$ or $deg(r) < deg(p)$. Since $f,p \in I$, then $r(X) = f(X) - q(X)\cdot p(X) \in I$