COMPUTING SCIENCE

# An Adventure in the *N*th Dimension

On the mystery of a ball that fills a box, but vanishes in the vastness of higher dimensions

# The Master Formula

An *n*-ball of radius 1 (a “unit ball”) will just fit inside an *n*-cube with sides of length 2. The surface of the ball kisses the center of each face of the cube. In this configuration, what fraction of the cubic volume is filled by the ball?

The question is answered easily in the familiar low-dimensional spaces we are all accustomed to living in. At the bottom of the hierarchy is one-dimensional geometry, which is rather dull: Everything looks like a line segment. A 1-ball with *r*=1 and a 1-cube with *s*=2 are actually the same object—a line segment of length 2. Thus in one dimension the ball completely fills the cube; the volume ratio is 1.0.

In two dimensions, a 2-ball inside a 2-cube is a disk inscribed in a square, and so this problem can be solved with one of my childhood formulas. With *r*=1, the area π*r*^{2} is simply π, whereas the area of the square, *s*^{2}, is 4; the ratio of these quantities is about 0.79.

In three dimensions, the ball’s volume is 4/3π, whereas the cube has a volume of 8; this works out to a ratio of approximately 0.52.

On the basis of these three data points, it appears that the ball fills a smaller and smaller fraction of the cube as *n* increases. There’s a simple, intuitive argument suggesting that the trend will continue: The regions of the cube that are left vacant by the ball are the corners. Each time *n* increases by 1, the number of corners doubles, so we can expect ever more volume to migrate into the nooks and crannies near the cube’s vertices.

To go beyond this appealing but nonquantitative principle, I would have to calculate the volume of *n*-balls and *n*-cubes for values of *n* greater than 3. The calculation is easy for the cube. An *n*-cube with sides of length *s* has volume *s*^{n}. The cube that encloses a unit ball has *s*=2, so the volume is 2^{n}.

But what about the *n*-ball? As I have already noted, my early education failed to equip me with the necessary formula, and so I turned to the Web. What a marvel it is! (And it gets better all the time.) In two or three clicks I had before me a Wikipedia page titled “Deriving the volume of an *n*-ball.” Near the top of that page was the formula I sought:

Later in this column I’ll say a few words about where this formula came from, both mathematically and historically, but for now I merely note that the only part of the formula that ventures beyond routine arithmetic is the gamma function, Γ, which is an elaboration on the idea of a factorial. For positive integers, Γ(*n*+1)=*n*!=1×2×3×...×*n*. But the gamma function, unlike the factorial, is also defined for numbers other than integers. For example, Γ(½) is equal to the square root of π.

EMAIL TO A FRIEND :

**Of Possible Interest**

**Spotlight**: Briefings

**Computing Science**: Belles lettres Meets Big Data

**Technologue**: Quantum Randomness