Cyclic codes: overview

Similar documents
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)

ECEN 604: Channel Coding for Communications

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

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

Coding Theory and Applications. Solved Exercises and Problems of Cyclic Codes. Enes Pasalic University of Primorska Koper, 2013

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

ELG 5372 Error Control Coding. Lecture 12: Ideals in Rings and Algebraic Description of Cyclic Codes

3. Coding theory 3.1. Basic concepts

EE512: Error Control Coding

Vector spaces. EE 387, Notes 8, Handout #12

Chapter 5. Cyclic Codes

Generator Matrix. Theorem 6: If the generator polynomial g(x) of C has degree n-k then C is an [n,k]-cyclic code. If g(x) = a 0. a 1 a n k 1.

Objective: To become acquainted with the basic concepts of cyclic codes and some aspects of encoder implementations for them.

Linear Cyclic Codes. Polynomial Word 1 + x + x x 4 + x 5 + x x + x f(x) = q(x)h(x) + r(x),

Cyclic codes. Vahid Meghdadi Reference: Error Correction Coding by Todd K. Moon. February 2008

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

EE512: Error Control Coding

Information redundancy

Error Detection & Correction

Information Theory. Lecture 7

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

Chapter 6. BCH Codes

Algebra for error control codes

Cyclic Codes. Saravanan Vijayakumaran August 26, Department of Electrical Engineering Indian Institute of Technology Bombay

Error Correction Review

EE 229B ERROR CONTROL CODING Spring 2005

7.1 Definitions and Generator Polynomials

Solutions or answers to Final exam in Error Control Coding, October 24, G eqv = ( 1+D, 1+D + D 2)

A Brief Encounter with Linear Codes

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

EECS Components and Design Techniques for Digital Systems. Lec 26 CRCs, LFSRs (and a little power)

Fault Tolerant Computing CS 530 Information redundancy: Coding theory. Yashwant K. Malaiya Colorado State University

Implementation of Galois Field Arithmetic. Nonbinary BCH Codes and Reed-Solomon Codes

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

Rings. EE 387, Notes 7, Handout #10

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

Physical Layer and Coding

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

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

Chapter 3 Linear Block Codes

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

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

Fundamental Theorem of Algebra

Binary Primitive BCH Codes. Decoding of the BCH Codes. Implementation of Galois Field Arithmetic. Implementation of Error Correction

6.1.1 What is channel coding and why do we use it?

Cyclic Redundancy Check Codes

ERROR CORRECTING CODES

Information Redundancy: Coding

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

Linear Feedback Shift Registers (LFSRs) 4-bit LFSR

: Error Correcting Codes. November 2017 Lecture 2

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

Part III. Cyclic codes

Cyclic codes. I give an example of a shift register with four storage elements and two binary adders.

MATH32031: Coding Theory Part 15: Summary

ECE 4450:427/527 - Computer Networks Spring 2017

Chapter 6 Reed-Solomon Codes. 6.1 Finite Field Algebra 6.2 Reed-Solomon Codes 6.3 Syndrome Based Decoding 6.4 Curve-Fitting Based Decoding

GF(2 m ) arithmetic: summary

Error Correction Methods

Lecture 12. Block Diagram

Outline. EECS Components and Design Techniques for Digital Systems. Lec 18 Error Coding. In the real world. Our beautiful digital world.

Least Period of Linear Recurring Sequences over a Finite Field

New Algebraic Decoding of (17,9,5) Quadratic Residue Code by using Inverse Free Berlekamp-Massey Algorithm (IFBM)

Polynomials. Chapter 4

EE 229B ERROR CONTROL CODING Spring 2005

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

Outline. MSRI-UP 2009 Coding Theory Seminar, Week 2. The definition. Link to polynomials

Finite Fields. Mike Reiter

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

MATH 291T CODING THEORY

An Enhanced (31,11,5) Binary BCH Encoder and Decoder for Data Transmission

EE512: Error Control Coding

Topic 3. Design of Sequences with Low Correlation

Optimum Soft Decision Decoding of Linear Block Codes

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

MT5821 Advanced Combinatorics

Math 512 Syllabus Spring 2017, LIU Post

ECEN 5022 Cryptography


5.0 BCH and Reed-Solomon Codes 5.1 Introduction

The Golay codes. Mario de Boer and Ruud Pellikaan

Reed-Solomon Error-correcting Codes

17 Galois Fields Introduction Primitive Elements Roots of Polynomials... 8

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

