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

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

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

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

Fault Tolerance & Reliability CDA Chapter 2 Cyclic Polynomial Codes

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

Chapter 5. Cyclic Codes

ECEN 604: Channel Coding for Communications

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

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)

EE 229B ERROR CONTROL CODING Spring 2005

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


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

Information Theory. Lecture 7

Error Detection & Correction

Cyclic codes: overview

Information Redundancy: Coding

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

Linear Block Codes. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

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

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

Chapter 6. BCH Codes

Solutions to problems from Chapter 3

Introduction to Wireless & Mobile Systems. Chapter 4. Channel Coding and Error Control Cengage Learning Engineering. All Rights Reserved.

EE512: Error Control Coding

Multimedia Systems WS 2010/2011

EE 229B ERROR CONTROL CODING Spring 2005

Cyclic Redundancy Check Codes

Optical Storage Technology. Error Correction

Information redundancy

Physical Layer and Coding

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

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

7.1 Definitions and Generator Polynomials

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.

Error Control Codes for Memories

Design and Implementation of Reed-Solomon Decoder using Decomposed Inversion less Berlekamp-Massey Algorithm by

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

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

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

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

ELEC3227/4247 Mid term Quiz2 Solution with explanation

Assume that the follow string of bits constitutes one of the segments we which to transmit.

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

MTH310 EXAM 2 REVIEW

The Pennsylvania State University. The Graduate School. Department of Computer Science and Engineering

Chapter 3 Linear Block Codes

Error Correction Methods

Error Correction Review

On Irreducible Polynomial Remainder Codes

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

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

3. Coding theory 3.1. Basic concepts

EECS150 - Digital Design Lecture 21 - Design Blocks

Lecture 12. Block Diagram

Random Variables. Saravanan Vijayakumaran Department of Electrical Engineering Indian Institute of Technology Bombay

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

Error Correction and Trellis Coding

ECE 4450:427/527 - Computer Networks Spring 2017

Optimum Soft Decision Decoding of Linear Block Codes

Reverse Berlekamp-Massey Decoding

CSE 123: Computer Networks

Homework 8 Solutions to Selected Problems

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

MATH3302. Coding and Cryptography. Coding Theory

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

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

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

Discrete Mathematics and Probability Theory Spring 2016 Rao and Walrand Discussion 6A Solution

EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs)

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

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

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

1 Reed Solomon Decoder Final Project. Group 3 Abhinav Agarwal S Branavan Grant Elliott. 14 th May 2007

PAPER A Low-Complexity Step-by-Step Decoding Algorithm for Binary BCH Codes

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

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

Simplification of Procedure for Decoding Reed- Solomon Codes Using Various Algorithms: An Introductory Survey

March Algebra 2 Question 1. March Algebra 2 Question 1

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

Fully-parallel linear error block coding and decoding a Boolean approach

VHDL Implementation of Reed Solomon Improved Encoding Algorithm

16.36 Communication Systems Engineering

ELEC-E7240 Coding Methods L (5 cr)

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

7.4: Integration of rational functions

Continuing discussion of CRC s, especially looking at two-bit errors

Coding on a Trellis: Convolutional Codes

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

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

Linear Feedback Shift Registers (LFSRs) 4-bit LFSR

Integration of Rational Functions by Partial Fractions

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road UNIT I

Abstract Algebra: Chapters 16 and 17

EE512: Error Control Coding

Binary Convolutional Codes

Section IV.23. Factorizations of Polynomials over a Field

Math 512 Syllabus Spring 2017, LIU Post

Coding theory: Applications

Transcription:

1 / 25 Cyclic Codes Saravanan Vijayakumaran sarva@ee.iitb.ac.in Department of Electrical Engineering Indian Institute of Technology Bombay August 26, 2014

2 / 25 Cyclic Codes Definition A cyclic shift of a vector [ v 0 v 1 v n 2 v n 1 ] is the vector [ vn 1 v 0 v 1 v n 3 v n 2 ]. Definition An (n, k) linear block code C is a cyclic code if every cyclic shift of a codeword in C is also a codeword. Example Consider the (7, 4) code C with generator matrix 1 0 0 0 1 1 0 G = 0 1 0 0 0 1 1 0 0 1 0 1 1 1 0 0 0 1 1 0 1

3 / 25 Polynomial Representation of Vectors For every vector v = [ v 0 v 1 v n 2 ] v n 1 there is a polynomial v(x) = v 0 + v 1 X + v 2 X 2 + + v n 1 X n 1 Let v (i) be the vector resulting from i cyclic shifts on v v (i) (X) = v n i +v n i+1 X + +v n 1 X i 1 +v 0 X i + +v n i 1 X n 1 Example v = [ 1 0 0 1 1 0 1 ], v(x) = 1 + X 3 + X 4 + X 6 v (1) = [ 1 1 0 0 1 1 0 ], v (1) (X) = 1 + X + X 4 + X 5 v (2) = [ 0 1 1 0 0 1 1 ], v (2) (X) = X + X 2 + X 5 + X 6

