ELEC 405/ELEC 511 Error Control Coding. Hamming Codes and Bounds on Codes

Similar documents
ELEC 405/ELEC 511 Error Control Coding and Sequences. Hamming Codes and the Hamming Bound

ELEC 519A Selected Topics in Digital Communications: Information Theory. Hamming Codes and Bounds on Codes

Answers and Solutions to (Even Numbered) Suggested Exercises in Sections of Grimaldi s Discrete and Combinatorial Mathematics

Chapter 3 Linear Block Codes

We saw in the last chapter that the linear Hamming codes are nontrivial perfect codes.

Linear Codes and Syndrome Decoding

MATH Examination for the Module MATH-3152 (May 2009) Coding Theory. Time allowed: 2 hours. S = q

MATH/MTHE 406 Homework Assignment 2 due date: October 17, 2016

Hamming Codes 11/17/04

Hamming codes and simplex codes ( )

MATH 433 Applied Algebra Lecture 21: Linear codes (continued). Classification of groups.

Chapter 7. Error Control Coding. 7.1 Historical background. Mikael Olofsson 2005

Lecture 17: Perfect Codes and Gilbert-Varshamov Bound

Mathematics Department

Solutions to problems from Chapter 3

Coding Theory. Golay Codes

EE 229B ERROR CONTROL CODING Spring 2005

The extended Golay code

Section 3 Error Correcting Codes (ECC): Fundamentals

MATH32031: Coding Theory Part 15: Summary

Solutions of Exam Coding Theory (2MMC30), 23 June (1.a) Consider the 4 4 matrices as words in F 16

3. Coding theory 3.1. Basic concepts

MATH 433 Applied Algebra Lecture 22: Review for Exam 2.

EE512: Error Control Coding

Orthogonal Arrays & Codes

Some error-correcting codes and their applications

The extended coset leader weight enumerator

G Solution (10 points) Using elementary row operations, we transform the original generator matrix as follows.

Know the meaning of the basic concepts: ring, field, characteristic of a ring, the ring of polynomials R[x].

MATH 291T CODING THEORY

x n k m(x) ) Codewords can be characterized by (and errors detected by): c(x) mod g(x) = 0 c(x)h(x) = 0 mod (x n 1)

16.36 Communication Systems Engineering

MATH 291T CODING THEORY

Channel Coding for Secure Transmissions

B. Cyclic Codes. Primitive polynomials are the generator polynomials of cyclic codes.

Cross-Error Correcting Integer Codes over Z 2

MATH3302 Coding Theory Problem Set The following ISBN was received with a smudge. What is the missing digit? x9139 9

: Coding Theory. Notes by Assoc. Prof. Dr. Patanee Udomkavanich October 30, upattane

11 Minimal Distance and the Parity Check Matrix

Communications II Lecture 9: Error Correction Coding. Professor Kin K. Leung EEE and Computing Departments Imperial College London Copyright reserved

exercise in the previous class (1)

Binary Linear Codes G = = [ I 3 B ] , G 4 = None of these matrices are in standard form. Note that the matrix 1 0 0

Ma/CS 6b Class 25: Error Correcting Codes 2

Lecture 4: Linear Codes. Copyright G. Caire 88

Zigzag Paths and Binary Strings Counting, Pascal s Triangle, and Combinations Part I

ELEC-E7240 Coding Methods L (5 cr)

FUNDAMENTALS OF ERROR-CORRECTING CODES - NOTES. Presenting: Wednesday, June 8. Section 1.6 Problem Set: 35, 40, 41, 43

MATH3302. Coding and Cryptography. Coding Theory

Optimum Soft Decision Decoding of Linear Block Codes

Cyclic codes: overview

1. How many errors may be detected (not necessarily corrected) if a code has a Hamming Distance of 6?

The Golay code. Robert A. Wilson. 01/12/08, QMUL, Pure Mathematics Seminar

Physical Layer and Coding

Flip-N-Write: A Simple Deterministic Technique to Improve PRAM Write Performance, Energy and Endurance. Presenter: Brian Wongchaowart March 17, 2010

Definition 2.1. Let w be a word. Then the coset C + w of w is the set {c + w : c C}.

MTAT : Introduction to Coding Theory. Lecture 1

ERROR CORRECTING CODES

Can You Hear Me Now?

And for polynomials with coefficients in F 2 = Z/2 Euclidean algorithm for gcd s Concept of equality mod M(x) Extended Euclid for inverses mod M(x)

Reed-Muller Codes. These codes were discovered by Muller and the decoding by Reed in Code length: n = 2 m, Dimension: Minimum Distance

Counting With Repetitions

The BCH Bound. Background. Parity Check Matrix for BCH Code. Minimum Distance of Cyclic Codes

