Determining the distance of linear code using parity-check matrix

292 Views Asked by At

A matrix $H$ over $\Bbb F_2$ has as the first seven rows $I_7$ and the other rows are all of the vectors of $\{0,1\}^7$ with exactly three $1$'s per vector (weight-$3$ vectors). I know that this can be a parity-check matrix for a linear code $C$. I want to find the distance $d(C)$ for this linear code, which can be computed by determining the number of linearly independent rows of $H$. So this comes down to simply finding the rank of $H$.

I think rank$(H)=7$ because the RREF of $H$ just gives the matrix with rows $I_7$ and the rest are zero rows. So the $d(C) = \operatorname{rank}(H)+1=8$. The correction manual says $4$. I don't know how this is possible. Is my formula for the distance of a code wrong? It just comes down to determining the amount of lin independent rows of $H$, which I think should be $7$.

Edit: I think I read the theorem about the distance of a linear code $C$ wrong. The distance is $d$ when ANY set of $d-1$ rows of $H$ is lin indep and there is a set of $d$ rows of $H$ that is linearly dependent. That may be different from the rank of $H$?

1

There are 1 best solutions below

0
On

Yes the rank and the quantity determining the minimum distance are distinct.

If any set of $d-1$ rows are linearly independent that means that no parity check of weight $d-1$ exists that gives zero. Thus no codeword of weight $\leq d-1$ exists. On the other hand if a set of $d$ rows are linearly dependent this implies that there is at least one codeword of weight $d.$ To see this let there be a minimal parity check of weight $d$ with support set $J=\{j_1,j_2,\ldots,j_d\} \subset \{1,\ldots,n\}.$ Then the word $(x_1,\dots,x_n)$ with $$x_i=1 \Leftrightarrow i \in J$$ is a minimum weight codeword in this code. No codeword of smaller weight exists other than the all zero codeword. Since the code is linear, the componentwise sum (same as difference in $\mathbb{F}_2$) of any two codewords is also a codeword. Thus the minimum distance of the code is $d.$