<<

: Linear Error- Correcting

Anna Dovzhik

Outline Coding Theory: Linear Error-Correcting Codes Coding Theory Basic Definitions Error Detection and Correction Finite Fields Anna Dovzhik

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes April 23, 2014 Reed-Solomon Codes Conclusion Coding Theory: Linear Error- Correcting 1 Coding Theory Codes Basic Definitions Anna Dovzhik Error Detection and Correction Outline Coding Theory 2 Finite Fields Basic Definitions Error Detection and Correction 3 Finite Fields Linear Codes

Linear Codes Hamming Codes Hamming Codes Finite Fields Finite Fields Revisited Revisited BCH Codes BCH Codes Reed-Solomon Codes Reed-Solomon Codes Conclusion 4 Conclusion Definition

A q-ary word w = w1w2w3 ... wn is a vector where wi ∈ A.

Definition A q-ary block is a set C over an alphabet A, where each element, or codeword, is a q-ary word of length n.

Basic Definitions

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik Definition If A = a , a ,..., a , then A is a code alphabet of size q. Outline 1 2 q

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Definition A q-ary is a set C over an alphabet A, where each element, or codeword, is a q-ary word of length n.

Basic Definitions

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik Definition If A = a , a ,..., a , then A is a code alphabet of size q. Outline 1 2 q

Coding Theory Basic Definitions Error Detection Definition and Correction Finite Fields A q-ary word w = w1w2w3 ... wn is a vector where wi ∈ A.

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Basic Definitions

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik Definition If A = a , a ,..., a , then A is a code alphabet of size q. Outline 1 2 q

Coding Theory Basic Definitions Error Detection Definition and Correction Finite Fields A q-ary word w = w1w2w3 ... wn is a vector where wi ∈ A.

Linear Codes Hamming Codes Finite Fields Definition Revisited BCH Codes A q-ary block code is a set C over an alphabet A, where each Reed-Solomon Codes element, or codeword, is a q-ary word of length n. Conclusion Definition For a code C, the minimum distance is denoted d(C) = min{d(w1w2): w1, w2 ∈ C, w1 6= w2}.

Definition For a codeword w, the Hamming weight of w, or wt(w), is the number of nonzero places in w. That is, wt(w) = d(w, 0).

Basic Definitions

Coding Theory: Linear Error- Correcting Definition Codes

Anna Dovzhik For two codewords, w1, w2, over the same alphabet, the , denoted d(w1, w2), is the number of places Outline where the two vectors differ. Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Definition For a codeword w, the Hamming weight of w, or wt(w), is the number of nonzero places in w. That is, wt(w) = d(w, 0).

Basic Definitions

Coding Theory: Linear Error- Correcting Definition Codes

Anna Dovzhik For two codewords, w1, w2, over the same alphabet, the Hamming distance, denoted d(w1, w2), is the number of places Outline where the two vectors differ. Coding Theory Basic Definitions Error Detection and Correction Definition Finite Fields For a code C, the minimum distance is denoted Linear Codes Hamming Codes d(C) = min{d(w1w2): w1, w2 ∈ C, w1 6= w2}. Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Basic Definitions

Coding Theory: Linear Error- Correcting Definition Codes

Anna Dovzhik For two codewords, w1, w2, over the same alphabet, the Hamming distance, denoted d(w1, w2), is the number of places Outline where the two vectors differ. Coding Theory Basic Definitions Error Detection and Correction Definition Finite Fields For a code C, the minimum distance is denoted Linear Codes Hamming Codes d(C) = min{d(w1w2): w1, w2 ∈ C, w1 6= w2}. Finite Fields Revisited BCH Codes Reed-Solomon Codes Definition Conclusion For a codeword w, the Hamming weight of w, or wt(w), is the number of nonzero places in w. That is, wt(w) = d(w, 0). Example • A binary (3,4,2)-code

• A = F2 = {0, 1} • C = {000, 011, 110, 101}

The main coding theory problem: optimizing one parameter when others are given.

Example

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik Notation:A q-ary (n, M, d)-code

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion The main coding theory problem: optimizing one parameter when others are given.

Example

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik Notation:A q-ary (n, M, d)-code Outline Example Coding Theory Basic Definitions • A binary (3,4,2)-code Error Detection and Correction • A = F2 = {0, 1} Finite Fields

