We construct a bi-Lipschitz bijection from the Boolean cube to the Hamming ball of equal volume. More precisely, we show that for all even n ∈ N there exists an explicit bijection ψ: {0, 1} n → {x ∈ {0, 1} n+1 : |x| > n/2} such that for every x ≠ y ∈ {0, 1} n , $$\frac{1}{5} \leqslant \frac{{dis\tan ce\left( {\psi \left( x \right),\psi \left( y \right)} \right)}}{{dis\tan ce\left( {x,y} \right)}} \leqslant 4,$$ where distance(·, ·) denotes the Hamming distance. In particular, this implies that the Hamming ball is bi-Lipschitz transitive.
This result gives a strong negative answer to an open problem of Lovett and Viola (2012), who raised the question in the context of sampling distributions in low-level complexity classes. The conceptual implication is that the problem of proving lower bounds in the context of sampling distributions requires ideas beyond the sensitivity-based structural results of Boppana (1997).
We study the mapping ψ further and show that it (and its inverse) are computable in DLOGTIME-uniform TC0, but not in AC0. Moreover, we prove that ψ is “approximately local” in the sense that all but the last output bit of ψ are essentially determined by a single input bit.