Theory of Information Lecture 16 Perfect Codes and

  • Slides: 15
Download presentation
Theory of Information Lecture 16 Perfect Codes and the Sphere. Packing Condition (Section 4.

Theory of Information Lecture 16 Perfect Codes and the Sphere. Packing Condition (Section 4. 5) 1

Spheres in Znr Definition Let x be a string of length n over an

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: S 22(00, 1) = S 23(00, 1) = S 32(101, 2) = 2

S 32(111, 0) 001 011 101 111 000 010 100 110 Volume = 1

S 32(111, 0) 001 011 101 111 000 010 100 110 Volume = 1 3

S 32(111, 1) 001 011 101 111 000 010 100 110 Volume = 4

S 32(111, 1) 001 011 101 111 000 010 100 110 Volume = 4 4

S 32(111, 2) 001 011 101 111 000 010 100 110 Volume = 7

S 32(111, 2) 001 011 101 111 000 010 100 110 Volume = 7 5

S 32(111, 3) 001 011 101 111 000 010 100 110 Volume = 8

S 32(111, 3) 001 011 101 111 000 010 100 110 Volume = 8 6

Calculating the Volume The volume of a given sphere is the number of strings

Calculating the Volume 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 0 n in Zn 2? What is the number of strings at distance k from 0 n in Zn 3? What is the number of strings at distance k from 0 n in Zn 4? What is the number of strings at distance k from 0 n in Znr? What is the number of strings at distance from 0 n in Znr? Theorem 4. 5. 1. Vnr( ) = (n choose k)(r-1)k k=0 Corollary. Vn 2( ) = k=0 (n choose k) 7

Examples of Calculating the Volume Theorem 4. 5. 1. Vnr( ) = (n choose

Examples of Calculating the Volume Theorem 4. 5. 1. Vnr( ) = (n choose k)(r-1)k k=0 Corollary. Vn 2( ) = (n choose k) k=0 V 32(0) = V 32(1) = V 32(2) = V 32(3) = V 52(2) = V 53(2) = 8

The Packing Radius of a Code Definition Let C be an r-ary (n, M,

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 011 101 111 000 010 C={000, 111} pr(C) = 001 011 100 110 101 111 000 010 C={001, 111} pr(C) = 100 110 9

Error Correction and Packing Radius of a Code Theorem 4. 5. 2 The packing

Error Correction and Packing Radius of a Code Theorem 4. 5. 2 The 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 10

Perfect Codes Definition An r-ary (n, M, d) code C = {c 1, …,

Perfect Codes Definition An r-ary (n, M, d) code C = {c 1, …, c. M} 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. , (d-1)/2 M* C(n, k)(r-1)k = rn k=0 This last equation is called the sphere-packing condition. 11

Which Code Is Perfect and Which Is not? 001 011 101 111 000 010

Which Code Is Perfect and Which Is not? 001 011 101 111 000 010 100 001 100 110 001 011 100 111 010 111 101 000 010 011 110 011 001 111 000 010 100 110 12

When Is a Binary Repetition Code Perfect? Examples of repetition codes: {0000, 1111} parameters:

When Is a Binary Repetition Code Perfect? Examples of repetition codes: {0000, 1111} parameters: {00000, 11111} parameters: {000000, 111111} parameters: {0000000, 1111111} parameters: When is a binary repetition code perfect? 13

Perfect Codes Are Rare A code is perfect iff its parameters (plus arity) satisfy

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). 14

Homework 1. a) b) c) d) Compute the following volumes: V 62(2) V 63(2)

Homework 1. a) b) c) d) Compute the following volumes: V 62(2) V 63(2) V 72(3) V 105(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. 15