Presentation is loading. Please wait.

Presentation is loading. Please wait.

Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina.

Similar presentations


Presentation on theme: "Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina."— Presentation transcript:

1 Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina Neil Sigmon Radford University Radford, Virginia

2 Purpose for Presentation To demonstrate some applications with error correcting codes with MATLAB and Maple To demonstrate some applications with error correcting codes with MATLAB and Maple  Reed-Muller Codes  Hamming Codes  Reed-Solomon Codes

3 Basic Notation Terminology Coding theory is the study of methods for Coding theory is the study of methods for efficient and accurate transformation from one place to another. A code is a set of codewords representing the messages to be transferred between two parties. A code is a set of codewords representing the messages to be transferred between two parties. An error-correcting code is a code where An error-correcting code is a code where it is possible to detect and correct errors during the transmission of codewords.

4 Applications Applications  Information transmitted by Internet.  Wireless communication devices.  Compact Discs.  Transmission of information from satellites.

5 Reed-Muller Codes Invented by I. Reed and D. Muller in 1954. Invented by I. Reed and D. Muller in 1954. Can be constructed using matrices. Can be constructed using matrices. Can correct a multiple number of errors. Can correct a multiple number of errors. Was used to perform error correction for the Mariner 9 space probe mission to Mars in 1972. Was used to perform error correction for the Mariner 9 space probe mission to Mars in 1972.

6 Hadamard Matrices A matrix H is a Hadamard matrix if all entries of H are 1 or -1 and, A matrix H is a Hadamard matrix if all entries of H are 1 or -1 and, where I is the identity matrix. A normalized Hadamard matrix is one where the first row and column of H only contain positive ones. A normalized Hadamard matrix is one where the first row and column of H only contain positive ones.

7 The only normalized Hadamard matrices of order one and two are The only normalized Hadamard matrices of order one and two are Subsequent normalized Hadamard matrices can be generated using the block matrix formula Subsequent normalized Hadamard matrices can be generated using the block matrix formula

8 Reed-Muller Code Construction Steps Construct a normalized Hadamard matrix of order. Construct a normalized Hadamard matrix of order. Delete the first row and first column of the normalized Hadamard matrix. Change all negative ones to zeros. Call this matrix A. Delete the first row and first column of the normalized Hadamard matrix. Change all negative ones to zeros. Call this matrix A. Change all ones to zeros and zeros to ones in the matrix A. Call this matrix B. Change all ones to zeros and zeros to ones in the matrix A. Call this matrix B.

9 Attach a column of all ones to the left of the matrix A and a column of all zeros to the left of the matrix B. Call these matrices script A and script B, respectively. Attach a column of all ones to the left of the matrix A and a column of all zeros to the left of the matrix B. Call these matrices script A and script B, respectively. Stack the matrix script A on top of script B. Add an extra row of all zeros and an extra row of all ones to the bottom of the matrix. Stack the matrix script A on top of script B. Add an extra row of all zeros and an extra row of all ones to the bottom of the matrix.

10 The codewords for the code are vectors obtained from the rows for the resulting matrix. The codewords for the code are vectors obtained from the rows for the resulting matrix. Each codeword c is a vector consisting over elements in of length 4 k. Each codeword c is a vector consisting over elements in of length 4 k.

11 Reed-Muller codes are classified as Reed-Muller codes are classified as (4 k, 2 k ) codes, where 4 k is the length of each codeword and 2 k is the minimum distance between codewords. A Reed-Muller code has 8 k codewords. A Reed-Muller code has 8 k codewords.

12 Error Correction for Reed-Muller Codes Reed-Muller codes are designed to correct up to k – 1 errors. Reed-Muller codes are designed to correct up to k – 1 errors. Suppose a vector r is received. This vector is compared to all codewords in the code. The vector r will be corrected to the codeword that differs from it in k – 1 or less positions. Suppose a vector r is received. This vector is compared to all codewords in the code. The vector r will be corrected to the codeword that differs from it in k – 1 or less positions.