Linear Codes • C = {000, 011, 110, 101} Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Example

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik Notation:A q-ary (n, M, d)-code Outline Example Coding Theory Basic Definitions • A binary (3,4,2)-code Error Detection and Correction • A = F2 = {0, 1} Finite Fields

Linear Codes • C = {000, 011, 110, 101} Hamming Codes Finite Fields Revisited The main coding theory problem: optimizing one parameter BCH Codes Reed-Solomon Codes when others are given. Conclusion Example Binary (3,3,1)-code C = {001, 101, 110}

• e1 = 010 can be detected → for all x ∈ C, x + e1 6∈ C

• e2 = 100 cannot be detected → 001 + 100 = 101 ∈ C

Errors

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik • vector received is not a codeword

Outline • x is sent, but y is received → e = x + y Coding Theory • To detect e, x + e cannot be a codeword Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Errors

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik • vector received is not a codeword

Outline • x is sent, but y is received → e = x + y Coding Theory • To detect e, x + e cannot be a codeword Basic Definitions Error Detection and Correction Finite Fields Example Linear Codes Binary (3,3,1)-code C = {001, 101, 110} Hamming Codes Finite Fields Revisited • e = 010 can be detected → for all x ∈ C, x + e 6∈ C BCH Codes 1 1 Reed-Solomon Codes • e2 = 100 cannot be detected → 001 + 100 = 101 ∈ C Conclusion Theorem A code is u-error-detecting if and only if d(C) ≥ u + 1.

Proof. (⇐) Any error pattern of weight at most u will alter a codeword into a non-codeword. (⇒) Suppose that for x, y ∈ C, d(x, y) ≤ u. Let e = x + y, wt(e) ≤ u, and x + e = x + x + y = y, which is a codeword. Therefore, e cannot be detected. (⇒)(⇐)

Error Detection

Coding Theory: Linear Error- Definition Correcting Codes A code is u-error-detecting if when a codeword incurs Anna Dovzhik between one to u errors, the resulting word is not a codeword.

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Proof. (⇐) Any error pattern of weight at most u will alter a codeword into a non-codeword. (⇒) Suppose that for x, y ∈ C, d(x, y) ≤ u. Let e = x + y, wt(e) ≤ u, and x + e = x + x + y = y, which is a codeword. Therefore, e cannot be detected. (⇒)(⇐)

Error Detection

Coding Theory: Linear Error- Definition Correcting Codes A code is u-error-detecting if when a codeword incurs Anna Dovzhik between one to u errors, the resulting word is not a codeword.

Outline

Coding Theory Theorem Basic Definitions Error Detection A code is u-error-detecting if and only if d(C) ≥ u + 1. and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Error Detection

Coding Theory: Linear Error- Definition Correcting Codes A code is u-error-detecting if when a codeword incurs Anna Dovzhik between one to u errors, the resulting word is not a codeword.

Outline

Coding Theory Theorem Basic Definitions Error Detection A code is u-error-detecting if and only if d(C) ≥ u + 1. and Correction Finite Fields

Linear Codes Proof. Hamming Codes Finite Fields (⇐) Any error pattern of weight at most u will alter a Revisited BCH Codes codeword into a non-codeword. Reed-Solomon Codes (⇒) Suppose that for x, y ∈ C, d(x, y) ≤ u. Let e = x + y, Conclusion wt(e) ≤ u, and x + e = x + x + y = y, which is a codeword. Therefore, e cannot be detected. (⇒)(⇐) Definition A code is v-error-correcting if v or fewer errors can be corrected by decoding a transmitted word based on minimum distance.

Theorem A code is v-error-correcting if and only if d(C) ≥ 2v + 1. That d−1 is, if C has a distance d, it corrects 2 errors.

Error Correction

Coding Theory: Linear Error- Correcting Codes • e + x is closer to x than any other codeword Anna Dovzhik • evaluate minimum distances Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Theorem A code is v-error-correcting if and only if d(C) ≥ 2v + 1. That d−1 is, if C has a distance d, it corrects 2 errors.

Error Correction

Coding Theory: Linear Error- Correcting Codes • e + x is closer to x than any other codeword Anna Dovzhik • evaluate minimum distances Outline

