Binary block code Created 2026-09-24 Updated 2026-10-14
Boolean cube expansion from bounded differences Created 2026-10-14 Updated 2026-10-31
For a nonempty of relative size at least , its Hamming distance function has the bounded differences property with all constants one. If , the concentration bound at gives , so for . Then , proving that the radius- neighbourhood contains at least cube points.
Bounded-distance decoding 2026-10-14
For a code of minimum Hamming distance and radius with , bounded-distance decoding returns the unique codeword within Hamming distance of the received word, or reports failure if none exists. The disjointness of radius- Hamming balls gives uniqueness. It guarantees recovery when at most errors occurred, but a word produced by more errors can be nearer to a different codeword and be miscorrected.
Coding theory Created 2026-09-24 Updated 2026-10-18
Coding theory studies representations of messages that make decoding efficient, reliable, or compact. In channel coding, messages are mapped to separated codewords, so a corrupted word can still be recognized as coming from one particular message. In lossless source coding, a prefix code instead assigns short descriptions to frequent symbols. The objectives differ, but both exploit structure in the set of allowed words.
The simplest error-correction example sends as and as . If the receiver sees , at most one bit flip is consistent with , whereas two flips would be needed to obtain it from . A repetition code therefore recovers the original by taking the majority function of the received bits. The Hamming distance between the valid codewords is three: the spaces of one-error outputs around them do not overlap. This turns error correction into geometry in a discrete space.
The central tradeoff is between code rate and minimum distance. Additional separation makes correction possible but leaves fewer words available for messages at a fixed length. The Hamming bound counts disjoint error neighborhoods, while linear codes turn encoding and error detection into computations with matrices over finite fields. These connections explain why combinatorics, linear algebra, and probability theory all enter the subject.
Richard W. Hamming's Error Detecting and Error Correcting Codes appeared in the Bell System Technical Journal in April 1950, pp. 147–160. Its introduction motivates automatic correction through failures in digital computing, and its constructions go beyond detecting an error to identifying and correcting its location.[ref]
https://zoo.cs.yale.edu/classes/cs323/doc/Hamming.pdf. Hamming, Error Detecting and Error Correcting Codes, 1950
Equip the symmetric group with its uniform probability measure and unnormalized Hamming distance. If has Lipschitz constant , it obeys the displayed two-sided bound, and each one-sided tail has the same exponential without the factor two. Reveal a uniform permutation one image at a time. Two possible next images have completion sets paired by swapping those two values, changing exactly two coordinates. Thus the corresponding conditional means differ by at most . Each increment of the Doob exposure martingale has conditional range length at most . Applying the conditional Hoeffding lemma gives ; optimizing the exponential Markov bound proves the bound. A mere absolute-increment bound of gives a weaker constant, so using the range length matters.
Cross-intersection bound from cube separation Created 2026-10-07 Updated 2026-10-14
If two nonempty set families on coordinates have every cross-intersection greater than an integer , their density product obeys the displayed bound. Complementing the second set family separates it from the first by Hamming distance greater than . Harper inequality bounds the first set family's radius- neighbourhood from below. If , disjointness yields . The binary entropy function tail estimate bounds these two factors by Gaussian tails; their deficits from the middle rank sum to at least , proving the claim.
Downward coordinate compression 2026-10-14
In a set family, replace a set containing by its deletion of only when that deletion is absent. This preserves cardinality and cannot increase maximum pairwise Hamming distance. If a new set and a retained set gave a larger distance, the retained set's deletion would already have been present; that deletion and the original uncompressed set would give the same distance. Repeated downward compressions yield a down-set.
For even positive , share the maximally entangled state . Each party applies a phase oracle from its input binary string, producing . Its overlap with is the displayed expression because the Hamming distance counts exactly the negative signs. Under the promise , the output either equals or is orthogonal to it. Sending one subsystem lets the receiver distinguish the cases with the projective measurement . The transmitted system needs qubits, including when is not a power of two.
Entropy bound for a Hamming ball 2026-10-06
For , the number of binary words within Hamming distance of a fixed word is at most , with the binary entropy function in natural logarithms. In , each summand weight for is at least . Also , so . These two bounds give the approximate-recovery denominator in the list-decoding Fano inequality.
Error-correcting code Created 2026-10-03 Updated 2026-10-14
An error-correcting code is a set of codewords chosen with enough separation to recover a transmitted message after specified errors. For equal-length words and bit-flip errors, separation is measured by Hamming distance. If the minimum distance is , any nonzero pattern of at most flips changes a valid word into an invalid word and can therefore be detected. Every pattern of at most flips can be corrected by choosing the unique nearby codeword.
The distinction matters. A distance-two code detects a single flip but need not locate it; a distance-three code corrects a single flip. The triangle inequality explains the correction threshold: a received word within distance of two distinct codewords would put those codewords within distance , a contradiction. Actual decoders also need an efficient way to find the nearby word; a parity-check matrix and syndrome decoding exploit the structure of a linear code to do this.
Hamming ball 2026-10-03
Hamming cube Created 2026-10-06 Updated 2026-10-07
The Hamming cube is , or equivalently , equipped with Hamming distance. Under its uniform probability measure, the distance from a fixed vertex has the binomial distribution with parameters . This converts geometric ball sizes into probability tails.
Hamming cube as an L1 and L2 metric Created 2026-09-28 Updated 2026-10-14
Use the convention for the Hamming cube . Its elements are length- binary strings, and their Hamming distance counts the differing coordinates:Send each binary string to the vector with the same coordinates, by . Every differing coordinate contributes both to the sum of absolute differences and to the sum of squared differences. Therefore the L1 norm and L2 norm give, respectively,This short coordinate calculation proves that the L1 norm gives an isometric embedding, while Euclidean distance grows like the square root of the number of changed binary digits. For example, and differ twice: their Hamming distance and Manhattan distance are , but their Euclidean distance is . Comparing binary strings in these two geometric representations answers different questions even though the points have the same coordinates.
For distinct pairs ranges over every integer from to . The metric embedding into the L2 norm thus has sharp ratiosNeighbors attain and opposite corners attain . This computes the bi-Lipschitz distortion of this coordinate map; it does not prove that every metric embedding into an L2 space has at least this bi-Lipschitz distortion. Uniformly multiplying the output coordinates changes and together and leaves unchanged.
The important family distinction is that these coordinate maps have no dimension-independent bound on their bi-Lipschitz distortion into the L2 norm, yet they do give a uniform coarse embedding of a family of metric spaces. Pad each output vector with zero coordinates to view all maps in the single l2 sequence space, an L2 space for counting measure. Then the same functionswork for every , and . Similarly, padding into the l1 sequence space gives common controls and exact preservation of Hamming distance. These claims use unnormalized Hamming distance; replacing it by normalized Hamming distance changes the family of source metrics.
The geometry has a practical origin: Hamming's 1950 paper uses the number of differing positions between binary strings to study error-correcting codes. Changing one binary digit moves to a neighboring corner, so a question about corrupted messages becomes a question about separation in the Hamming cube. [ref]
https://ineffectivetheory.com/edu/papers/hamming-codes-1950.pdf. R. W. Hamming, Error Detecting and Error Correcting Codes, 1950, Section 5
This Hamming distance on partitions identifies a group with its complement because exchanging the two group names does not change the partition. Complementation is an isometry of the ordinary Hamming distance, so minimizing over this two-element group action gives a quotient metric and preserves the triangle inequality. Negating a zero-one indicator is not complementation; with membership vectors, it is.
Hamming distortion Created 2026-09-24 Updated 2026-10-14
Hamming distortion is zero for a correctly reconstructed symbol and one for a mismatch. Its expected distortion is the symbol-error probability:For strings of length , separable distortion divides their Hamming distance by . Thus reconstructed as has Hamming distance one and average Hamming distortion . Counting only whether the whole string is correct would give a different criterion.
Hamming space 2026-10-14
The Hamming space of length over a finite field is the set equipped with Hamming distance, the number of coordinates at which two words differ. The Hamming weight of a word is its distance from zero.
Hopfield network Created 2026-10-14 Updated 2026-10-18
A recurrent network with symmetric interactions and an energy function. In the binary version, units take values , self-couplings are zero, and asynchronous threshold updates can retrieve stored patterns from incomplete or corrupted cues. Fixed points are local energy minima, which need not be the intended memories or global minima.
For a symmetric matrix of couplings with , define the energy landscapeThe factor removes double counting. The local input is . Choosing to agree with lowers this energy; this mathematical energy need not be a conserved physical quantity. Its pairwise form connects the model to the Ising model; competing couplings also motivate the comparison with a spin glass. Here retrieval seeks a useful nearby local minimum, so reaching the global minimum is not the goal.
John Hopfield's 1982 computer study stored random binary strings in neural networks of 30 and 100 units. Couplings were prepared from the stored patterns; asynchronous updates supplied the computational apparatus. Starting at each nominal memory, the readout counted Hamming distances after settling as storage load varied. Corrupted starting patterns separately tested recovery. Varying the load and cue damage exposed interference between memories. These simulations supported collective retrieval, not a measurement of biological memory capacity.[ref]
Neural networks and physical systems with emergent collective computational abilities by John Joseph Hopfield. 1982, pp. 2555–2557, storage Eq. 2, Fig. 2 and corrupted-start tests
Hopfield recall from a corrupted cue 2026-10-18
Store only with , zero thresholds, and Hebbian memory weights for a Hopfield network. If bits differ from , their Hamming distance is and . Squaring this sum and subtracting the diagonal terms yields the displayed energy. Thus gives .
For the cue , the first unit has input and flips to . The second then has and flips to , completing recall. The energy drops . Every cue with at most two wrong bits is corrected under a fair asynchronous schedule: a wrong bit sees the correct majority among the other four, while a correct bit either sees agreement or retains its value at a tie. The opposite pattern is also stored implicitly, so cues with at least three errors retrieve it. This is a limitation of this symmetric one-pattern construction.
An exact five-unit memory landscape and correction of two wrong bits
. Each point represents every state at the indicated Hamming distance; multiplicities count the states. Arrows follow two actual updates of the illustrated cue under asynchronous Hopfield energy descent. This is an original finite calculation. Details. Metric embedding Created 2026-09-28 Updated 2026-10-14
A metric embedding represents the points of one metric space inside another by an injective function . The geometric question is how faithfully the representation preserves pairwise distances. For example, binary strings can be treated as vectors so that tools from linear algebra become available, but the chosen norm determines what their separation means. A drawing of the points alone does not specify a metric embedding: both metrics matter.
An isometric embedding preserves every distance exactly. A metric embedding that is a bi-Lipschitz map allows multiplicative error while keeping its bi-Lipschitz distortion bounded over all pairs. A coarse embedding instead controls separation through possibly nonlinear functions of distance. These are different requirements: the Hamming cube as an L1 and L2 metric below preserves Hamming distance exactly in one representation and takes its square root in another.
The usefulness is that a complicated distance comparison becomes a calculation with familiar vectors and norms. This also helps assess a visualization: nearby points should not acquire arbitrarily large separations, and far-apart points should not collapse together. Matoušek's 2013 lecture notes describe how motivations from computer science, especially approximation algorithms, accelerated the study of metric embeddings from the 1990s onward. [ref]
Lecture notes on metric embeddings by Jiří Matoušek. Jiří Matoušek, Lecture notes on metric embeddings, preface and Section 1.1
Minimum distance of a code Created 2026-10-03 Updated 2026-10-14
The minimum distance of a code is the least Hamming distance between distinct codewords. For a linear code, translation invariance makes this equal to the least Hamming weight of a nonzero codeword.

