150 likes | 172 Views
Lecture 16 Perfect Codes and the Sphere-Packing Condition (Section 4.5). Theory of Information. Spheres in Z n r. Definition Let x be a string of length n over an r- ary code, and let ρ be a nonnegative
E N D
Lecture 16Perfect Codes and the Sphere-Packing Condition(Section 4.5) Theory of Information
Spheres in Znr Definition Let x be a string of length n over an r-ary code, and let ρ be a nonnegative integer. The sphere Snr(x, ρ) with center x and radius ρ is the set of all r-ary strings of length n whose Hamming distance from x is less than or equal to ρ: Snr(x, ρ) = {y Znr | d(x, y) ρ}. Examples: S22(00,1) = S23(00,1) = S32(101,2) =
S32(111,0) 001 101 011 111 000 100 010 110 Volume = 1
S32(111,1) 001 101 011 111 000 100 010 110 Volume = 4
S32(111,2) 001 101 011 111 000 100 010 110 Volume = 7
S32(111,3) 001 101 011 111 000 100 010 110 Volume = 8
Calculating the Volume k=0 k=0 The volume of a given sphere is the number of strings in it. Vnr() stands for the volume of a(ny) sphere Snr(x,C). What is the number of strings at distance k from 0n in Zn2? What is the number of strings at distance k from 0n in Zn3? What is the number of strings at distance k from 0n in Zn4? What is the number of strings at distance k from 0n in Znr? What is the number of strings at distance from 0n in Znr? Theorem 4.5.1. Vnr() = (n choose k)(r-1)k Corollary. Vn2() = (n choose k)
Examples of Calculating the Volume k=0 k=0 Theorem 4.5.1. Vnr() = (n choose k)(r-1)k Corollary. Vn2() = (n choose k) V32(0) = V32(1) = V32(2) = V32(3) = V52(2) = V53(2) =
The Packing Radius of a Code Definition Let C be an r-ary (n, M, d) code. The packing radius of C, denoted pr(C), is the largest possible radius for a set of disjoint spheres, one centered at each codeword. The spheres Snr(c, pr(C)), centered at each codeword c, are called the packing spheres for C. 001 101 001 101 011 111 011 111 000 100 000 100 010 110 010 110 C={000,111} pr(C) = C={001,111} pr(C) =
Error Correction and Packing Radius of a Code Theorem 4.5.2The packing radius of an (n, M, d) code is pr(C) = (d(C) -1)/2. Corollary 4.5.3 A code C is exactly v-error correcting if and only if pr(C) = v. d(C)=5 pr(C)=2 d(C)=6 pr(C)=2
Perfect Codes Definition An r-ary (n, M, d) code C = {c1, …, cM} with code alphabet A, is said to be perfect iff any of the following equivalent conditions holds: 1. Every string in An is contained in some packing sphere. 2. The union of the packing spheres is precisely An. 3. The sum of the volumes of the packing spheres is equal to the number of all strings in An, i.e., This last equation is called the sphere-packing condition. (d-1)/2 M * C(n,k)(r-1)k = rn k=0
Which Code Is Perfect and Which Is not? 001 101 001 101 011 111 011 111 000 100 000 100 010 110 010 110 001 101 001 101 011 111 011 111 000 100 000 100 010 110 010 110
When Is a Binary Repetition Code Perfect? Examples of repetition codes: {0000,1111} {00000,11111} parameters: parameters: {000000,111111} {0000000,1111111} parameters: parameters: When is a binary repetition code perfect?
Perfect Codes Are Rare A code is perfect iff its parameters (plus arity) satisfy the sphere-packing condition. However, the fact that given parameters satisfy that condition does not imply that a code with those parameters exists. In fact, perfect codes are rather rare. E.g., it has been proven that the only perfect binary 2-error-correcting codes are repetition codes (which are not very useful) and the Golay code with parameters (23, 212,7).
Homework • Compute the following volumes: • V62(2) • V63(2) • V72(3) • V105(1) 2. If a binary (7,20,3)-code existed, would it be perfect? Justify your answer by testing the sphere-packing condition. 3. If a ternary (7,20,3)-code exists, is it perfect? Justify your answer.