Hamming Distance - Special Properties

Special Properties

For a fixed length n, the Hamming distance is a metric on the vector space of the words of length n, as it obviously fulfills the conditions of non-negativity, identity of indiscernibles and symmetry, and it can be shown easily by complete induction that it satisfies the triangle inequality as well. The Hamming distance between two words a and b can also be seen as the Hamming weight of ab for an appropriate choice of the − operator.

For binary strings a and b the Hamming distance is equal to the number of ones (population count) in a XOR b. The metric space of length-n binary strings, with the Hamming distance, is known as the Hamming cube; it is equivalent as a metric space to the set of distances between vertices in a hypercube graph. One can also view a binary string of length n as a vector in by treating each symbol in the string as a real coordinate; with this embedding, the strings form the vertices of an n-dimensional hypercube, and the Hamming distance of the strings is equivalent to the Manhattan distance between the vertices.

Read more about this topic:  Hamming Distance

Famous quotes containing the words special and/or properties:

    Myths, as compared with folk tales, are usually in a special category of seriousness: they are believed to have “really happened,” or to have some exceptional significance in explaining certain features of life, such as ritual. Again, whereas folk tales simply interchange motifs and develop variants, myths show an odd tendency to stick together and build up bigger structures. We have creation myths, fall and flood myths, metamorphose and dying-god myths.
    Northrop Frye (1912–1991)

    The reason why men enter into society, is the preservation of their property; and the end why they choose and authorize a legislative, is, that there may be laws made, and rules set, as guards and fences to the properties of all the members of the society: to limit the power, and moderate the dominion, of every part and member of the society.
    John Locke (1632–1704)