Coding Theory Definition Basic Definitions Error Detection A code is v-error-correcting if v or fewer errors can be and Correction Finite Fields corrected by decoding a transmitted word based on minimum

Linear Codes distance. Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Error Correction

Coding Theory: Linear Error- Correcting Codes • e + x is closer to x than any other codeword Anna Dovzhik • evaluate minimum distances Outline

Coding Theory Definition Basic Definitions Error Detection A code is v-error-correcting if v or fewer errors can be and Correction Finite Fields corrected by decoding a transmitted word based on minimum

Linear Codes distance. Hamming Codes Finite Fields Revisited BCH Codes Theorem Reed-Solomon Codes A code is v-error-correcting if and only if d(C) ≥ 2v + 1. That Conclusion d−1 is, if C has a distance d, it corrects 2 errors. Binary field - arithmetic mod 2 + 0 1 · 0 1 0 0 1 0 0 0 1 1 0 1 0 1

Finite Fields

Coding Theory: Linear Error- Definition Correcting Codes A field is a nonempty set F of elements satisfying: Anna Dovzhik • operations addition and multiplication Outline • eight axioms Coding Theory • closure under addition and multiplication Basic Definitions Error Detection • commutativity of addition and multiplication and Correction Finite Fields • associativity of addition and multiplication • Linear Codes distributivity of multiplication over addition Hamming Codes • additive and multiplicative identities Finite Fields Revisited • additive and multiplicative inverses BCH Codes Reed-Solomon Codes Conclusion Finite Fields

Coding Theory: Linear Error- Definition Correcting Codes A field is a nonempty set F of elements satisfying: Anna Dovzhik • operations addition and multiplication Outline • eight axioms Coding Theory • closure under addition and multiplication Basic Definitions Error Detection • commutativity of addition and multiplication and Correction Finite Fields • associativity of addition and multiplication • Linear Codes distributivity of multiplication over addition Hamming Codes • additive and multiplicative identities Finite Fields Revisited • additive and multiplicative inverses BCH Codes Reed-Solomon Codes Binary field - arithmetic mod 2 Conclusion + 0 1 · 0 1 0 0 1 0 0 0 1 1 0 1 0 1 Definition Denote the multiplicative identity of a field F as 1. Then characteristic of F is the least positive integer p such that 1 added to itself p times is equal to 0. This characteristic must be either 0 or a prime number.

Theorem A finite field F of characteristic p contains pn elements for some integer n ≥ 1.

Finite Fields

Coding Theory: Linear Error- Correcting Theorem Codes

Anna Dovzhik Zp is a field if and only if p is a prime.

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Theorem A finite field F of characteristic p contains pn elements for some integer n ≥ 1.

Finite Fields

Coding Theory: Linear Error- Correcting Theorem Codes

Anna Dovzhik Zp is a field if and only if p is a prime.

Outline Definition Coding Theory Basic Definitions Error Detection Denote the multiplicative identity of a field F as 1. Then and Correction characteristic of F is the least positive integer p such that 1 Finite Fields added to itself p times is equal to 0. This characteristic must Linear Codes Hamming Codes be either 0 or a prime number. Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Finite Fields

Coding Theory: Linear Error- Correcting Theorem Codes

Anna Dovzhik Zp is a field if and only if p is a prime.

Outline Definition Coding Theory Basic Definitions Error Detection Denote the multiplicative identity of a field F as 1. Then and Correction characteristic of F is the least positive integer p such that 1 Finite Fields added to itself p times is equal to 0. This characteristic must Linear Codes Hamming Codes be either 0 or a prime number. Finite Fields Revisited BCH Codes Reed-Solomon Codes Theorem Conclusion A finite field F of characteristic p contains pn elements for some integer n ≥ 1. • Codewords are linear combinations (qk distinct codewords)

Definition A matrix whose rows are the vectors of a linear code is a .

Definition Two q-ary codes are equivalent if one can be obtained from the other using a combination of the operations • permutation of the positions of the code (column swap) • multiplication of the symbols appearing in a fixed position (row operation)

Linear Codes

Coding Theory: • A linear (n, k, d)-code C over a finite field Fq is a Linear Error- n Correcting subspace of the F Codes q

Anna Dovzhik

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Definition A matrix whose rows are the basis vectors of a linear code is a generator matrix.

