0% found this document useful (0 votes)
185 views20 pages

Reed Muller Codes Sebastian Raaphorst

The document examines Reed-Muller codes, which are an important family of error-correcting codes. It introduces the codes and their history, then discusses how they are represented using generator matrices and encoded/decoded. Reed-Muller codes have a recursive structure and connections to design theory. Encoding and decoding algorithms are provided in an appendix.

Uploaded by

siyag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
185 views20 pages

Reed Muller Codes Sebastian Raaphorst

The document examines Reed-Muller codes, which are an important family of error-correcting codes. It introduces the codes and their history, then discusses how they are represented using generator matrices and encoded/decoded. Reed-Muller codes have a recursive structure and connections to design theory. Encoding and decoding algorithms are provided in an appendix.

Uploaded by

siyag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Reed-Muller Codes

Sebastian Raaphorst
Carleton University

May 9, 2003
Abstract

This paper examines the family of codes known as Reed-Muller codes. We begin by briefly
introducing the codes and their history before delving in and examining how they are used in
practice. We investigate one particular representation of generator matrices for these codes,
and then discuss the encoding and the decoding process.
After the basics have been covered, we examine the recursive nature of Reed-Muller
codes, and touch on their links to design theory and affine geometries.
Contents
1 Introduction and history 2

2 Monomials and vectors over F2 2

3 Simple view of Reed-Muller Codes 4


3.1 Encoding and the generator matrix . . . . . . . . . . . . . . . . . . . . . . . 5
3.2 Decoding using majority logic . . . . . . . . . . . . . . . . . . . . . . . . . . 7

4 Different constructions for RM(r, m) 8


4.1 An alternate view of ψ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 Recursive definition of RM(r, m) . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3 Affine geometries and Reed-Muller codes . . . . . . . . . . . . . . . . . . . . 12
4.3.1 Affine geometries and their designs . . . . . . . . . . . . . . . . . . . 12
4.3.2 Reed-Muller codes and designs . . . . . . . . . . . . . . . . . . . . . . 13

A Implementation of Reed-Muller encoding and decoding 16


A.1 Encoding using rmencode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
A.2 Decoding using rmdecode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

1
1 Introduction and history
Reed-Muller codes are amongst the oldest and most well-known of codes. They were discov-
ered and proposed by D. E. Muller and I. S. Reed in 1954.
Reed-Muller codes have many interesting properties that are worth examination; they
form an infinite family of codes, and larger Reed-Muller codes can be constructed from
smaller ones. This particular observation leads us to show that Reed-Muller codes can be
defined recursively.
Unfortunately, Reed-Muller codes become weaker as their length increases. However,
they are often used as building blocks in other codes.
One of the major advantages of Reed-Muller codes is their relative simplicity to encode
messages and decode received transmissions. We examine encoding using generator matrices
and decoding using one form of a process known as majority logic.
Reed-Muller codes, like many other codes, have tight links to design theory; we briefly
investigate this link between Reed-Muller codes and the designs resulting from affine geome-
tries.
Finally, we present the reader with an implementation of the Reed-Muller encoding and
decoding process, written in ANSI C.

2 Monomials and vectors over F2


We begin by introducing the concept of vector spaces over F2 and their correspondance to
certain rings of polynomials.

Notation: We use the notation Zn to refer to the set {0, 1, . . . , n − 1}.

Notation: We use a string of length n with elements in F2 to write a vector in the


vector space Fn2 for brevity when this is unambiguous. For example, if we have the vector
σ = (1, 0, 1, 1, 0, 1, 0) ∈ F72 , we simply write σ as 1011010.

Notation: Assume that x and y are vectors over our vector space Fn2 (with x = (x1 , x2 , . . . , xn ),
and y = (y1 , y2 , . . . , yn )). Let a be an element of F2 , where we call a a scalar. Then, we
have the standard operations of addition and scalar multiplication for vectors (these are not
described here, and we assume that the reader is familiar with them). However, we also
extend the set of operations in the following way:
• Scalar addition
a + x = (a + x1 , a + x2 , . . . , a + xn )

• Vector complement

x = 1 + x = (1 + x1 , 1 + x2 , . . . , 1 + xn )

• Vector multiplication
x ∗ y = (x1 ∗ y1 , x2 ∗ y2 , . . . , xn ∗ yn )

2
Note that (Fn2 , +, ∗) forms a commutative ring.
m
Assume that we are given a vector space F22 . Then we consider the ring Rm =
F2 [x0 , x1 , . . . , xm−1 ]. We will see shortly that there exists a bijection between elements of
m m
Rm and F22 (in fact, an isomorphism of rings between (Rm , +, ∗) and (F22 , +, ∗)).

