Error-Correcting Code

An error-correcting code is an algorithm for expressing a sequence of numbers such that any errors which are introduced can be detected and corrected (within certain limitations) based on the remaining numbers. The study of error-correcting codes and the associated mathematics is known as coding theory.

Error detection is much simpler than error correction, and one or more "check" digits are commonly embedded in credit card numbers in order to detect mistakes. Early space probes like Mariner used a type of error-correcting code called a block code, and more recent space probes use convolution codes. Error-correcting codes are also used in CD players, high speed modems, and cellular phones. Modems use error detection when they compute checksums, which are sums of the digits in a given transmission modulo some number. The ISBN used to identify books also incorporates a check digit.

A powerful check for 13 digit numbers consists of the following. Write the number as a string of digits a_1a_2a_3...a_(13). Take a_1+a_3+...+a_(13) and double. Now add the number of digits in odd positions which are >4 to this number. Now add a_2+a_4+...+a_(12). The check number is then the number required to bring the last digit to 0. This scheme detects all single digit errors and all transpositions of adjacent digits except 0 and 9.

Let A(n,d) denote the maximal number of n (0,1)-vectors having the property that any two of the set differ in at least d places. The corresponding vectors can correct [(d-1)/2] errors. A(n,d,w) is the number of A(n,d)s with precisely w 1s (Sloane and Plouffe 1995). Since it is not possible for n-vectors to differ in d>n places and since n-vectors which differ in all n places partition into disparate sets of two,

 A(n,d)={1   n<d; 2   n=d.
(1)

Values of A(n,d) can be found by labeling the 2^n (0,1)-n-vectors, finding all unordered pairs (a_i,a_j) of n-vectors which differ from each other in at least d places, forming a graph from these unordered pairs, and then finding the clique number of this graph. Unfortunately, finding the size of a clique for a given graph is an NP-complete problem.

dSloaneA(n,d)
1A0000792, 4, 8, 16, 32, 64, 128, ...
21, 2, 4, 8, ...
31, 1, 2, 2, ...
4A0058641, 1, 1, 2, 4, 8, 16, 20, 40, ...
51, 1, 1, 1, 2, ...
6A0058651, 1, 1, 1, 1, 2, 2, 2, 4, 6, 12, ...
71, 1, 1, 1, 1, 1, 2, ...
8A0058661, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, ...

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.