Why would we want to detect/correct errors?
- The internet drops data packets (due to congestion)
- Not all bits on a storage device can be retrieved
- Wireless signals are noisy
We have 2 “channel models”:
- The erasure channel → data is lost
- The error channel → data is changed
Definition
We have the erasure weight (or error weight) the total number of erasures (or errors)
Introduction to Channel Coding
Example
Let’s suppose we want to transport the message across the erasure channel
If we transport it as is, we have no way of knowing the original message
Now let’s do some channel coding (by adding redundancy) → every bit is expanded to cover three bits ⇒ becomes , becomes , etc…
Now if we have an error, we can easily reconstruct our original message
We can of course do the same for the error channel
The example we showed is a block code , with , and ⇒ each source symbol is substituted by channel symbols over the same alphabet.
With the alphabet ⇒ binary block code
Definitions
- We have the set of codewords
- We have a codeword an element of
- The block length is
- Each codeword carries information bits
- We have the rate bits per symbol
Hamming distance
Definition
We have the Hamming distance between two -tuples ⇒ the number of positions they differ
, ,
⇒ The hamming distance is a mathematical distance (comparable to the distance between two points in 2 dimensions) ⇐> it satisfies
- Non negativity:
- Symmetry:
- Triangle inequality:
Decoders
We can therefore minimize errors by correcting for errors with the minimum distance from known codewords
Definition
For a code , we have its minimum distance $$ d_{\min} (\mathcal C) = \min_{x, y \in \mathcal C; x \neq y}d(x, y)
We can expect 3 results from a decoder:
- For an error channel:
- Error correction ⇒ we get the original signal back
- Error detection ⇒ we detect that an error has occurred (but cannot recover the message)
- Decoding error ⇒ the decoder makes the wrong decision while correcting
- For an erasure channel:
- Erasure correction ⇒ we get the original signal back
- Erasure detection ⇒ (erasures are always found out)
- Decoding error ⇒ the decoder fills the missing symbols wrongfully
Theorem
Channel errors of weight do not lead to a codeword, and are detected
Channel errors of weight lead to another codeword ⇒ cannot be detected by a minimum-distance decoder
Theorem
A minimum distance decoder for a code corrects all erasures of weight ⇐>
Theorem
A minimum distance decoder for a code corrects all channel errors of weight ⇐>
To find the minimum distance of , where , we need comparisons ⇒ This is not always very applicable ⇐> large amount of codewords
Singleton’s Bound
Theorem
Regardless of the size of , the minimum distance satisfies
We call the block codes that satisfy this bound with equality Maximum Distance Separable code — or simply MDS