15-853:Algorithms in the Real World

Slides:



Advertisements
Similar presentations
Mahdi Barhoush Mohammad Hanaysheh
Advertisements

Vector Spaces A set V is called a vector space over a set K denoted V(K) if is an Abelian group, is a field, and For every element vV and K there exists.
15-251: Great Theoretical Ideas in Computer Science Error Correction Lecture 17 October 23, 2014.
296.3Page :Algorithms in the Real World Error Correcting Codes I – Overview – Hamming Codes – Linear Codes.
Cyclic Code.
Error Control Code.
296.3Page :Algorithms in the Real World Error Correcting Codes II – Cyclic Codes – Reed-Solomon Codes.
L. J. Wang 1 Introduction to Reed-Solomon Coding ( Part I )
Efficient Soft-Decision Decoding of Reed- Solomon Codes Clemson University Center for Wireless Communications SURE 2006 Presented By: Sierra Williams Claflin.
Information and Coding Theory
Ch 2.7 Error Detection & Correction CS-147 Tu Hoang.
CHANNEL CODING REED SOLOMON CODES.
Wireless Mobile Communication and Transmission Lab. Chapter 2 Block code ----BCH The Theory and Technology of Error Control Coding.
Cellular Communications
DIGITAL COMMUNICATION Coding
6/20/2015List Decoding Of RS Codes 1 Barak Pinhas ECC Seminar Tel-Aviv University.
Chapter 11 Algebraic Coding Theory. Single Error Detection M = (1, 1, …, 1) is the m  1 parity check matrix for single error detection. If c = (0, 1,
15-853Page :Algorithms in the Real World Error Correcting Codes I – Overview – Hamming Codes – Linear Codes.
Linear Codes.
DIGITAL COMMUNICATION Error - Correction A.J. Han Vinck.
Cyclic codes 1 CHAPTER 3: Cyclic and convolution codes Cyclic codes are of interest and importance because They posses rich algebraic structure that can.
Channel Coding Part 1: Block Coding
Great Theoretical Ideas in Computer Science.
1 Channel Coding (II) Cyclic Codes and Convolutional Codes.
Application of Finite Geometry LDPC code on the Internet Data Transport Wu Yuchun Oct 2006 Huawei Hisi Company Ltd.
Error Control Code. Widely used in many areas, like communications, DVD, data storage… In communications, because of noise, you can never be sure that.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
15-853Page :Algorithms in the Real World Error Correcting Codes II – Cyclic Codes – Reed-Solomon Codes.
Cyclic Code. Linear Block Code Hamming Code is a Linear Block Code. Linear Block Code means that the codeword is generated by multiplying the message.
COEN 180 Erasure Correcting, Error Detecting, and Error Correcting Codes.
MIMO continued and Error Correction Code. 2 by 2 MIMO Now consider we have two transmitting antennas and two receiving antennas. A simple scheme called.
Fields: Defns “Closed”: a,b in F  a+b, a.b in F Properties: – Commutative: a+b=b+a, a.b=b.a – Associative: a+(b+c)=(a+b)+c, a.(b.c) = (a.b).c – Distributive:
Great Theoretical Ideas in Computer Science.
CS717 Algorithm-Based Fault Tolerance Matrix Multiplication Greg Bronevetsky.
§6 Linear Codes § 6.1 Classification of error control system § 6.2 Channel coding conception § 6.3 The generator and parity-check matrices § 6.5 Hamming.
DIGITAL COMMUNICATIONS Linear Block Codes
David Wetherall Professor of Computer Science & Engineering Introduction to Computer Networks Error Detection (§3.2.2)
Information and Coding Theory Cyclic codes Juris Viksna, 2015.
Information Theory Linear Block Codes Jalal Al Roumy.
Channel Coding Binit Mohanty Ketan Rajawat. Recap…  Information is transmitted through channels (eg. Wires, optical fibres and even air)  Channels are.
The parity bits of linear block codes are linear combination of the message. Therefore, we can represent the encoder by a linear system described by matrices.
Perfect and Related Codes
Elementary Coding Theory Including Hamming and Reed-Solomom Codes with Maple and MATLAB Richard Klima Appalachian State University Boone, North Carolina.
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
Cryptography and Coding Theory
2016/2/14 1 Error Correction Code (1) Fire Tom Wada Professor, Information Engineering, Univ. of the Ryukyus.
15-499Page :Algorithms and Applications Cryptography II – Number theory (groups and fields)
Reed-Solomon Codes Rong-Jaye Chen.
CHAPTER 8 CHANNEL CODING: PART 3 Sajina Pradhan
Exercise in the previous class (1) Define (one of) (15, 11) Hamming code: construct a parity check matrix, and determine the corresponding generator matrix.
Cyclic Linear Codes. p2. OUTLINE  [1] Polynomials and words  [2] Introduction to cyclic codes  [3] Generating and parity check matrices for cyclic.
ECE 442 COMMUNICATION SYSTEM DESIGN LECTURE 10. LINEAR BLOCK CODES Husheng Li Dept. of EECS The University of Tennessee.
Class Report 林格名 : Reed Solomon Encoder. Reed-Solomom Error Correction When a codeword is decoded, there are three possible outcomes –If 2s + r < 2t (s.
RS – Reed Solomon Error correcting code. Error-correcting codes are clever ways of representing data so that one can recover the original information.
V. Non-Binary Codes: Introduction to Reed Solomon Codes
Modulo-2 Digital coding uses modulo-2 arithmetic where addition becomes the following operations: 0+0= =0 0+1= =1 It performs the.
Information and Coding Theory
Cyclic Codes 1. Definition Linear:
Great Theoretical Ideas in Computer Science
15-853:Algorithms in the Real World
15-853:Algorithms in the Real World
Algorithms in the Real World
RS – Reed Solomon List Decoding.
Block codes. encodes each message individually into a codeword n is fixed, Input/out belong to alphabet Q of cardinality q. The set of Q-ary n-tuples.
Cyclic Code.
Error Correction Code (1)
Erasure Correcting Codes for Highly Available Storage
Error Correction Code (1)
CHAPTER 3: Cyclic and convolution codes
296.3:Algorithms in the Real World
Presentation transcript:

15-853:Algorithms in the Real World Error Correcting Codes II Cyclic Codes Reed-Solomon Codes 15-853

Reed-Solomon: Outline A (n, k, n-k+1) Reed Solomon Code: Consider the polynomial p(x) = ak-1 xk-1 + L + a1 x + a0 Message: (ak-1, …, a1, a0) Codeword: (p(1), p(2), …, p(n)) To keep the p(i) fixed size, we use ai 2 GF(pr) To make the p(i) distinct, n < pr Any subset of size k of (p(1), p(2), …, p(n)) is enough to reconstruct p(x). 15-853

Reed Solomon: Outline A (n, k, 2s +1) Reed Solomon Code: k 2s n Can detect 2s errors Can correct s errors Generally can correct a erasures and b errors if a + 2b · 2s 15-853

Reed Solomon: Outline Correcting s errors: Find k + s symbols that agree on a polynomial p(x). These must exist since originally k + 2s symbols agreed and only s are in error There are no k + s symbols that agree on the wrong polynomial p’(x) Any subset of k symbols will define p’(x) Since at most s out of the k+s symbols are in error, p’(x) = p(x) 15-853

Reed Solomon: Outline Systematic version of Reed-Solomon p(x) = ak-1 xk-1 + L + a1 x + a0 Message: (ak-1, …, a1, a0) Codeword: (ak-1, …, a1, a0, p(1), p(2), …, p(2s)) This has the advantage that if we know there are no errors, it is trivial to decode. Later we will see that version of RS used in practice uses something slightly different than p(1), p(2), … This will allow us to use the “Parity Check” ideas from linear codes (i.e HcT = 0?) to quickly test for errors. 15-853

RS in the Real World (204,188,17)256 : ITU J.83(A)2 (128,122,7)256 : ITU J.83(B) (255,223,33)256 : Common in Practice Note that they are all byte based (i.e. symbols are from GF(28)). Performance on 600MHz Pentium (approx.): (255,251) = 45Mbps (255,223) = 4Mbps Dozens of companies sell hardware cores that operate 10x faster (or more) (204,188) = 320Mbps (Altera decoder) 15-853

Applications or Reed-Solomon Codes Storage: CDs, DVDs, “hard drives”, Wireless: Cell phones, wireless links Sateline and Space: TV, Mars rover, … Digital Television: DVD, MPEG2 layover High Speed Modems: ADSL, DSL, .. Good at handling burst errors. Other codes are better for random errors. e.g. Gallager codes, Turbo codes 15-853

RS and “burst” errors Let’s compare to Hamming Codes (which are “optimal”). code bits check bits RS (255, 253, 3)256 2040 16 Hamming (211-1, 211-11-1, 3)2 2047 11 They can both correct 1 error, but not 2 random errors. The Hamming code does this with fewer check bits However, RS can fix 8 contiguous bit errors in one byte Much better than lower bound for 8 arbitrary errors 15-853

Galois Field GF(23) with irreducible polynomial: x4 + x + 1 a = x is a generator a x 010 2 a2 x2 100 3 a3 x + 1 011 4 a4 x2 + x 110 5 a5 x2 + x + 1 111 6 a6 x2 + 1 101 7 a7 1 001 Will use this as an example. 15-853

Discrete Fourier Transform Another View of Reed-Solomon Codes a is a primitive nth root of unity (an = 1) – a generator The Discrete Fourier Transform (DFT) Inverse DFT 15-853

DFT Example a = x is 7th root of unity in GF(28)/x4 + x + 1 Recall a = “2”, a2 = “3”, … , a7 = 1 = “1” Should be clear that c = T ¢ (m0,m1,…,mk-1,0,…)T is the same as evaluating p(x) = m0 + m1x + … + mk-1xk-1 at n points. 15-853

Decoding Why is it hard? Brute Force: try k+s choose k + 2s possibilities and solve for each. 15-853

Cyclic Codes A code is cyclic if: (c0, c1, …, cn-1) 2 C ) (cn-1, c0, …, cn-2) 2 C Both Hamming and Reed-Solomon codes are cyclic. Note: we might have to reorder the columns to make the code “cyclic”. We will only consider linear cyclic codes. Motivation: They are more efficient to decode than general codes. 15-853

Generator and Parity Check Matrices Generator Matrix: A k x n matrix G such that: C = {m ¢ G | m 2 åk} Made from stacking the basis vectors Parity Check Matrix: A (n – k) x n matrix H such that: C = {v 2 ån | H ¢ vT = 0} Codewords are the nullspace of H These always exist for linear codes H ¢ GT = 0 15-853

Generator and Parity Check Polynomials Generator Polynomial: A degree (n-k) polynomial g such that: C = {m ¢ g | m 2 åk[x]} such that g | xn - 1 Parity Check Polynomial: A degree k polynomial h such that: C = {v 2 ån [x] | h ¢ v = 0 (mod xn –1)} such that h | xn - 1 These always exist for linear cyclic codes h ¢ g = xn - 1 15-853

Viewing g as a matrix If g = g0 + g1x + … + gn-kxn-k We can put this generator in matrix form: Write m = m0 + m1 x + … mk-1xk-1 as (m0, m1, …, mk-1) Then c = mG 15-853

g generates cyclic codes Codes are linear combinations of the rows. All but last row is clearly cyclic (based on next row) Shift of last row is xkg mod (xn –1) Consider h = h0 + h1x + … + hkxk (gh = xn –1) h0g + (h1x)g + … + (hk-1xk-1)g + (hkxk)g = xn - 1 xkg = -hk-1(h0g + h1(xg) + … + hk-1(xk-1g)) mod (xn –1) This is a linear combination of the rows. 15-853

Viewing h as a matrix If h = h0 + h1x + … + hkxk we can put this parity check poly. in matrix form: HcT = 0 15-853

Hamming Codes Revisited The Hamming (7,4,3)2 code. g = 1 + x2 + x3 h = x4 + x2 + x + 1 gh = x7 – 1, GHT = 0 The columns are reordered from when we previously discussed this code. 15-853

Factors of xn -1 Intentionally left blank 15-853

Another way to write g Let a be a generator of GF(pr). Let n = pr - 1 (the size of the multiplicative group) Then we can write a generator polynomial as g(x) = (x-a)(x-a2) … (x - an-k) Lemma: g | xn – 1 (a | b, means a divides b) Proof: an = 1 (because of the size of the group) ) an – 1 = 0 ) a root of xn – 1 ) (x - a) | xn -1 similarly for a2, a3, …, an-k therefore xn - 1 is divisible by (x - a)(x - a2) … 15-853

