240 likes | 382 Views
Chapter 3. Error-Correcting Codes. Outline. 3.1 Need for Error Correction 3.2 Rectangular Codes 3.3 Triangular, Cubic, and n -Dimensional Codes 3.4 Hamming Error-Correcting Codes 3.5 Equivalent Codes 3.6 Geometric Approach 3.7 Single-Error-Correction Plus
E N D
Chapter 3 Error-Correcting Codes
Outline • 3.1 Need for Error Correction • 3.2 Rectangular Codes • 3.3 Triangular, Cubic, and n-Dimensional Codes • 3.4 Hamming Error-Correcting Codes • 3.5 Equivalent Codes • 3.6 Geometric Approach • 3.7 Single-Error-Correction Plus Double-Error-Detection Codes • 3.8 Hamming Codes Using Words • 3.9 Application of the Ideas • 3.10 Summary
3.1 Need for Error Correction • Error detection is not enough • Real time application • Storage error can not restore because the original source of the information is often no longer available.
3.2 Rectangular Codes • Triplication codes: m1 m2m3 • • • • Repeated 3 times m1m1m1 m2m2m2 m3m3m3 • • • • At receiving end, a majority vote is taken.
Rectangular codes: • Redundancy: m -1 o o o • • • o xo o o• • • o xo o o • • • o x• • • • • • • • • • • • o o o • • • o xx x x x x o = message positionx = check position n -1 sum mod 2 It’d better use even-parity checking to avoid contradiction
For a given size mn, the redundancy will be smaller the more the rectangle approaches a square. • For square codes of size n,we have (n -1)2bits of information. And 2n-1 bits of checking along the sides. • Note that: Rectangular codes also can correct bursty error. • (k2+1)x(k1+1) array codeIf k2 2(k1-1) we can correct k1 size of bursty errors *Reference: Blaum, M. van Tilborg, H. Farrell, P., “A class of burst error-correcting array codes ,” IEEE Trans. Information Theory, Vol. 32, Iss. 6, pp. 836-839, 1986.
3.3 Triangular, Cubic, and n-Dimensional Codes • A triangular code of side n has message and n check bits o o o o xo o o xo o xo xx n Redundancy:
Exercise: Can a triangular code correct burst errors? If it can, please give a simple example.
n1 x n2 array codes if n1 2b1b2 - b1n2 2 b1b2 , where b1 divides n1 and b2 divides n2 then it could correct two-dimensional clusters of errors of size b1 x b2 Reference: Blaum, M. and Farrell, P.G.,“Array codes for cluster-error correction,” Electronics Letters. Vol. 30, no. 21, pp. 1752-1753, 1994
Cubic: • The check bits use 3n-2 positions out of the n3 positions. 4 d-hypercubic excess redundancy excess redundancy Redundancy
Highest possible dimensional → 2n bits of which (n+1) are checks when n=3, there are 4 check bits out of 8 bits m1 m2 m3 m4 m5 m6 m7 m8 Check bits: m1,m2 ,m3 ,m5 m2 + m4 + m6 + m8 = 0 -- (1) p2m3 + m4 + m7 + m8 = 0 -- (2) p3 m5 + m6 + m7 + m8 = 0 -- (3) p5 m1 + m3 + m5 + m7 = 0 -- (4) p1 m1 + m2 + m5 + m6 = 0 p1 m1 + m2 + m3 + m4 = 0 p1 0 0 00 0 10 1 00 1 1 1 0 01 0 1 1 1 01 1 1 (1) + (2) + (4) (1) + (3) + (4)
These (n+1) bits form an (n+1)-bit number, and this number ( the syndrome) can specify any of 2n+1 things – more then the 2n locations of the corresponding single error plus the fact that no error occurred. 2n+1 > 2n+1So it could be improved somewhere.m1 m2 m3 m4 m5 m6 m7 m8 p1 p2p3p5 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 1 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 1 1 1 0 0 0 0 0 0 1 0 0 1 1 0 1 0 0 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 0 0 1 1 1 1 0 Syndrome Error Type
3.4 Hamming Error-correcting codes • Find the best encoding scheme for single-error correction for white noise. • Suppose there are m independent parity checks. →It means no sum of any combination of the checks is any other check. • Example: check 1 : 1 2 5 7 --- (1) check 2 : 5 7 8 9 --- (2) check 3 : 1 2 8 9 --- (3) It is not independent, because (1)+(2)=(3) • So third parity check provides no new information over that of the first two, and is simply wasted effort.
The syndrome which results from writing a 0 for each of the m parity checks that is correct and 1 for each failure can be viewed as an m-bit number and can represent at most 2m things. • For n bits of the message, 2m n + 1 It is optimal when meets the equality condition. ( Hamming Codes ) • Using Syndrome to find out the position of errors. The ideal situation is to use the value of Syndrome to point out the position of errors.
Example: 0 0 0 no error 0 0 1 error happened in the first position
Locate errorcheck1 m1+ m3+ m5+ m7=0check2 m2+ m3+ m6+ m7=0check3 m4+ m5+ m6+ m7=0 Viewing m1 , m2 , m4 as check bit • Note that the check positions are equally corrected with the message positions. The code is uniform in its protection. Once encoded there is no different between the message and the check digits.
Hamming code when m = 10, then n = 1023original message length : 1023 – 10 = 1013Redundancy:
3.5 Equivalent codes • Interchange the positions
3.6 Geometric Approach • The length of codeword is n The length of message is k The length of check bit is m • m1, m2, m3, . . . , mn=> There are 2n possibilities. • Every codeword can correct any one of errors.So (n+1) elements could be a sphere. maximum number of spheres
Consider the string of n 0’s and 1’s as a point in n-dimension space. • Each vertex is a string of n 0’s and 1’s. • The space consists only of the 2nvertices. • Each vertex is a possible received message, but only selected vertices are to be original messages. • Single error move original message to adjacent vertex. • Single error detection : the minimum distance must be at least 2. • Single error correction :the minimum distance must be at least 3.
Hamming distance: the minimum number of sides of the cube we have to traverse to get from one point to another.i.e., sum of the two points (mod 2)
Higher error correction:Considering that code can correct two errors.Then • It does not mean that this number can be achieved, only that this is an upper bound. • When the spheres about the message points completely exhaust the space of 2n points, leaving no points outside some sphere, the code is called a perfect code. • In only a comparatively few cases do perfect code exist. They require that the inequalities be equalities.
3.7 Single-Error-Correction Plus Double-Error-Detection Codes • It is seldom wise to use only single-error correction, because a double error would then fool the system in its attempts to correct, and the system would use the syndrome to correct the wrong place; thus there would be three error in the decoded message. • Therefore, we need a code which can correct a single error and detect a double error. • To make a double-error-detecting code from a single-error-correcting code, we add one more parity check (and one more position): this check is over the whole message.
How to make a single-error-correcting code single-error-correcting + double-error-detecting code? • Add a parity to check which is over the whole message.