1
$\begingroup$

There is a hypercube with sides of length 2 and a hypersphere with a radius of 1. Both of them are centered at the origin (the hypercube surrounds the hypersphere). Each of the d dimensions in the hypercube is divided into K segments, so that the hypercube is dissected into K^d “small” hypercubes. Which means, each of the small hypercubes h has volume (2/K)^d.

How do you classify each small hypercube h, into one of three categories: either it is wholly inside the hypersphere, wholly outside the hypersphere, or else the surface of the hypersphere passes through h.

Note: You cannot calculate the volume of the hypersphere to find out how many small hypercubes fit in the hypersphere of radius 1.

My approach has been to see which small hypercubes are entirely within a distance of 1 from the origin, but I don't know which coordinates of the small hypercube to use to compare against the unit distance from the origin.

$\endgroup$
0
$\begingroup$

Your setup is a bit strange, as the dissection into $K$ segments (in each direction) would yield a central segment (centered at the origin) when $K$ is odd and 2 segments on either side of the origin when $K$ is even.

Thus I'll restrict to $K$ being even only in my following answer. (An analogue could be given for $K$ being odd, for sure.)

For a small cube of side length $2/K$ being completely contained within the hypersphere the outermost vertex has to have a Pythagorean coordinates squared sum lower than 1. According to my previous restriction this gives

$$\sum_{i=1}^d (n_i\frac2K)^2 < 1$$

For a small cube of side length $2/K$ being completely outside the hypersphere the innermost vertex has to have a Pythagorean coordinates squared sum larger than 1. According to my previous restriction this gives

$$\sum_{i=1}^d ((n_i-1)\frac2K)^2 > 1$$

Thus you'd just have to check all $d$-tuples with each position number $-K/2 \leq n_i \leq K/2$ whether it would belong to the first case (inside), the second case (outside), or else (somehow hitting the hypersphere).

--- rk

$\endgroup$
4
  • $\begingroup$ Apologies for the confusion. I meant what your answer assumed (that the big hypercube is split up into smaller hypercubes of sides 2/K.). Why wouldn't the same solution work for K being odd? $\endgroup$ – dbrunson Dec 2 '18 at 17:24
  • $\begingroup$ @dbrunson: if $K$ would be odd, then the position index does not happen to be the outermost coordinate (up to size scaling), because there is a tiny cube centered at the origin. Thus you'd need for halved position numbers. (Not impossible, just ugly.) $\endgroup$ – Dr. Richard Klitzing Dec 3 '18 at 18:05
  • $\begingroup$ When you start going to the "left" of the origin (using negative values of n), the n-1 value becomes more negative making the innermost vertex distance larger right? How do you account for going in the negative direction of the dimension? $\endgroup$ – dbrunson Dec 4 '18 at 20:51
  • $\begingroup$ Also, I'm having trouble visualizing how I would check all d-tuples with each position number. Explanation for 2 dimensional object would be helpful. $\endgroup$ – dbrunson Dec 5 '18 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.