MATH 291T CODING THEORY

Solutions to problems from Chapter 3

0 Sets and Induction. Sets

On the Construction and Decoding of Cyclic LDPC Codes

Dr. Cathy Liu Dr. Michael Steinberger. A Brief Tour of FEC for Serial Link Systems

Introduction to finite fields

Algebra Review 2. 1 Fields. A field is an extension of the concept of a group.

Mathematics Department

Implementation of Galois Field Arithmetic. Nonbinary BCH Codes and Reed-Solomon Codes

Part I. Cyclic codes and channel codes. CODING, CRYPTOGRAPHY and CRYPTOGRAPHIC PROTOCOLS

ECEN 5682 Theory and Practice of Error Control Codes

Finite Fields. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

Linear Codes and Syndrome Decoding

Abstract Algebra, Second Edition, by John A. Beachy and William D. Blair. Corrections and clarifications

Optical Storage Technology. Error Correction

New algebraic decoding method for the (41, 21,9) quadratic residue code

Transcription:

Cyclic codes: overview EE 387, Notes 14, Handout #22 A linear block code is cyclic if the cyclic shift of a codeword is a codeword. Cyclic codes have many advantages. Elegant algebraic descriptions: c(x) = m(x)g(x), where g(x) is generator polynomial c(x)h(x) = 0 mod (x n 1), where h(x) is parity-check polynomial c(β1 ) = 0,...,c(β t ) = 0, where β 1,...,β t GF(q m ) Shift register encoders and syndrome units Simple burst error correction (error trapping) Random error correction by solving polynomial equations Cyclic codes are (by definition) a very special case of linear codes. But nearly all commonly used block codes are (shortened) cyclic codes. EE 387, October 23, 2015 Notes 14, Page 1

Cyclic shifts of n-tuples and polynomials The right cyclic shift of (v 0,v 1,...,v n 1 ) is (v n 1,v 0,...,v n 2 ). Circuit diagrams: D Q D Q D Q D Q D Q D Q D Q CLK The right cyclic shift of v is denoted by v (1). When n-tuples are polynomials of degree n 1, the right cyclic shift of v(x) = (v 0,v 1,...,v n 2,v n 1 ) = v 0 +v 1 x+ +v n 2 x n 2 +v n 1 x n 1 is also a polynomial of degree n 1: v (1) (x) = (v n 1,v 0,...,v n 2 ) = v n 1 +v 0 x+ +v n 2 x n 1 The right cyclic shift of v = v(x) by i positions is denoted v (i) = v (i) (x). EE 387, October 23, 2015 Notes 14, Page 2

Properties of cyclic shifts Some obvious facts about cyclic shifts of n-tuples: v (n) = v. Left cyclic shift i positions v ( i) is same as right cyclic shift v (n i). v (i) = v (i mod n). The first two statements are special cases of the third. The right cyclic shift operation is a linear transformation v (1) = vs 1, where S 1 is a permutation matrix: 0 1 0 0 0 0 1 0 S 1 =........ 0 0 0 1 1 0 0 0 Every linear feedback shift register corresponds to a matrix in rational canonical form. The cyclic register is the simplest feedback shift register. EE 387, October 23, 2015 Notes 14, Page 3

Numbers vs. polynomials When binary n-tuples represent integers, bit shifts perform multiplication and division by powers of 2. Logical left shift is multiplication by 2. Logical right shift is unsigned division by 2. Cyclic left/rights shifts are multiplication/division by 2 mod 2 n 1. When n-tuples represent polynomials over a field, cyclic shifts correspond to multiplication and division by powers of x mod (x n 1). We write polynomials with the most significant coefficients on the right. (v 0,v 1,...,v n 1 ) v 0 +v 1 x+ +v n 1 x n 1 Cyclic right shifts are multiplication by x, except coefficient of x n becomes coefficient of x 0 = 1. Thus right cyclic shift differs from product with x by a multiple of x n 1. EE 387, October 23, 2015 Notes 14, Page 4

Polynomial description of cyclic shifts Lemma: The right cyclic shift of v(x) is v (1) (x) = xv(x) v n 1 (x n 1) = xv(x) mod (x n 1). Proof: By the definition of right cyclic shift, v (1) (x) = v n 1 +v 0 x+ +v n 2 x n 1 = v n 1 +v 0 x+ +v n 2 x n 1 +v n 1 x n v n 1 x n = xv(x) v n 1 (x n 1) = xv(x) mod (x n 1) When v n 1 = 0, the right cyclic shift is same as the right logical shift: v n 1 = 0 v (1) (x) = xv(x) EE 387, October 23, 2015 Notes 14, Page 5