Definitions: A Boolean monomial is an element p ∈ Rm of the form:


r
p = xr00 xr11 . . .xm−1
m−1

where ri ∈ N and i ∈ Zm . A Boolean polynomial is simply, as expected, a linear combination


(with coefficients in F2 ) of boolean monomials; any element of Rm may be thought of as a
Boolean polynomial.

Definition: Given a Boolean monomial p ∈ Rm , we say that p is in reduced form if it is


squarefree. For any Boolean monomial q ∈ Rm , it is trivial to find the reduced form of q by
applying:
xi xj = xj xi as Rm is a commutative ring
x2i = xi as 0 ∗ 0 = 0 and 1 ∗ 1 = 1
A Boolean polynomial in reduced form is simply a linear combination of reduced-form
Boolean monomials (with coefficients in F2 ).

Example: Say we have the Boolean polynomial p = 1 + x1 + x50 x22 + x0 x41 x101
2 ∈ R3 . Then,
by applying the above rules, we can get its reduced form, p′ :

p′ = 1 + x1 + x0 x2 + x0 x1 x2

m
Consider the mapping ψ : Rm → F22 , defined as follows:

ψ(0) = !00."#. .0$


2m
ψ(1) = !11."#. .1$
2m
ψ(x0 ) = !11."#. .1$ 00.
! "#. .0$
2m−1 2m−1
ψ(x1 ) = !11."#. .1$ 00.
! "#. .0$ 11.
! "#. .1$ 00.
! "#. .0$
2m−2 2m−2 2m−2 2m−2
ψ(x2 ) = !11."#. .1$ 00.
! "#. .0$ 11.
! "#. .1$ 00.
! "#. .0$ 11.
! "#. .1$ 00.
! "#. .0$ 11.
! "#. .1$ 00.
! "#. .0$
2m−3 2m−3 2m−3 2m−3 2m−3 2m−3 2m−3 2m−3
.. ..
. .
ψ(xi ) = !11."#. .1$ 00.
! "#. .0$ . . .
2m−i 2m−i
.. ..
. .

3
For any monomial p ∈ Rm , to calculate ψ(p), we find the reduced form:

p′ = xi1 xi2 . . .xir

(where ij ∈ Zm , ij = ik → j = k, and 0 ≤ r ≤ m). Then,

ψ(p) = ψ(xi1 ) ∗ ψ(xi2 ) ∗ · · · ∗ ψ(xir )

For any polynomial q ∈ Rm , we can write q as:

q = m1 + m2 + . . . + mr

(where mi is a monomial of Rm , mi = mj → i = j, and 0 ≤ r ≤ 2m ). Then,

ψ(q) = ψ(m1 ) + ψ(m2 ) + . . . + ψ(mr )

Example: Let p = 1 + x1 + x50 x22 + x0 x41 x101


2 ∈ R3 , and we have seen from above that p

has reduced form p = 1 + x1 + x0 x2 + x0 x1 x2 . Then:
ψ(p) = ψ(p′ )
= ψ(1) + ψ(x1 ) + ψ(x0 x2 ) + ψ(x0 x1 x2 )
= ψ(1) + ψ(x1 ) + ψ(x0 ) ∗ ψ(x2 ) + ψ(x0 ) ∗ ψ(x1 ) ∗ ψ(x2 )
= 11111111 + 11001100 + 11110000 ∗ 10101010 + 11110000 ∗ 11001100 ∗ 10101010
= 00010011

Proposition: ψ is a bijection (not shown), and indeed, ψ is a homomorphism of rings


m
(proof not shown, but obvious by construction of ψ). Thus, Rm and F22 are isomorphic, and
from this point on, we will interchangeably refer to vectors and their associated polynomials
in reduced form.

3 Simple view of Reed-Muller Codes


We now investigate the basics of Reed-Muller codes, including what they are, and a technique
for encoding and decoding. The design theory background of Reed-Muller codes is not
discussed here, but interested readers may refer to section 4.3 to learn more.

Definition: The r th order Reed-Muller code, denoted RM(r, m), is the set of all polyno-
mials of degree at most r in the ring Rm , as defined in the previous section. Alternatively,
m
through the isomorphism ψ, it may be thought of as a subspace of F22 .

Observation: The 0th order Reed-Muller code RM(0, m) consists of the monomials {0, 1},
which is equivalent to the following vectors:

