Week 2 Parameters. Bounds
Version 2023-10-01. To PDF of this week only Open the whole set of notes in PDF
Synopsis. Basic properties of a code
Parameters of a code
Parameters are numerical characteristics of a code. The most important parameters are:
Definition: parameters of a code
Let
-
•
denotes the size of the alphabet, i.e., -
•
is called the length of the code — each codeword consists of symbols; -
•
denotes the number of codewords in the code, i.e., -
•
is the information dimension of -
•
is the minimum distance of -
•
is the rate of -
•
is the relative distance of
We say that
The importance of the minimum distance for error detection and correction
We will now see that the higher
Notation:
Theorem 2.1: the number of errors detected/corrected by a code
Let
-
1. If
then Thus, if at most errors occur in a transmitted codeword, they will be detected. -
2. If
then has a unique nearest neighbour in which is So if at most errors occur in a codeword, a decoder will correct them by decoding back to
-
Proof. 1. If
then by definition of minimum distance, either or So the statement follows by contrapositive.2. We use proof by contradiction, so we must assume for contradiction that
is a nearest neighbour of in such that Then so by the triangle inequalityHence
are distinct codewords at distance less than This contradicts being the minimum distance of □
Remark
The Theorem is expressed by saying that a code of minimal distance
Channel coding. The importance of rate
To understand why the information dimension
Messages are arbitrary words of length
For each
Remark: high
Encoding increases transmission costs by a factor of
Although the increase in transmission costs is a proce to pay for error detection or correction, we want this increase to be as small as possible. One can try to construct codes with higher rate, without degrading the error detection or correction performance, by using more sophisticated mathematics. This is one of the main themes in Coding Theory.
There are obstacles to increasing the rate. Mathematically, they are expressed by bounds.
Bounds
Proposition 2.2: the trivial bound
If
-
Proof. Let
be an -code. Then, by definition, is a non-empty subset of with The cardinality of a set is greater than or equal to the cardinality of its subset. In particular, Applying the monotone function to both sides of the inequality, we obtainFurthermore, the Hamming distance between any two words of length
is an integer between and Therefore, for any code of length □
It is easy to describe the codes which attain
Example:
The trivial code of length
Exercise: prove that a code has
We will now give a simple example of codes which attain
Example:
Exercise: prove that
The Hamming bound
To state the next bound, we recall that
Before proving the Theorem, we introduce
Definition: Hamming sphere
If
The number of words in the Hamming sphere depends only on the radius
-
Proof. To construct a word
at distance from we need to choose positions out of where will differ from Then we need to change the symbol in each of the chosen positions to one of the other symbols. The total number of choices for which is at distance exactly from is thusThe Hamming sphere contains all vectors at distance
from so we sum over from up to The Lemma is proved. □
-
Proof of Theorem 2.3. First of all, we prove that spheres of radius
centred at distinct codewords do not overlap. Indeed, by Theorem 2.1(2), each word in has unique nearest neighbour, which is Hence a word in cannot lie in another such sphere (a word cannot have two unique nearest neighbours!)Hence the whole set
contains disjoint spheres centred at codewords. By Lemma 2.4, each of the spheres contains words. The number of elements in a disjoint union of sets is equal to the sum of cardinalities of the sets, hence the total number of words in the spheres is Since the union of the spheres is a subset of this does not exceed The bound follows. □
Given the length
Definition: perfect code
A code which attains the Hamming bound is called a perfect code.
It turns out that meaningful perfect codes are quite rare. When the number of symbols in the alphabet is a prime power, a complete classification of perfect codes up to parameter equivalence is known; we will see it later in the course.
Remark: what does it mean to attain the bound?
Attains the bound means: the inequality in the bound becomes equality for this code.
It is a mistake to say that perfect codes are those that “satisfy” the Hamming bound. Every code satisfies the Hamming bound — only perfect codes attain it!
The Singleton bound
Another upper bound on the number
-
Proof. Let
be an -code. Consider the function where is the word obtained from by deleting the last symbols.I claim that
is an injective function. Indeed, if then by definition of the minimum distance, and differ in at least positions. Since deletes only symbols, the words and still differ in at least one position. So Injectivity of is proved.Now, by the Pigeonhole Principle, injective functions
exist only if We conclude that so that as claimed. □
Definition: maximum distance separable code, MDS code
A code which attains the Singleton bound is called a maximum distance separable (MDS) code.
Remark: the bounds do not work in reverse