MT5821 Advanced Combinatorics

Coding Theory: Linear-Error Correcting Codes Anna Dovzhik Math 420: Advanced Linear Algebra Spring 2014

The Hamming Codes and Delsarte s Linear Programming Bound

ICT12 8. Linear codes. The Gilbert-Varshamov lower bound and the MacWilliams identities SXD

Coding Theory and Applications. Linear Codes. Enes Pasalic University of Primorska Koper, 2013

Combinatória e Teoria de Códigos Exercises from the notes. Chapter 1

Cyclic Redundancy Check Codes

THIS paper is aimed at designing efficient decoding algorithms

Codes over Subfields. Chapter Basics


Greedy Codes. Theodore Rice

} has dimension = k rank A > 0 over F. For any vector b!

Lecture B04 : Linear codes and singleton bound

9 THEORY OF CODES. 9.0 Introduction. 9.1 Noise

A Tutorial on Quantum Error Correction

Math 512 Syllabus Spring 2017, LIU Post

Properties of the Leech Lattice

channel of communication noise Each codeword has length 2, and all digits are either 0 or 1. Such codes are called Binary Codes.

Arrangements, matroids and codes

Cryptographie basée sur les codes correcteurs d erreurs et arithmétique

MT361/461/5461 Error Correcting Codes: Preliminary Sheet

MAS309 Coding theory

ELEC3227/4247 Mid term Quiz2 Solution with explanation

Error Detection and Correction: Hamming Code; Reed-Muller Code

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x

SPHERE PACKINGS CONSTRUCTED FROM BCH AND JUSTESEN CODES

Algebraic Geometry Codes. Shelly Manber. Linear Codes. Algebraic Geometry Codes. Example: Hermitian. Shelly Manber. Codes. Decoding.

MTH6108 Coding theory

Chapter 5. Cyclic Codes

Channel Coding I. Exercises SS 2017

Finite Mathematics. Nik Ruškuc and Colva M. Roney-Dougal

Lecture Introduction. 2 Linear codes. CS CTT Current Topics in Theoretical CS Oct 4, 2012

Conjectures and proof. Book page 24-30

Week 3: January 22-26, 2018

5.0 BCH and Reed-Solomon Codes 5.1 Introduction

: Error Correcting Codes. October 2017 Lecture 1

ECE8771 Information Theory & Coding for Digital Communications Villanova University ECE Department Prof. Kevin M. Buckley Lecture Set 2 Block Codes

Richard A. Brualdi W. Cary Human Vera S. Pless. January 24, Origins of Coding Theory 2. 2 Basic Concepts Bounds Finite Fields 39

Transcription:

ELEC 405/ELEC 511 Error Control Coding Hamming Codes and Bounds on Codes

Single Error Correcting Codes (3,1,3) code (5,2,3) code (6,3,3) code G = rate R=1/3 n-k=2 [ 1 1 1] rate R=2/5 n-k=3 1 0 1 1 0 G = 0 1 1 0 1 rate R=1/2 n-k=3 1 0 0 1 1 0 G = 0 1 0 0 1 1 0 0 1 1 0 1 2

Hamming Codes (7,4,3) Hamming code rate R=4/7 n-k=3 1 0 0 0 0 1 1 0 1 0 0 1 0 1 G= [ IP ] = 0 0 1 0 1 1 0 0 0 0 1 1 1 1 0 1 1 1 1 0 0 T H = - 1 0 1 1 0 1 0 P I = 1 1 0 1 0 0 1 H generates the (7,3,4) dual code 3

Hamming Codes Another form of the (7,4,3) Hamming code is generated by 1 1 0 1 0 0 0 0 1 1 0 1 0 0 G = [ P I] = 1 1 1 0 0 1 0 1 0 1 0 0 0 1 This is equivalent to the code in Wicker Section 1.3 with 1 0 0 0 0 1 1 0 1 0 0 1 1 0 G = [ IP ] = 0 0 1 0 1 0 1 0 0 0 1 1 1 1 4

Theorem 4-9 The minimum distance of a code is equal to the minimum number of columns of H which sum to zero. Let d 0, d 1,, d n-1 be the column vectors of H. For any codeword c, ch T can be expressed as d T 0 T T ( ) 1 c0 c1 c d n 1 c0 0 c1 1 cn 1 n 1 ch =,,..., = d + d +... + d = 0 T d n 1 ch T is a linear combination of columns of H. 5

Significance of H For a codeword of weight w (w ones), ch T is a linear combination of w columns of H. Thus we have a one-to-one mapping between weight w codewords and linear combinations of w columns of H that sum to 0. The minimum value of w which results in ch T =0, i.e. codeword c with weight w, determines d min. 6

