Title: ErrorCorrecting codes
1Chapter 3
2Rectangular Codes
- Rule take intersection of row-column parity
error(s) single error correction (double error
detection)
m?1
row parity bits
n?1
message bits
x
x
corner bit (use even parity checking)
column parity bits
n m (square) (n - 1)² message bits (2n - 1)
check bits n² total
Example n 11, 21 overhead
3.2
3Triangular Codes
- Rule intersection of parity errors single
error correction (no double error detection). A
single parity error implies the error was on the
diagonal itself.
n?1
diagonal parity checks
n?1
message bits
x
x
both row and column sum to even parity (see book)
n(n - 1)/2 message bits n check bits n(n
1)/2 total
3.3
4Hyper-dimensional Codes
- Arrange the bits in a cube, and include check
bits not in every linear dimension, but every
plane. So we get three edges of check bits,
which intersect in a single point. Total of n³
(3n - 2) check bits message. - excess bit redundancy 3 / n²
- Four-dimensional check over hyperplanes (cubes)
- excess bit redundancy 4 / n³
b
k 3
k 1
k 2
3.3 cont.
5Hypercubes
- More generally, consider a k-dimensional n-cube.
There are n(k-1) dimension hyperplanes in each
of the k directions (each are parity checked),
for a total of n k bits. Overhead is hence nk
/ nk k / nk-1. So keeping m nk fixed,
overhead is kkvm. This has a minimum when its
(natural) logarithm does log k (log m) / k.
Taking derivatives 1/k - (log m)/k² 0 implies
k log m is the optimal dimension. Hence, the
highest dimensional space would be best. So try
using a k-dimensional 2-cube, with n 2k bits.
One parity check in each direction means each of
the k different ways of splitting the cube has
even parity.
3.3 cont.
6Hamming Code
- Design a code so the sequence of parity error
bits (called syndrome) address (point to) the
erroneous bit. All zeros is no error. If we
number the parity checks pm, ..., p1, where pi
(1 for an error / 0 for no error), then they can
point to 2m ? 1 erroneous bits. If we use a total
of n bits, we must have n 2m ? 1 to correct an
error in any possible location. Clearly, each
parity check pi must sum over all positions i in
the string such that the jth bit of i is one - In order for x1, , xn to be a valid code word,
it must include both message bits and the proper
check bits. The most convenient choice is to
locate them at positions 2j-1 in the word x1, ,
xn according to the formula - x2j-1 ? xi i (bm b1)two bj 1 mod 2
3.4
7Example
- n 7, m 3 parity bit positions 1, 2, 4. 7
? 3 4 message bits at positions 3, 5, 6, 7.
Shortcut
Turn 90?
(011)two
error in position 3
3.4
8Hamming distance
- This is the number of places that they differ
(same as L0 norm in F2).
The minimum distance between allowable code words
is
corresponds to performance of code
3.6
9Sphere packing
- For single error correction, with minimum
distance 3, the spheres of radius one around
each code word must not overlap, so
k of message bits
n total number of bits
m of check bits
For double error correction, we have
non-overlapping spheres of radius 2
Density corresponds to efficiency of code
When equality is achieved, the code is said to be
perfect. E.g. double-error correcting with m
12, n 90.
3.6
10Double Error Detection
- Hamming code would cause 3 errors in a
double-error situation. But if we add an extra
parity check bit over the entire word we can
detect double errors - x0 x1, , xn x0 ? xi i 1 n mod 2
Algebraic approach
Geometric approach In the original code, points
of distance 3 from each other have a different
of 1s in them (mod 2) since they differ in 3
positions, so their extra parity checks will be
set differently, and now they will differ in 4
positions!
3.7
11Hamming Codes on Words
- Think of doing parity checks over entire words,
using a logical sum.
0 0 ?? 0 represents no parity error anything
else represents a parity error
a check
The same syndrome technique locates the erroneous
word. Any of the parity check failure words
could now be added to the erroneous word to
correct it.
character
parity bit
Consider the ASCII code with each 8-bit word
having a parity bit, and for each block of words,
a checksum word. The parity check within a word
locates the erroneous word, and the check sum
bits locate the erroneous bit.
ASCII code words
This is equivalent to a rectangular code
checksum word
3.8