Hamming space


In statistics and coding theory, a Hamming space is usually the set of all binary strings of length N. It is used in the theory of coding signals and transmission.
More generally, a Hamming space can be defined over any alphabet Q as the set of words of a fixed length N with letters from Q. If Q is a finite field, then a Hamming space over Q is an N-dimensional vector space over Q. In the typical, binary case, the field is thus GF.
In coding theory, if Q has q elements, then any subset C of the N-dimensional Hamming space over Q is called a q-ary code of length N; the elements of C are called codewords. In the case where C is a linear subspace of its Hamming space, it is called a linear code. A typical example of linear code is the Hamming code. Codes defined via a Hamming space necessarily have the same length for every codeword, so they are called block codes when it is necessary to distinguish them from variable-length codes that are defined by unique factorization on a monoid.
The Hamming distance endows a Hamming space with a metric, which is essential in defining basic notions of coding theory such as error detecting and error correcting codes.
Hamming spaces over non-field alphabets have also been considered, especially over finite rings giving rise to modules instead of vector spaces and ring-linear codes instead of linear codes. The typical metric used in this case the Lee distance. There exist a Gray isometry between with the Hamming distance and with the Lee distance.