Skip to content

Why hypercubes look spiky

Posted on:

If you’ve flipped through a textbook on high-dimensional probability or geometry, you’ve seen the obligatory drawing of an nn-dimensional cube. It is usually rendered as a strange spiky object: a sea urchin, a thorny diamond, a star with way too many points. Why does the high-dimensional cube get drawn like that?

Some of it is concentration of measure, but there is a much simpler counting argument behind a particular family of these drawings. It is just the binomial coefficient in disguise.

Counting corners

The unit cube in nn dimensions is the set [0,1]n[0,1]^n. Its corners are the points where every coordinate is either 00 or 11. There are exactly 2n2^n of them.

Now group the corners by Hamming weight, the number of coordinates equal to 11. Define

C  =  #{corners with  1s and n 0s}.C_\ell \;=\; \#\{\text{corners with $\ell$ $1$s and $n - \ell$ $0$s}\}.

How many such corners are there? You’re picking which \ell of the nn slots get the 11, so

C  =  (n).C_\ell \;=\; \binom{n}{\ell}.

That is the punchline: the level distribution of cube corners is exactly the binomial coefficient.

What does (n)\binom{n}{\ell} look like?

A bell. Peaked at =n/2\ell = n/2, symmetric around it, with C0=Cn=1C_0 = C_n = 1 at the extremes and Cn/22n/πn/2C_{\lfloor n/2 \rfloor} \approx 2^n / \sqrt{\pi n / 2} in the middle.

For large nn, the de Moivre–Laplace theorem (a classical, pre-CLT special case of the central limit theorem) gives

(n)    2nπn/2exp ⁣(2(n/2)2n).\binom{n}{\ell} \;\approx\; \frac{2^n}{\sqrt{\pi n / 2}} \exp\!\left(-\frac{2(\ell - n/2)^2}{n}\right).

In other words, the count of corners at level \ell, viewed as a function of \ell, converges to a Gaussian with mean n/2n/2 and variance n/4n/4.

Drawing the cube

Now suppose we draw the cube on a 2D page. One natural convention: stack the levels vertically and draw each level as a horizontal band whose width is proportional to CC_\ell.

For small nn this is a chunky diamond. For large nn it is a vertical bell curve, narrow at the top and bottom (only one corner each, at =0\ell = 0 and =n\ell = n) and bulging in the middle. The ratio between the middle width and the tip width is (nn/2)\binom{n}{\lfloor n/2 \rfloor}, which is roughly 2n/n2^n / \sqrt{n}, exponentially huge.

Try it yourself. Slide nn and watch the chunky diamond at n=4n = 4 sharpen into a needle-tipped spindle:

n = 82n corners = 256peak Cn/2⌋ = 70

That’s the spike. The drawing has sharp points at the top and bottom because there is exactly one corner at each end, and a dramatic bulge in the middle because the binomial is dramatic about its peak. As nn grows, the tips become invisibly thin while the middle balloons out.

A few observations follow immediately:

References

Versions of the spiky-cube drawing appear all over high-dimensional probability and data-science texts. A few good places to look:

The drawings vary author to author, but the underlying combinatorics is always the same: corners count as a binomial, and a binomial peaks sharply.



Previous Post
Central Limit Theorem - why sums become Gaussian
Next Post
Optimal message passing on sparse graphs