Kim Mitchell MATH 6221 Fall 2005 5.5 Reed-Muller Codes Introduction/ History Why do we need coding theory? The ultimate purpose of coding theory is to correct or detect errors when data is stored or transmitted. Coding theory has been of great importance in the last fifty years both in theoretical and practical uses. The Reed-Muller Codes, in particular have been used to encode pictures sent back from satellites to Earth. Each -pixel of a picture became an 8-tuple that represented a gray value. The binary data was encoded by a codeword of weight 32, and thus the data was sent to earth using a lot more space. However, then on Earth scientists could decode the data and correct the errors accrued during transmission, and therefore reproduce the original photographs taken by the satellites. Producing any kind of code presents an inherent problem; we want to be able to code as many things or “words” as possible, but we want the code words to be very distinct, so that when there is error in the transmission we can detect what code word the received message is closest to. So when you have a finite amount of space to work with, these two conditions clearly oppose each other. The goal of coding theory is to come up with a system for creating code words that are both “far apart” from each other, as well as there being a high number of code words available to use. Several methods for coming up with these codes are based on geometrical methods, in particular geometries built on affine spaces. Reed-Muller codes were formulated by D.E. Muller and I.S. Reed in 1954. They are among the oldest and most well-known of codes. They have several useful properties; they form an infinite family of codes, and larger Reed-Muller codes can be constructed from smaller ones. One of the major advantages to creating and using Reed-Muller codes is their relative simplicity to encode messages and decode received messages. Unfortunately, these codes become weaker as their length increases. However, they are often used as building blocks in other codes. [4] We will examine some of the properties of Reed-Muller codes, prove some properties that make the codes useful, and finally present an example of a code. -1- Definitions The following definitions will be used in this paper: Hamming distance Let v (v1 ,..., vn ) and w ( w1 ,..., wn ) be vectors of V. The Hamming distance d (v, w) of v and w is defined as the number of positions in which v and w differ: d (v, w) i vi wi . Characteristic vector Let A AG (d ,2) be the affine space of dimension d and order 2, whose points we shall label P1 , P2 ,..., P2d . If M is any set of points of A its characteristic vector X(M) is: 1, if Pi M X(M) (a1 ,..., a 2d ) where ai 0 otherwise d *In this paper the set M will be the same as X(M) , so any subset of points of A is a vector of {0,1}2 . Weight / Minimum weight The weight w(x) of a vector x is the number of nonzero positions in x. The minimum weight w(C) of a code C is the minimum weight of all nonzero codewords in C. Properties of Reed-Muller Codes In the typical model, some data is sent to a recipient, in a manner in which some error is likely to occur. So the data must be encoded into a “message” so that when the recipient receives altered message, they are able to decode the message and determine the original data that was sent. See the figure below: Recipient Sender data d encoding message c (codeword) altered message x -2- decoding data d’ In all of the codes presented in the Projective Geometry [2] text, the message is always a binary string of length n, or an element of the vector space V {0,1} n . The r-th order Reed-Muller code of A, denoted by R (r,d) is the code C {0,1}2 that is generated by d all (d-r)-dimensional subspaces of A. In other words, the “message” vectors of the Reed-Muller Codes are created by examining subspaces of a d-dimensional affine space. These subspaces have dimension (d-r), where r is the order of the code. Each vector will have length 2 d . We will now examine the two properties we care about in codes: the number of codewords and the distance between any two codewords. The number of codewords comes from counting the number of binary monomials in R (r,d) of degree at most r. There are d d d k 1 ... 1 2 r such monomials, and so there are 2 k linear combinations of these. [1] This clearly gives a higher number of code words the closer r is to d. The minimum distance between any two codewords of a Reed-Muller Code C = R (r,d) is given by the formula: d (C) 2 d-r Proof: We will prove this statement by induction on d. If d = r, then the code is the whole space, and the minimum distance between any two codewords is clearly 1 (which is 2 0 ). If d = r + 1, then the distance between any two codewords would have to be at least 2. This means that any codeword has weight at least 2. Therefore, we must show that any single point cannot be -3- represented by a linear combination of the codewords, because then it would be in the subgroup, and therefore be a codeword of weight 1. First recall that a point lies in the span of M if and only if it is on an odd number of lines of M. Now we count the lines of M. Let rp be the number of lines of M through a point, P. We get r PA Therefore, 2 M P r PA true that r PA P P since each line will have two points on it. is an even number. Since the sum of the even degrees of rp has to be even, it is also is even for only odd degrees of rp . Since the sum of odd integers is even if and only if the number of summands is even, there must be an even number of points with odd degree. In other words, there could never be a unique point of odd degree. This means any combination of lines is passing through at least two points, so a unique point could not be determined by a particular combination of codewords. Therefore, the minimum weight of the code is larger than 1. Since the code contains lines, it has codewords of weight two, so the code must have weight 2. [2] Now consider the space of dimension d = d’ + 1, and assume the assertion is true for all Reed-Muller codes with dimension d’. Take a vector w and let w = u’ + v’ where u’ involves only variables from the d’ dimensional space, and v’ involves only the variable x d '1 . Since the space d’ contains vectors of length 2 d ' , the space d contains vectors of length 2 d 2 d '1 2 d ' 2 . So we have the vectors u’ = (u, u) , where u R r, d and v’ = (0, v) , where v R r 1, d . If v = 0, then w = (u, u) has weight at least 2 2 d ' r , by the induction hypothesis so w has weight 2 ( d '1)r 2 d r . If u = v, then u R r 1, d , and so w = (u, 0) has weight at least 2 d '( r 1) 2 d ' r 1 2 ( d '1)r 2 d r . Otherwise, u and u + v each have weight at least 2 d ' r , so together w = (u, u + v) would have weight 2 d ' r 2 d ' r 2 2 d ' r 2 d '1r 2 d r . [3] Notice that the distance equation d (C) 2 d-r indicates that the further d is from r, the greater the distance between any two codes words. Recall that the closer r is to d, the higher the number of code words. This displays the property noted in general about codes, that the number of codewords and the distance between them oppose each other in a choice for creating codes. -4- Examples of Reed-Muller Codes Example 1: Consider the case where d = 2. The only option for r is r = 1. We know that the length of each vector is 2 d 2 2 4 . Therefore we are looking at lines in a plane that connect two out of four points, and the span of those vectors. 0 1 2 3 2 We also know the number of codewords should be 2 k where k 1 1 2 3 . So there 1 should be 8 codewords. The minimum distance between any two codewords should be d (C) 2 2-1 2 . Now we will list out the vectors according to the lines in the picture above. 1100 1001 0101 1010 0110 0011 If we take the span of these vectors, it will include the zero vector and the 1111 vector, so the total codewords are: 1100 1001 0101 1010 0110 0011 0000 1111 There are 8 codewords in this set, and the distance between any two vectors is at least 2. Example 2: Consider the case where d = 3 and r = 1. We know that the length of each vector is 2 d 2 3 8 . Therefore we are looking at planes in 3-space that connect four out of eight points, and the span of those vectors. -5- 6 7 2 3 4 0 5 1 3 We also know the number of codewords should be 2 k where k 1 1 3 4 . So there 1 should be 16 codewords. The minimum distance between any two codewords should be d (C) 23-1 2 2 4 . Now we will list out the vectors according to the lines in the picture above. 11110000 11001100 11000011 10101010 10100101 10011001 10010110 00001111 00110011 00111100 01010101 01011010 01100110 01101001 If we take the span of these vectors, it will include the zero vector and the 11111111 vector, so the total codewords are: 11110000 11001100 11000011 10101010 10100101 10011001 10010110 00001111 00110011 00111100 01010101 01011010 01100110 01101001 11111111 00000000 There are 16 codewords in this set, and the distance between any two vectors is at least 4. Example 3: Consider the case where d = 3 and r = 2. We know that the length of each vector is 2 d 2 3 8 . Therefore we are looking at lines in 3-space that connect two out of eight points, and the span of those vectors. -6- 6 7 2 3 4 0 5 1 3 3 We also know the number of codewords should be 2 k where k 1 1 3 3 7 . So 1 2 there should be 128 codewords. The minimum distance between any two codewords should be d (C) 23-2 21 2 . I will not list out the vectors in this example, as there are 128 altogether in the span. -7- Bibliography [1] Assmus, Jr., E. F. and Key, J. D. Designs and their Codes. Cambridge University Press, Cambridge, United Kingdom, 1992. [2] Beutelspacher, Albrecht and Rosenbaum, Ute. Projective Geometry. Cambridge University Press, Cambridge, United Kingdom, 1998. [3] Cameron, P.J. and van Lint, J.H. Designs, Graphs, Codes and their Links. Cambridge University Press, Cambridge, United Kingdom, 1991. [4] Raaphorst, Sebastian. Reed-Muller Codes. Carleton University, 2003. -8-