Computing distances between hyperspheres and sides of a hypercube?

238 Views Asked by At

Suppose you are given the $n$ dimensional hypersphere:

$$\left(x_1 - \frac{1}{2}\right)^2 + \left(x_2 - \frac{1}{2}\right)^2 +\ldots+ \left(x_n - \frac{1}{2}\right)^2 = \frac{n}{4}$$

And the hyperplane:

$$a_1x_1 + a_2x_2 + a_3x_3+\ldots+a_nx_n = c$$

Such that they intersect to form an $n-1$ dimensional hypersphere.

How do you compute the average distance of the surface of this hypersphere from the hyperfaces of the cube:

$$0 \le x_1, x_2, x_3,\dots, x_n \le 1$$

Here hyper surface can be defined as any surface of dimension lower than the original cube itself.

For example

We can consider the circle formed by intersecting:

$$\left(x_1 - \frac{1}{2}\right)^2 + \left(x_2 - \frac{1}{2}\right)^2 + \left(x_3 - \frac{1}{2}\right)^2 = \frac{3}{4}$$

$$x + y + z = 1$$

and then we want to compute the average distance of the points of this sphere to the cube

$$0 \le x_1, x_2, x_3 \le 1 $$