The peg problem asks whether a round peg in a square hole fits better than a square peg in a round hole. This compares the ratio of the area
of a circle to its circumscribed square with the ratio of the area
of a square to its circumscribed circle. In two dimensions,
the ratios are
and
, respectively. Therefore,
a round peg fits better into a square hole than a square peg fits into a round hole
(Wells 1986, p. 74).
This result holds in dimensions . For
, the
-hypercube fits more closely into the
-ball than vice versa, while the two
ratios are equal for
(Singmaster 1964; Wells 1986, p. 74). This can be demonstrated by noting that
the formulas for the content
of the unit
-ball, the content
of its circumscribed hypercube, and the content
of its inscribed hypercube are given by
|
(1)
| |||
|
(2)
| |||
|
(3)
|
where is the gamma
function. The ratios in question are then
|
(4)
| |||
|
(5)
|
(Singmaster 1964). The ratio of these ratios is
|
(6)
|
illustrated above, where the dimension has been treated as a continuous quantity. This ratio crosses
1 at the value
(OEIS A127454), which must be determined numerically.
As a result, a round peg fits better into a square hole than a square peg fits into
a round hole only for integer dimensions
.