Download presentation
Presentation is loading. Please wait.
Published byPreston Fletcher Modified over 5 years ago
1
Lecture 17 Making New Codes from Old Codes (Section 4.6)
Theory of Information Lecture 13 Theory of Information Lecture 17 Making New Codes from Old Codes (Section 4.6)
2
Parity Checking Schemes
Definition Adding 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 …bn then b1b2 …bn0 if # of 1s among b1b2 …bn is 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 yields 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 yields
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 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 (1in), 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 If the code alphabet A contains 0, then any code over A is equivalent to a code that contains the zero codeword 0=0…0. Theorem Equivalent codes have the same parameters (length, size and minimum distance).
8
Theory of Information Lecture 13
Homework 1. Check the following ISBN for errors: 2. Find the check digit for ISBN: ? 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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.