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.