Definition Two q-ary codes are equivalent if one can be obtained from the other using a combination of the operations • permutation of the positions of the code (column swap) • multiplication of the symbols appearing in a fixed position (row operation)

Linear Codes

Coding Theory: • A linear (n, k, d)-code C over a finite field Fq is a Linear Error- n Correcting subspace of the vector space F Codes q k Anna Dovzhik • Codewords are linear combinations (q distinct codewords)

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Definition Two q-ary codes are equivalent if one can be obtained from the other using a combination of the operations • permutation of the positions of the code (column swap) • multiplication of the symbols appearing in a fixed position (row operation)

Linear Codes

Coding Theory: • A linear (n, k, d)-code C over a finite field Fq is a Linear Error- n Correcting subspace of the vector space F Codes q k Anna Dovzhik • Codewords are linear combinations (q distinct codewords)

Outline

Coding Theory Definition Basic Definitions Error Detection A matrix whose rows are the basis vectors of a linear code is a and Correction generator matrix. Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Linear Codes

Coding Theory: • A linear (n, k, d)-code C over a finite field Fq is a Linear Error- n Correcting subspace of the vector space F Codes q k Anna Dovzhik • Codewords are linear combinations (q distinct codewords)

Outline

Coding Theory Definition Basic Definitions Error Detection A matrix whose rows are the basis vectors of a linear code is a and Correction generator matrix. Finite Fields

Linear Codes Hamming Codes Definition Finite Fields Revisited BCH Codes Two q-ary codes are equivalent if one can be obtained from the Reed-Solomon Codes other using a combination of the operations Conclusion • permutation of the positions of the code (column swap) • multiplication of the symbols appearing in a fixed position (row operation) • C is a (n, k, d)-code → generator matrix G is k × n and parity-check matrix H is (n − k) × n.

• The standard form of G is (Ik |A) and the standard form of H is (B|In−k ).

Linear Codes

Coding Theory: Linear Error- Correcting Codes Definition Anna Dovzhik n ⊥ If C is a linear code in Fq, then the dual code of C is C . Outline

Coding Theory Basic Definitions Definition Error Detection and Correction A parity-check matrix is a generator matrix for the dual code. Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Linear Codes

Coding Theory: Linear Error- Correcting Codes Definition Anna Dovzhik n ⊥ If C is a linear code in Fq, then the dual code of C is C . Outline

Coding Theory Basic Definitions Definition Error Detection and Correction A parity-check matrix is a generator matrix for the dual code. Finite Fields

Linear Codes Hamming Codes • C is a (n, k, d)-code → generator matrix G is k × n and Finite Fields Revisited BCH Codes parity-check matrix H is (n − k) × n. Reed-Solomon Codes • The standard form of G is (Ik |A) and the standard form of Conclusion H is (B|In−k ). Theorems

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik Theorem Outline

Coding Theory If C is a (n, k)-code over Fp, then v is a codeword of C if and Basic Definitions only if it is orthogonal to every row of the parity-check matrix Error Detection and Correction H, or equivalently, vHT = 0. Finite Fields This also means that G is a generator matrix for C if and only Linear Codes T Hamming Codes if the rows of G are linearly independent and GH = O. Finite Fields Revisited BCH Codes Reed-Solomon Proof: orthogonality Codes Conclusion Theorems

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik

Outline Theorem Coding Theory Basic Definitions If G = (Ik |A) is the standard form of the generator matrix for a Error Detection and Correction (n, k, d)-code C, then a parity-check matrix for C is Finite Fields T H = (−A |In−k ). Linear Codes Hamming Codes Finite Fields Note that if the code is binary, negation is unnecessary Revisited BCH Codes Reed-Solomon Codes Conclusion Theorems

Coding Theory: Linear Error- Correcting Codes Theorem Anna Dovzhik For a linear code C and a parity-check matrix H, Outline Coding Theory • C has distance ≥ d if and only if any d − 1 columns of H Basic Definitions Error Detection are linearly independent and Correction Finite Fields • C has distance ≤ d if and only if H has d columns that Linear Codes are linearly dependent. Hamming Codes Finite Fields Revisited BCH Codes So, when C has distance d, any d − 1 columns of H are linearly Reed-Solomon Codes independent and H has d columns that are linearly dependent. Conclusion Proof: orthogonality Definition A q-ary code is a perfect code if it attains the Hamming, or sphere-packing bound. For q > 1 and 1 ≤ d ≤ n, this is defined as having qn P[(d−1)/2] n i i=0 i (q − 1) codewords.