Example For the (7,4,3) code, a codeword with weight d min = 3 is given by the first row of G c = 1000011 The linear combination of the first and last 2 columns in H gives 0 0 0 0 1+ 1+ 0= 0 1 0 1 0 Thus a minimum of 3 columns (= d min ) are required to obtain ch T =0 7

Hamming Codes Definition Let m be an integer and H be an m (2 m -1) matrix with columns which are the non-zero distinct vectors from V m. The code having H as its parity-check matrix is a binary Hamming code of length 2 m -1. 1 1 0 H= = 1 0 1 G [ 1 1 1] 1 0 0 0 0 1 1 0 1 1 1 1 0 0 0 1 0 0 1 0 1 H= 1 0 1 1 0 1 0 G= 0 0 1 0 1 1 0 1 1 0 1 0 0 1 0 0 0 1 1 1 1 The Hamming codes are (2 m -1, 2 m -1-m, 3) codes m = n k 8

Binary Hamming Code Parameters C : n = m 2 1 k = m 2 1 m d = 3 C m : n = 2 1 k d = m = 2 m 1 9

Coset Leaders for the Hamming Codes There are 2 n-k = 2 m coset leaders or correctable error patterns The number of single error patterns is n = 2 m -1 Thus the coset leaders are precisely the words of weight 1 The syndrome of the word 0 010 0 with 1 in the jth position and 0 otherwise is the transpose of the jth column of H 10

Decoding Hamming Codes For the case that the columns of H are arranged in order of increasing binary numbers that represent the column numbers 1 to 2 m -1 Step 1 Given r compute the syndrome s = rh T Step 2 If s = 0, then r is assumed to be the codeword sent Step 3 If s 0, then assuming a single error, s gives the binary position of the error 11

Example For the Hamming code given by the parity-check matrix 0 0 0 1 1 1 1 H = 0 1 1 0 0 1 1 1 0 1 0 1 0 1 the received word r = 1101011 has syndrome s = 110 and therefore the error is in the sixth position. Hamming codes were first used to deal with errors in long-distance telephone calls. 12

The (7,4,3) code is an optimal single error correcting code for n-k = 3 An (8,5,3) code does not exist The (15,11,3) code is an optimal single error correcting code for n-k = 4 What is the limit on how many errors an (n,k) code can correct? 13

Optimal Codes d min = 1 (n, n, 1) entire vector space d min = 2 (n, n-1, 2) single parity check codes d min = 3 n = 2 m -1 Hamming codes what about other values of n? 14

Shortening For 2 m-1 n < 2 m -1, k = n-m, use shortening To get a (6,3,3) code, delete one column say (1 1 1) T from H for the (7,4,3) code H 1 0 1 1 1 0 0 = 1 1 0 1 0 1 0 0 1 1 1 0 0 1 n-k is constant so both n and k are changed H 1 1 0 1 1 0 0 = 1 1 0 0 1 0 0 1 1 0 0 1 G 1 1 0 0 1 1 0 = 0 1 0 0 1 1 0 0 1 1 0 1 15

Next delete (0 1 1) T which gives a (5,2,3) code H 2 1 1 1 0 0 = 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 2 G = 0 1 1 0 1 Next delete (1 0 1) T which gives a (4,1,3) code 1 1 0 0 = 0 0 0 1 3 H 1 0 1 0 3 G = [ 1 1 1 0] The (4,1,4) repetition code has larger d min, but a code with n=4 and d min =3 cannot have k>1 16

Extending The process of deleting a message coordinate from a code is called shortening (n, k) (n-1, k-1) Adding an overall parity check to a code is called extending (n, k) (n+1, k) Example: G 1 0 0 0 0 1 1 0 1 0 0 1 0 1 = 0 0 1 0 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 1 1 0 1 0 0 1 0 1 1 G = 0 0 1 0 1 1 0 1 0 0 0 1 1 1 1 0 17

If d(c) is odd, d(c') is even In this case, d(c') = d(c) + 1 Example (7,4,3) (8,4,4) The extended Hamming codes are optimal d min = 4 codes 18

Optimal Codes d min = 1 (n, n, 1) entire vector space d min = 2 (n, n-1, 2) single parity check codes d min = 3 Hamming and shortened Hamming codes d min = 4 extended d min = 3 codes 19

Binary Spheres of Radius t The number of binary words (vectors) of length n and distance i from a word c is n = i n! i!( n i)! Let c be a word of length n. For 0 t n, the number of words of length n a distance at most t from c is n n n n + + + + = V ( 2 nt 0, ) 1 2 t 20

Hamming or Sphere Packing Bound Consider an (n,k,d) binary code Spheres of radius t around the 2 k codewords must be disjoint Volume of a sphere with radius t is the number of vectors in the sphere: V 2 (n,t) Example: (7,4,3) Hamming code t=1 Volume of each sphere is V 2 (7,1)=1+7=8=2 3 codeword 1 bit errors 21

