II Linear Block Codes Hamming Linear Block Codes
II. Linear Block Codes
Hamming Linear Block Codes
Hamming Codes For any positive integer m≥ 3, there exists a Hamming code such that: - Code Length: No. of information symbols: No. of parity check symbols: Error correcting capability: © Tallal Elshabrawy n = 2 m-1 k = n-m =2 m-m-1 n-k = m t = 1 (i. e. , dmin=3) 3
Parity Check Matrix, Generator Matrix and dmin of Hamming Codes H contains all of nonzero m-tuples as its columns. In the systematic form: m columns of weight 1 Parity Check Matrix - 2 m-m-1 columns of weight >1 Generator Matrix No two columns are identical dmin>2 The sum of any two columns must be a third one dmin=3 Hamming Codes can correct all single errors or detect all double errors © Tallal Elshabrawy 4
Example: (15, 11) Hamming Codes - Code Length: No. of information symbols: No. of parity check symbols: Error correcting capability: 4 columns of weight 1 © Tallal Elshabrawy n k 15 -11 dmin = 24 -1 = 15 -4 = 11 =4 =3 11 columns of weight >1 5
Hamming Codes are Perfect Codes Consider the standard array for a Hamming Code - The code has 2 m cosets - The number of (2 m-1)-tuples of weight 1 is 2 m-1 - The 0 vector and the (2 m-1)-tuples of weight 1 form all the coset leaders of the standard array - In such configuration for the standard array, the Hamming code corrects ONLY error patterns with single error. A Perfect Code is a t-error correcting code where its standard array has all error patterns of t or fewer errors and no others as coset leaders © Tallal Elshabrawy 6
The (15, 11) Hamming Code is a Perfect Code - Number of cosets = 2 n-k= 215 -11 = 16 Number of error patterns of weight 1 = 15 If the coset leaders are chosen to be the 0 vector and all the error patterns of weight 1. The (15, 11) code corrects ONLY error patterns with single error © Tallal Elshabrawy 7
Shortened Hamming Codes It is possible to delete l columns from the parity check matrix of H of a Hamming code. This results is H’ of dimensions m×(2 m-l-1) which is the parity check matrix of a shortened Hamming code - Code Length: No. of information symbols: No. of parity check symbols: Error correcting capability: © Tallal Elshabrawy n = 2 m-l-1 k = n-m = 2 m-m-l-1 n-k = m dmin≥ 3 8
Single Error Correction and Double Error Detection For a code with minimum Hamming distance dmin: If the code could correct λ and detect l then dmin≥ λ+l+1 - For a shortened Hamming code to achieve single error correction (λ=1) and double error detection (l=2), It is essential that dmin≥ 4 To achieve dmin=4 it is essential to delete columns properly from H of the original Hamming code Example - Delete from Q all even weight columns H’ is of dimension m× 2 m-1 Why is it that dmin=4? - 2 m-1 -m odd weight columns No two columns are identical dmin>2 Adding two m-tuples of odd weight results in an even weight m-tuple dmin>3 Adding three m-tuples of odd weight results in an odd weight m-tuple dmin=4 © Tallal Elshabrawy 9
1. 2. 3. Single Error Correction and Double Error Detection (Decoding Scheme) If the syndrome s is zero, assume no error has occurred. If s is nonzero and has odd weight, assume single error has occurred. Add the error pattern corresponding to the syndrome. If s is nonzero and has even weight, an uncorrectable pattern has been detected © Tallal Elshabrawy 10
Example: (8, 4) Shortened Hamming Code Parity Check Matrix for (15, 11) Hamming Code delete all even weight columns © Tallal Elshabrawy 11
Example: (8, 4) Shortened Hamming Code syndrome s=e. H’T Notice that l If an error pattern has a single error, the syndrome has odd weight l If an error pattern has a double error, the syndrome has even weight © Tallal Elshabrawy 12
- Slides: 12