Week 4 Decoding linear codes
Version 2023-10-07. To PDF of this week only Open the whole set of notes in PDF
Synopsis. We explicitly describe a decoder
Cosets and coset leaders
It turns out that the following notion is of direct relevance to decoding:
Definition: coset
Given a linear code
We recall basic facts about cosets (see for example Algebraic Structures 1):
-
•
is itself a coset. ( is called the trivial coset.) Moreover, is the coset of any codeword -
• If
then either (if ) or -
•
-
• There are
distinct cosets.
Thus, the whole space
The above is true for any abelian group; but the following is specific to Coding Theory:
Definition: coset leader
A coset leader of a coset
Remark: warning — a coset leader may not be unique
There may be more than one coset leader in a coset. However, all coset leaders of a given coset are of the same weight.
Proposition 4.1: the formula for a decoder for a linear code
For a linear code
-
Proof. Let
Then Put Since is a linear code, so We have proved that must lie in the cosetVector
must be decoded to its nearest neighbour in i.e., must be minimised. Yet by Lemma 3.1 Hence the decoder must choose so that is minimal in the coset By definition, must be a coset leader of □
Standard array: construction
We now give a method to construct all cosets and to find one coset leader in each coset.
Definition: standard array
A standard array for a linear code
-
• the table has
columns and rows; -
• each row is a coset;
-
• the leftmost entry in each row is a coset leader of that row;
-
• the top row is the trivial coset (i.e.,
itself); -
• each entry is the sum of the leftmost entry in its row and the top of its column;
-
• the table contains every vector from
exactly once.
We explain how to construct a standard array, using the linear code
Row 0 of the standard array: lists all codevectors (elements of
Row 1: out of vectors not yet listed, choose
Say,
Row 2: choose
Say,
Row 3: same with, say,
Since we have filled
Example: a standard array for the code
Standard array: decoding
Let
This suggests the following decoding algorithm for
Algorithm 4.2: the standard array decoder
Preparation: construct a standard array for
Decoding:
-
• Receive a vector
-
• Look up
in the standard array. -
• Return the topmost vector of the column of
as
Justification: the algorithm is correct because, by definition of a standard array,
-
(a) Look-up of
will succeed as every vector in is present in the array; -
(b) the row of
starts with so -
(c) the top of
’s column is so this is decoded.
Example: use the standard array decoder
For the code
-
• decode the received vectors
and -
• give an example of one bit error occurring in a codeword and being corrected;
-
• give an example of one bit error occurring in a codeword and not being corrected.
Solution. We work with the following standard array for
The received vector
Suppose that the codeword
Discussion: is a standard array decoder unique?
Recall that there may be more than one possible standard array for the code
The decoder associated to this standard array is different from the decoder considered above. Both decoders decode the same linear code
However, if
Reminder (the number of errors corrected by a code)
Recall that a code with minimum distance
The code
So, from the point of view of Hamming’s theory, this code
But in Shannon’s theory, error-detecting and error-correcting performance of a code are measured probabilistically.
Error-detecting and error-correcting performance of a linear code: Shannon’s theory point of view
Shannon’s Information Theory is interested in how likely is it that a transmission error in a codeword is not detected/corrected by a decoder of
Recall that this means that one bit (
When a codeword
In determining
Definition: the weight enumerator
The weight enumerator of a linear code
in two variables
Theorem 4.3:
Suppose that a codevector of a binary linear code
-
Proof. Let
be the codevector being transmitted. Recall that an undetected error means that the received vector is a codevector not equal to Note that, since and is a vector space,Therefore, an undetected error means that the error vector is a non-zero codevector. We can now calculate
This is
without exactly one term, excluded by the constraint namelywhich gives the expression for
as stated. □
Remark: In general,
Example: calculating the weight enumerator and
The binary linear code
If a codeword of
Discussion. Knowing
The probability of correct decoding
We will now find the probability of an error being corrected for
Theorem 4.4:
Suppose that a codevector of a binary linear code
where
-
Proof. Recall that
is decoded correctly if By Proposition 4.1, Therefore, correct decoding occurs if the error vector is the chosen coset leader of its coset.We therefore have one good outcome per coset: namely,
equals the chosen coset leader of the coset. Recall that that happens with probability where is the weight of the coset leader of the given coset. Summing over all cosets and gathering the like terms, we obtain the formula for as stated (it does not depend on □
Discussion. When is it important to know
Example: calculation of
Let
we can see that
Comparing codes using approximate values of or
Our analysis above gives, for a binary linear code
In practical situations
Example. We compare use of the code
If
i.e., the use of
If
Hence
The above suggests that for error correction, more mathematically sophisticated codes need to be designed. In the rest of the course, we will see how ideas from different areas of mathematics are used in code constructions.