Information and Coding Theory Cyclic codes Juris Viksna, 2015.

Slides:



Advertisements
Similar presentations
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.
Advertisements

Cryptography and Network Security
296.3Page :Algorithms in the Real World Error Correcting Codes II – Cyclic Codes – Reed-Solomon Codes.
15-853:Algorithms in the Real World
Information and Coding Theory
CHANNEL CODING REED SOLOMON CODES.
Information and Coding Theory Finite fields. Juris Viksna, 2015.
Basic properties of the integers
Wireless Mobile Communication and Transmission Lab. Chapter 2 Block code ----BCH The Theory and Technology of Error Control Coding.
Cryptography and Network Security Chapter 4
Cryptography and Network Security Chapter 4 Fourth Edition by William Stallings.
DIGITAL COMMUNICATION Coding
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,
Introduction Polynomials
5.IV. Jordan Form 5.IV.1. Polynomials of Maps and Matrices 5.IV.2. Jordan Canonical Form.
Finite fields.
LIAL HORNSBY SCHNEIDER
Linear codes 1 CHAPTER 2: Linear codes ABSTRACT Most of the important codes are special types of so-called linear codes. Linear codes are of importance.
Rings,Fields TS. Nguyễn Viết Đông Rings, Integral Domains and Fields, 2. Polynomial and Euclidean Rings 3. Quotient Rings 2.
FINITE FIELDS 7/30 陳柏誠.
Linear Codes.
Cyclic codes 1 CHAPTER 3: Cyclic and convolution codes Cyclic codes are of interest and importance because They posses rich algebraic structure that can.
CPSC 3730 Cryptography and Network Security
Information Security and Management 4. Finite Fields 8
Linear Algebra Chapter 4 Vector Spaces.
Cryptography and Network Security Introduction to Finite Fields.
The Polynomial Time Algorithm for Testing Primality George T. Gilbert.
Part.7.1 Copyright 2007 Koren & Krishna, Morgan-Kaufman FAULT TOLERANT SYSTEMS Part 7 - Coding.
By: Hector L Contreras SSGT / USMC
Great Theoretical Ideas in Computer Science.
Information and Coding Theory Linear Block Codes. Basic definitions and some examples. Juris Viksna, 2015.
Polynomial Factoring Ramesh Hariharan. The Problem Factoring Polynomials overs Integers Factorization is unique (why?) (x^2 + 5x +6)  (x+2)(x+3) Time:
Cyclic Codes for Error Detection W. W. Peterson and D. T. Brown by Maheshwar R Geereddy.
Error Coding Transmission process may introduce errors into a message.  Single bit errors versus burst errors Detection:  Requires a convention that.
Copyright © 2013, 2009, 2005 Pearson Education, Inc. 1 3 Polynomial and Rational Functions Copyright © 2013, 2009, 2005 Pearson Education, Inc.
1 SNS COLLEGE OF ENGINEERING Department of Electronics and Communication Engineering Subject: Digital communication Sem: V Cyclic Codes.
Session 1 Stream ciphers 1.
Chapter 4 – Finite Fields
Data Security and Encryption (CSE348) 1. Lecture # 12 2.
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.
Great Theoretical Ideas in Computer Science.
§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.
EE 430 \ Dr. Muqaibel Cyclic Codes1 CYCLIC CODES.
ADVANTAGE of GENERATOR MATRIX:
Chapter 31 INTRODUCTION TO ALGEBRAIC CODING THEORY.
Information Security Lab. Dept. of Computer Engineering 87/121 PART I Symmetric Ciphers CHAPTER 4 Finite Fields 4.1 Groups, Rings, and Fields 4.2 Modular.
Information Theory Linear Block Codes Jalal Al Roumy.
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.
Some Computation Problems in Coding Theory
Error Detection and Correction
Cryptography and Network Security Chapter 4. Introduction  will now introduce finite fields  of increasing importance in cryptography AES, Elliptic.
Digital Communications I: Modulation and Coding Course Term Catharina Logothetis Lecture 9.
INFORMATION THEORY Pui-chor Wong.
Richard Cleve DC 2117 Introduction to Quantum Information Processing QIC 710 / CS 667 / PH 767 / CO 681 / AM 871 Lecture (2011)
Reed-Solomon Codes Rong-Jaye Chen.
CHAPTER 8 CHANNEL CODING: PART 3 Sajina Pradhan
Cryptography and Network Security Third Edition by William Stallings Lecture slides by Lawrie Brown.
Matrices CHAPTER 8.9 ~ Ch _2 Contents  8.9 Power of Matrices 8.9 Power of Matrices  8.10 Orthogonal Matrices 8.10 Orthogonal Matrices 
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.
Information and Coding Theory Linear Codes. Groups, fields and vector spaces - a brief survey. Codes defined as vector subspaces. Dual codes. Juris Viksna,
Page : 1 bfolieq.drw Technical University of Braunschweig IDA: Institute of Computer and Network Engineering  W. Adi 2011 Lecture-5 Mathematical Background:
Information and Coding Theory
Mathematical Background: Extension Fields
Cyclic Codes 1. Definition Linear:
CHAPTER 3: Cyclic and convolution codes
Cyclic Code.
I. Finite Field Algebra.
CHAPTER 3: Cyclic and convolution codes
Mathematical Background: Extension Finite Fields
Presentation transcript:

Information and Coding Theory Cyclic codes Juris Viksna, 2015

Why cyclic codes? We started with restricting our attention to linear codes: Advantages minimal distance h(C) is easy to compute if C is a linear code it is easy to specify a particular code simple enconing and (kind of :) reasonable decoding procedures Disadvantages linearity is heavy restriction, however it is not that clear whether we really could gain that much by abandoning it However, most of known "good" codes are in addition cyclic. Cyclic codes also have a simpler decoding procedures.

Relation with shift registers clock signal g0g0 g1g1 + g2g2 + g3g3 time R = N-K shift registers

Cyclic codes -definition [Adapted from B.Cherowitzo]

Cyclic codes - examples [Adapted from B.Cherowitzo]

Rings Actually we will be interested in rings that are even “more similar” to fields, i.e.: - are commutative, - have multiplicative unit “1”. A commutative ring with unity Why do we need rings? It seems that a way to do encoding with a cyclic code could be encoding of polynomial m(x) as c(x) = m(x)g(x) mod (x n  1) The set of all polynomials m(x) is a ring, but not a field.

Computation within R n Computation modulo x n – 1 Since x n  1 (mod x n -1) we can compute f(x) mod x n -1 as follow: In f(x) replace x n by 1, x n +1 by x, x n +2 by x 2, x n +3 by x 3, … Identification of words with polynomials a 0 a 1 … a n -1  a 0 + a 1 x + a 2 x 2 + … + a n -1 x n -1 Multiplication by x in R n corresponds to a single cyclic shift x (a 0 + a 1 x + … a n -1 x n -1 ) = a n -1 + a 0 x + a 1 x 2 + … + a n -2 x n - 1

Ring of polynomials - example [Adapted from B.Cherowitzo]

Ring of polynomials The set of polynomials in F q [x] of degree less than deg (f(x)), with addition and multiplication modulo f(x) forms a ring denoted F q [x]/f(x). Example Calculate (x + 1) 2 in F 2 [x] / (x 2 + x + 1). It holds (x + 1) 2 = x 2 + 2x + 1  x  x (mod x 2 + x + 1). How many elements has F q [x] / f(x)? Result | F q [x] / f(x) | = q deg (f(x)). Example Addition and multiplication in F 2 [x] / (x 2 + x + 1) +01x1 + x 001x 110 x xx 01 x10  01x X x0 x 1 0 1x

Ideals So, this a subspace of a ring that seems to satisfy the requirements of cyclic codes: - 1 and 2 (and part of 3) guarantees linearity - 3 in addition guarantees cyclicity

Ideals and cyclic codes R n - a ring of polynomials modulo x n  1 (assume that field GF(q) is fixed) Theorem A set of elements in R n corresponds to cyclic code C if and only if C is an ideal in R n. Proof Given an ideal C, linearity guarantees that C is subspace, and property 3 guarantees that all cyclic shifts of codewords also belongs to code. Similarly, if C is a code, its elements have to satisfy the definition of ideal.

Principal ideals [Adapted from B.Cherowitzo]

Principal ideals [Adapted from B.Cherowitzo] Thus, the in the ring of all polynomials any ideal is principal - i.e. it can be defined by a single generator polynomial.

Principal ideals [Adapted from B.Cherowitzo] Generally the proof doesn’t change, if we consider ring of polynomials modulo some polynomial p(x). We will be generally interested in R n (rings modulo x n  1). Every cyclic code thus can be defined by providing a single generator polynomial g(x).

Generators of ideals - example [Adapted from B.Cherowitzo]

Cyclic codes - some more definitions

