Generator matrix
In coding theory, a generator matrix is a matrix whose rows form a basis for a linear code. The codewords are all of the linear combinations of the rows of this matrix, that is, the linear code is the row space of its generator matrix.
Terminology
If G is a matrix, it generates the codewords of a linear code C by
- [math]\displaystyle{ w=sG }[/math]
where w is a codeword of the linear code C, and s is any input vector. Both w and s are assumed to be row vectors.[1] A generator matrix for a linear [math]\displaystyle{ [n, k, d]_q }[/math]-code has format [math]\displaystyle{ k \times n }[/math], where n is the length of a codeword, k is the number of information bits (the dimension of C as a vector subspace), d is the minimum distance of the code, and q is size of the finite field, that is, the number of symbols in the alphabet (thus, q = 2 indicates a binary code, etc.). The number of redundant bits is denoted by [math]\displaystyle{ r = n - k }[/math].
The standard form for a generator matrix is,[2]
- [math]\displaystyle{ G = \begin{bmatrix} I_k | P \end{bmatrix} }[/math],
where [math]\displaystyle{ I_k }[/math] is the [math]\displaystyle{ k \times k }[/math] identity matrix and P is a [math]\displaystyle{ k \times (n-k) }[/math] matrix. When the generator matrix is in standard form, the code C is systematic in its first k coordinate positions.[3]
A generator matrix can be used to construct the parity check matrix for a code (and vice versa). If the generator matrix G is in standard form, [math]\displaystyle{ G = \begin{bmatrix} I_k | P \end{bmatrix} }[/math], then the parity check matrix for C is[4]
- [math]\displaystyle{ H = \begin{bmatrix} -P^{\top} | I_{n-k} \end{bmatrix} }[/math],
where [math]\displaystyle{ P^{\top} }[/math] is the transpose of the matrix [math]\displaystyle{ P }[/math]. This is a consequence of the fact that a parity check matrix of [math]\displaystyle{ C }[/math] is a generator matrix of the dual code [math]\displaystyle{ C^{\perp} }[/math].
G is a [math]\displaystyle{ k \times n }[/math] matrix, while H is a [math]\displaystyle{ (n-k) \times n }[/math] matrix.
Equivalent codes
Codes C1 and C2 are equivalent (denoted C1 ~ C2) if one code can be obtained from the other via the following two transformations:[5]
- arbitrarily permute the components, and
- independently scale by a non-zero element any components.
Equivalent codes have the same minimum distance.
The generator matrices of equivalent codes can be obtained from one another via the following elementary operations:[6]
- permute rows
- scale rows by a nonzero scalar
- add rows to other rows
- permute columns, and
- scale columns by a nonzero scalar.
Thus, we can perform Gaussian elimination on G. Indeed, this allows us to assume that the generator matrix is in the standard form. More precisely, for any matrix G we can find an invertible matrix U such that [math]\displaystyle{ UG = \begin{bmatrix} I_k | P \end{bmatrix} }[/math], where G and [math]\displaystyle{ \begin{bmatrix} I_k | P \end{bmatrix} }[/math] generate equivalent codes.
See also
- Hamming code (7,4)
Notes
- ↑ MacKay, David, J.C. (2003). Information Theory, Inference, and Learning Algorithms. Cambridge University Press. pp. 9. ISBN 9780521642989. http://www.inference.phy.cam.ac.uk/itprnn/book.pdf. "Because the Hamming code is a linear code, it can be written compactly in terms of matrices as follows. The transmitted codeword [math]\displaystyle{ \mathbf{t} }[/math] is obtained from the source sequence [math]\displaystyle{ \mathbf{s} }[/math] by a linear operation,
where [math]\displaystyle{ \mathbf{G} }[/math] is the generator matrix of the code... I have assumed that [math]\displaystyle{ \mathbf{s} }[/math] and [math]\displaystyle{ \mathbf{t} }[/math] are column vectors. If instead they are row vectors, then this equation is replaced by[math]\displaystyle{ \mathbf{t} = \mathbf{G}^\intercal\mathbf{s} }[/math]
... I find it easier to relate to the right-multiplication (...) than the left-multiplication (...). Many coding theory texts use the left-multiplying conventions (...), however. ...The rows of the generator matrix can be viewed as defining the basis vectors."[math]\displaystyle{ \mathbf{t} = \mathbf{sG} }[/math]
- ↑ Ling & Xing 2004, p. 52
- ↑ Roman 1992, p. 198
- ↑ Roman 1992, p. 200
- ↑ Pless 1998, p. 8
- ↑ Welsh 1988, pp. 54-55
References
- Ling, San; Xing, Chaoping (2004), Coding Theory / A First Course, Cambridge University Press, ISBN 0-521-52923-9
- Pless, Vera (1998), Introduction to the Theory of Error-Correcting Codes (3rd ed.), Wiley Interscience, ISBN 0-471-19047-0
- Roman, Steven (1992), Coding and Information Theory, GTM, 134, Springer-Verlag, ISBN 0-387-97812-7
- Welsh, Dominic (1988), Codes and Cryptography, Oxford University Press, ISBN 0-19-853287-3
Further reading
- MacWilliams, F.J.; Sloane, N.J.A. (1977), The Theory of Error-Correcting Codes, North-Holland, ISBN 0-444-85193-3
External links
Original source: https://en.wikipedia.org/wiki/Generator matrix.
Read more |