{00. ! "#. .1$}


! "#. .0$, 11.
2m 2m

On the other extreme, the mth order Reed-Muller code RM(m, m) = Rm ∼


m
= F22 .

4
3.1 Encoding and the generator matrix
For the Reed-Muller code RM(r, m), we define the generator matrix as follows:
⎡ ⎤
ψ(1)
⎢ ψ(x0 ) ⎥
⎢ ⎥
⎢ ψ(x ) ⎥
⎢ 1 ⎥
⎢ .. ⎥
⎢ . ⎥
⎢ ⎥
⎢ ψ(xm−1 ) ⎥
⎢ ⎥
⎢ ψ(x0 x1 ) ⎥
GRM(r,m) = ⎢
⎢ ψ(x0 x2 )


⎢ . ⎥
⎢ .
. ⎥
⎢ ⎥
⎢ ψ(xm−2 xm−1 ) ⎥
⎢ ⎥
⎢ ψ(x0 x1 x2 ) ⎥
⎢ ⎥
⎢ . ⎥
⎣ .
. ⎦
ψ(xm−r xm−r+1 . . .xm−1 )

Example: The generator matrix for RM(1, 3) is:


⎡ ⎤ ⎡ ⎤
ψ(1) 1 1 1 1 1 1 1 1
⎢ ψ(x0 ) ⎥ ⎢ 1 1 1 1 0 0 0 0 ⎥
GRM(1,3) = ⎢ ⎥ ⎢
⎣ ψ(x1 ) ⎦ = ⎣ 1

1 0 0 1 1 0 0 ⎦
ψ(x2 ) 1 0 1 0 1 0 1 0

Example: The generator matrix for RM(2, 3) is:


⎡ ⎤ ⎡ ⎤
ψ(1) 1 1 1 1 1 1 1 1
⎢ ψ(x0 ) ⎥ ⎢ 1 1 1 1 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x1 ) ⎥ ⎢ 1 1 0 0 1 1 0 0 ⎥
⎢ ⎥ ⎢ ⎥
GRM(2,3) = ⎢
⎢ ψ(x 2 ) ⎥=⎢ 1
⎥ ⎢ 0 1 0 1 0 1 0 ⎥

⎢ ψ(x0 x1 ) ⎥ ⎢ 1 1 0 0 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣ ψ(x0 x2 ) ⎦ ⎣ 1 0 1 0 0 0 0 0 ⎦
ψ(x1 x2 ) 1 0 0 0 1 0 0 0

5
Example: The generator matrix for RM(2, 4) is:
⎡ ⎤ ⎡ ⎤
ψ(1) 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
⎢ ψ(x0 ) ⎥ ⎢ 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x1 ) ⎥ ⎢ 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x2 ) ⎥ ⎢ 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x3 ) ⎥ ⎢ 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 ⎥
⎢ ⎥ ⎢ ⎥
GRM(2,4) = ⎢
⎢ ψ(x0 x1 )
⎥=⎢ 1 1 1 1 0
⎥ ⎢ 0 0 0 0 0 0 0 0 0 0 0 ⎥

⎢ ψ(x0 x2 ) ⎥ ⎢ 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x0 x3 ) ⎥ ⎢ 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎢ ψ(x1 x2 ) ⎥ ⎢ 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 ⎥
⎢ ⎥ ⎢ ⎥
⎣ ψ(x1 x3 ) ⎦ ⎣ 1 0 1 0 0 0 0 0 1 0 1 0 0 0 0 0 ⎦
ψ(x2 x3 ) 1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0

Theorem 1. The matrix GRM(r,m) has dimension k × n, where:


r , -
+ m
k=
i=0
i

n = 2m
The dimension of the code is hence k.

Proof. The rows of the matrix may be partitioned


.m/ by the degree of the monomial they repre-
sent;
.m/ for the code RM(r, m), there are 0
rows corresponding to monomials
.m/ of degree 0 (0),
1
rows corresponding to monomials of degree 1 (x0 , x1 , . . . , xm−1 ), 2 rows corresponding
to monomials of degree 2 (x0 x1 , x0 x2 , . . . , xm−2 xm−1 ), etc...
Hence, there are:
, - , - , - + r , -
m m m m
+ + ...+ =
0 1 r i=0
i
such rows, and thus, the dimension of the code is k. It is simple to see that the number of
columns is 2m by definition of ψ.

Encoding is then easy; we are given a message m ∈ Fk2 and we simply perform the
multiplication m ∗ GRM(r,m) to get our codeword c.

