Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Chapter 11
Algebraic
Coding Theory
Single Error Detection
M = (1, 1, …, 1) is the m 1 parity check
matrix for single error detection. If c = (0, 1, 0,
…, 1) is an n-bit codeword, then McT = 0 (use
XOR addition). If c′ = c + e contains an error,
then the syndrome is:
M c′T = M(c + e)T = McT + MeT = MeT = 1
This detects errors: 0 for none, 1 for an error.
11.4
Single Error Correction / Double Error Detection
M′ =
11111111
00001111
00110011
01010101
for double-error detection (optional)
the 3 x 7 parity check matrix for a
single-error correcting Hamming code
If c is a 7 bit code word, then McT = (0 0 0)T = 0 and Mc′T = MeT =
the syndrome for the error (e.g. try 0110011 → 0100011). In general,
we can choose any parity check matrix for M, provided the rows are
linearly independent (otherwise the checks themselves are redundant),
and McT = 0. But, to correct a double-error, we must have the
property that the syndrome M(e1 + e2)T = Me1T + Me2T is unique for
every pair of columns (assuming e1 and e2 are single-error vectors).
11.2
Polynomials
degree coefficients
leading coefficient
2[x] = {bnxn + … + b0 | n ≥ 0; bi = 0, 1; bn = 1}
unless n = 0
Associate with each n-bit vector the corresponding polynomial. Like
a generating function. Arithmetric operations (+, ×) apply to 2[x],
provided we do arithmetic on the coefficients in 2 (mod 2).
A polynomial P(x) is prime (or irreducible) if it cannot be factored
(over 2[x]) into lower-order polynomials.
Examples:
x, x + 1, x2 + x + 1, x3 + x + 1, x3 + x2 + 1 all prime
composite:
x2, x2 + 1 = (x + 1)2, x2 + x, x3, x3 + 1, x3 + x2 + x + 1 =
(x + 1)3.
Primitive roots:
e2πi/n generates all roots of xn − 1 over . If n
is prime, any root (except 1) will work.
11.5, 11.6, 11.7
Polynomial arithmetic
Consider arithmetic in 2[x] / p(x) modulo an irreducible polynomial
p(x) of degree n. Since xn ≡ p(x) − xn (mod p(x)) there are no
polynomials of degree ≥ n. In fact, 2[x] / p(x) has 2n elements:
bn−1xn−1 + … + b0, which form a field, and hence there exists a
polynomial g(x) whose powers generate all the non-zero elements.
E.g. The powers of g(x) = x mod p(x) = x3 + x + 1 are:
1, x, x2, x + 1, x2 + x, x2 + x + 1, x2 + 1. Writing these as column
vectors of a matrix gives a rearranged Hamming code:
n=3
1 1 1 0 1 0 0 x2
2n = 8 = | 2[x] / p(x) |
M = 0 1 1 1 0 1 0 x1
7 = 8 − 1 (# non-zero)
1 1 0 1 0 0 1 x0
x6 x5 x4 x3 x2 x1 x0
11.8
Polynomial Coding
A sent codeword should have McT = 0, which means that
c(x), as a polynomial, is evenly divisible by p(x), the
modulus polynomial. Why?
Because c(x) = c6x6 + … + c0 , and McT = c(x) by
definition of matrix multiplication, and since the powers of
x that make up the columns of M are modulo p(x),
McT = 0 c(x) ≡ 0 (mod p(x)).
For a received codeword c′, Mc′T = MeT = syndrome, and
similarly, the corresponding polynomial s(x) has
c′(x) − s(x) ≡ 0 mod p(x) c′(x) ≡ s(x) and that the
column matched, xi ≡ s(x) is the error location (assuming e
contains only one error, i.e. s(x) ≡ xi).
11.8 end
Encode:
Place message in colums 6, 5, 4, 3, and compute
b6x6 + b5x5 + b4x4 + b3x3 modulo p(x). Put remainder,
r(x) = b2x2 + b1x + b0, in the last columns.
message
checks
b6 b5 b4 b3 b2 b1 b0
Decode:
Divide received polynomial by p(x), and use the
remainder r(x) ≡ gi (x) to locate error position i).
no error i doesn’t exist. (r ( x ) 0 mod p( x))
Example:
1001
1001110
x 6 + x3 + ?
/\
/\
x2 + 1 + x + 1 = x2 + x
11.8
Double error-correcting Code
An illustration: start with a 15 bit Hamming code having 4 parity
checks.
Verify that x4 + x + 1 is prime, and that the primitive x generates
2[x] / (x4 + x + 1) \ {0}.
The resulting parity check matrix M1 is single error-correcting, but
x + x2 = x12 + x14 so double error-correction is impossible.
Now, pick another primitive generator x3 of the same
2[x] / (x4 + x + 1), with resulting matrix M2.
Let s1 = xi + xj = M1 c′T be the first syndrome and
s2 = (x3)i + (x3)j = M2 c′T be the second syndrome.
Then s2 = (xi)3 + (xj)3 = (xi + xj)((xi)2 + (xi)(xj) + (xj)2) = s1[xixj + s12]
So that:
xi + xj = s1 and xixj = s12 + s2/s1
11.11