
In
statistics
Statistics (from German language, German: ', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a s ...
and
coding theory
Coding theory is the study of the properties of codes and their respective fitness for specific applications. Codes are used for data compression, cryptography, error detection and correction, data transmission and computer data storage, data sto ...
, a Hamming space is usually the set of all
binary strings of length ''N'', where different binary strings are considered to be ''adjacent'' when they differ only in one position. The total distance between any two binary strings is then the total number of positions at which the corresponding bits are different, called the
Hamming distance
In information theory, the Hamming distance between two String (computer science), strings or vectors of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number ...
. Hamming spaces are named after American mathematician
Richard Hamming
Richard Wesley Hamming (February 11, 1915 – January 7, 1998) was an American mathematician whose work had many implications for computer engineering and telecommunications. His contributions include the Hamming code (which makes use of a Ha ...
, who introduced the concept in 1950. They are used in the theory of coding signals and transmission.
More generally, a Hamming space can be defined over any
alphabet
An alphabet is a standard set of letter (alphabet), letters written to represent particular sounds in a spoken language. Specifically, letters largely correspond to phonemes as the smallest sound segments that can distinguish one word from a ...
(set) ''Q'' as the set of
words
A word is a basic element of language that carries meaning, can be used on its own, and is uninterruptible. Despite the fact that language speakers often have an intuitive grasp of what a word is, there is no consensus among linguists on its ...
of a fixed length ''N'' with letters from ''Q''.
[Cohen et al., ''Covering Codes'', p. 15] If ''Q'' is a
finite field
In mathematics, a finite field or Galois field (so-named in honor of Évariste Galois) is a field (mathematics), field that contains a finite number of Element (mathematics), elements. As with any field, a finite field is a Set (mathematics), s ...
, then a Hamming space over ''Q'' is an ''N''-dimensional
vector space
In mathematics and physics, a vector space (also called a linear space) is a set (mathematics), set whose elements, often called vector (mathematics and physics), ''vectors'', can be added together and multiplied ("scaled") by numbers called sc ...
over ''Q''. In the typical, binary case, the field is thus
GF(2)
(also denoted \mathbb F_2, or \mathbb Z/2\mathbb Z) is the finite field with two elements.
is the Field (mathematics), field with the smallest possible number of elements, and is unique if the additive identity and the multiplicative identity ...
(also denoted by Z
2).
In coding theory, if ''Q'' has ''q'' elements, then any
subset
In mathematics, a Set (mathematics), set ''A'' is a subset of a set ''B'' if all Element (mathematics), elements of ''A'' are also elements of ''B''; ''B'' is then a superset of ''A''. It is possible for ''A'' and ''B'' to be equal; if they a ...
''C'' (usually assumed of
cardinality
The thumb is the first digit of the hand, next to the index finger. When a person is standing in the medical anatomical position (where the palm is facing to the front), the thumb is the outermost digit. The Medical Latin English noun for thum ...
at least two) of the ''N''-dimensional Hamming space over ''Q'' is called a q-ary
code
In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communicati ...
of length N; the elements of ''C'' are called
codewords.
In the case where ''C'' is a
linear subspace
In mathematics, the term ''linear'' is used in two distinct senses for two different properties:
* linearity of a ''function (mathematics), function'' (or ''mapping (mathematics), mapping'');
* linearity of a ''polynomial''.
An example of a li ...
of its Hamming space, it is called a
linear code
In coding theory, a linear code is an error-correcting code for which any linear combination of Code word (communication), codewords is also a codeword. Linear codes are traditionally partitioned into block codes and convolutional codes, although t ...
.
A typical example of linear code is the
Hamming code
In computer science and telecommunications, Hamming codes are a family of linear error-correcting codes. Hamming codes can detect one-bit and two-bit errors, or correct one-bit errors without detection of uncorrected errors. By contrast, the ...
. Codes defined via a Hamming space necessarily have the same length for every codeword, so they are called
block code
In coding theory, block codes are a large and important family of Channel coding, error-correcting codes that encode data in blocks.
There is a vast number of examples for block codes, many of which have a wide range of practical applications. Th ...
s when it is necessary to distinguish them from
variable-length code
In coding theory, a variable-length code is a code which maps source symbols to a ''variable'' number of bits. The equivalent concept in computer science is '' bit string''.
Variable-length codes can allow sources to be compressed and decompr ...
s that are defined by unique factorization on a monoid.
The
Hamming distance
In information theory, the Hamming distance between two String (computer science), strings or vectors of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number ...
endows a Hamming space with a
metric
Metric or metrical may refer to:
Measuring
* Metric system, an internationally adopted decimal system of measurement
* An adjective indicating relation to measurement in general, or a noun describing a specific type of measurement
Mathematics
...
, 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 (most notably over
Z4) giving rise to
modules instead of vector spaces and
ring-linear codes (identified with
submodule
In mathematics, a module is a generalization of the notion of vector space in which the field of scalars is replaced by a (not necessarily commutative) ring. The concept of a ''module'' also generalizes the notion of an abelian group, since t ...
s) instead of linear codes. The typical metric used in this case the
Lee distance. There exist a
Gray isometry between
(i.e. GF(2
2m)) with the Hamming distance and
(also denoted as GR(4,m)) with the Lee distance.
References
Coding theory
Linear algebra
{{linear-algebra-stub