Example: Assume we want to encode the message m = 01101001010 using RM(2, 4).
We have:
c = m ∗ GRM(2,4) = 1010111111111010

6
3.2 Decoding using majority logic
There are different techniques available for decoding Reed-Muller codes, but one of the most
common and most easily implementable is majority logic decoding. We will investigate one
form of this technique here.
Before we begin, we will give mention to the error-correcting capabilities of Reed-Muller
codes. Given the code RM(r, m), the distance between any two codewords is 2m−r . This
is not proven here; interested readers can refer to theorem 2 in section 4.2 of this document
for a detailed proof of this fact that relies on the recursive definition of Reed-Muller codes.
To correct ϵ errors, we must have a distance strictly greater than 2ϵ. Thus, in the case of
Reed-Muller codes, since we have distance 2m−r , we can correct max(0, 2m−r−1 − 1) errors.
We now look at a basic algorithm for decoding using majority logic. The essential idea
behind this technique is that, for each row of the generator matrix, we attempt to determine
through a majority vote whether or not that row was employed in the formation of the
codeword corresponding to our message.

Definition: Let p be any monomial of degree d in Rm with reduced form p′ . Then we form
the set J of variables not in p′ and their complements. The characteristic vectors of p are
all vectors corresponding to monomials of degree m − d over the variables of J . Note: Any
monomial containing a variable and its complement corresponds to the 0 vector (through ψ:
ψ(xi xi ) = ψ(xi ) ∗ ψ(xi ) = 0). Since ψ is a bijection and ψ −1 (0) = 0, this implies that any
monomial containing both a variable and its complement is equivalent to the monomial of
degree 0. Thus, without loss of generality, we only consider monomials where the variables
are distinct (i.e. no variable and its complement appears).

Example: If we are working over RM(3, 4), the characteristic vectors of x0 x1 x3 are the
vectors corresponding to the monomials {x2 , x2 }. The characteristic vectors of x0 x2 are the
vectors corresponding to the monomials {x1 x3 , x1 x3 , x1 x3 , x1 x3 }.

The way in which we accomplish this is that we begin at the bottom of our generator
matrix and work our way upwards. Our algorithm starts by examining the rows with mono-
mials of degree r. We begin by calculating 2m−r characteristic vectors for the row, and then
we take the dot product of each of these vectors with our received message. If the majority
of the dot products are 1, we assume that this row was used in constructing our codeword,
and we set the position in our original message vector corresponding to this row to 1. If the
majority of the dot products are 0, then we assume that this row was not used in forming
our message, and hence, we set the corresponding entry in the original message vector to 0.
After we have run this technique
.m/ for all rows corresponding to monomials of degree r,
we take the vector of length r corresponding
. / to the portion of the message we have just
calculated, and we multiply it by the mr rows of our generator matrix that we have just
considered. This gives us a vector s of length n. We add s to our received message, and
proceed recursively on the rows corresponding to monomials of degree r − 1.
This is best clarified by an example.

Example: We decode the message u = 00110110 in RM(2, 3). The generator matrix for
this code can be found in the preceeding subsection.

7
As per the algorithm, we begin from the bottom of the matrix up, first considering the
rows corresponding to monomials of degree r = 2.
Row x1 x2 has characteristic vectors x0 , x0 .
0
u · ψ(x0 ) = 0
→m= 0
u · ψ(x0 ) = 0

Row x0 x2 has characteristic vectors x1 , x1 .


0
u · ψ(x1 ) = 1
→m= 10
u · ψ(x1 ) = 1

Row x0 x1 has characteristic vectors x2 , x2 .


0
u · ψ(x2 ) = 0
→m= 010
u · ψ(x2 ) = 0

We have completed processing the rows corresponding to monomials of degree r = 2, so


we compute s:
⎡ ⎤
1 2 1 1 0 0 0 0 0 0 1 2
s= 0 1 0 ·⎣ 1 0 1 0 0 0 0 0 ⎦= 1 0 1 0 0 0 0 0
1 0 0 0 1 0 0 0

We add s to u to get s + u = 10010110, and we proceed to process the rows corresponding


to monomials of degree r − 1 = 1.
Row x2 has characteristic vectors x0 x1 , x0 x1 , x0 x1 , x0 x1 .

u · (ψ(x0 ) ∗ ψ(x1 )) = 1 ⎪

u · (ψ(x0 ) ∗ ψ(x1 )) = 1 ⎬
→m= 1010
u · (ψ(x0 ) ∗ ψ(x1 )) = 1 ⎪ ⎪

u · (ψ(x0 ) ∗ ψ(x1 )) = 1

