16 Error-correcting Codes

Currently, the coding theory module is designed for linear codes over finite fields, linear codes over Galois rings (including special functionality for codes over 4), additive codes over finite fields, and quantum stabilizer codes.

16.1 Linear Codes over Finite Fields

16.1.1 Linear Codes: Creation

  • Creation from a subspace of a vector space

  • Creation in terms of a generator matrix

  • Creation from a design

  • Creation from a finite plane

  • Construction of a cyclic code given the generator polynomial

  • Construction of a cyclic code given the roots of the generator polynomial

  • Universe code, repetition code, zero code

  • Random linear code

16.1.2 Linear Codes: Operations on Codewords

  • Vector space operations: sum, difference scalar multiplication

  • Syndrome

  • Distance and weight

  • Coordinates, support

  • Trace

16.1.3 Linear Codes: Elementary Operations

  • Sum, intersection

  • Dual code

  • Hull of a code

  • External direct sum, Plotkin sum

  • Modifying the codewords: augment, extend, expurgate, lengthen, puncture, shorten, etc

  • Subcode generated by given codewords

  • Subcode of a specified dimension

  • Subcode generated by words of a given weight

  • Coset leaders (in the case of a small code)

16.1.4 Linear Codes over Finite Fields: Basic Properties

  • Standard form

  • All information sets of a code

  • Idempotent of a cyclic code

  • Properties: cyclic

  • Properties: even, doubly even, equidistant

  • Properties: self-dual, weakly self-orthogonal

  • Properties: perfect, nearly perfect

  • Properties: maximum-distance separable, equidistant

  • Properties: optimal for the Griesmer bound

  • Properties: projective

  • Determine whether two codes are equivalent

16.1.5 Linear Codes over Finite Fields: Weight Distribution

  • Minimum weight (Zimmermann algorithm)

  • Weight distribution, weight enumerator

  • MacWilliams transform

  • Complete weight enumerator, MacWilliams transform

  • Number of words of designated weight

  • Number of words of constant weight

  • List all words of designated weight

  • List all words of constant weight

  • Coset weight distribution, covering radius, diameter

Carefully crafted algorithms are provided for computing the minimum weight, the weight distribution, and word collection algorithms. For example, computation of the minimum weight of a [96,60,8] code takes 77 seconds; computation of the weight distribution of the [64,22,16] Reed-Muller code (r = 2,m = 6) takes 1.4 seconds.

16.1.6 Linear Codes over Finite Fields: Construction of Families

  • Hamming code, simplex code

  • Reed-Muller codes

  • Quadratic residue code, Golay codes, doubly circulant QR-code, twisted QR-code, power residue code

  • BCH code

  • Goppa code

  • Chien-Choy code

  • Alternant code, Fire code, Gabidulin code

  • Srivastava, generalized Srivastava codes

  • Reed-Solomon code, generalized Reed-Solomon code, Justesen code

  • Maximum distance separable code

16.1.7 Linear Codes over Finite Fields: Algebraic-Geometric codes

Functions are provided for the construction of algebraic–geometric codes. The user chooses a plane curve X, and specifies a set of places of degree 1 on X and a divisor on X.

16.1.8 Linear Codes over Finite Fields: Decoding Algebraic-Geometric codes

Algebraic-geometric codes can be decoded efficiently up to the Goppa designated distance.

16.1.9 Linear Codes over Finite Fields: Changing the Alphabet

  • Extension of the base field

  • Restricting the alphabet to a subfield

  • Subfield subcode

  • Trace code

  • Rewriting the alphabet, taken as the elements of GF(qm), as m-dimensional vectors over GF(q)

16.1.10 Linear Codes over Finite Fields: Combining Codes

  • Concatenation of two codes

  • Concatenated code

  • Construction X

  • Construction X3

  • Construction XX

  • Zinoviev code

  • Construction Y1

16.1.11 Linear Codes over Finite Fields: Bounds

  • BCH bound on minimum distance

  • Upper and lower bounds on the cardinality of a largest code having given length and minimum distance

  • Upper asymptotic bounds on the information rate

  • Tables of best known bounds, based on the codes database

16.1.12 Linear Codes over Finite Fields: Best Known Codes

Magma V2.14 incorporates a database containing constructions of the best known linear codes over F2 of length up to 256, over F3 of length up to 100, and over F4 of length up to 100.

