Linear code
Definition
A -linear code is the following data:
- A -dimensional vector space over equipped with a basis
- A -dimensional vector subspace of
The purpose of a linear code is as follows. Given a message of length over the alphabet , we want to convert this to a linear code-word of length , via a suitable encoding isomorphism . We can recover the original message by applying the decoding map .
Terminology associated with linear codes
Message length
The message length for a linear code is the parameter . This is the length of the initial message that is meant to be encoded.
Code length
The code length for a linear code is the parameter . This is the length of the coded message, that is, the element of obtained after applying the isomorphism .
Message rate
The rate of a linear code is defined as the value . This in some sense measures the density of information sent through the code.
Weight
The weight of a linear code is defined in any of the following equivalent ways:
- The minimum over all nonzero code-words of the number of nonzero coordinates (code-words are the elements of )
- The minimum over all pairs of distinct code-words of the Hamming distance between them.
It turns out that the theoretically best possible error-detecting radius is one less than the weight while the theoretically best possible error-correcting radius is half of one less than the weight.
These theoretical bounds may not be achievable through practical algorithms for a given linear code.
Related notions
- Error-detecting code
- Error-correcting code
- Binary linear code: This is the special case where