Back to Reed-Solomon Consider a generator g 2 GF(pr)[x], s.t. g | (xn – 1) Recall that n – k = 2s (the degree of g) Encode: m’ = m x2s (basically shift by 2s) b = m’ (mod g) c = m’ – b = (mk-1, …, m0, -b2s-1, …, -b0) Note that c is a cyclic code based on g m’ = qg + b c = m’ – b = qg Parity check: h c = 0 ? 15-853

Example Lets consider the (7,3,5)8 Reed-Solomon code. We use GF(23)/x3 + x + 1 a x 010 2 a2 x2 100 3 a3 x + 1 011 4 a4 x2 + x 110 5 a5 x2 + x + 1 111 6 a6 x2 + 1 101 7 a7 1 001 15-853

Example RS (7,3,5)8 g = (x - a)(x - a2)(x - a3)(x - a4) = x4 + a3x3 + x2 + ax + a3 h = (x - a5)(x - a6)(x - a7) = x3 + a3x3 + a2x + a4 gh = x7 - 1 Consider the message: 110 000 110 m = (a4, 0, a4) = a4x2 + a4 m’ = x4m = a4x6 + a4x4 = (a4 x2 + x + a3)g + (a3x3 + a6x + a6) c = (a4, 0, a4, a3, 0, a6, a6) = 110 000 110 011 000 101 101 a 010 a2 100 a3 011 a4 110 a5 111 a6 101 a7 001 ch = 0 (mod x7 –1) 15-853

A useful theorem Theorem: For any b, if g(b) = 0 then b2sm(b) = b(b) Proof: x2sm(x) = g(x)q(x) + d(x) b2sm(b) = g(b)q(b) + b(b) = b(b) Corollary: b2sm(b) = b(b) for b 2 {a, a2, …, a2s} {a, a2, …, a2s} are the roots of g by definition. 15-853

Fixing errors Theorem: Any k symbols from c can reconstruct c and hence m Proof: We can write 2s equations involving m (cn-1, …, c2s) and b (c2s-1, …, c0). These are a2s m(a) = b(a) a4s m(a2) = b(a2) … a2s(2s) m(a2s) = b(a2s) We have at most 2s unknowns, so we can solve for them. (I’m skipping showing that the equations are linearly independent). 15-853

Efficient Decoding I don’t plan to go into the Reed-Solomon decoding algorithm, other than to mention the steps. Syndrome Calculator Error Polynomial Berlekamp Massy Error Locations Chien Search Error Magnitudes Forney Algorithm Error Corrector c m 15-853