Constant-weight code

The theory is closely connected to that of designs (such as t-designs and Steiner systems).

Most of the work on this field of discrete mathematics is concerned with binary constant-weight codes.

Binary constant-weight codes have several applications, including frequency hopping in GSM networks.

[1] Most barcodes use a binary constant-weight code to simplify automatically setting the brightness threshold that distinguishes black and white stripes.

In addition to use as error correction codes, the large space between code words can also be used in the design of asynchronous circuits such as delay insensitive circuits.

The central problem regarding constant-weight codes is the following: what is the maximum number of codewords in a binary constant-weight code with length

Apart from some trivial observations, it is generally impossible to compute these numbers in a straightforward way.

Lower bounds are most often found by exhibiting specific codes, either with use of a variety of methods from discrete mathematics, or through heavy computer searching.

A one-of-four code can use the words 0001, 0010, 0100, 1000 in order to encode two bits 00, 01, 10, and 11.

An example is dual rail encoding, and chain link [4] used in delay insensitive circuits.

Balanced codes have been introduced by Donald Knuth;[5] they are a subset of so-called unordered codes, which are codes having the property that the positions of ones in a codeword are never a subset of the positions of the ones in another codeword.

Balanced codes allow for particularly efficient decoding, which can be carried out in parallel.

The 3-wire lane encoding used in MIPI C-PHY can be considered a generalization of constant-weight code to ternary -- each wire transmits a ternary signal, and at any one instant one of the 3 wires is transmitting a low, one is transmitting a middle, and one is transmitting a high signal.

A single bit error will cause the code word to have either m + 1 or m − 1 "ones".