Number of spheres (codewords) is 2 k = 16 Volume of all spheres is 2 k 2 3 = 2 4 2 3 = 2 7 = 2 n The spheres completely fill the n-dimensional vector space The Hamming bound (binary) k n n n 2 1+ + + + 2 1 2 t n = V(,) nt 2 t n or 2 i= 0 i A binary code is called perfect if it meets this bound with equality n k 22

Hamming Bound Example Give an upper bound on the size of a linear code C of length n=6 and distance d=3 6 2 64 k C = 2 = 6 6 7 + 0 1 This gives C 9 but the size of a linear code C must be a power of 2 so C 8 and k 3 23

Hamming Bound for Linear Codes log n 2 t i= 0 i 2 i= 0 n k since k must be an integer t n n k i t n k n log2 i= 0 i t n k n log2 i= 0 i 24

Codes that meet the Hamming Bound Binary Hamming codes t=1 (,1) n n V 1 2 1 2 2 2 n = + = + = = 0 1 m m n k Odd binary repetition codes (2m+1,1,2m+1) t=m m 2m + 1 2m n k sphere volume = = 2 = 2 i= 0 (n,n,1) codes (all vectors in V n are codewords) n t = 0 V ( n,0) = 1 2 1 = 2 2 i n 25

Marcel Golay (1902-1989) 26

Blaise Pascal (1623-1662) French religious philosopher, writer, physicist, inventor, and mathematician First mechanical calculator (1642-1644) Developed the modern theory of probability with Pierre de Fermat (1654) Pascal s triangle was discovered by Chinese mathematician Yanghui, 500 years before Pascal and in the Eleventh century by Persian mathematician and poet Omar Khayam 27

Pascal s Triangle 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 1 7 21 35 35 21 7 1 1 8 28 56 70 56 28 8 1 1 9 36 84 126 126 84 36 9 1 1 10 45 120 210 252 210 120 45 10 1 1 11 55 165 330 462 462 330 165 55 11 1 1 12 66 220 495 792 924 792 495 220 66 12 1 1 13 78 286 715 1287 1716 1716 1287 715 286 78 13 1 1 14 91 364 1001 2002 3003 3432 3003 2002 1001 364 91 14 1 1 15 105 455 1365 3003 5005 6435 6435 5005 3003 1365 455 105 15 1 28

Rows 87 to 94 1 87 3741 105995 2225895 36949857 504981379 1 88 3828 109736 2331890 39175752 541931236 1 89 3916 113564 2441626 41507642 581106988 1 90 4005 117480 2555190 43949268 622614630 1 91 4095 121485 2672670 46504458 666563898 1 92 4186 125580 2794155 49177128 713068356 1 93 4278 129766 2919735 51971283 762245484 1 94 4371 134044 3049501 54891018 814216767 29

Rows 19 to 26 1 19 171 969 3876 11628 27132 50388 1 20 190 1140 4845 15504 38760 77520 1 21 210 1330 5985 20349 54264 116280 1 22 231 1540 7315 26334 74613 170544 1 23 253 1771 8855 33649 100947 245157 1 24 276 2024 10626 42504 134596 346104 1 25 300 2300 12650 53130 177100 480700 1 26 325 2600 14950 65780 230230 657800 30

Golay Codes Marcel Golay considered the problem of perfect codes in 1949 He found three possible solutions to equality for the Hamming bound q = 2, n = 23, t = 3 q = 2, n = 90, t = 2 q = 3, n = 11, t = 2 Only the first and third codes exist 31

32

Gilbert Bound There exists a code of length n, distance d, and M codewords with M n n 2 2 = d-1 V( nd, 1) j= 0 ( n ) j 2 Note that the constructive proof does not result in a linear code 33

Bound Comparison (r=n-k) (n) 34

Gilbert-Varshamov Bound The Gilbert bound can be improved by considering linear codes There exists a binary linear code of length n, dimension k and minimum distance d if ( ) ( ) ( ) + + + d = V ( n 1, d 2) < 2 n-1 n-1 n-1 nk - 0 1-2 2 Proof: construct a parity check matrix based on the condition that any combination of up to d-1 columns of H is linearly independent Thus a binary (n,k,d) code exists with ( d -2 ( -1 ) ) n k n log2 1 j= 0 j + 35

Asymptotic Bounds Relative minimum distance: δ = d/n Maximum possible code rate for fixed δ as n : a(δ) 36

Bounds on Binary Linear Codes Hamming Bound t n k n log2 i= 0 i Gilbert-Varshamov Bound k d 2 ( n-1 n log ) 2 j + 1 j= 0 37