Math Quad
Math Quad
Let's talk about some very interesting things: quite a fascinating world of
Reed-Solomon codes, an error-correcting code that can fix errors in
transmitting data. Capable of recovering data from a scratched CD or DVD or
even a signal sent to space.
Let's start with a very concrete physical example which sets up the maths.
Suppose I wanted to send you the word 'CAT' but in transmission one letter
was lost. So, you got '_AT'. We want to make an educated guess about which
letter was lost. Reed-Solomon codes let us do just that and I'll explain what's
going on over the next three steps.
First and foremost, it's a huge concept-changed the nature of the data-from
letters, numbers or files to a polynomial. A polynomial is simply an
expression in math terminology with terms like 3x² + 2x +1. Let's take this
apart using our word 'CAT'.
C=3
A=1
T = 20
We make such a polynomial, the letters of 'CAT' standing for the coefficients
of the polynomial:
f(x) = 3x2 + 1x + 20
Sending only the letters is a bit dicey because data may get corrupted in
transit. So Reed-Solomon codes send extra information called redundancy.
That redundancy is like packing some extra snacks just in case some get
lost. In technical parlance, we calculate additional points from the polynomial
by substituting various values of 'x' and send those along also.
Suppose now that we get '_AT' with the 'C' missing. We know this much so
far. Now we have a job ahead of us: to determine where the error occurred.
Here's where modular arithmetic comes into play. Modular arithmetic is like a
clock after 12, it loops back to 1. In data transmission, it is this looping
property helps us to handle large numbers and to ensure everything falls in a
range.
Consider, for example how in modular arithmetic data might 'wrap around' a
given number so that regardless of how large it was, it always came within
our range of expectation. This is critical in Reed-Solomon codes in detecting
and isolating error.
Now that we know something is missing, we want to recover it. That is where
Lagrange interpolation fits in. Lagrange interpolation is the mathematical
procedure used to recover missing parts of a polynomial even if some data
points are lost. Let us understand this by using the word 'CAT' once again.
Now we have all other points written in terms of 'A' and 'T', but we are
missing that 'C'. Now we are going to plot this polynomial as a curve on the
graph. We know some points of the curve-in our example, 'A' and 'T'-and
Lagrange interpolation is going to allow us to finish the rest of the curve so
that finally we can get the value of the missing point.