4 / 25 Polynomial Representation of Vectors Consider v(x) and v (1) (X) v(x) = v 0 + v 1 X + v 2 X 2 + + v n 1 X n 1 v (1) (X) = v n 1 + v 0 X + v 1 X 2 + v 2 X 3 + + v n 2 X n 2 = v n 1 + X [v 0 + v 1 X + v 2 X 2 + + v n 2 X n 2] = v n 1 (1 + X n ) + X [v 0 + + v n 2 X n 2 + v n 1 X n 1] = v n 1 (1 + X n ) + Xv(X) In general, v(x) and v (i) (X) are related by X i v(x) = v (i) (X) + q(x) (X n + 1) where q(x) = v n i + v n i+1 X + + v n 1 X i 1 v (i) (X) is the remainder when X i v(x) is divided by X n + 1

5 / 25 Hamming Code of Length 7 Codeword Code Polynomial 0000000 0 1000110 1 + X 4 + X 5 0100011 X + X 5 + X 6 1100101 1 + X + X 4 + X 6 0010111 X 2 + X 4 + X 5 + X 6 1010001 1 + X 2 + X 6 0110100 X + X 2 + X 4 1110010 1 + X + X 2 + X 5 0001101 X 3 + X 4 + X 6 1001011 1 + X 3 + X 5 + X 6 0101110 X + X 3 + X 4 + X 5 1101000 1 + X + X 3 0011010 X 2 + X 3 + X 5 1011100 1 + X 2 + X 3 + X 4 0111001 X + X 2 + X 3 + X 6 1111111 1 + X + X 2 + X 3 + X 4 + X 5 + X 6

6 / 25 Properties of Cyclic Codes (1) Theorem The nonzero code polynomial of minimum degree in a linear block code is unique. Proof. Suppose there are two code polynomials g(x) and g (X) of minimum degree r. What is the degree of their sum?

7 / 25 Properties of Cyclic Codes (2) Let g(x) = g 0 + g 1 X + + g r 1 X r 1 + X r be the nonzero code polynomial of minimum degree in an (n, k) binary cyclic code C. Theorem The constant term g 0 is equal to 1. Proof. Suppose g 0 = 0. Then g 1 X + g 2 X 2 + + X r is a code polynomial. What happens when we left shift the corresponding codeword?

8 / 25 Properties of Cyclic Codes (3) Let g(x) = g 0 + g 1 X + + g r 1 X r 1 + X r be the nonzero code polynomial of minimum degree in an (n, k) binary cyclic code C. Theorem A binary polynomial of degree n 1 or less is a code polynomial if and only if it is a multiple of g(x). Proof. ( ) A multiple of g(x) of degree n 1 or less is a linear combination of shifts of g(x). ( ) Consider the remainder when a code polynomial is divided by g(x). g(x) is called the generator polynomial of the cyclic code.

9 / 25 Properties of Cyclic Codes (4) Theorem The degree of the generator polynomial of an (n, k) binary cyclic code is n k. Proof. If the degree of g(x) is r, how many distinct multiples of g(x) of degree of n 1 or less exist?

10 / 25 Properties of Cyclic Codes (5) Theorem The generator polynomial of an (n, k) binary cyclic code is a factor of X n + 1. Proof. g(x) has degree n k. What is the remainder when X k g(x) is divided by X n + 1?

11 / 25 Properties of Cyclic Codes (6) Theorem If g(x) is a polynomial of degree n k and is a factor of X n + 1, then g(x) generates an (n, k) cyclic code. Proof. Multiples of g(x) of degree n 1 or less generate a (n, k) linear block code. We need to show that the generated code is cyclic. For a code polynomial v(x) consider the following equation Xv(X) = v n 1 (X n + 1) + v (1) (X) What can we say about v (1) (X)?

12 / 25 Systematic Encoding of Cyclic Codes To encode a k-bit message [ u 0 u 1 ] u k 1 construct the message polynomial u(x) = u 0 + u 1 X + + u k 1 X k 1. Given a generator polynomial g(x) of an (n, k) cyclic code, the corresponding codeword is u(x)g(x). This is not a systematic encoding. A systematic encoding of the message can be obtained as follows Divide X n k u(x) by g(x) to obtain remainder b(x) The code polynomial is given by b(x) + X n k u(x)

Circuits for Cyclic Code Encoding

14 / 25 A Shift Register Circuit Let g(x) = 1 + g 1 X + g 2 X 2 + + g r 1 X r 1 + X r g 1 g 2 g r 1 a + s 0 + s 1 + + s r 1 s(x) = s 0 + s 1 X + + s r 1 X r 1 is the current state polynomial The next state polynomial s (X) is given by s (X) = [a + Xs(X)] mod g(x) Can we use this circuit to build an encoder for a cyclic code with generator polynomial g(x)?

