[Math] Codes: Distance, number of codewords, etc

coding-theorylinear algebramatrices

Let $p\geq 3$ be any prime and consider the code $C = N(H)\subseteq\mathbb{Z}_p^2$, where $H = \begin{pmatrix} 1 & 1 & 1 & \dots & 1 & 1 \\ 0 & 1 & 2 & \dots & p-2 & p-1 \end{pmatrix}\in \mathbb{Z}_p^{2\times p}$.

a) How many codewords does the code $C$ contain? I've got an idea on this part. It should just be $p^2$, shouldn't it?

b) Show that every selection of two distinct columns of $H$ results in a non-singular 2×2 matrix.

c) Find a codeword in $C$ of weight 3 and use (b) to conclude that the code $C$ has distance 3.

Parts b and c I have no clue on where to start. I'm sure that I could probably reason my way through c if I could figure out b, since finding the codeword of weight 3 should be trivial. However, I'm willing to take any assistance on this problem.

Best Answer

For part b, what does a selection of two distinct columns look like? What's the condition for a matrix to be non-singular?

For part c, can't you find a vector $v=(a,b,c,0,\dots,0)$ such that $Hv=0$?