Finding generator matrix for binary linear code given parity check matrix

7.9k Views Asked by At

I have a parity check matrix for a binary linear code V below:

$$ H = \begin{bmatrix} 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 & 1 \\ 1 & 0 & 0 & 1 & 0 & 1 \end{bmatrix} $$

I want to find a generator matrix for V. Is anything different than just converting the parity matrix to the generator since I'm trying to find one for 'V'? As in, put $H$ in standard form to get $[I\mid A]$, then $G = [-A^T \mid I]$?

Steps I did: R3 = R1 + R3 $$ H = \begin{bmatrix} 1 & 0 & 1 & 1 & 1 & 1 \\ 1 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 0 & 1 & 0 \end{bmatrix} $$ R1 = R1 + R3 $$ H = \begin{bmatrix} 1 & 0 & 0 & 1 & 0 & 1 \\ 1 & 1 & 0 & 1 & 1 & 1 \\ 0 & 0 & 1 & 0 & 1 & 0 \end{bmatrix} $$

R2 = R2 + R1 $$ H = \begin{bmatrix} 1 & 0 & 0 & 1 & 0 & 1 \\ 0 & 1 & 0 & 0 & 1 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 \end{bmatrix} $$

So the parity matrix is now in the form [I3 | A ] where A = $$ A = \begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 1 & 0 \end{bmatrix} $$ $$G = [-A^T \mid I] = \begin{bmatrix} 1 & 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 1 & 1 & 1 & 0 \\ 1 & 1 & 0 & 0 & 0 & 1 \end{bmatrix} $$

Is this correct?

Edit: $$G = [-A^T \mid I] = \begin{bmatrix} 1 & 0 & 0 & 1 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 \\ 1 & 0 & 0 & 0 & 0 & 1 \end{bmatrix} $$

2

There are 2 best solutions below

0
On

I think the last edit is correct. But for the row operation part I would do

R1 = R1 + R3, R2 = R2 + R3

and then swap R1 and R3 to get an [I3|A]

0
On

The formulas being used are incorrect.

Generator Matrix

G = [I | A]

Parity Matrix H = [ -A Transpose | I]