Circuit for Systematic Encoding If the initial state polynomial is zero and the input is a sequence of bits a m 1, a m 2,..., a 1, a 0, the final state polynomial is a(x) mod g(x) = [ m 1 i=0 a i X i ] mod g(x) For systematic encoding we need X n k u(x) mod g(x) which corresponds to input bit sequence u k 1, u k 2,..., u 1, u 0, 0, 0,..., 0, 0 }{{} n k Is there a way to avoid the delay of n k clock ticks? 15 / 25

16 / 25 Another Shift Register Circuit Let g(x) = 1 + g 1 X + g 2 X 2 + + g r 1 X r 1 + X r g 1 g 2 g r 1 s 0 + s 1 + + s r 1 + a s(x) = s 0 + s 1 X + + s r 1 X r 1 is the current state polynomial The next state polynomial s (X) is given by s (X) = [ax r + Xs(X)] mod g(x) If the initial state polynomial is zero and the input is a sequence of bits a m 1, a m 2,..., a 1, a 0, the final state polynomial is [ m 1 ] X r a(x) mod g(x) = a i X r+i mod g(x) i=0

17 / 25 Systematic Encoding Circuit for Cyclic Codes Let g(x) = 1 + g 1 X + g 2 X 2 + + g n k 1 X n k 1 + X n k Gate g 1 g 2 g n k 1 s 0 + s 1 + + s n k 1 + u k 1, u k 2,... Output1 Output2 Turn on the gate. Shift the message bits u k 1, u k 2,..., u 0 into the circuit and channel simultaneously. Only Output1 is fed to the channel. Turn off the gate and shift the contents of the shift register into the channel. Only Output2 is fed to the channel.

Error Detection using Cyclic Codes

19 / 25 Syndrome Computation Errors are detected when the received vector is not a codeword For linear block codes, r is a codeword rh T = 0 s = rh T is called the syndrome vector For cyclic codes, the received polynomial r(x) is a code polynomial r(x) mod g(x) = 0 s(x) = r(x) mod g(x) is called the syndrome polynomial The following circuit computes the syndrome polynomial g 1 g 2 g n k 1 r 0,..., r n 1 + s 0 + s 1 + + s n k 1

20 / 25 Detecting Odd Weight Error Patterns For received polynomial r(x) = v(x) + e(x) where v(x) is a code polynomial r(x) mod g(x) = e(x) mod g(x) Error e(x) 0 is undetected if e(x) mod g(x) = 0 If an odd weight error pattern occurs, then e(x) = X i 1 + X i 2 + + X im where m is odd and 0 i j n 1 If X + 1 is a factor of g(x), all odd weight error patterns are detected If g(x) = (X + 1)a(X), then e(x) mod g(x) = 0 = e(x) = g(x)b(x) = (X + 1)a(X)b(X)

21 / 25 Detecting Double Bit Errors A double bit error pattern is of the form e(x) = X i + X j where i j and 0 i, j n 1 A polynomial over F 2 is said to be irreducible over F 2 if it has no factors other than 1 and itself Examples: X, X + 1, X 2 + X + 1, X 3 + X + 1, X 3 + X 2 + 1 A degree m irreducible polynomial is primitive if the smallest value of N for which it divides X N + 1 is 2 m 1 Examples: X + 1, X 2 + X + 1 If g(x) is a primitive polynomial of degree m and the code length n = 2 m 1, then all double bit errors are detected X i + X j = X i (1 + X j i ) In practice, g(x) is chosen to be (X + 1)p(X) where p(x) is a primitive polynomial

22 / 25 Example: CRC-16 The generator polynomial of CRC-16 is given by g(x) = X 16 + X 15 + X 2 + 1 = (X + 1)(X 15 + X + 1) CRC = Cyclic Redundancy Check All odd weight error patterns are detected If the code length is 2 15 1 = 32767, then all double bit errors are detected A burst error of length m occurs if the error locations are confined to a block of length m e(x) = X i +e i+1 X i+1 +e i+2 X i+2 + +e i+m 2 X i+m 2 +X i+m 1 The CRC-16 code can detect all burst errors of length 16 or less, 99.997% of 17-length bursts, 99.998% of 18-length bursts...

23 / 25 Burst Error Detection An (n, k) cyclic code can detect burst errors of length n k or less, including end-around bursts The fraction of undetectable bursts of length n k + 1 is 2 (n k 1) For m > n k + 1, the fraction of undetectable bursts of length m is 2 (n k)

24 / 25 CRC in Context Information Source CRC Encoder FEC Encoder Modulator Channel Information Destination CRC Decoder FEC Decoder Demodulator CRC is used along with Automatic Repeat request (ARQ) to enable reliable communication

Questions? Takeaways? 25 / 25