Bounds

Coding Theory: Linear Error- Correcting Codes Recall the main coding theory problem Anna Dovzhik

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Bounds

Coding Theory: Linear Error- Correcting Codes Recall the main coding theory problem Anna Dovzhik Definition Outline

Coding Theory A q-ary code is a perfect code if it attains the Hamming, or Basic Definitions Error Detection sphere-packing bound. For q > 1 and 1 ≤ d ≤ n, this is and Correction defined as having Finite Fields Linear Codes qn Hamming Codes Finite Fields [(d−1)/2] n Revisited P (q − 1)i BCH Codes i=0 i Reed-Solomon Codes codewords. Conclusion Definition A(n, k, d) code where k + d = n + 1 is a maximum distance separable code (MDS) code.

Theorem

If a linear code C over Fq with parameters (n, k, d) is MDS, then: C ⊥ is MDS, every set of n − k columns of H is linearly independent, every set of k columns of G is linearly independent.

Bounds

Coding Theory: Theorem Linear Error- Correcting When q is a prime power, the parameters (n, k, d) of a linear Codes code over F satisfy k + d ≤ n + 1. This upper bound is known Anna Dovzhik q as the . Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Theorem

If a linear code C over Fq with parameters (n, k, d) is MDS, then: C ⊥ is MDS, every set of n − k columns of H is linearly independent, every set of k columns of G is linearly independent.

Bounds

Coding Theory: Theorem Linear Error- Correcting When q is a prime power, the parameters (n, k, d) of a linear Codes code over F satisfy k + d ≤ n + 1. This upper bound is known Anna Dovzhik q as the Singleton bound. Outline

Coding Theory Basic Definitions Definition Error Detection and Correction A(n, k, d) code where k + d = n + 1 is a maximum distance Finite Fields separable code (MDS) code. Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Bounds

Coding Theory: Theorem Linear Error- Correcting When q is a prime power, the parameters (n, k, d) of a linear Codes code over F satisfy k + d ≤ n + 1. This upper bound is known Anna Dovzhik q as the Singleton bound. Outline

Coding Theory Basic Definitions Definition Error Detection and Correction A(n, k, d) code where k + d = n + 1 is a maximum distance Finite Fields separable code (MDS) code. Linear Codes Hamming Codes Finite Fields Revisited Theorem BCH Codes Reed-Solomon If a linear code C over Fq with parameters (n, k, d) is MDS, Codes Conclusion then: C ⊥ is MDS, every set of n − k columns of H is linearly independent, every set of k columns of G is linearly independent. Definition The binary , denoted Ham(r, 2), has a parity-check matrix H whose columns consist of all nonzero binary codewords of length r

For a non-binary finite field Fq, the q-ary Hamming code is denoted as Ham(r, q)

Hamming Codes

Coding Theory: Linear Error- Correcting Codes • single error-correcting Anna Dovzhik • double error-detecting codes Outline • easy to encode and decode Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Hamming Codes

Coding Theory: Linear Error- Correcting Codes • single error-correcting Anna Dovzhik • double error-detecting codes Outline • easy to encode and decode Coding Theory Basic Definitions Error Detection and Correction Definition Finite Fields The binary Hamming code, denoted Ham(r, 2), has a Linear Codes Hamming Codes parity-check matrix H whose columns consist of all nonzero Finite Fields Revisited binary codewords of length r BCH Codes Reed-Solomon Codes For a non-binary finite field F , the q-ary Hamming code is Conclusion q denoted as Ham(r, q) Properties

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik Properties for both Ham(r, 2) and Ham(r, q): Outline • Coding Theory perfect code Basic Definitions r Error Detection • k = 2 − 1 − r, where k denotes dimension and Correction qr −1 Finite Fields • more generally, k = q−1 Linear Codes • d = 3, where d denotes distance Hamming Codes Finite Fields Revisited • exactly single-error-correcting BCH Codes Reed-Solomon Codes Conclusion • all binary Hamming codes of a given length are equivalent • arrange the columns of H in order of increasing binary numbers 0 0 0 1 1 1 1 H = 0 1 1 0 0 1 1 1 0 1 0 1 0 1

Decoding Hamming

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik Ham(3, 2) code

Outline Constructing the parity-check matrix

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Decoding Hamming

Coding Theory: Linear Error- Correcting Codes Anna Dovzhik Ham(3, 2) code

Outline Constructing the parity-check matrix Coding Theory • all binary Hamming codes of a given length are equivalent Basic Definitions Error Detection and Correction • arrange the columns of H in order of increasing binary Finite Fields numbers   Linear Codes 0 0 0 1 1 1 1 Hamming Codes Finite Fields H = 0 1 1 0 0 1 1 Revisited   BCH Codes 1 0 1 0 1 0 1 Reed-Solomon Codes Conclusion 0 0 1 0 1 0   0 1 1 T   yH = (1101011) 1 0 0 = (110)   1 0 1   1 1 0 1 1 1

• error is in the sixth position of y • y is corrected to (1101001)

Decoding Hamming

Coding Theory: Linear Error- Ham(3, 2) code Correcting Codes Suppose y = (1101011) is received Anna Dovzhik

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion • error is in the sixth position of y • y is corrected to (1101001)

Decoding Hamming

Coding Theory: Linear Error- Ham(3, 2) code Correcting Codes Suppose y = (1101011) is received Anna Dovzhik 0 0 1 Outline

Coding Theory 0 1 0   Basic Definitions 0 1 1 Error Detection   and Correction T   yH = (1101011) 1 0 0 = (110) Finite Fields   1 0 1 Linear Codes   Hamming Codes 1 1 0 Finite Fields Revisited 1 1 1 BCH Codes Reed-Solomon Codes Conclusion Decoding Hamming

Coding Theory: Linear Error- Ham(3, 2) code Correcting Codes Suppose y = (1101011) is received Anna Dovzhik 0 0 1 Outline

Coding Theory 0 1 0   Basic Definitions 0 1 1 Error Detection   and Correction T   yH = (1101011) 1 0 0 = (110) Finite Fields   1 0 1 Linear Codes   Hamming Codes 1 1 0 Finite Fields Revisited 1 1 1 BCH Codes Reed-Solomon Codes Conclusion • error is in the sixth position of y • y is corrected to (1101001) To encode x = 1101: 1 0 0 0 0 1 1 0 1 0 0 1 0 1 xG = (1101)   = (1101001) 0 0 1 0 1 1 0 0 0 0 1 1 1 1

• encoded vector is n + k digits long • first k digits (message digits) are the original vector • last n − k digits (check digits) represent redundancy

Encoding Hamming

Coding Theory: Linear Error- Correcting T Codes To derive G, recall that if H = (−A |In−k ), G = (Ik |A) Anna Dovzhik

Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion • encoded vector is n + k digits long • first k digits (message digits) are the original vector • last n − k digits (check digits) represent redundancy

Encoding Hamming

Coding Theory: Linear Error- Correcting T Codes To derive G, recall that if H = (−A |In−k ), G = (Ik |A) Anna Dovzhik To encode x = 1101: Outline 1 0 0 0 0 1 1 Coding Theory Basic Definitions 0 1 0 0 1 0 1 Error Detection xG = (1101)   = (1101001) and Correction 0 0 1 0 1 1 0 Finite Fields 0 0 0 1 1 1 1 Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Encoding Hamming

Coding Theory: Linear Error- Correcting T Codes To derive G, recall that if H = (−A |In−k ), G = (Ik |A) Anna Dovzhik To encode x = 1101: Outline 1 0 0 0 0 1 1 Coding Theory Basic Definitions 0 1 0 0 1 0 1 Error Detection xG = (1101)   = (1101001) and Correction 0 0 1 0 1 1 0 Finite Fields 0 0 0 1 1 1 1 Linear Codes Hamming Codes Finite Fields Revisited • encoded vector is n + k digits long BCH Codes Reed-Solomon • Codes first k digits (message digits) are the original vector Conclusion • last n − k digits (check digits) represent redundancy Definition

A minimal polynomial of an element in a finite field Fp is a nonzero monic polynomial of the least degree possible such that the element is a root.