We continue to proceed in this fashion, to discover that the original message was v =
0111010 (we can trivially check that this is correct by verifying that v · GRM(2,3) = u). In
this case, u had no errors (indeed, RM(2, 3) can correct 0 errors, which makes it a poor
choice of code, but it will suffice for the purposes of this example).

4 Different constructions for RM(r, m)


The isomorphism ψ, as mentioned above, is not unique. In fact, we can derive many such iso-
morphisms, and our generator matrix GRM(r,m) is dependent on which of these isomorphisms
that we choose.

8
4.1 An alternate view of ψ
Another way that we can think of ψ is as follows. Consider the ring Rm and the vector space
Fm
2 . We can consider the vectors in F2 simply as binary representations of the elements in
m

Z2m , and thus we can derive a natural ordering from this observation.

Example: Suppose we are considering F32 . Our natural ordering for the vectors in this
vector space is as follows:

(000, 001, 010, 011, 100, 101, 110, 111)

Let S be the set of all monomials in Rm . Let p ∈ S be a Boolean monomial with reduced
form p′ with the form p′ = xi1 xi2 . . .xir (ij ∈ Zm , ij = ik → j = k, 0 ≤ r ≤ m). We consider
the function α, defined as follows (where P(X ) is the power set of X ):

α : S → P(Zm )
7
′ ∅ : if r = 0
p ≡ p = xi1 xi2 . . .xir )→
{i1 , i2 , . . . , ir } : otherwise
We then define a class of certain functions. Given T ∈ P(Zm ), we define the following
function:
fT : Fm
2 → F2
7 8
(x0 , x1 , . . . , xm−1 ) )→ i∈T (xi + 1) : if T ̸= ∅
1 : if T = ∅

Example: Evaluate f{0,2} (1001) and f{0,2} (0101).


We begin by noting that, by definition, f{0,2} (x0 , x1 , x2 , x3 ) = (x0 + 1)·(x2 + 1).

f{0,2} (1011) = (1 + 1) · (0 + 1) = 0 · 1 = 0

f{0,2} (0101) = (0 + 1) · (0 + 1) = 1 · 1 = 1

Then we consider the function β, defined as follows:


m
β : S → F22

x )→ (fα(x) (0b ), fα(x) (1b ), fα(x) (2b ), . . . , fα(x) ((m − 1)b ))


where nb is the binary representation of n as a vector in Fm
2 .
Now we have all the tools we need in order to fully define ψ within this new framework,
which we will see is equivalent to the old framework in a moment. We first recognize that
any element of q ∈ Rm can be written as a sum of monomials, i.e. q = m1 + m2 + . . . + mr ,
where mi ∈ S, mi = mj → i = j, 0 ≤ r ≤ 2m . We then define ψ as follows:
m
ψ : Rm → F22

9
7
β(0) : x=0
x = m1 + m2 + . . . + mr )→
β(m1 ) + β(m2 ) + . . . + β(mr ) : x ∈ Rm \ {0}
This more precise definition of ψ is consistent with our previous definition of ψ, and this
is best shown with an example.

Example: Using ψ as defined above, we construct GRM(2,3) . The rows of GRM(2,3) corre-
spond to the monomials {1, x0 , x1 , x2 , x0 x1 , x0 x2 , x1 x2 }, and to get each row, we evaluate ψ
for each monomial.
ψ(1) = β(1) = (f∅ (000), f∅(001), . . . , f∅ (111)) = 11111111
ψ(x0 ) = β(x0 ) = (f{0} (000), f{0} (001), . . . , f{0} (111)) = 11110000
ψ(x1 ) = β(x1 ) = (f{1} (000), f{1} (001), . . . , f{1} (111)) = 11001100
ψ(x2 ) = β(x2 ) = (f{2} (000), f{2} (001), . . . , f{2} (111)) = 10101010
ψ(x0 x1 ) = β(x0 x1 ) = (f{0,1} (000), f{0,1} (001), . . . , f{0,1} (111)) = 11000000
ψ(x0 x2 ) = β(x0 x2 ) = (f{0,2} (000), f{0,2} (001), . . . , f{0,2} (111)) = 10100000
ψ(x1 x2 ) = β(x1 x2 ) = (f{1,2} (000), f{1,2} (001), . . . , f{1,2} (111)) = 10001000

As we can see, these vectors form the rows of GRM(2,3) as defined in section 2.

4.2 Recursive definition of RM(r, m)


