Hamming cube as an L1 and L2 metric
ID: hamming-cube-as-an-l1-and-l2-metric
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
New to topics? Read the docs here!
