Last time we defined the Hamming code. We also saw that it meets the Hamming bound, which is a measure of how densely a code can be packed inside an ambient space and still maintain a given distance. This time we’ll define the Reed-Solomon code which optimizes a different bound called the Singleton bound, and then generalize them to a larger class of codes called Reed-Muller codes. In future posts we’ll consider algorithmic issues behind decoding the codes, for now we just care about their existence and optimality properties.
The Singleton bound
Recall that a code
One way to motivate for the Singleton bound goes like this. We can easily come up with codes for the following parameters. For
Theorem [Singleton 64]: If
Proof. The proof is pleasantly simple. Let
It’s embarrassing that such a simple argument can prove that one can do no better. There are codes that meet this bound and they are called maximum distance separable (MDS) codes. One might wonder how MDS codes relate to perfect codes, but they are incomparable; there are perfect codes that are not MDS codes, and conversely MDS codes need not be perfect. The Reed-Solomon code is an example of the latter.
The Reed-Solomon Code
The Reed-Solomon code has a very simple definition, especially for those of you who have read about secret sharing.
Given a prime power
- Generate
explicitly. - Pick
distinct elements . - A message
is a list of elements . Represent the message as a polynomial . - The encoding of a message is the tuple
. That is, we just evaluate at our chosen locations in .
Here’s an example when
Decoding the message is a bit more difficult (more on that next time), but for now let’s prove the basic facts about this code.
Fact: The Reed-Solomon code is linear. This is just because polynomials of a limited degree form a vector space. Adding polynomials is adding their coefficients, and scaling them is scaling their coefficients. Moreover, the evaluation of a polynomial at a point is a linear map, i.e. it’s always true that
Fact:
So the Reed-Solomon code is maximum distance separable. Neat!
One might wonder why one would want good codes with large alphabets. One reason is that with a large alphabet we can interpret a byte as an element of
The Reed-Muller code
The Reed-Muller code is a neat generalization of the Reed-Solomon code to multivariable polynomials. The reason they’re so useful is not necessarily because they optimize some bound (if they do, I haven’t heard of it), but because they specialize to all sorts of useful codes with useful properties. One of these is properties is called local decodability, which has big applications in theoretical computer science.
Anyway, before I state the definition let me remind the reader about compact notation for multivariable polynomials. I can represent the variables
Definition: Let
- The message is the list of multinomial coefficients of a homogeneous degree
polynomial in variables, . - You encode a message
as the tuple of all polynomial evaluations .
Here the actual parameters of the code are
Fact: Two multivariate degree
For messages of desired length
A fun fact about Reed-Muller codes: they were apparently used on the Voyager space missions to relay image data back to Earth.
The Way Forward
So we defined Reed-Solomon and Reed-Muller codes, but we didn’t really do any programming yet. The reason is because the encoding algorithms are very straightforward. If you’ve been following this blog you’ll know we have already written code to explicitly represent polynomials over finite fields, and extending that code to multivariable polynomials, at least for the sake of encoding the Reed-Muller code, is straightforward.
The real interesting algorithms come when you’re trying to decode. For example, in the Reed-Solomon code we’d take as input a bunch of points in a plane (over a finite field), only some of which are consistent with the underlying polynomial that generated them, and we have to reconstruct the unknown polynomial exactly. Even worse, for Reed-Muller we have to do it with many variables!
We’ll see exactly how to do that and produce working code next time.
Until then!
Posts in this series:
- A Proofless Introduction to Coding Theory
- Hamming’s Code
- The Codes of Solomon, Reed, and Muller
- The Welch-Berlekamp Algorithm for Correcting Errors in Data
Want to respond? Send me an email, post a webmention, or find me elsewhere on the internet.