Cyclic codes - some examples The code with the generator matrix has codewords c 1 = c 2 = c 3 = c 1 + c 2 = c 1 + c 3 = c 2 + c 3 = c 1 + c 2 + c 3 = and it is cyclic because the right shifts have the following impacts c 1  c 2,c 2  c 3,c 3  c 1 + c 3 c 1 + c 2  c 2 + c 3,c 1 + c 3  c 1 + c 2 + c 3,c 2 + c 3  c 1 c 1 + c 2 + c 3  c 1 + c 2

Cyclic codes - some examples Example (i) Code C = {000, 101, 011, 110} is cyclic. (ii) Hamming code Ham(3, 2): with the generator matrix is equivalent to a cyclic code. (iii) The binary linear code {0000, 1001, 0110, 1111} is not a cyclic, but it is equivalent to a cyclic code. (iv) Is Hamming code Ham(2, 3) with the generator matrix (a) cyclic? (b) equivalent to a cyclic code?

Cyclic codes - how frequent are they? Comparing with linear codes, the cyclic codes are quite scarce. For, example there are linear (7,3) linear binary codes, but only two of them are cyclic. Trivial cyclic codes. For any field F and any integer n >= 3 there are always the following cyclic codes of length n over F: No-information code - code consisting of just one all-zero codeword. Repetition code - code consisting of codewords (a, a, …,a) for a  F. Single-parity-check code - code consisting of all codewords with parity 0. No-parity code - code consisting of all codewords of length n For some cases, for example for n = 19 and F = GF(2), the above four trivial cyclic codes are the only cyclic codes.

Cyclic codes and generator polynomials

We show that all cyclic codes C have the form C =  f(x)  for some f(x)  R n. Theorem Let C be a non-zero cyclic code in R n. Then there exists unique monic polynomial g(x) of the smallest degree such that C =  g(x)  g(x) is a factor of x n -1. Proof (i) Suppose g(x) and h(x) are two monic polynomials in C of the smallest degree. Then the polynomial g(x) - h(x)  C and it has a smaller degree and a multiplication by a scalar makes out of it a monic polynomial. If g(x)  h(x) we get a contradiction. (ii) Suppose a(x)  C. Then a(x) = q(x)g(x) + r(x)(deg r(x) < deg g(x)) and r(x) = a(x) - q(x)g(x)  C. By minimality r(x) = 0 and therefore a(x)  g(x) .

Cyclic codes and generator polynomials [Adapted from B.Cherowitzo] Thus there is 1-to-1 correspondence between cyclic codes and all distinct polynomials that divide x n  1.

Cyclic codes and generator polynomials We show that all cyclic codes C have the form C =  f(x)  for some f(x)  R n. Theorem Let C be a non-zero cyclic code in R n. Then there exists unique monic polynomial g(x) of the smallest degree such that C =  g(x)  g(x) is a factor of x n -1. Proof (iii) Clearly, x n –1 = q(x)g(x) + r(x) with deg r(x) < deg g(x) and thereforer(x)  -q(x)g(x) (mod x n -1) and r(x)  C  r(x) = 0  g(x)is a factor of x n -1.

How to find cyclic codes? Theorem 2 gives a recipe to get all cyclic codes of given length n. Indeed, all we need to do is to find all factors of x n -1. Problem: Find all binary cyclic codes of length 3. Solution: Since x 3 – 1 = (x + 1)(x 2 + x + 1) both factors are irreducible in GF(2) we have the following generator polynomials and codes. Generator polynomialsCode in R 3 Code in V(3,2) 1R 3 V(3,2) x + 1{0, 1 + x, x + x 2, 1 + x 2 }{000, 110, 011, 101} x 2 + x + 1{0, 1 + x + x 2 }{000, 111} x 3 – 1 ( = 0){0}{000}

Example - binary cyclic codes in R 7 [Adapted from B.Cherowitzo]

Example - ternary codes of length 3 The task is to determine all ternary codes of length 4 and generators for them. Factorization of x over GF(3) has the form x = (x - 1)(x 3 + x 2 + x + 1) = (x - 1)(x + 1)(x 2 + 1) Therefore there are 2 3 = 8 divisors of x and each generates a cyclic code. Generator polynomialGenerator matrix 1I 4 x x + 1 x (x - 1)(x + 1) = x (x - 1)(x 2 + 1) = x 3 - x 2 + x - 1[ ] (x + 1)(x 2 + 1)[ ] x = 0[ ]

Some factors of x n -1 All we need to do is factor x n  1. This, however, isn’t necessarily obvious how to do :)

