mathematics

And Yet Another Geometry Problem

Say, that you have a N-dimensional hypercube with the edge of 1 (unit).

You can then, of course, put 2^N spheres inside, each with a diameter of 1/2.

For example, eight 50 cm diameter spheres, inside a 1 meter cube, fit nicely. As four circles each of 50 cm  diameter fit well inside a unit square.

Now, you squeeze another sphere in the middle, touching every other of those 2^N spheres.

It has been recently noted, that the middle sphere can have a diameter bigger than 1!

Question No. 1: At which dimension X, does this (first) happen?

Question No. 2: At which dimension Y (if at any), the middle hypersphere has bigger hypervolume than that of its “encompassing” hypercube?

Question No. 3: How many 100 dimensional hyperspheres with the diameter of 2, can be squeezed (with no deformation) inside a 100 dimensional hypercube with the edge of 1?

Standard

2 thoughts on “And Yet Another Geometry Problem

  1. module DimVolume where

    import Data.Number.BigFloat

    type BigFloat50 = BigFloat Prec50

    (^.) :: Epsilon a => BigFloat a -> BigFloat a -> BigFloat a
    (^.) _ 0 = 1
    (^.) x y = x * ( x ^. (y-1))

    factorial :: (Eq n, Num n) => n -> n
    factorial 0 = 1
    factorial n = factorial (n – 1) * n

    kFromDim :: (Epsilon n) => Integer -> BigFloat n
    kFromDim dim
    | even dim = fromInteger dim / 2
    | otherwise = (fromInteger dim – 1) / 2

    radiusFromDim :: (Epsilon n) => Integer -> BigFloat n
    radiusFromDim dim = ((sqrt . fromInteger) dim – 1) / 4

    volume :: (Epsilon n) => Integer -> BigFloat n
    volume dim
    | kEven = (pi^.k / factorial k) * (r^.(2*k))
    | otherwise = ((2 * factorial k * (4 * pi) ^. k) / factorial (2 * k + 1)) * r^.(2*k + 1)
    where
    kEven = even dim
    k = kFromDim dim
    r = radiusFromDim dim

    main :: IO ()
    main = print (volume 1206 :: BigFloat50)

Leave a comment