13 MATLAB Example We generate the Reed-Muller code that was used for in Mariner 9 space probe used to take pictures of Mars in 1972. We generate the Reed-Muller code that was used for in Mariner 9 space probe used to take pictures of Mars in 1972. The code was constructed using the normalized Hadamard ( k = 8). The code consisted of 64 codewords of length 32 each. The code could correct up to 7 errors. The code was constructed using the normalized Hadamard ( k = 8). The code consisted of 64 codewords of length 32 each. The code could correct up to 7 errors.

14 Before being transmitted, each photograph taken was broken down into a collection of pixels. Before being transmitted, each photograph taken was broken down into a collection of pixels. Each pixel was assigned one of 64 levels of grayness, and then encoded into one of the 64 codewords in the code. Each pixel was assigned one of 64 levels of grayness, and then encoded into one of the 64 codewords in the code.

15 Hamming Codes First published by Richard Hamming in 1950. First published by Richard Hamming in 1950.

16 Used by the telephone industry and in computer data transfer. Used by the telephone industry and in computer data transfer. Can correct 1 error. Can correct 1 error. Code is perfect, which says every message received with errors is uniquely correctable to a codeword. Code is perfect, which says every message received with errors is uniquely correctable to a codeword.

17 Hamming Codeword Construction Let and be vector spaces with and let G be a Let and be vector spaces with and let G be a matrix over of full row rank. Then is a subspace of of dimension. The vectors in C form codewords.

18 The matrix G is called the generator matrix for the code C. The matrix G is called the generator matrix for the code C. The matrix G is formed by finding the nullspace of a matrix H known as the parity check matrix. The matrix G is formed by finding the nullspace of a matrix H known as the parity check matrix.

19 Hamming codes form a linear [ n, k ] code, where the codewords have a length of Hamming codes form a linear [ n, k ] code, where the codewords have a length of n positions and k is the dimension of the vector space the code forms. In Hamming codes, and In Hamming codes, and for some integer m > 1. for some integer m > 1.

20 The parity check matrix H is a matrix of size that is formed by placing as its columns the binary expressions of the integers. The parity check matrix H is a matrix of size that is formed by placing as its columns the binary expressions of the integers. The generator matrix G will be of size The generator matrix G will be of size. If a codeword, then. If a codeword, then.

21 MATLAB Example In MATLAB, suppose we demonstrate how to construct a codeword from the vector In MATLAB, suppose we demonstrate how to construct a codeword from the vector w = (10111011110).

22 We encode this message using a [15, 11] Hamming code with generator matrix G formed from the nullspace of the rows of the parity check matrix We encode this message using a [15, 11] Hamming code with generator matrix G formed from the nullspace of the rows of the parity check matrix

23 Error Correction for Hamming Codes Suppose a vector r is transmitted and received. If, then r is a codeword. Suppose a vector r is transmitted and received. If, then r is a codeword. If not, then the error can be corrected by computing where is a vector containing all zeros except at the position. If not, then the error can be corrected by computing where is a vector containing all zeros except at the position.

24 The error position i is determined by using the fact that. The error position i is determined by using the fact that. Since and produce the same column, the column number produced by Since and produce the same column, the column number produced by gives the error position i. gives the error position i.

25 MATLAB Example Using a [15, 11] Hamming code, we demonstrate how to correct the following received vector. Using a [15, 11] Hamming code, we demonstrate how to correct the following received vector. r = ( 011100010111110 ) r = ( 011100010111110 )

26 Reed-Solomon Codes Developed by Irving Reed and Gustave Solomon in 1960. Developed by Irving Reed and Gustave Solomon in 1960.

27 One of the most widely used error correcting code techniques. One of the most widely used error correcting code techniques. Ideal at correcting error bursts, where several errors occur close together. Ideal at correcting error bursts, where several errors occur close together.

28 Important for the Voyager 2 satellite’s transmission of pictures of the outer planets Uranus and Neptune. Important for the Voyager 2 satellite’s transmission of pictures of the outer planets Uranus and Neptune. Besides satellite communications, Reed Solomon codes are used with wireless communication and with compact disks. Besides satellite communications, Reed Solomon codes are used with wireless communication and with compact disks.

29 Example Pictures taken by Voyager Pictures of Uranus and its rings

30 Example Pictures taken by Voyager Picture of Neptune and one its moons, Triton

31 The Reed-Solomon code implemented on Voyager 2 was constructed using a finite field of elements represented by the primitive polynomial The Reed-Solomon code implemented on Voyager 2 was constructed using a finite field of elements represented by the primitive polynomial Codeword Construction in Reed-Solomon Codes

32 Codewords for Voyager were obtained by taking multiples of the generating polynomial Codewords for Voyager were obtained by taking multiples of the generating polynomial where a is a primitive element use to generate. A codeword is formed by computing the polynomial A codeword is formed by computing the polynomial where m(x) is a polynomial with coefficients from the finite field.

33 Each codeword is represented by polynomials of degree less than. Each codeword is represented by polynomials of degree less than. Each codeword is a vector of length 255 with the information transformed in the polynomial’s coefficients. Each codeword is a vector of length 255 with the information transformed in the polynomial’s coefficients.

34 Each polynomial coefficient in the codeword is a polynomial of degree <. Each polynomial coefficient is a unique element from the finite field. Each polynomial coefficient in the codeword is a polynomial of degree <. Each polynomial coefficient is a unique element from the finite field. On Voyager, full color images were digitized into binary vectors over. On Voyager, full color images were digitized into binary vectors over.

35 The binary vectors can be represented in “blocks” of length 8 as the coefficients of polynomials of degree < p(x) = 8. For example, The binary vectors can be represented in “blocks” of length 8 as the coefficients of polynomials of degree < p(x) = 8. For example, In binary, the length of each codeword converts to a vector of length of In binary, the length of each codeword converts to a vector of length of

36 A codeword has the property that A codeword has the property that for. This gives a technique for verifying a transmitted message is a codeword. for. This gives a technique for verifying a transmitted message is a codeword. Error Correction in Reed-Solomon Codes

37 If a transmitted message r(x) is received that is not a codeword, a polynomial e(x) is computed to correct its coefficients by forming. If a transmitted message r(x) is received that is not a codeword, a polynomial e(x) is computed to correct its coefficients by forming. The Voyager 2 Reed-Solomon code could correct up to polynomial coefficient errors. This translates to a minimum of 121 errors in binary. The Voyager 2 Reed-Solomon code could correct up to polynomial coefficient errors. This translates to a minimum of 121 errors in binary.

38 Finding e(x) involves performing computations involving the Euclidean algorithm and polynomial differentiation. Finding e(x) involves performing computations involving the Euclidean algorithm and polynomial differentiation.

39 Maple Example Involves user-written procedures Involves user-written procedures  bincoeff  binword  rscoeff  rseuclid We demonstrate both the codeword construction and error correction process. We demonstrate both the codeword construction and error correction process.

40 References R. E. Klima, N. P. Sigmon, and E. L. Stitzinger, Applications of Abstract Algebra with Maple, CRC Press, Llc, Boca Raton, FL 2000. R. E. Klima, N. P. Sigmon, and E. L. Stitzinger, Applications of Abstract Algebra with Maple, CRC Press, Llc, Boca Raton, FL 2000. Stephen B. Wicker and Vijay K Bhargava, editors: Reed-Solomon Codes and their Applications, The Institute of Electrical and Electronics Engineers, Inc., New York, NY 1994. Stephen B. Wicker and Vijay K Bhargava, editors: Reed-Solomon Codes and their Applications, The Institute of Electrical and Electronics Engineers, Inc., New York, NY 1994.


Download ppt "Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina."

Similar presentations


Ads by Google