Patterns Produced by Hamming Distance

Initializing live version
Download to Desktop

Requires a Wolfram Notebook System

Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.

In a bit sequence of length , each bit is either 0 or 1. The Hamming distance between two bit sequences is the number of bits in which they differ.


This Demonstration constructs a graph by placing vertices uniformly around the unit circle beginning with the vertex at . List the bit sequences in base-2 order at the vertices going counterclockwise. Two vertices are connected with an edge if the Hamming distance between their corresponding bit sequences is (the value of the lower control).

Some of the patterns created are remarkable.


Contributed by: Chris Boucher (July 2020)
Open content licensed under CC BY-NC-SA



Feedback (field required)
Email (field required) Name
Occupation Organization
Note: Your message & contact information may be shared with the author of any specific Demonstration for which you give feedback.