Cyclic codes: definition and basic properties Definition: A cyclic code is a linear block code such that the right cyclic shift of any codeword is a codeword. By iteration, all cyclic shifts of codewords are codewords. The right cyclic shift i positions of any codeword c(x) is a codeword: c (i) (x) = x i c(x) mod (x n 1) Since cyclic codes are linear, sums of cyclic shifts are codewords. For any polynomial a(x) = a 0 +a 1 x+ +a m x m, m a(x)c(x) mod (x n ( 1) = ai x i c(x) mod (x n 1) ) is a codeword. Important special case: dega(x) < n degc(x). Then i=0 dega(x)c(x) < n = a(x)c(x) mod (x n 1) = a(x)c(x). Therefore a(x)c(x) is a codeword when deg a(x)c(x) < n. EE 387, October 23, 2015 Notes 14, Page 6

Generator polynomial Theorem: Let C be an (n,k) cyclic code over GF(q). 1. There exists a monic polynomial g(x) such that n-tuple c(x) is a codeword if and only if g(x) is a divisor of c(x). The polynomial g(x) is called the generator polynomial of C. 2. The generator polynomial is unique. 3. The degree of the generator polynomial is n k. 4. The generator polynomial is a divisor of x n 1. Proof: When k = 0 we can take g(x) = x n 1. In this case all the statements are obviously true. So assume k > 0 and therefore n k < n. The zero polynomial is the only polynomial of degree < n that is divisible by x n 1. So x n 1 generates the code consisting of only the zero vector. x n 1 is called the cyclic polynomial of degree n. EE 387, October 23, 2015 Notes 14, Page 7

Generator polynomial proof (1) 1. Let g(x) be the monic greatest common divisor of {c i (x)}, the set of nonzero codewords. Then there exist polynomials {a i (x)} such that g(x) = a i (x)c i (x) i ( ) = a i (x)c i (x) mod (x n 1) since degg(x) < n = i i ( ) a i (x)c i (x) mod (x n 1) The final expression shows that g(x) is a linear combination of codewords. Therefore g(x) is a divisor of all other codewords. 2. If there were two generator polynomials, each would be a divisor of the other. Since both are monic, the ratio is 1, so they are equal. EE 387, October 23, 2015 Notes 14, Page 8

Generator polynomial proof (2) 3. Let r = degg(x). If degm(x) < n r then degm(x)g(x) < n, so m(x)g(x) is a codeword. Conversely, every codeword c(x) is a polynomial multiple of g(x), that is, c(x) = m(x)g(x) where degm(x) < n r. So there are q n r codewords. But every (n,k) code over GF(q) has q k codewords. Therefore q n r = q k = n r = k = r = n k. 4. (Cute trick.) The right cyclic shift of g(x) by k digits is a codeword: g (k) (x) = (1,0,...,0,g 0,g 1,...,g n k 1 ) Therefore = 1+g 0 x k +g 1 x k+1 + +g n k 1 x n 1 + x n x n = x k g(x) (x n 1) x n 1 = x k g(x) g (k) (x) is a sum of multiples of g(x) and so itself is a multiple of g(x). EE 387, October 23, 2015 Notes 14, Page 9

Examples of binary cyclic codes The (n,0) code consisting of the zero vector: g n (x) = x n 1. The (n,n) code of all n-tuples is another trivial cyclic code: g 0 (x) = 1. The (n,0) and (n,n) codes are duals. Note: g 0 (x)g n (x) = x n 1. Even-parity simple parity-check codes are cyclic: g 1 (x) = x 1 = x+1. Nonsystematic generator matrix: 1 1 0 0 0 0 0 1 1 0 0 0 G =......... 0 0 0 1 1 0 0 0 0 0 1 1 Repetition codes have generator polynomial g n 1 = 1+x+ +x n 1. G = [ 1 1 1 1 1 1 ] Odd parity-check codes are not linear and therefore not cyclic by definition. They are cosets of cyclic codes and have the same error protection ability in most situations. EE 387, October 23, 2015 Notes 14, Page 10

