Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY
Motivation: Suppose you wish to send a message to either execute or not a particular command; 1 to execute, 0 to not. The message is to be transmitted thousands of miles away and is susceptible to interference (noise) that could alter the intended message. What could be done to improve a safe delivery? Suppose you wish to send a message to either execute or not a particular command; 1 to execute, 0 to not. The message is to be transmitted thousands of miles away and is susceptible to interference (noise) that could alter the intended message. What could be done to improve a safe delivery?
Simple apply redundancy Start with the idea of majority rule. So if you want to send the message of 0, turn it into Whichever number appears the most is the intended one. Start with the idea of majority rule. So if you want to send the message of 0, turn it into Whichever number appears the most is the intended one. This involves the idea of independent error (maximum-likelihood decoding) This involves the idea of independent error (maximum-likelihood decoding) So if you send a sequence of length 500 and each digit has a probability of error q=.01 (p=.99). SO the chance that the message is sent error free equals (.99)^500 or approx So if you send a sequence of length 500 and each digit has a probability of error q=.01 (p=.99). SO the chance that the message is sent error free equals (.99)^500 or approx..0066
Three fold repetition scheme > > > >111 Error can only occur if 001,010,100,000 Error can only occur if 001,010,100,000 Q (error)= (.01)(.01)(.99)+(.01)(.99)(.01)+(.99)(.01)(.01)+(.01)(. 01)(.01) ≈ Q (error)= (.01)(.01)(.99)+(.01)(.99)(.01)+(.99)(.01)(.01)+(.01)(. 01)(.01) ≈ P(no error) = (.99702)^500 ≈.86 P(no error) = (.99702)^500 ≈.86
Goal To devise reliable, efficient, and reasonably easy to implement To devise reliable, efficient, and reasonably easy to implement Three basic features: 1.set of messages 2.method of encoding 3. method of decoding Three basic features: 1.set of messages 2.method of encoding 3. method of decoding
Example 1:
Example 1 cont.
Definition: Linear Code An (n, k) linear code over a field F is a k-dimensional subspace V of the vector space An (n, k) linear code over a field F is a k-dimensional subspace V of the vector space F = F + F +… +F n copies Over F. The members of V are called the code words. When F is Z 2 the code is called binary. The message consist of k digits and the redundancy of the remaining n - k The message consist of k digits and the redundancy of the remaining n - k
Example 4: The set {0000,0121, 0212, 1022, 1110, 1201, 2011, 2102, 2220} is a (4,2) linear code over Z3; called a ternary code.
Definitions: The Hamming distance between two vectors of a vector space is the number of components in which they differ. Denoted d(u,v). The Hamming weight of a vector is the number of nonzero components of the vector. Denoted wt(u). The Hamming weight of a linear code is the minimum weight of any nonzero vector in the code. Example s = , t = , v = d(s,t) = 4, d(s,v) = 5, wt(s) = 4, wt(v) = 5
Theorem For any vectors u,v, and w, d(u,v) ≤ d(u,w) + d(w,v) and d(u,v) = wt(u – v). This theorem and the previous definitions give the following.Theorem If the Hamming weight of a linear code is at least 2t + 1, then the code can correct any to or fewer errors. Alternatively, the same code can detect any 2t or fewer errors. Note: A linear code with Hamming weight 2t + 1 can detect t errors or 2t errors, not both.
Example Hamming (7,4) code revisited (Table on p523) Hamming weight is 3 = 2 * This code can detect 1 error or 1 or 2 errors.
CHOSING THE G MATRIX
Parity-check matrix decoding For any received word w, compute wH. For any received word w, compute wH. If wH is the zero vector, assume no error was made. If wH is the zero vector, assume no error was made. If there exist one instance of a nonzero element s € F and a row i of H s.t. wH is s times row i, assume the sent word was w – (0…s…0) where s occurs in the ith component. If there is more than one such instance, do not decode. If there exist one instance of a nonzero element s € F and a row i of H s.t. wH is s times row i, assume the sent word was w – (0…s…0) where s occurs in the ith component. If there is more than one such instance, do not decode. If wH does not fit into either category 2 or 3, at least two errors occurred; don’t decode. If wH does not fit into either category 2 or 3, at least two errors occurred; don’t decode.
Example Hamming (7,4) code The generator matrix G is The parity-check matrix H is
Example (cont) Consider received word v = , vH = is 1 st row of H and no other, so an error was made in the 1 st position of v. So the received word is really
Lemma: Orthogonality Relation Let C be an (n, k) linear code over F with generator matrix G and parity- check matrix H. Then for any vector in F^n, we have vH = 0 (the zero vector) iff v belongs to C Let C be an (n, k) linear code over F with generator matrix G and parity- check matrix H. Then for any vector in F^n, we have vH = 0 (the zero vector) iff v belongs to C
Theorem 31.3 Parity-Check Matrix Decoding Parity-check matrix decoding will correct any single error if and only if if and only if the rows of the parity-check matrix are nonzero and no one row is a scalar multiple of any other. the rows of the parity-check matrix are nonzero and no one row is a scalar multiple of any other.
Coset Decoding Do this by constructing a table called a standard array. 1 st row is the set C of received code words beginning with the identity st row is the set C of received code words beginning with the identity choose another element v in V and consider the coset v + C choose another element v in V and consider the coset v + C (where v is not an element already listed in the table) (where v is not an element already listed in the table) among the elements of v + C, choose one of minimum weight, among the elements of v + C, choose one of minimum weight, call it v‘. call it v‘. create the next row by placing vector v‘ + c under the code create the next row by placing vector v‘ + c under the code word c word c continue until all vectors in V have been listed continue until all vectors in V have been listed (Note: an (n, k) linear code over a field with q elements will have (Note: an (n, k) linear code over a field with q elements will have |v * c| = q^( n- k) rows |v * c| = q^( n- k) rows 1 st column is called the coset leaders 1 st column is called the coset leaders
Example Consider (6,3) binary linear code C = {000000, , , , , , , }
Theorem 31.4 Coset Decoding Is Nearest-Neighbor Decoding In coset decoding, a received word w is decoded as a code word c such that d( w, c) is a minimum In coset decoding, a received word w is decoded as a code word c such that d( w, c) is a minimum
Definition If an (n, k) linear code over F has a parity-check matrix H, then, for any vector u in F^n, the vector uH is called the syndrome of u. Theorem Let C be an (n, k,) linear code over F with a parity-check matrix H. Then, two vectors of F^ n are in the same coset of C iff they have the same syndrome. We can use syndromes for decoding any received word w: Calculate wH (syndrome) Calculate wH (syndrome) Find coset leader v such that wH = vH Find coset leader v such that wH = vH Assume vector sent was w - v Assume vector sent was w - v
Example 11 H = H = Coset leaders Coset leaders Syndromes Syndromes For v = , vH = 100. Since the coset leader has 100 as its syndrome, v = was sent. For v = , vH = 100. Since the coset leader has 100 as its syndrome, v = was sent