1. MDS Codes.
(a)
Show that \(C\) is MDS if and only if every set of \(k\) columns in its generator matrix is linearly independent.
Solution.
Remember that \(C\) is MDS if and only if its minimum distance is equal to \(n-k+1\text{.}\) So \(C\) is not MDS if and only if its minimum distance is at most \(n-k\text{.}\) We will prove the contrapositive of both sides of this statement.
First, suppose we have a linear combination of \(k\) columns of a generator matrix of \(C\) that is zero., i.e. some set of \(k\) columns of the generator matrix is linearly dependent. Without loss of generality we can assume these are the first \(k\) columns, since reordering the columns gives an equivalent code to \(C\text{.}\) Then the \(k\times k\) submatrix of \(G\) consisting of these columns, \(G'\text{,}\) has a nontrivial linear dependence among its columns and is thus not full rank. Since it does not have full rank, there is a combination \(\bm\in F^k\) such that
\begin{equation*}
\bm G' = \bzero \text{.}
\end{equation*}
Now write \(G=\left[\begin{array}{c|c}G'\amp A\end{array}\right]\) and consider the codeword
\begin{equation*}
\bc=\bm G = \bm \left[\begin{array}{c|c}G'\amp A\end{array}\right] = \left[\begin{array}{c|c}\bm G'\amp \bm A\end{array}\right]=\left[\begin{array}{c|c}0\, \ldots\, 0\amp \bm A\end{array}\right]\text{.}
\end{equation*}
This codeword has zeros in at least its first \(k\) positions and so has Hamming weight at most \(n-k\text{.}\) So the minimum distance of \(C\) is at most \(n-k\) and \(C\) is not MDS.
Now suppose that \(C\) is not MDS. Then the minimum distance of \(C\) is at most \(n-k\text{.}\) So there is a nonzero codeword \(\bc\in C\) with Hamming weight at most \(n-k\text{,}\) i.e. there are at least \(k\) positions in which \(\bc\) is zero. Let \(\bm\in F^k\) be such that
\begin{equation*}
\bc=\bm G\text{.}
\end{equation*}
Now let \(G'\) be the \(k\times k\) submatrix of \(G\) consisting of the columns of \(G\) corresponding to the positions in which \(\bc\) is zero. Then we have also
\begin{equation*}
\bm G'=\bzero\text{.}
\end{equation*}
So \(G'\) is not full rank and there is a linear dependence among the columns of \(G'\text{.}\) So there is a set of \(k\) columns of \(G\) that is linearly dependent.
(b)
Solution.
Suppose \(C\) is MDS, i.e. \(d=n-k+1\text{.}\) Then every \(n-k\) columns of its parity check matrix are linearly independent. Now, a parity check matrix for \(C\) is a generator matrix for the dual code \(C^{\perp}\) which is an \([n,n-k]_q\) code, so by the previous part \(C^{\perp}\) is MDS.
Suppose \(C^{\perp}\) is MDS. Then \(C^{\perp}\) is an \([n,n-k]_q\) code with minimum distance \(n-(n-k)+1=k+1\text{.}\) So every \(k\) columns of a parity check matrix for \(C^{\perp}\) are linearly independent. But a parity check matrix for \(C^{\perp}\) is a generator matrix for \(C\text{,}\) so again by the previous part \(C\) is MDS.
Note that also the second part of the implication follows by the first part and the fact that the dual of the dual code is the original code.
