Before the formal definition is given, let us go straight to an example.
``What?''
``Hi Bob'' (louder).
``What?''
``Hi Bob'' (even louder).
``Oh, hi.''
This illustrates a ``repetition code''. More precisely,
the
-ary repetition code of length
is the
set of all
-tuples of the form
, for
.
(We leave it as an exercise to verify that this is a
vector space over
.)
We think of
as representing information you want to send.
It could be the ``greyness'' of a pixel in a picture
or a letter (represented in ASCII code) in a word, for example.
Since the channel might contain noise,
we send
instead, with the understanding that
the receiver should perform a ``majority vote'' to decode
the vector. (For example, if
was received then
0 ``wins the vote'').
This wasn't a very efficient example. Let's try again.
First, write the number in binary, 0 as
,
as
, ...,
as
. If
for
, then define
The problem with this example boils down to the fact
that the first and second column of
are
the same. We shall explain this type of deficency more
later.