Let
be a code. The number
In other words, the minimum distance of a linear code is the length of its shortest non-zero vector.
proof:
Clearly,
. Conversely, suppose
are code words such that
. By (3.1),
, so
.
The above theorem helps us find the minimum
distance of the ISBN code
in Example 3.3.6.
This is a subspace of
.
There is no codeword of weight
. This is due to the fact that
is a codeword
if and only if
.
But if only one coordinate is non-zero then
divides
, for some
. This
forces
but in
that says
. However, there is a codeword of weight
,
for example,
(
, all
other
). By the above theorem, the minimum
distance
of
is therefore
.
In the next section we shall show that if
denotes
the minimum distance of
then the smallest
for
which
is
-error correcting is the integer
part of
. For now, we explore some
of this definitions more basic consequences.
This definition means that if you
have sent off a code word
and
know the receiver received a vector
which has
errors or less
(i.e.,
) then
the code word closest to
(in the sense of the Hamming distance) is
. In this case, to decode the received
vector
, all the receiver has to do
to determine
is search
(which is a finite set)
and find a code word
which is as close as
possible to
. This strategy is called
the nearest neighbor algorithm.
If
is
-error correcting and
has
no more than
errors then
.
If
is ``too large'' (where the definition of ``large''
is a function of the speed of your computer and your
level of patience) then this algorithm is too
slow for practical purposes.
The following theorem of Shannon is fundamental to the theory of error correcting codes.
Shannon's theorem guarantees us that ``very good'' codes (in the sense that they are close to being best possible) exist. They may not be linear and even if they are, the theorem does not suggest that they are practical (i.e., ``fast'' encoding and decoding algorithms exist). However, we shall very briefly discuss in a later chapter ``low density parity check codes'', which can be both ``very good'' and practical. The proof of Shanon's theorem is not easy and goes beyond the scope of this book. For a proof and further discussion, see Ash [Ash], §3.5.
Figure 3.1 graphs the capacity for a binary code.