Code$C$ over $Z_3$ given by the solutions of a linear system of equations

61 Views Asked by At

I have an exercise such as follows, but I don't know where to start (I am used to see codewords or G directly). How should I find the generator matrix G of this C ?:

"Consider the code C over $Z_3$ given by the solutions of the linear system of equations:

$$x_1 +2x_3 + x_4 + x_5 + 2x_6 = 0$$ $$x_1 +2x_2 + x_3 + 2x_4 + 2x_6 = 0$$

i) Give a generator matrix G of C.
ii) Give a parity-check matrix H of C."

1

There are 1 best solutions below

1
On BEST ANSWER

The linear equations give you the parity check matrix directly. That is, for any codeword, $$ \begin{bmatrix}x_1&x_2&x_3&x_4&x_5&x_6\end{bmatrix}\begin{bmatrix}1&1\\ 0&2\\ 2&1\\ 1&2\\ 1&0\\ 2&2\end{bmatrix}=\begin{bmatrix}0&0\end{bmatrix} $$

This two-column matrix is the parity check matrix $H$.

Finding the generator matrix is then just a matter of finding a basis for the space orthogonal to the subspace generated by the two columns of the parity check below. They will form the rows of a matrix $G$ such that $GH=0$. You will be able to obtain four linearly independent vectors this way. It's easiest to try using $1$'s and $0$'s.

For example, with $x_1=x_6=1$ and $x_2=x_3=x_4=x_5=0$, the parity check identifies this as a codeword.

Trying with $x_1=0$ and $x_2=1$, you can find that $x_3=x_4=0$, but we need to use $x_5=2$ and $x_6=1$ to get the resulting codeword to be orthogonal to the parity check.

Now trying with $x_1=x_2=0$ and $x_3=1$, it's safe to use $x_4=0$ and $x_5=1$ and $x_6=2$.

Finally we try $x_1=x_2=x_3$ and $x_4=1$, and it's clear that $x_5=x_6=1$ does the trick.

So a generator matrix would be

\begin{bmatrix} 1&0&0&0&0&1\\ 0&1&0&0&2&1\\ 0&0&1&0&1&2\\ 0&0&0&1&1&1\\ \end{bmatrix}

You can also use more sophisticated tricks to find $G$ based on $H$ so that $GH=0$, but this is a very elementary one that I think gives you the nuts and bolts experience for figuring it out by hand. It's all just a matter of understanding the basic relationship between the parity check matrix and the codewords.