Definition

A primitive element or generator of Fp is an α such that 2 p−1 Fq = {0, α, α , . . . , α } Every finite field has at least one primitive element, and primitive elements are not unique.

Finite Fields Revisited

Coding Theory: Definition Linear Error- Correcting For n polynomials in F [x], denoted f (x ), f (x),..., f (x), the Codes q 1 2 n

Anna Dovzhik least common multiple, denoted lcm(f (x1), f2(x),..., fn(x)) is the lowest degree monic polynomial that is a multiple of all the Outline polynomials. Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Definition

A primitive element or generator of Fp is an α such that 2 p−1 Fq = {0, α, α , . . . , α } Every finite field has at least one primitive element, and primitive elements are not unique.

Finite Fields Revisited

Coding Theory: Definition Linear Error- Correcting For n polynomials in F [x], denoted f (x ), f (x),..., f (x), the Codes q 1 2 n

Anna Dovzhik least common multiple, denoted lcm(f (x1), f2(x),..., fn(x)) is the lowest degree monic polynomial that is a multiple of all the Outline polynomials. Coding Theory Basic Definitions Error Detection and Correction Definition Finite Fields A minimal polynomial of an element in a finite field Fp is a Linear Codes Hamming Codes nonzero monic polynomial of the least degree possible such Finite Fields Revisited that the element is a root. BCH Codes Reed-Solomon Codes Conclusion Finite Fields Revisited

Coding Theory: Definition Linear Error- Correcting For n polynomials in F [x], denoted f (x ), f (x),..., f (x), the Codes q 1 2 n

Anna Dovzhik least common multiple, denoted lcm(f (x1), f2(x),..., fn(x)) is the lowest degree monic polynomial that is a multiple of all the Outline polynomials. Coding Theory Basic Definitions Error Detection and Correction Definition Finite Fields A minimal polynomial of an element in a finite field Fp is a Linear Codes Hamming Codes nonzero monic polynomial of the least degree possible such Finite Fields Revisited that the element is a root. BCH Codes Reed-Solomon Codes Definition Conclusion A primitive element or generator of Fp is an α such that 2 p−1 Fq = {0, α, α , . . . , α } Every finite field has at least one primitive element, and primitive elements are not unique. Definition m i Suppose α is a primitive element of a finite field Fq and M (x) i is the minimal polynomial of α with respect to Fq. Then a m primitive BCH code over Fq of length n = q − 1 and distance d is a q-ary that is generated by the polynomial defined as lcm(Ma(x), Ma+1(x),..., Ma+d−2(x)) for some a.

BCH Codes

Coding Theory: Linear Error- Correcting Codes • Generalization of Hamming codes for multiple-error Anna Dovzhik correction

Outline • Eliminate certain codewords from Hamming code Coding Theory • Can be determined from a generator polynomial Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion BCH Codes

Coding Theory: Linear Error- Correcting Codes • Generalization of Hamming codes for multiple-error Anna Dovzhik correction

Outline • Eliminate certain codewords from Hamming code Coding Theory • Can be determined from a generator polynomial Basic Definitions Error Detection and Correction Finite Fields Definition Linear Codes Suppose α is a primitive element of a finite field Fm and Mi (x) Hamming Codes q Finite Fields i Revisited is the minimal polynomial of α with respect to Fq. Then a BCH Codes m Reed-Solomon primitive BCH code over Fq of length n = q − 1 and distance Codes Conclusion d is a q-ary cyclic code that is generated by the polynomial defined as lcm(Ma(x), Ma+1(x),..., Ma+d−2(x)) for some a. Example The BCH code of length 15, 00001 11011 00101, corresponds to the polynomial x10 + x9 + x8 + x6 + x5 + x2 + 1

Codewords and Polynomials

Coding Theory: Linear Error- Correcting • One way to represent a codeword c is with a binary Codes polynomial c(x), where α is a primitive element and Anna Dovzhik c(αk ) = 0. Outline • Given a codeword c of length n, let the digits of c be Coding Theory Basic Definitions denoted c = cn−1,..., c1, c0, and define the polynomial Error Detection and Correction c(x) as Finite Fields n−1 X i Linear Codes c(x) = ci x Hamming Codes Finite Fields i=0 Revisited BCH Codes Reed-Solomon Codes Conclusion Codewords and Polynomials

