Menu
Home Explore People Places Arts History Plants & Animals Science Life & Culture Technology
On this page
Lexicographic code

Lexicographic codes or lexicodes are greedily generated error-correcting codes with remarkably good properties. They were produced independently by Vladimir Levenshtein and by John Horton Conway and Neil Sloane. The binary lexicographic codes are linear codes, and include the Hamming codes and the binary Golay codes.

We don't have any images related to Lexicographic code yet.
We don't have any YouTube videos related to Lexicographic code yet.
We don't have any PDF documents related to Lexicographic code yet.
We don't have any Books related to Lexicographic code yet.
We don't have any archived web articles related to Lexicographic code yet.

Construction

A lexicode of length n and minimum distance d over a finite field is generated by starting with the all-zero vector and iteratively adding the next vector (in lexicographic order) of minimum Hamming distance d from the vectors added so far. As an example, the length-3 lexicode of minimum distance 2 would consist of the vectors marked by an "X" in the following example:

VectorIn code?
000X
001
010
011X
100
101X
110X
111

Here is a table of all n-bit lexicode by d-bit minimal hamming distance, resulting of maximum 2m codewords dictionnary. For example, F4 code (n=4,d=2,m=3), extended Hamming code (n=8,d=4,m=4) and especially Golay code (n=24,d=8,m=12) shows exceptional compactness compared to neighbors.

n \ d123456789101112131415161718
11
221
3321
44311
554211
6653211
77643111
887442111
9985422111
1010965321111
111110764321111
1212118744221111
13131298543211111
1414131096543211111
151514111076542211111
1616151111875522111111
17171612119865322111111
181817131299763322111111
1919181413109874322111111
20201915141110985432211111
212120161512111095533221111
2222211716121211106543221111
2323221817131212116654222111
2424231918141312127655322211
2525242019151412128765332211
2626252120161512129876432221
2727262221171613129977543222
28282723221817131310987553322
292928242319181413111088654322
303029252419191514121198665422
3131302625201916151212109666532
32323126262120161613121110766633
33...32...26...21...16...13...11...7...6...3

All odd d-bit lexicode distances are exact copies of the even d+1 bit distances minus the last dimension, so an odd-dimensional space can never create something new or more interesting than the d+1 even-dimensional space above.

Since lexicodes are linear, they can also be constructed by means of their basis.4

Implementation

Following C generate lexicographic code and parameters are set for the Golay code (N=24, D=8).

#include <stdio.h> #include <stdlib.h> int main() { /* GOLAY CODE generation */ int i, j, k; int _pc[1<<16] = {0}; // PopCount Macro for (i=0; i < (1<<16); i++) for (j=0; j < 16; j++) _pc[i] += (i>>j)&1; #define pc(X) (_pc[(X)&0xffff] + _pc[((X)>>16)&0xffff]) #define N 24 // N bits #define D 8 // D bits distance unsigned int * z = malloc(1<<29); for (i=j=0; i < (1<<N); i++) { // Scan all previous for (k=j-1; k >= 0; k--) // lexicodes. if (pc(z[k]^i) < D) // Reverse checking break; // is way faster... if (k == -1) { // Add new lexicode for (k=0; k < N; k++) // & print it printf("%d", (i>>k)&1); printf(" : %d\n", j); z[j++] = i; } } }

Combinatorial game theory

The theory of lexicographic codes is closely connected to combinatorial game theory. In particular, the codewords in a binary lexicographic code of distance d encode the winning positions in a variant of Grundy's game, played on a collection of heaps of stones, in which each move consists of replacing any one heap by at most d − 1 smaller heaps, and the goal is to take the last stone.5

Notes

References

  1. Levenšteĭn, V. I. (1960), "Об одном классе систематических кодов" [A class of systematic codes], Doklady Akademii Nauk SSSR (in Russian), 131 (5): 1011–1014, MR 0122629; English translation in Soviet Math. Doklady 1 (1960), 368–371 /wiki/Vladimir_Levenshtein

  2. Conway, John H.; Sloane, N. J. A. (1986), "Lexicographic codes: error-correcting codes from game theory", IEEE Transactions on Information Theory, 32 (3): 337–348, CiteSeerX 10.1.1.392.795, doi:10.1109/TIT.1986.1057187, MR 0838197 /wiki/John_Horton_Conway

  3. Conway, John H.; Sloane, N. J. A. (1986), "Lexicographic codes: error-correcting codes from game theory", IEEE Transactions on Information Theory, 32 (3): 337–348, CiteSeerX 10.1.1.392.795, doi:10.1109/TIT.1986.1057187, MR 0838197 /wiki/John_Horton_Conway

  4. Trachtenberg, Ari (2002), "Designing lexicographic codes with a given trellis complexity", IEEE Transactions on Information Theory, 48 (1): 89–100, doi:10.1109/18.971740, MR 1866958 /wiki/IEEE_Transactions_on_Information_Theory

  5. Conway, John H.; Sloane, N. J. A. (1986), "Lexicographic codes: error-correcting codes from game theory", IEEE Transactions on Information Theory, 32 (3): 337–348, CiteSeerX 10.1.1.392.795, doi:10.1109/TIT.1986.1057187, MR 0838197 /wiki/John_Horton_Conway