The binary codes database is complete in the sense that it contains a construction for every set of parameters, with the codes of length up to 36 known to be optimal. The database for codes over F3 is also complete, with codes of length up to 21 known to be optimal. The databse for codes over F4 is over 99% complete, with only 40 of the 4,150 codes missing (the first such missing code coming at length 96. The codes of length up to 18 are known to be optimal.

The Magma BKLC database makes use of the tables of bounds compiled by A.E. Brouwer. It should be noted that the Magma BKLC database is unrelated to the similar (but rather incomplete) BKLC database forming part of GUAVA, a share package in GAP3. A significant number of entries in the Magma BKLC database provide better codes than the corresponding ones listed in the Brouwer tables.

The construction of the Magma BKLC database has been undertaken by John Cannon (Sydney), Markus Grassl (Karlsruhe) and Greg White (Sydney).

16.1.13 Linear Codes over Finite Fields: Decoding Algorithms

  • Syndrome decoding

  • Alternant decoding

16.1.14 Linear Codes over Finite Fields: Automorphism Group

  • Automorphism groups of linear codes over GF(p) (prime p), GF(4)

  • Testing pairs of codes for isomorphism over GF(p) (prime p), GF(4)

  • Group actions on a code

Automorphism groups may be computed over any field Fp, p a prime, and F4, again using Leon's PERM package.

16.1.15 Linear Codes over Finite Fields: LDPC Codes

  • Construction of LDPC codes from sparse matrices

  • Deterministic LDPC constructions

  • Random constructions from regular and irregular LDPC ensembles

  • Iterative LDPC decoding

  • Simulation of decoding performance on specified channels

  • Density evolution on binary symmetric and Gaussian channels for given channel parameters, as well as threshold determination.

  • Small database of good irregular LDPC ensembles.

16.1.16 Linear Codes over Finite Fields: Attacks on the McEliece Cryptosystem

All of the best known decoding attacks on the McEliece cryptosystem are available, as well as improved attacks.

  • McEliece's attack

  • Lee and Brickell's attack

  • Leon's attack

  • Stern's atack

  • Canteaut and Chabaud's attack

  • Generalized combinations of attacks

16.2 Linear Codes over Finite Rings

16.2.1 Linear Codes over Finite Rings: Creation

  • Creation from a subspace of a vector space

  • Creation in terms of a generator matrix

  • Construction from a permutation

  • Construction of a cyclic code given the generator polynomial

  • Construction of a cyclic code given the roots of the generator polynomial

  • Universe code, repetition code, zero code

  • Random linear code

16.2.2 Linear Codes over Finite Rings: Operations on Codewords

  • Module operations: sum, difference scalar multiplication

  • Syndrome

  • Hamming distance, Hamming weight

  • Lee distance, Lee weight (codes over 4)

  • Coordinates, support

  • Trace

16.2.3 Linear Codes over Finite Rings: Elementary Operations

  • Sum, intersection

  • Dual code

  • External direct sum, Plotkin sum

  • Modifying the codewords: augment, extend, expurgate, lengthen, puncture, shorten, etc

  • Coset leaders (in the case of a small code)

16.2.4 Linear Codes over Finite Rings: Weight Distribution

  • Minimum Hamming weight

  • Hamming weight distribution

  • Hamming weight enumerator

  • Complete weight enumerator

16.2.5 Linear Codes over

  • Minimum Lee Weight (Zimmermann algorithm)

  • Lee weight distribution

  • Symmetric weight enumerator

  • Lee weight enumerator

16.2.6 Linear Codes over

  • Kerdock code

  • Preparata codes

16.2.7 Linear Codes over

  • Standard form

  • Gray map

  • Lee weights

  • Properties: cyclic

  • Properties: even, self-dual, self-orthogonal

16.3 Additive Codes

16.3.1 Additive Codes: Creation

  • Additive codes defined as some K-additive subspace of Fn for some subfield K of F.

  • Creation in terms of a generator matrix

  • Construction of a cyclic code given the generator polynomial

  • Universe code, repetition code, zero code

  • Random additive code

16.3.2 Additive Codes: Operations on Codewords

  • Vector space operations: sum, difference scalar multiplication

  • Distance and weight

  • Coordinates, support

  • Trace

16.3.3 Additive Codes: Elementary Operations

  • Sum, intersection

  • Dual code

  • Symplectic Dual code

  • Plotkin sum

  • Modifying the codewords: augment, extend, lengthen, puncture, shorten, etc

  • Subcode generated by given codewords

  • Subcode of a specified dimension

  • Subcode generated by words of a given weight

16.3.4 Additive Codes over Finite Fields: Basic Properties

  • Properties: cyclic

  • Properties: self-dual, self-orthogonal

  • Properties: symplecic self-dual, symplectic self-orthogonal

16.3.5 Additive Codes over Finite Fields: Weight Distribution

  • Minimum weight (Zimmermann algorithm)

  • Weight distribution, weight enumerator

  • MacWilliams transform

  • Complete weight enumerator, MacWilliams transform

  • Number of words of designated weight

  • Number of words of constant weight

  • List all words of designated weight

  • List all words of constant weight

The fast algorithm for minimum weight and word collection is adapted from linear codes and provides performance similar to a calculation with an equivalently sized linear code.

16.3.6 Additive Codes over Finite Fields: Construction of Families

  • Cyclic codes

  • Quasicyclic codes

16.3.7 Additive Codes over Finite Fields: Automorphism Group

  • Automorphism and permutation groups of additive codes over GF(4)

  • Group actions on a code

16.4 Quantum Error-Correcting Codes

16.4.1 Quantum Codes: Creation

  • Quantum stabilizer codes defined by symplectic self dual additive codes.

  • Creation in terms of a generator matrix

  • Construction of a cyclic code given the generator polynomial

  • Universe code, repetition code, zero code

  • Random quantum code

16.4.2 Quantum Codes: Basic Properties

  • Properties: Cyclic, quasicyclic

  • Properties: Self-dual

  • Properties: Stablizer code

16.4.3 Quantum Codes: Error Group

  • The group of errors on a quantum space

  • Stabiliser group associated with a quantum code

16.4.4 Quantum Codes: Weight Distribution

  • Minimum weight (Zimmermann algorithm)

  • Weight distribution, weight enumerator

  • Complete weight enumerator

The algorithm for minimum weight uses the Zimmermann algorithm for the underlying self dual code.

16.4.5 Quantum Codes: Constructions

  • Cyclic codes

  • Quasicyclic codes

  • CSS code

  • Direct sums

  • Extend, shorten

16.4.6 Quantum Codes: Automorphism Group

  • Automorphism and permutation groups of binary quantum codes (codes based on quaternary stabilizer codes)