1 / 8

Lecture 17: Parity Checking Schemes

This lecture explores the concept of even parity extension in codes, minimum distance of codes, error detection, and error correction. The lecture also discusses the application of parity checking schemes in ISBN book numbers and the equivalence of codes.

catherinep
Download Presentation

Lecture 17: Parity Checking Schemes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture 17Making New Codes from Old Codes(Section 4.6) Theory of Information

  2. Parity Checking Schemes DefinitionAdding an even parity check to a code C is adding to each of its codewords an extra bit to make the total number of 1s in the new codewords even: if c = b1b2 …bnthen b1b2 …bn0 if # of 1s among b1b2 …bnis even c= b1b2 …bn1 if # of 1s among b1b2 …bn is odd Example: If C = {00, 01, 10, 11}, then its even-parity extension is C = The number of 1s in a given binary string c is called its weight w(c). Is the weight of c even or odd? Hence, the minimum distance of C is at least what? How does d(C) compare with d(C)? Hence (d(C)-1)/2=

  3. Impact of Even Parity Extension (d(C)-1)/2= (d(C)-1)/2 Theorem If C is an (n, M, d)code, then C is an (n+1, M, d) or (n+1, M, d+1)code, depending on whether d is even or odd. Recall the error-detection and error-correction theorems: Theorem A code is u-error-detecting if and only if ud –1. Theorem A code is v-error-correcting if and only if v  (d-1)/2. Hence: Even-parity extension can increase the code’s error-detecting capabilities by 1 (if d(C) is odd). But it cannot increase its error-correcting capabilities (since (d(C) -1)/2 = (d(C) -1)/2 ).

  4. Generalizing Even Parity Extension If the code is ternary, to a codeword c=c1…cn we add cn+1 such that c1+…+cn+cn+1=0 (mod 3). Example: extending 1012012 yields 10120121 More generally, if the code alphabet is any finite field, say Zp where p is prime, to a codeword c=c1…cn we add cn+1 such that c1+…+cn+cn+1= the sum of the elements of c Example: Assume the code alphabet is Z7={0,1,…,6}. Then extending 56031234 yields 560312343

  5. ISBN Book Numbers The International Standard Book Number (ISBN) is a 10-digit code assigned to books (and other printed materials). The first nine decimal digits indicate the country, the publisher and the book number assigned by the publisher. The tenth digit is used as a validity check. The check digit, d10, is a number between 0 and 9 or an uppercase X (for the Roman numeral 10); it is computed to satisfy the equation: 10d1+9d2+…+2d9+d10 = 0 (mod 11) E.g. 0-387-94704-3 10*0+9*3+8*8+7*7+6*9+5*4+4*7+3*0+2*4+1*3=253, and 253 = 0 (mod 11). This scheme can detect all single-digit errors.

  6. Equivalence of Codes Let C be an r-ary (n,M)-code over the alphabet A={a1,…,ar}. Consider the following procedure for transforming C: 1. Pick any permutation for {1,…,n}, and permute the code symbol in each codeword of C using . That is, replace each codeword c1…cn by the word c(1) …c(n). Denote the resulting code by D. 2. For each position i (1in), choose a permutation i for A and, using it, permute the ith code symbols in each codeword of D. That is, replace each codeword d1…dn by 1(d1)…n(dn). Denote the resulting code by E. Example. Let A={0,1}, and C={0000,0011,1010,1111}. Let  be the permutation that reverses the order, i.e. (1)=4, (2)=2, (3)=2, (4)=1. Let 1 and 3 swap 0 with 1 (i.e. 1(0)= 3(0)=1 and 1(1)= 3(1)= 0), and 2, 4 change nothing (i.e. 2(0)=4(0)=0 and 2(1)=4(1)=1). Then D= E=

  7. Equivalence of Codes (continued) Definition A code E is said to be equivalent to a code C iff E can be obtained from C using the procedure of the previous slide. Lemma 4.6.1 If the code alphabet A contains 0, then any code over A is equivalent to a code that contains the zero codeword0=0…0. Theorem 4.6.2 Equivalent codes have the same parameters (length, size and minimum distance).

  8. Homework 1. Check the following ISBN for errors: 0-1321-2571-4 2. Find the check digit for ISBN: 0-1315-2447-? 3. Construct a code E that is equivalent to C={000,101,111} yet different from C. Show why the equivalence holds, i.e. show the permutations that yield E. 4. Exercises 1,2,3 of Section 4.6 of the textbook.

More Related