Examples of binary cyclic codes (cont.) Systematic generator matrix for (4, 3) simple parity-check code: 1 1 0 0 g(x) = x+1 = x j mod g(x) = 1 = G = 1 0 1 0 1 0 0 1 Over GF(2), x 7 1 = (x+1)(x 3 +x+1)(x 3 +x 2 +1). There are 2 3 = 8 divisors of x 7 1 hence 8 cyclic codes of blocklength 7. For primitive polynomial g(x) = x 3 +x+1 we obtain cyclic Hamming code. 1 1 0 1 0 0 0 G = 0 1 1 0 1 0 0 1 0 0 1 0 1 1 1 1 1 0 0 1 0 = H = 0 1 0 1 1 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 1 Dual code has generator matrix H, the (7, 3) maximum-length code. All nonzero maximum-length codewords have same weight, 2 m 1 = 4. EE 387, October 23, 2015 Notes 14, Page 11

Nonsystematic generator matrix Let C be the (n,k) cyclic code generated by g(x) of degree r = n k. Every codeword m(x)g(x) = m 0 g(x)+m 1 xg(x)+ +m k 1 x k 1 g(x) is a linear combination of x i g(x). Therefore {x i g(x):i = 0,1,...,k 1} is a basis for C. The matrix with rows x i g(x) is a nonsystematic generator matrix for C. g(x) g 0 g 1 g r 0 0 0 xg(x) 0 g 0 g 1 g r 0 0 G 1 =. =............... x k 2 g(x) 0 0 0 g 0 g 1 g r 0 x k 1 g(x) 0 0 0 0 g 0 g 1 g r Every row of G 1 is a right (cyclic) shift of the first row. EE 387, October 23, 2015 Notes 14, Page 12

Systematic generator matrix A systematic encoder copies message digits to consecutive positions in codeword. Convention: most significant digits transmitted first: c n 1,c n 2,...,c n n In order for k message digits to appear at beginning of a codeword, they must be shifted right by n k positions: m(x) (0,0,...,0,m 0,m 1,...,m k 1 ) = x n k m(x). To generate a valid codeword, low order n k coefficients must be chosen so that the complete n-tuple is a multiple of g(x). Suppose that x n k m(x) has nonzero remainder when divided by g(x). x n k m(x) mod g(x) = R g(x) (x n k m(x)) We can create a codeword by subtracting the remainder from x n k m(x). Integer example: 31 mod 7 = 3 hence 31 3 = 28 is a multiple of 7. EE 387, October 23, 2015 Notes 14, Page 13

Systematic generator matrix (cont.) The systematic encoder for cyclic code with generator polynomial g(x): m(x) x n k m(x) (x n k m(x) mod g(x)) ) = x n k m(x) R g(x) (x n k m(x) = (0,...,0,m 0,...,m k 1 ) (p 0,...,p n k 1,0,...,0) The two polynomials in the above sum have no nonzero coefficients of powers of x in common. This polynomial subtraction is multiplexing. m(x) x n k mod g(x) 1 c(x) This encoder creates a codeword by appending to the message digits the negative of the remainder modulo g(x) of the shifted message polynomial. EE 387, October 23, 2015 Notes 14, Page 14

Systematic generator matrix (cont.) Systematic encoder uses division to produce multiple of generator polynomial. The remainder of division by a fixed polynomial is a linear function. The systematic encoder is a linear transformation, so its output is determined by the output values for any basis. The standard basis consists of the k unit vectors {1,x,...,x k 1 }. Check symbols for message x i are (x n k x i ) mod g(x) = x n k+i mod g(x). The rows of the systematic generator matrix for i = 0,1,...,k 1 are where s [j] (x) = x j mod g(x). g i (x) = x n k+i mod g(x) + x n k+i = s [n k+i] (x) + x n k+i, We will see that s [j] (x) is the j-th feedback shift of s [0] (x). EE 387, October 23, 2015 Notes 14, Page 15

Systematic generator matrix (cont.) Coefficients of s [j] (x) form check portion of systematic generator matrix. s [n k] 0 s [n k] n k 1 1 0 0 s [n k+1] G 2 = 0 s [n k+1] n k 1 0 1 0........... s [n 1] 0 s [n 1] n k 1 0 0 1 First row of G 2 is simply g(x), same as first row of nonsystematic G 1. G 2 has k(n k+1) nonzero elements, same as G 1. Both G 1 and G 2 are determined by n k values (coefficients of g(x)). The parity-check portion of each row of G 2 comes from the first row by using a linear feedback shift register whose scalers the coefficients of g(x). For example, this shift register multiplies by x modulo x 16 +x 12 +x 5 +1. EE 387, October 23, 2015 Notes 14, Page 16