As mentioned in the introduction, it is interesting to note that Reed-Muller codes can be
defined recursively. However, the standard recursive definition of RM(r, m) will result in a
generator matrix that differs from the one defined by ψ. This is of no consequence, provided
that both encoding and decoding are done using the same matrix.
Here is the standard recursive definition for RM(r, m) ([4]):

1. RM(0, m) = {00.
! "#. .0$}
2m
m
2. RM(m, m) = F22

3. RM(r, m) = {(x, x + y) | x ∈ RM(r, m − 1), y ∈ RM(r − 1, m − 1)}, 0 < r < m

Example: Using the recursive definition of Reed-Muller codes, we find RM(1, 2):

RM(1, 2) = {(x, x + y) | x ∈ RM(1, 1), y ∈ RM(0, 1)}


= {(x, x + y) | x ∈ {00, 01, 10, 11}, y ∈ {00, 11}}
= {0000, 0011, 0101, 0110, 1010, 1001, 1111, 1100}

This recursive definition of the codes translates to a recursive definition of the generator
matrix, as follows: 9 :
GRM(r−1,m) GRM(r−1,m)
GRM(r,m) =
0 GRM(r−1,m−1)
where we consider the following base cases:

10
GRM(0,m) = {11.
! "#. .1$}
2m
⎡ ⎤
GRM(m−1,m)
GRM(m,m) = ⎣ 00.
! "#. .0$ 1

2m −1

Example: Using the recursive definition of generator matrices for Reed-Muller codes, we
construct GRM(2,3) :
9 :
GRM(2,2) GRM(2,2)
GRM(2,3) =
⎡ 0 GRM(1,2) ⎤
GRM (1, 2) GRM (1, 2)
⎢ 0 0 0 1 0 0 0 1 ⎥
= ⎢ ⎣ 0 0 0 0 GRM(1,1) GRM(1,1) ⎦

⎡ 0 0 0 0 0 0 GRM(0,1) ⎤
GRM(1,1) GRM(1,1) GRM(1,1) GRM(1,1)
⎢ 0 0 GRM(0,1) 0 0 GRM(0,1) ⎥
⎢ ⎥

= ⎢ 0 0 0 1 0 0 0 1 ⎥ ⎥
⎣ 0 0 0 0 GRM(1,1) GRM(1,1) ⎦
⎡ 0 0 0 0 0 ⎤ 0 GRM(0,1)
1 1 1 1 1 1 1 1
⎢ 0 1 0 1 0 1 0 1 ⎥
⎢ ⎥
⎢ 0 0 1 1 0 0 1 1 ⎥
⎢ ⎥
= ⎢ ⎢ 0 0 0 1 0 0 0 1 ⎥

⎢ 0 0 0 0 1 1 1 1 ⎥
⎢ ⎥
⎣ 0 0 0 0 0 1 0 1 ⎦
0 0 0 0 0 0 1 1

One interesting property of the recursive definition is that it facilitates proving certain
properties of Reed-Muller codes; recursion allows us to derive inductive proofs that are, in
these cases, much simpler than non-inductive proofs.

Theorem 2. The distance of RM(r, m) is 2m−r .

Proof. (from [4]) Let wt(x) denote the weight of x in the code.
We proceed by induction on r. By definition:

RM(r, m) = {(x, x + y) | x ∈ RM(r, m − 1), y ∈ RM(r − 1, m − 1)}

It is easy to see that RM(r − 1, m − 1) ⊆ RM(r, m − 1). By combining these facts, we


observe that x + y ∈ RM(r, m − 1). We now consider two distinct cases.

11
1. x ̸= y
By the inductive hypothesis, the weight of x + y must be at least 2(m−1)−r . We also
have that the weight of x is at least 2(m−1)−r . Thus:

wt(x, x + y) = wt(x + y) + wt(x) ≥ 2 · 2m−r−1 = 2m−r

2. x = y
We then have that (x, x+y) = (x, 0) = (y, 0), and we know that y ∈ RM(r −1, m−1),
so we have that:

wt(x, x + y) = wt(y, 0) = wt(y) ≥ 2(m−1)−(r−1) = 2m−r

Thus, the distance of the code is 2m−r .

4.3 Affine geometries and Reed-Muller codes


Reed-Muller codes, like many other codes, have links in design theory, and in particular,
to designs from affine geometries. We will briefly investigate the link here. Readers are
assumed to have some basic familiarity with designs, although definitions are given where
necessary.

4.3.1 Affine geometries and their designs


Definition: Let F be any field, and let V be a vector space over F of dimension n. Then, the
affine geometry of V, denoted AG(V), is the set of all cosets over all subspaces of V. More
precisely:
AG(V) = {x + U | x ∈ V, U is a subspace of V}

Definition: For any coset x + U, if U is a subspace of V with dimension s, we say that


the coset x + U has dimension s. Then, we call x + U an s-flat of AG(V).

In AG(V), the points correspond to the 0-flats. The 1-flats are the lines and the 2-flats
the planes, with incidence defined by containment, as we will see in an example in a moment.

Example: We consider the field F = F2 and the vector space V = F32 . We then determine
the subspaces of V, partition them by dimension, and derive the cosets. For brevity, we
write vectors of V as 0-1 strings.
The subspace of dimension 0 is:
{000}
The cosets over this subspace give us the 0-flats, or the points, of our geometry:

{000} {001} {010} {011}


{100} {101} {110} {111}

12
The subspaces of dimension 1 are:

{000, 001} {000, 010} {000, 011} {000, 100}


{000, 101} {000, 110} {000, 111}

The cosets over these subspaces give us the 1-flats, or lines, of our geometry:

{000, 001} {000, 010} {000, 011} {000, 100}


{000, 101} {000, 110} {000, 111} {001, 011}
{001, 010} {001, 101} {001, 100} {001, 111}
{001, 110} {010, 011} {010, 110} {010, 111}
{010, 100} {010, 101} {011, 111} {011, 110}
{011, 101} {011, 100} {100, 101} {100, 110}
{100, 111} {101, 111} {101, 110} {110, 111}

The subspaces of dimension 2 are:

{000, 001, 010, 011} {000, 001, 100, 101} {000, 001, 110, 111} {000, 010, 100, 110}
{000, 010, 101, 111} {000, 011, 100, 111} {000, 011, 101, 110}

The cosets over these subspaces give us the 2-flats, or planes, of our geometry:

{000, 001, 010, 011} {000, 001, 100, 101} {000, 001, 110, 111} {000, 010, 100, 110}
{000, 010, 101, 111} {000, 011, 100, 111} {000, 011, 101, 110} {100, 101, 110, 111}
{010, 011, 110, 111} {010, 011, 100, 101} {011, 011, 101, 111} {001, 011, 100, 110}
{001, 010, 101, 110} {001, 010, 100, 111}

Trivially, the only subspace of V of dimension 3 is V, and the only coset derivable from this
subspace is V.

We also note that if, for an affine geometry AG(V), we take the set of 0-flats and the set
of s-flats (with s > 0) together, they form a balanced incomplete block design, with the set
of 0-flats as the points, and the set of s-flats as the blocks.

Example: In the previous example, we notice that the set of 0-flats as the points with
the set of 1-flats as the blocks forms a 2-(8, 2, 1)-BIBD. If we take the set of 0-flats as our
points and the set of 2-flats as our blocks, we have a 3-(8, 4, 1)-BIBD.

In the next section, we briefly examine the links between these designs and Reed-Muller
codes.

4.3.2 Reed-Muller codes and designs


Reed-Muller codes can be thought of as the designs of an affine geometry; the link between
the two is briefly explored here with an example. Interested readers should refer to [1] for a
more detailed examination of the ties between design theory and coding theory.

13
Theorem 3. RM(r, m) is the binary code of the design of points and (m − r)-flats of
AG(Fm
2 ).

We do not prove this theorem, but it simply requires showing that the incidence vectors
of the (m − r)-flats of AG(Fm
2 ) span RM(r, m). A detailed proof may be found in [1].

Example: We demonstrate how RM(1, 3) is the binary code of the design of points and
2-flats of AG(F32 ). We have already investigated AG(F32 ) in the previous section, and we will
rely on the results we obtained there.
We examine how the incidence vectors of the plane equations corresponding to the 2-flats
of AG(Fm 2 ) are actually codewords in our design. Recall that GRM(1,3) , using the isomorphism
ψ, is as follows: ⎡ ⎤
ψ(1)
⎢ ψ(x0 ) ⎥
GRM(1,3) = ⎢⎣ ψ(x1 ) ⎦

ψ(x2 )
Then it is easy to see that the 16 messages over F42 correspond to the codeword vectors
associated with the following equations:

x ∈ F42 x · GRM(1,3) x ∈ F42 x · GRM(1,3)


0000 0 1000 1
0001 x2 1001 1 + x2
0010 x1 1010 1 + x1
0011 x1 + x2 1011 1 + x1 + x2
0100 x0 1100 1 + x0
0101 x0 + x2 1101 1 + x0 + x2
0110 x0 + x1 1110 1 + x0 + x1
0111 x0 + x1 + x2 1111 1 + x0 + x1 + x2

Now we examine our design; each block corresponds to a plane, and each plane has an

14
incidence vector, as per the following table:

Block Plane eqn Inc vector


001, 010, 100, 111 1 + X0 + X1 + X2 = 0 0
000, 011, 101, 110 X 0 + X1 + X2 = 0 1
010, 011, 100, 101 1 + X 0 + X1 = 0 x2
000, 001, 110, 111 X 0 + X1 = 0 1 + x2
001, 011, 100, 110 1 + X 0 + X2 = 0 x1
000, 010, 101, 111 X 0 + X2 = 0 1 + x1
100, 101, 110, 111 1 + X0 = 0 x1 + x2
000, 001, 010, 011 X0 = 0 1 + x1 + x2
001, 010, 101, 110 1 + X 1 + X2 = 0 x0
000, 011, 100, 111 X 1 + X2 = 0 1 + x0
010, 011, 110, 111 1 + X1 = 0 x0 + x2
000, 001, 100, 101 X1 = 0 1 + x0 + x2
001, 011, 101, 111 1 + X2 = 0 x0 + x1
000, 010, 100, 110 X2 = 0 1 + x0 + x1

The vectors 0000 and 1111 in F42 do not have planes associated with their codewords;
however, their associated geometric structures may be formed by linear combinations of the
planes of the others.

Thus, Reed-Muller codes can be associated with the designs of affine geometries, and
indeed, several majority-logic decoding techniques have arisen because of this association.

15
A Implementation of Reed-Muller encoding and de-
coding
Using the techniques found in section 3, I have implemented two command-line applications
to perform encoding and decoding of Reed-Muller codes.
These applications have been coded in ANSI C and hence, should compile on any platform
that has an available C compiler. The source code is available on my personal web page, at

http://www.site.uottawa.ca/~raaphors

A.1 Encoding using rmencode


Encoding is done with the rmencode application, which is run in the following way:

rmencode r m vector1 [vector2 [vector3 [...]]]

where vectors are elements of Fk2 , represented by 0-1 strings.


Here are some examples of the encoding process:

~ -> ./rmencode 2 4 01101001010


1010111111111010
~ -> ./rmencode 2 4 00000000000
0000000000000000
~ -> ./rmencode 2 4 11111111111
1110100010000001
~ -> ./rmencode 0 3 0
00000000
~ -> ./rmencode 0 3 1
11111111
~ -> ./rmencode 3 3 00110011
01101110
~ -> ./rmencode 3 3 00110010
11101110
~ ->

A.2 Decoding using rmdecode


Decoding is performed using the rmdecode program, which has the same basic command-line
paramaters as rmencode:

rmdecode r m vector1 [vector2 [vector3 [...]]]


m
However, in this case, of course, the specified vectors must be elements of F22 , written as
0-1 strings.
Here are some examples of the decoding process:

16
~ -> ./rmencode 2 5 1111111111111111
01111110111010001110100010000001
~ -> ./rmdecode 2 4 1010111111111010
01101001010
~ -> ./rmdecode 2 4 1010111011111010
01101001010
~ -> ./rmdecode 2 4 1011111111111010
01101001010
~ -> ./rmdecode 2 5 01111110111010001110100010000001
1111111111111111
~ -> ./rmdecode 2 5 01101110101010001110101010000001
1111111111111111
~ ->

Note that in the final example, we add an error vector of length 3 to the encoding of
1111111111111111 (namely 00010000010000000000001000000000), and the program decodes
the correct message. This is as we expect in RM(2, 5), which can correct at most 25−2−1 −1 =
3 errors.

17
References
[1] Assmus, Jr., E. F. and Key, J. D. Designs and their Codes. Press Syndicate of the
University of Cambridge, Cambridge, 1992.

[2] Cameron, P. J. and Van Lint, J. H. Designs, Graphs, Codes, and their Links. Cambridge
University Press, Cambridge, 1991.

[3] Cooke, Ben. Reed-Muller Error Correcting Codes. MIT Undergraduate Journal of Math-
ematics Volume 1, MIT Department of Mathematics, 1999.

[4] Hankerson, D. R. et al. Coding Theory and Cryptography: The Essentials. Marcel
Dekker, New York, 1991.

[5] MacWilliams, F. J. and Sloane, N. J. A. The Theory of Error Correcting Codes. North-
Holland Mathematical Library Volume 16, Elsevier Science B. V., Amsterdam, 1977.

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy