On this page
A QR code still scans with a corner smudged, and a scratched CD still plays. Both rely on the same algebra. Reed–Solomon codes were developed in 1960 by Irving S. Reed and Gustave Solomon, then staff members of MIT Lincoln Laboratory (Wikipedia: Reed–Solomon error correction). Their original paper, “Polynomial Codes Over Certain Finite Fields”, appeared in the Journal of the Society for Industrial and Applied Mathematics (Reed and Solomon, 1960).
What is a Reed–Solomon code?
Take k data symbols m₀, m₁, …, m₍ₖ₋₁₎ as the coefficients of a polynomial p(x) = m₀ + m₁x + … + m₍ₖ₋₁₎xᵏ⁻¹. Send its values at n different points. The arithmetic happens in a finite field, here the numbers modulo a prime, so every value is a symbol of the same size and you can divide by anything except 0. If finite fields are new to you, start with what finite fields are, with GF(4) and GF(8) built by hand.
The key fact: a polynomial of degree below k is fixed by its values at any k points. That is Lagrange interpolation, which finds the polynomial through any set of points. So any k of the n sent values rebuild the data, and the other n − k are spare.
How does a Reed–Solomon code work over GF(7)?
GF(7) is the set 0 to 6 with arithmetic modulo 7. Take k = 2 and the data (3, 2), so p(x) = 3 + 2x, a straight line. Choose n = 5 and work out p at x = 1 to 5:
p(1) = 5
p(2) = 7 ≡ 0
p(3) = 9 ≡ 2
p(4) = 11 ≡ 4
p(5) = 13 ≡ 6
You send (5, 0, 2, 4, 6): five symbols carrying two symbols of data, with three spare.
First, lost symbols. Say only positions 2 and 5 arrive, with values 0 and 6. The slope is (6 − 0)/(5 − 2) = 6/3. In GF(7), dividing by 3 means multiplying by 5, because 3 × 5 = 15 ≡ 1. So the slope is 6 × 5 = 30 ≡ 2. Then 0 = c + 2 × 2 gives c = −4 ≡ 3. You are back at (3, 2). Any two of the five values work, so three can be lost.
Now a wrong symbol: the third one arrives corrupted: (5, 0, 5, 4, 6). The receiver does not know which one is bad, so it looks for the line that agrees with the most values.
Line through positions 1 and 2: slope 0 − 5 = −5 ≡ 2, so c = 5 − 2 = 3. This gives 3 + 2x, which predicts (5, 0, 2, 4, 6) and agrees at 4 of the 5 positions.
Line through positions 1 and 3: both values are 5, so p(x) = 5. It agrees at only 2 positions.
Two different lines meet in at most one point, so any wrong line matches at most one good symbol plus the bad one. The true line wins 4 to 2, and position 3 is repaired to 2. Real decoders use cleverer algebra than trying every pair, but the principle is the same.
Why do n − k extra symbols correct (n − k)/2 errors?
Two different polynomials of degree below k agree in at most k − 1 places, because their difference has degree below k and so at most k − 1 roots. So any two codewords differ in at least n − k + 1 positions. The distance of a Reed–Solomon code is exactly d = n − k + 1 (Wikipedia).
Erasures: you know which symbols are missing, and any k survivors are enough, so up to n − k can be filled.
Errors: with e wrong symbols, the received word is e away from the true codeword and at least d − e from any other. The true one is closest when e < d − e, that is 2e ≤ n − k.
An error at an unknown place costs two spare symbols: one to find it, one to fix it. The same article states the rule: t = n − k check symbols correct up to ⌊t/2⌋ errors at unknown locations, or t erasures. In our example n − k = 3: three erasures, or one error.
Where are Reed–Solomon codes used?
QR codes: the QR Code site run by DENSO WAVE says the error correction “is implemented by adding a Reed-Solomon Code to the original data”, with four levels to choose from; level M, rated at 15%, is the one most often selected (QRcode.com).
CDs: the compact disc was the first mass-produced consumer product to use Reed–Solomon codes, in 1982 (Wikipedia). A CD uses two Reed–Solomon codes interleaved cross-wise, adding one parity byte for every three data bytes, and corrects bursts of up to 4,000 data bits, about 2.5 mm of track (Wikipedia: CIRC).
Space probes: in 1977, Reed–Solomon codes were implemented in the Voyager programme as concatenated codes (Wikipedia). A 1982 NASA JPL report analyses a channel that pairs a (255, 223) Reed–Solomon code with a convolutional code, for Voyager 2's Uranus and Neptune encounters (Deutsch and Miller, JPL). There n − k = 32, so the rule gives up to 16 symbol errors per block.
How can you practise Reed–Solomon codes by hand?
Pick a prime p, k data numbers below p, and n ≤ p points.
Delete n − k values and rebuild the polynomial by interpolation.
Change one value and find the polynomial that agrees with the most values.
Repeat with k = 3, n = 7 over GF(11), changing two values.
If inverses modulo 7 or interpolation feel shaky, the Fermi Concept Library has a lesson for every concept in mathematics and computing, and the Fermi Problem Library has a step-by-step solver that explains the reasoning rather than printing an answer.
For how much information a message can carry at all, read why a fair coin carries 1 bit of Shannon entropy.



