Upload to Canvas a PDF of your work for the following problems.

Assignment: due Monday, 11:59 pm

  1. Make up an example of a binary linear code with 16 code words that isn’t perfect. List the 16 code words, and give a generating matrix. (Use your package functions.)

  2. Prove that a \(k\)-fold repetition code is perfect if and only if \(k\) is odd.

  3. Consider the binary linear code generated by the following matrix. \[ B = \begin{bmatrix} 1 & 0 & 0 & 1 & 1 & 0 \\ 0 & 1 & 0 & 0 & 1 & 1 \\ 0 & 0 & 1 & 1 & 0 & 1 \end{bmatrix} \]

    1. List all the code words.
    2. Calculate the code rate of this code.
    3. Is this code a maximum distance separable (MDS) code? Prove or disprove.
    4. Is this code a perfect code? Prove or disprove.
  4. Here’s an \(8 \times 8\) Hadamard matrix: \[ B = \begin{bmatrix} 1 & 1 & 1 & -1 & 1 & -1 & -1 & -1 \\ 1 & 1 & -1 & -1 & -1 & 1 & -1 & 1 \\ 1 & -1 & 1 & 1 & -1 & -1 & -1 & 1 \\ 1 & -1 & 1 & -1 & -1 & 1 & 1 & -1 \\ 1 & -1 & -1 & -1 & 1 & -1 & 1 & 1 \\ 1 & 1 & -1 & 1 & -1 & -1 & 1 & -1 \\ 1 & -1 & -1 & 1 & 1 & 1 & -1 & -1 \\ 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \end{bmatrix} \]

    1. The corresponding Hadamard code consists of the rows of \(B\), along with their negatives (for a total of 16 code words). Is this Hadamard code (with \(-1\)’s replaced by \(0\)’s) a linear code? Explain why or why not.
    2. Is this Hadamard code perfect? Prove or disprove.