Week 5 The dual code. Syndrome decoding
Version 2023-11-01. To PDF of this week only Open the whole set of notes in PDF
Synopsis. Every linear code
Motivation. The inner product of vectors
Let
Some codes, however, are defined by a single checksum — recall the even weight code and the ISBN-10 code. A checksum of a given vector is easy to compute.
Extending the checksum approach, we introduce a check matrix which generates the dual code. It turns out that this construction helps to correct errors as well (not just detect). The first notion we need is:
Definition: inner product
For
Example: some inner products in
For
If
Properties of the inner product
(1) Expression as a matrix product:
Explanation: we write elements of
(2) Symmetry:
(3) Bilinearity: for a scalar
(4) Non-degeneracy:
Explanation: let
The dual code
Definition: dual code
Given a code
We can say that
Recall that
By definition,
Example: the dual code of the binary repetition code
Check matrices
Definition: check matrix
A check matrix for a linear code
One sometimes says parity check matrix (the term arose from applications of binary codes).
Theorem 5.1: properties of the dual code and a check matrix
If
-
i.
-
ii.
for any check matrix of
-
Proof. We recall the Rank-Nullity Theorem from Linear Algebra: if
is a matrix with columns, thenwhere
is the dimension of the span of the rows of and can be written asi. Consider the matrix
made up of all codevectors of used as rows. The is the set Note that the column vector is which is zero if and only if the inner product is for all rows of i.e., for all codevectors of By definition of the dual code, this happens exactly when so By rank-nullity, Since the rows of span one has and soii. By definition
generates the code so by i., has rows, Thus, and so by rank-nullity, Note that indeed, if then for all because which means that Since it follows that which isThe law
for the product of matrices implies that and so is zero iff is. Thus, as claimed. □
The syndrome of a vector
Definition: syndrome
Let
is called the syndrome of
Proposition 5.2: syndromes of vectors in the same coset
Let
-
•
are in the same coset of -
•
The use of syndromes in error detection and correction
If
To correct errors, we need to construct a decoder for the linear code
Algorithm 5.3: the syndrome decoder
Preparation. Construct a table of syndromes, with
Coset leader |
|
Start with the top row: the codeword
At each step, choose a vector
Decoding.
-
• Receive a vector
-
• Calculate
-
• In the table, find
with Then is the coset leader of -
• Return
Remark. The syndrome decoder is based on a choice of one coset leader in every coset. This is the same as for the standard array decoder.
In fact, if the same coset leaders are chosen in both decoders, both decoders with yield the same function
The number of arithmetic operations required to calculate the syndrome
Nevertheless, for codes which have more algebraic structure (than just linear codes), decoding algorithms exist which require even less storage, but the computation complexity is higher compared to syndrome decoding. Some examples will appear from the next chapter onwards.
Example: example of syndrome decoding
Let
-
(a) Construct the table of syndromes for
using the matrix -
(b) Using the table of syndromes, decode the received vector
Solution.
(a) When calculating syndromes, it is useful to observe that the syndrome of a vector
The syndrome map is linear, so the syndrome of a sum of two vectors is the sum of their syndromes, etc.
For example,
vector | syndrome | leader? |
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes |
All vectors of weight
no, syndrome already in the table | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes | ||
yes |
When we try a vector, say of weight
We found
(b)