Coding Theory: Linear Error- Correcting • One way to represent a codeword c is with a binary Codes polynomial c(x), where α is a primitive element and Anna Dovzhik c(αk ) = 0. Outline • Given a codeword c of length n, let the digits of c be Coding Theory Basic Definitions denoted c = cn−1,..., c1, c0, and define the polynomial Error Detection and Correction c(x) as Finite Fields n−1 X i Linear Codes c(x) = ci x Hamming Codes Finite Fields i=0 Revisited BCH Codes Reed-Solomon Codes Example Conclusion The BCH code of length 15, 00001 11011 00101, corresponds to the polynomial x10 + x9 + x8 + x6 + x5 + x2 + 1 Definition A q-ary Reed-Solomon code is a q-ary BCH code of length q − 1 that is generated by g(x) = (x − αa+1)(x − αa+2) ... (x − αa+d−1), where a ≥ 0, 2 ≤ d ≤ q − 1, and α is a primitive element of Fq.

Since the length of a binary RS code would be 2 − 1 = 1, this type of code is never considered.

Reed-Solomon Codes

Coding Theory: Linear Error- Correcting Codes • Subclass of BCH codes that can handle error-bursts Anna Dovzhik • MDS codes Outline

Coding Theory Basic Definitions Error Detection and Correction Finite Fields

Linear Codes Hamming Codes Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion Reed-Solomon Codes

Coding Theory: Linear Error- Correcting Codes • Subclass of BCH codes that can handle error-bursts Anna Dovzhik • MDS codes Outline

Coding Theory Basic Definitions Definition Error Detection and Correction A q-ary Reed-Solomon code is a q-ary BCH code of length Finite Fields q − 1 that is generated by Linear Codes g(x) = (x − αa+1)(x − αa+2) ... (x − αa+d−1), where Hamming Codes Finite Fields Revisited a ≥ 0, 2 ≤ d ≤ q − 1, and α is a primitive element of Fq. BCH Codes Reed-Solomon Codes Since the length of a binary RS code would be 2 − 1 = 1, this Conclusion type of code is never considered. Reed-Solomon Codes

Coding Theory: Linear Error- Correcting Codes Example Anna Dovzhik For a 7-ary RS code of length 6 and generator polynomial Outline g(x) = (x − 3)(x − 32)(x − 33) = 6 + x + 3x2 + x3, Coding Theory Basic Definitions   Error Detection 6 1 3 1 0 0 and Correction Finite Fields G = 0 6 1 3 1 0

Linear Codes 0 0 6 1 3 1 Hamming Codes Finite Fields Revisited   BCH Codes 1 4 1 1 0 0 Reed-Solomon Codes H = 0 1 4 1 1 0 Conclusion 0 0 1 4 1 1 Applications

Coding Theory: Linear Error- Correcting Codes

Anna Dovzhik

Outline Any case where data is transmitted through a channel that is Coding Theory susceptible to noise Basic Definitions Error Detection and Correction • digital images from deep-space Finite Fields • compact disc encoding Linear Codes Hamming Codes • radio communications Finite Fields Revisited BCH Codes Reed-Solomon Codes Conclusion References

Coding Theory: Hill, Raymond. A first course in coding theory. Oxford Linear Error- Correcting Oxfordshire: Clarendon Press, 1986. Print. Codes

Anna Dovzhik Hoffman, D. G., D. A. Leonard, C. C. Lindner, K. T. Phelps, C. A. Rodger, and J. R. Wall. Coding theory: the Outline essentials. New York etc.: Marcel Dekker, 1991. Print Coding Theory Basic Definitions Error Detection Ling, San, and Chaoping Xing. Coding theory: a first and Correction Finite Fields course. Cambridge, UK: Cambridge University Press, 2004.

Linear Codes Print. Hamming Codes Finite Fields Pless, Vera. Introduction to the theory of error-correcting Revisited BCH Codes codes. 3rd ed. New York: Wiley, 1998. Print. Reed-Solomon Codes Conclusion Pretzel, Oliver. Error-correcting codes and finite fields. Oxford: Clarendon Press, 2000. Print. Vermani, L. R.. Elements of algebraic coding theory. London: Chapman & Hall, 1996. Print.