Generator polynomials and matrices The fact that multiplying some vector with G we obtain a codeword from C is a bit obvious. In addition, we need: - to show that all rows of G are linearly independent - to show all codewords from C can be obtained

Generator polynomials and matrices [Adapted from B.Cherowitzo]

Check polynomials

Theorem Let C be a cyclic code in R n with a generator polynomial g(x) and a check polynomial h(x). Then an c(x)  R n is a codeword of C if c(x)h(x)  0 - this and next congruences are modulo x n - 1. Proof Note, that g(x)h(x) = x n - 1  0 (i) c(x)  C  c(x) = a(x)g(x) for some a(x)  R n  c(x)h(x) = a(x) g(x)h(x)  0.  0 (ii) c(x)h(x)  0 c(x) = q(x)g(x) + r(x), deg r(x) < n – k = deg g(x) c(x)h(x)  0  r(x)h(x)  0 (mod x n - 1) Since deg (r(x)h(x)) < n – k + k = n, we have r(x)h(x) = 0 in F[x] and therefore r(x) = 0  c(x) = q(x)g(x)  C.

Check polynomials and dual codes [Adapted from B.Cherowitzo]

Check polynomials and dual codes Since dim (  h(x)  ) = n - k = dim (C  ) we might easily be fooled to think that the check polynomial h(x) of the code C generates the dual code C . Reality is “slightly different'': Theorem Suppose C is a cyclic [n,k]-code with the check polynomial h(x) = h 0 + h 1 x + … + h k x k, then (i) a parity-check matrix for C is (ii) C  is the cyclic code generated by the polynomial i.e. the reciprocal polynomial of h(x).

Check polynomials and dual codes Proof A polynomial c(x) = c 0 + c 1 x + … + c n -1 x n –1 represents a code from C if c(x)h(x) = 0. For c(x)h(x) to be 0 the coefficients at x k,…, x n -1 must be zero, i.e. Therefore, any codeword c 0 c 1 … c n -1  C is orthogonal to the word h k h k -1 …h 0 00…0 and to its cyclic shifts. Rows of the matrix H are therefore in C . Moreover, since h k = 1, these row-vectors are linearly independent. Their number is n - k = dim (C  ). Hence H is a generator matrix for C , i.e. a parity-check matrix for C. In order to show that C  is a cyclic code generated by the polynomial it is sufficient to show that is a factor of x n -1. Observe that and sinceh(x -1 )g(x -1 ) = (x -1 ) n -1 we have thatx k h(x -1 )x n -k g(x -1 ) = x n (x –n -1) = 1 – x n and therefore is indeed a factor of x n -1.

Syndromes and generator matrix [Adapted from B.Cherowitzo]

Syndromes and generator matrix - example [Adapted from B.Cherowitzo]

Syndromes and generator matrix [Adapted from B.Cherowitzo]

Syndromes and generator matrix [Adapted from B.Cherowitzo]

Idempotent polynomials

Idempotent generators [Adapted from B.Cherowitzo]

Idempotent generators - example [Adapted from B.Cherowitzo]

Idempotent generators - existence [Adapted from B.Cherowitzo] (a,b) denotes just gcd(a,b). If  is a root then x n  1=(x   )(x n  1 +  x n   n  1 ) If there is another root equal to , then n  n  1 =  n  1 = 0, and  = 0...

Idempotent generators – Generator matrix [Adapted from B.Cherowitzo]

Idempotent generators – Generator matrix [Adapted from V.Pless]

Idempotent generators - how to find? This turns out to be quite easy, at least in GF(2) assuming that n is odd. S - set of powers of x that occur with non-zero coefficients in e(x). Notice that e 2 (x) = e(x) if and only if i  S  2i  S. Thus S is a union of cyclotomic cosets and we can just look at cyclotomic cosets and write down the coefficients of e(x).

Idempotent generators - how to find? n=7, C 0 ={0}, C 1 ={1,2,4},C 3 ={3,6,5}.

Idempotents - summary So, where are we now? Cyclic codes can be characterized by their idenpotents as well as by their generator polynomials. Idempotents are easier to find. In particular, for GF(2 m ) cyclotomic cosets allow to write down idempotents immediately. Then it is already not that hard to find generator polynomials - g(x)=gcd(x n –1,e(x)). By knowing generator polynomials, we actually are already quite close to solution to factoring problem. Actually, a similar approach is used in Berlekamp's factoring algorithm.

Berlekamp's factoring algorithm [Adapted from FYI We actually have developed a factoring algorithm for x n –1 in GF(2). There is a general algorithm for factoring p(x) in GF(q).