Example8.2
One possible coding scheme would be to send a message several times and to compare the received copies with one another. Suppose that the message to be encoded is a binary $n$-tuple $(x_{1}, x_{2}, \\ldots, x_{n})\\text{.}$ The message is encoded into a binary $3n$-tuple by simply repeating the message three times:
To decode the message, we choose as the $i$th digit the one that appears in the $i$th place in at least two of the three transmissions. For example, if the original message is $(0110)\\text{,}$ then the transmitted message will be $(0110\\; 0110\\; 0110)\\text{.}$ If there is a transmission error in the fifth digit, then the received codeword will be $(0110\\; 1110\\; 0110)\\text{,}$ which will be correctly decoded as $(0110)\\text{.}$ 2 We will adopt the convention that bits are numbered left to right in binary $n$-tuples. This triple-repetition method will automatically detect and correct all single errors, but it is slow and inefficient: to send a message consisting of $n$ bits, $2n$ extra bits are required, and we can only detect and correct single errors. We will see that it is possible to find an encoding scheme that will encode a message of $n$ bits into $m$ bits with $m$ much smaller than $3n\\text{.}$