MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $E^n$ be a Hamming cube of dimension $n$, and $\phi$ be a mapping from $E^n$ to $E^n$ that preserves Hamming distance, i.e. $d(x,y)=d(\phi (x),\phi (y))$. The question is the following: show that $\phi$ can only be constructed as a permutation of coordinates plus a constant vector, i.e. $\phi (x)=\pi (x)+v$, where $\pi \in S_n$ and $v\in E^n$.

share|cite|improve this question
category-theory? Must be a better tag.... – Gerry Myerson Apr 9 '13 at 12:14
up vote 2 down vote accepted

This might not be research-level, but here's an answer anyway. I'll take the cube to be $\{0,1\}^n$. Let an isometry $\phi$ be given. Adding a constant vector, if necessary, we can assume that $\phi(\vec0)=\vec 0$. Then the unit vectors (the vectors with exactly one component equal to 1), being the vectors at distance 1 from $\vec 0$, are mapped to each other, in a one-to-one way. That gives us a permutation $\pi$ of the coordinate positions. Finally, to show that $\phi$ acts on all vectors $\vec v$ by permuting components according to $\pi$, proceed by induction on the number of non-zero components of $\vec v$, taking into account which vectors with fewer 1's are at distance 1 from $\vec v$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.