Skip to main content
Mathematics LibreTexts

8.8E: An Application to Linear Codes over Finite Fields Exercises

  • Page ID
    132844
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \(\newcommand{\longvect}{\overrightarrow}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)
    Exercise \(\PageIndex{1}\)

    Find all \(a\) in \(\mathbb{Z}_{10}\) such that:

    1. \(a^{2} = a\).
    2. \(a\) has an inverse (and find the inverse).
    3. \(a^{k} = 0\) for some \(k \geq 1\).
    4. \(a = 2^{k}\) for some \(k \geq 1\).
    5. \(a = b^{2}\) for some \(b\) in \(\mathbb{Z}_{10}\).
    Answer
    1. \(1^{-1} = 1\), \(9^{-1} = 9\), \(3^{-1} = 7\), \(7^{-1} = 3\).
    2. \(2^{1} = 2\), \(2^{2} = 4\), \(2^{3} = 8\), \(2^{4} = 16 = 6\), \(2^{5} = 12 = 2\), \(2^{6} = 2^{2} \dots\) so \(a = 2^k\) if and only if \(a = 2, 4, 6, 8\).
    Exercise \(\PageIndex{2}\)
    1. Show that if \(3a = 0\) in \(\mathbb{Z}_{10}\), then necessarily \(a = 0\) in \(\mathbb{Z}_{10}\).
    2. Show that \(2a = 0\) in \(\mathbb{Z}_{10}\) holds in \(\mathbb{Z}_{10}\) if and only if \(a = 0\) or \(a = 5\).
    Answer
    1. If \(2a = 0\) in \(\mathbb{Z}_{10}\), then \(2a = 10k\) for some integer \(k\). Thus \(a = 5k\).
    Exercise \(\PageIndex{3}\)

    Find the inverse of:

    1. \(8\) in \(\mathbb{Z}_{13}\);
    2. \(11\) in \(\mathbb{Z}_{19}\).
    Answer
    1. \(11^{-1} = 7\) in \(\mathbb{Z}_{19}\).
    Exercise \(\PageIndex{4}\)

    If \(ab = 0\) in a field \(F\), show that either \(a = 0\) or \(b = 0\).

    Exercise \(\PageIndex{5}\)

    Show that the entries of the last column of the multiplication table of \(\mathbb{Z}_n\) are

    \[0, n - 1, n - 2, \dots, 2, 1 \nonumber \]

    in that order.

    Exercise \(\PageIndex{6}\)

    In each case show that the matrix \(A\) is invertible over the given field, and find \(A^{-1}\).

    1. \(A = \left[ \begin{array}{rr} 1 & 4 \\ 2 & 1 \end{array}\right]\) over \(\mathbb{Z}_5\).
    2. \(A = \left[ \begin{array}{rr} 5 & 6 \\ 4 & 3 \end{array}\right]\) over \(\mathbb{Z}_7\).
    Answer
    1. \(\det A = 15 - 24 = 1 + 4 = 5 \neq 0\) in \(\mathbb{Z}_{7}\), so \(A^{-1}\) exists. Since \(5^{-1} = 3\) in \(\mathbb{Z}_{7}\), we have \(A^{-1} = 3\left[ \begin{array}{rr} 3 & -6 \\ 3 & 5 \end{array}\right] = 3\left[ \begin{array}{rr} 3 & 1 \\ 3 & 5 \end{array}\right] = \left[ \begin{array}{rr} 2 & 3 \\ 2 & 1 \end{array}\right].\)
    Exercise \(\PageIndex{7}\)

    Consider the linear system \(\ \begin{array}{rrrrrrr} 3x & + & y & + & 4z & = & 3 \\ 4x & + & 3y & + & z & = & 1 \end{array}\). In each case solve the system by reducing the augmented matrix to reduced row-echelon form over the given field:

    1. \(\mathbb{Z}_5\)
    2. \(\mathbb{Z}_7\)
    Answer
    1. We have \(5 \cdot 3 = 1\) in \(\mathbb{Z}_{7}\) so the reduction of the augmented matrix is: \[\begin{aligned} \left[ \begin{array}{rrrr} 3 & 1 & 4 & 3 \\ 4 & 3 & 1 & 1 \end{array}\right] & \rightarrow \left[ \begin{array}{rrrr} 1 & 5 & 6 & 1 \\ 4 & 3 & 1 & 1 \end{array}\right] \\ & \rightarrow \left[ \begin{array}{rrrr} 1 & 5 & 6 & 1 \\ 0 & 4 & 5 & 4 \end{array}\right] \\ & \rightarrow \left[ \begin{array}{rrrr} 1 & 5 & 6 & 1 \\ 0 & 1 & 3 & 1 \end{array}\right] \\ & \rightarrow \left[ \begin{array}{rrrr} 1 & 0 & 5 & 3 \\ 0 & 1 & 3 & 1 \end{array}\right].\end{aligned} \nonumber \] Hence \(x = 3 + 2t\), \(y = 1 + 4t\), \(z = t\); \(t\) in \(\mathbb{Z}_{7}\).
    Exercise \(\PageIndex{8}\)

    Let \(K\) be a vector space over \(\mathbb{Z}_2\) with basis \(\{1, t\}\), so \(K = \{a + bt \mid a, b, \mbox{ in } \mathbb{Z}_2\}\). It is known that \(K\) becomes a field of four elements if we define \(t^{2} = 1 + t\). Write down the multiplication table of \(K\).

    Exercise \(\PageIndex{9}\)

    Let \(K\) be a vector space over \(\mathbb{Z}_3\) with basis \(\{1, t\}\), so \(K = \{a + bt \mid a, b, \mbox{ in } \mathbb{Z}_3\}\). It is known that \(K\) becomes a field of nine elements if we define \(t^{2} = -1\) in \(\mathbb{Z}_3\). In each case find the inverse of the element \(x\) of \(K\):

    1. \(x = 1 + 2t\)
    2. \(x = 1 + t\)
    Answer
    1. \((1 + t)^{-1} = 2 + t\).
    Exercise \(\PageIndex{10}\)

    How many errors can be detected or corrected by each of the following binary linear codes?

    1. \(C = \{0000000, 0011110, 0100111, 0111001, \\ \hspace*{2em} 1001011, 1010101, 1101100, 1110010\}\)
    2. \(C = \{0000000000, 0010011111, 0101100111,\\ \hspace*{2em} 0111111000, 1001110001, 1011101110,\\ \hspace*{2em} 1100010110, 1110001001\}\)
    Answer
    1. The minimum weight of \(C\) is \(5\), so it detects \(4\) errors and corrects \(2\) errors.
    Exercise \(\PageIndex{11}\)
    1. If a binary linear \((n, 2)\)-code corrects one error, show that \(n \geq 5\). [Hint: Hamming bound.]
    2. Find a \((5, 2)\)-code that corrects one error.
    Answer
    1. \(\{00000, 01110, 10011, 11101\}.\)
    Exercise \(\PageIndex{12}\)
    1. If a binary linear \((n, 3)\)-code corrects two errors, show that \(n \geq 9\). [Hint: Hamming bound.]
    2. If \(G = \left[ \begin{array}{rrrrrrrrrr} 1 & 0 & 0 & 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 & 1 & 1 & 1 \end{array}\right]\), show that the binary \((10, 3)\)-code generated by \(G\) corrects two errors. [It can be shown that no binary \((9, 3)\)-code corrects two errors.]
    Answer
    1. The code is \(\{0000000000, 1001111000, 0101100110,\) \(0011010111, 1100011110, 1010101111,\) \(0110110001, 1111001001\}\). This has minimum distance \(5\) and so corrects \(2\) errors.
    Exercise \(\PageIndex{13}\)
    1. Show that no binary linear \((4, 2)\)-code can correct single errors.
    2. Find a binary linear \((5, 2)\)-code that can correct one error.
    Answer
    1. \(\{00000, 10110, 01101, 11011\}\) is a \((5, 2)\)-code of minimal weight \(3\), so it corrects single errors.
    Exercise \(\PageIndex{14}\)

    Find the standard generator matrix \(G\) and the parity-check matrix \(H\) for each of the following systematic codes:

    1. \(\{00000, 11111\}\) over \(\mathbb{Z}_2\).
    2. Any systematic \((n, 1)\)-code where \(n \geq 2\).
    3. The code in Exercise 8.7.10(a).
    4. The code in Exercise 8.7.10(b).
    Answer
    1. \(G = \left[ \begin{array}{cc} 1 & \mathbf{u} \end{array} \right]\) where \(\mathbf{u}\) is any nonzero vector in the code. \(H = \left[ \begin{array}{c} \mathbf{u} \\ I_{n-1} \end{array}\right]\).
    Exercise \(\PageIndex{15}\)

    Let \(\mathbf{c}\) be a word in \(F^{n}\). Show that \(B_{t}(\mathbf{c}) = \mathbf{c} + B_{t}(\mathbf{0})\), where we write

    \[\mathbf{c} + B_{t}(\mathbf{0}) = \{\mathbf{c} + \mathbf{v} \mid \mathbf{v} \mbox{ in } B_{t}(\mathbf{0})\} \nonumber \]

    Exercise \(\PageIndex{16}\)

    If a \((n, k)\)-code has two standard generator matrices \(G\) and \(G_{1}\), show that \(G = G_{1}\).

    Exercise \(\PageIndex{17}\)

    Let \(C\) be a binary linear \(n\)-code (over \(\mathbb{Z}_2\)). Show that either each word in \(C\) has even weight, or half the words in \(C\) have even weight and half have odd weight. [Hint: The dimension theorem.


    This page titled 8.8E: An Application to Linear Codes over Finite Fields Exercises is shared under a CC BY-NC-SA 4.0 license and was authored, remixed, and/or curated by W. Keith Nicholson.

    • Was this article helpful?