Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear...

30
Linear Codes over Finite Rings and Modules Jay A. Wood Department of Mathematics Western Michigan University http://homepages.wmich.edu/jwood Central China Normal University Wuhan, Hubei May 2, 2018

Transcript of Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear...

Page 1: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Rings andModules

Jay A. Wood

Department of MathematicsWestern Michigan University

http://homepages.wmich.edu/∼jwood

Central China Normal UniversityWuhan, HubeiMay 2, 2018

Page 2: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Acknowledgments

I I thank Professor Hongwei Liu for inviting me toCentral China Normal University and for giving methe opportunity to present this series of lectures.

JW Codes May 2, 2018 2 / 30

Page 3: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

1. Linear Codes over Finite Fields

I Historical motivation

I Error detection and correction

I Definitions

I Hamming weight and likelihood

I Syndrome decoding and the dual code

I Equivalence of codes

JW Codes May 2, 2018 3 / 30

Page 4: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Objectives

I Historical motivation for error-correcting codes

I Introduce some of the language of coding theoryover finite fields.

I Introduce, with examples, some of the mathematicalproblems that will be discussed in later lectures.

JW Codes May 2, 2018 4 / 30

Page 5: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Historical motivation

I When transmitting information over a channel, oneshould expect noise to corrupt some of theinformation.

I To protect against this, add redundancy to themessage.

JW Codes May 2, 2018 5 / 30

Page 6: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Errors in transmission

I Error-correcting codes are designed to detect andcorrect errors in transmission in communicationchannels.

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I The code adds redundancy which, if done properly,may allow errors to be corrected (“decoding”).

JW Codes May 2, 2018 6 / 30

Page 7: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Basic vocabulary

I Let F be a finite field.

I A code over F of length n is a subset C ⊆ Fn.

I A linear code over F of length n is a vectorsubspace C ⊆ Fn.

I Let k = dimF C be the dimension of C over F.

I We say that C is a linear [n, k]-code.

I The elements of C are called codewords.

JW Codes May 2, 2018 7 / 30

Page 8: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Encoding

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I A linear code is often presented by an encodingmap, represented by a generator matrix G .

I G will be a matrix of size k × n of rank k

I G defines a linear transformation Fk → Fn, x 7→ xG ,with inputs written on the left. (Why? Tradition!)

JW Codes May 2, 2018 8 / 30

Page 9: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Encoding (more)

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I Fk is the information space. The linear code C isthe image of the encoding map (row space of G ).

I The codewords of C are the elements of Fn thatcorrespond to legitimate information.

I There are many possible encoding maps for C : usePG , P invertible k × k .

JW Codes May 2, 2018 9 / 30

Page 10: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Parity check matrix

I Given a linear [n, k]-code C , we can think of C asthe solution space of a system of linear equations.

I A parity check matrix for C is an (n − k)× nmatrix H of rank n − k such that

C = {c ∈ Fn : HcT = 0}.

I The column vector cT is the transpose of the rowvector c .

JW Codes May 2, 2018 10 / 30

Page 11: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Dual code

I Given linear [n, k]-code C , the dual code C⊥ is thelinear [n, n − k]-code generated by the parity checkmatrix of C .

I Define the dot product on Fn by a · b =∑n

i=1 aibi .

I Then C⊥ = {b ∈ Fn : c · b = 0, for all c ∈ C}.I Note that (C⊥)⊥ = C .

JW Codes May 2, 2018 11 / 30

Page 12: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Example

I F = F2, n = 7, k = 4, n − k = 3:

G =

0 0 0 1 1 1 10 1 1 0 0 1 11 0 1 0 1 0 11 1 1 1 1 1 1

H =

0 0 0 1 1 1 10 1 1 0 0 1 11 0 1 0 1 0 1

JW Codes May 2, 2018 12 / 30

Page 13: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Syndromes

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I Suppose c ∈ C is transmitted, and suppose someerror is introduced, so that y = c + e is received.Here, e is the (yet to be determined) error vector.

I Applying the parity check matrix, we see thatHyT = HcT + HeT = HeT (the “syndrome”).

I The error vector e lies in the same coset of C as thereceived vector y .

JW Codes May 2, 2018 13 / 30

Page 14: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Likelihood

I Of all vectors in the coset y + C , which is the mostlikely to be the error vector?

I One model of a communication channel: the binarysymmetric channel.

I Let F = F2 = Z/2Z = {0, 1}, the binary field.When an element of F2 is transmitted, there is aprobability of p that the other element will bereceived. Assume 0 ≤ p ≤ 1/2.

JW Codes May 2, 2018 14 / 30

Page 15: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Hamming distance and Hamming weight

I The Hamming weight wt(y) of a vector y ∈ Fn isthe number of nonzero entries in y ;wt(y) = |{i : yi 6= 0}|.

I The Hamming distance between two vectorsy , z ∈ Fn is the Hamming weight of their difference:d(y , z) = wt(y − z).

I The Hamming distance d is a distance, so (Fn, d) isa (discrete) metric space.

JW Codes May 2, 2018 15 / 30

Page 16: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Likelihood, again

I Provided p < 1/2, an error vector with smallHamming weight is more likely to occur than one oflarger Hamming weight.

I For example, if n = 7 and p = 0.1, thenwt(e) 0 1 2 3 · · ·Prob 0.478 0.372 0.124 0.023

I While, if n = 7 and p = 0.05, thenwt(e) 0 1 2 3 · · ·Prob 0.698 0.257 0.041 0.004

JW Codes May 2, 2018 16 / 30

Page 17: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Syndrome decoding

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I Syndrome decoding: given a received vectory = c + e, the most likely error vector is a vector ofminimal Hamming weight in the coset y + C .

I Such an e exists, but it may not be unique.

