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
Past exam of the mathematics course of the University of Cambridge 2021 iii Paper 155 1 Solution Created 2026-09-28 Updated 2026-10-14
A coarse embedding has nondecreasing control functions such thatA family is a uniform coarse embedding of a family of metric spaces when all its maps use the same controls.
For with the Hamming distance, the coordinate map into satisfiesso the cubes embed isometrically and uniformly into . The same coordinate map into satisfiesThus they also uniformly coarsely embed into , with . This is the Hamming cube as an L1 and L2 metric.
For a finite graph , defineAn expander family is a sequence of graphs with orders tending to infinity, uniformly bounded degrees, and uniformly bounded below.
Now let and let be a median of . PutBoth supports have at most vertices. The layer cake representation and the definition of giveand the same holds for . Since their supports are disjoint,Adding givesThe triangle inequality also givesand henceRepresent an -valued map as scalar functions on the underlying measure space and integrate this inequality. The result is the L1 Poincare inequality for an expander graph.
Suppose next that is -regular and is noncontracting with Lipschitz constant . The Poincare inequality givesA ball of radius in a graph of maximum degree has at mostvertices. Therefore, forat least vertices lie outside the radius- ball about each vertex. Integrating the tail count of the distance givesConsequently every such haswhich proves the L1 distortion lower bound for an expander graph.
Finally, suppose an expander family admitted uniform coarse embeddings into . Embedded edges have length at most , whereas the preceding Poincare argument and the fact that at least half the ordered pairs have distance comparable to implyThis contradicts . Thus expanders do not uniformly coarsely embed into . They do not uniformly coarsely embed into either: a Hilbert space embeds isometrically into an space byso an coarse embedding would produce an one. This is the expander graph obstruction to uniform coarse embedding.