JW Codes May 2, 2018 17 / 30

Page 18: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Minimum distance of a code

I Given a code C , the minimum (Hamming)distance of C isdC = min{d(b, c) : b, c ∈ C , b 6= c}.

I For linear codes, this equals the minimum(Hamming) weight, min{wt(c) : c ∈ C , c 6= 0}.

JW Codes May 2, 2018 18 / 30

Page 19: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Nearest neighbor decoding

Fk −−−→encode

Fn +noise−−−−→transmit

Fn −−−→decode

Fn −−−−−→unencode

Fk

I Suppose C has minimum distance dC . Lett = b(dC − 1)/2c.

I Nearest neighbor decoding corrects up to t errors.That is, decoding y to the codeword c closest to ywill be correct if wt(e) ≤ t.

JW Codes May 2, 2018 19 / 30

Page 20: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Example (again)

I F = F2, n = 7, k = 4:

G =

0 0 0 1 1 1 10 1 1 0 0 1 11 0 1 0 1 0 11 1 1 1 1 1 1

I Codewords: 0000000, 0001111, 0110011, 1010101,

1111111, 0111100, 1011010, 1110000, 1100110,1001100, 0101010, 1101001, 1000011, 0100101,0011001, 0010110. dC = 3.

JW Codes May 2, 2018 20 / 30

Page 21: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Example (and again)

I F = F2, n = 7, k = 3:

H =

0 0 0 1 1 1 10 1 1 0 0 1 11 0 1 0 1 0 1

I Codewords: 0000000, 0001111, 0110011, 1010101,

0111100, 1011010, 1100110, 1101001. dC⊥ = 4.

JW Codes May 2, 2018 21 / 30

Page 22: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Decoding C

I Because dC = 3, we can correct one error.

I If wt(e) = 1, there is a single 1 in position i .

I The syndrome HeT is the ith column of H .

I The ith column of H is the base 2 expression of i ,so the syndrome tells us the location of the error.

I Suppose y = 1011101 is received. SyndromeHyT = 100T, so most likely c = 1010101 was sent.

JW Codes May 2, 2018 22 / 30

Page 23: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Weight distributions

I Given C , its weight distribution is(A0,A1, . . . ,An), where Ai = |{c ∈ C : wt(c) = i}|,the number of codewords of Hamming weight i .

I For our example, C has (1, 0, 0, 7, 7, 0, 0, 1).

I C⊥ has (1, 0, 0, 0, 7, 0, 0, 0).

I In the next slide, we organize this informationdifferently.

JW Codes May 2, 2018 23 / 30

Page 24: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Hamming weight enumerator

I For a linear code C ⊆ An, define the Hammingweight enumerator of C by

hweC (X ,Y ) =∑x∈C

X n−wt(x)Y wt(x).

I hweC (X ,Y ) =∑n

i=0 AiXn−iY i , where Ai is the

number of codewords in C of Hamming weight i .

I In our example: hweC⊥(X ,Y ) = X 7 + 7X 3Y 4,hweC (X ,Y ) = X 7 + 7X 4Y 3 + 7X 3Y 4 + Y 7.

JW Codes May 2, 2018 24 / 30

Page 25: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

MacWilliams identities

I One can verify in our binary example that theweight enumerators are related in the following way:

hweC (X ,Y ) =1

|C⊥|hweC⊥(X + Y ,X − Y ).

JW Codes May 2, 2018 25 / 30

Page 26: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Properties of dual codes

I Given a linear code C ⊆ Fn.

I Dual C⊥ is also a linear code in Fn.

I Double dual: (C⊥)⊥ = C .

I Dimension/size: dimC + dimC⊥ = n, or:|C | · |C⊥| = |Fn|.

I The MacWilliams identities.

I The next several lectures will be aboutgeneralizations of these properties.

JW Codes May 2, 2018 26 / 30

Page 27: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Equivalence of linear codes

I When should two linear codes be considered asbeing the same?

I “Extrinsic”: differ by a monomial transformation ofFn.

I “Intrinsic”: related by a weight-preservingisomorphism.

JW Codes May 2, 2018 27 / 30

Page 28: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Monomial transformations

I A monomial transformation T : Fn → Fn is aninvertible linear transformation whose matrix hasexactly one nonzero entry in each row and column(a “monomial matrix”).

I Monomial transformations are precisely theinvertible linear transformations Fn → Fn thatpreserve the Hamming weight.

I Linear codes C1,C2 ⊆ Fn are monomiallyequivalent if there exists a monomialtransformation T with T (C1) = C2.

JW Codes May 2, 2018 28 / 30

Page 29: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Weight-preserving maps

I If T (C1) = C2, then the restriction of T to C1 is alinear isomorphism C1 → C2 that preservesHamming weight.

I Is the converse true?

I Yes!—MacWilliams (1961–62). Weight preservingmaps extend to monomial transformations.

I Call this the “MacWilliams extension theorem”.

JW Codes May 2, 2018 29 / 30

Page 30: Linear Codes over Finite Rings and Moduleshomepages.wmich.edu/~jwood/eprints/Wuhan-01.pdf · Linear Codes over Finite Fields Historical motivation I When transmitting information

Linear Codes over Finite Fields

Upcoming lectures

I Lectures 2, 3, and 4 will address generalizations ofdual codes and the MacWilliams identities for linearcodes defined over finite rings and modules.

I Lecture 5 will discuss self-dual codes (whereC = C⊥) in a general setting.

I Lectures 6–10 will deal with different aspects of theextension problem: do weight-preserving mapsextend to monomial transformations?

I Many of the techniques are based on characters offinite abelian groups and the modules built out ofthese characters, as we will see in Lectures 2–4.

JW Codes May 2, 2018 30 / 30