From a long time ago, I remember a puzzle asking for the common area available to four cows: each cow is attached to a different corner of a square with a rope that has the same length as the sides of the square.

One of several 'cow problems' and in this case, it's just the area of intersection of four unit circles, with centers on the four corners of a unit square. Through either geometry or calculus, the area is found to be $1+\pi/3-\sqrt{3}$.

The higher-dimensional analogue could be to ask for the volume of intersection of eight unit spheres, with centers on the eight corners of a unit cube. You could describe it as the 'fly zone' of eight flies, attached to... etc.

Geometry-wise it's not as simple to sketch/imagine the solid in question and calculus-wise, it's not that simple to set up the right integral. At least not to me, any ideas? Or is this a known problem, if someone has a reference?

Addendum: and I guess you could even try generalizing this to the volume of intersection of hyperspheres on the vertices of a hypercube, but I'd already be happy with some input on the 3D-case :-).

  • $\begingroup$ I'm pretty sure that by symmetry the intersection looks like a rounded octahedron. It's the union of 8 disjoint congruent pieces, one of which is the portion of the unit sphere centered at $(0,0,0)$ that lies in the region $x,y,z\ge1/2$. $\endgroup$
    – user856
    Feb 25, 2015 at 14:39
  • $\begingroup$ This was a problem on the Missouri State University problem site many years ago. The archive problem is here The 3D case is a mess. The 4D case is easy, but the link to the solution is broken. $\endgroup$ Feb 25, 2015 at 15:16
  • $\begingroup$ Thanks. The exact answer appears to be $\sqrt{2}+9 \arctan{(\sqrt{2}/5)}-1-11\pi/12 \approx 0.0152$, confirming the numerical simulation of Michael Lugo below. $\endgroup$
    – StackTD
    Feb 25, 2015 at 15:24
  • $\begingroup$ Based on the website linked above, that would be: this $\endgroup$
    – StackTD
    Feb 25, 2015 at 15:32

1 Answer 1


Of course it should be possible to do this analytically, but let's look for an answer by simulation. In R, we can get the answer to the square question as follows:

n = 10^8
x = runif(n, 0, 1)
y = runif(n, 0, 1)
d1 = x^2+y^2
d2 = (1-x)^2+y^2
d3 = x^2+(1-y)^2
d4 = (1-x)^2+(1-y)^2
sum(d1<1 & d2<1 & d3<1 & d4<1)/n

x and y are vectors of $10^8$ random points in the unit square; d1 is the vector of squares of distances to (0, 0), d2 the vector of squares of distances to (1, 0), and so on. The final line sums the number of such points for which all these are less than 1 and divides by the total number of points. (I take the square of the distance in order to not have to find square roots.)

This returns 0.3150778. To the same accuracy, $1 + \pi/3 - \sqrt{3} = 0.3151467$; thus the general approach checks out.

Now let's step it up to three dimensions:

n = 10^8
x = runif(n, 0, 1)
y = runif(n, 0, 1)
z = runif(n, 0, 1)
d1 = (x^2+y^2+z^2)
d2 = ((1-x)^2+y^2+z^2)
d3 = (x^2+(1-y)^2+z^2)
d4 = ((1-x)^2+(1-y)^2+z^2)
d5 = (x^2+y^2+(1-z)^2)
d6 = ((1-x)^2+y^2+(1-z)^2)
d7 = (x^2+(1-y)^2+(1-z)^2)
d8 = ((1-x)^2+(1-y)^2+(1-z)^2)
sum(d1<1 & d2<1 & d3<1 & d4<1 & d5<1 & d6<1 & d7<1 & d8<1)/n

We get a much smaller answer: 0.01520354. This should be accurate to four decimal places or so, given the accuracy of the simulation.

As it turns out, these are the only two cases where your problem has a nontrivial answer! In n dimensions the distance between two opposite corners of the unit $n$-cube, say $(0, 0, \ldots, 0)$ and $(1, 1, \ldots, 1)$, is $\sqrt{n}$. If $n \ge 4$ then this distance is at least 2. So in four dimensions the center of the cube is the only point which is at distance 1 or less from all corners; in five or higher dimensions there are no such points.

  • 1
    $\begingroup$ Thanks for your input! I expected the (area &) volumes to decrease but I hadn't thought about it the way you put it now: interesting to see that there are only a few non-trivial cases. But I am indeed looking / hoping for an analytical approach to derive the exact volume (either purely geometrical and/or through calculus). $\endgroup$
    – StackTD
    Feb 25, 2015 at 15:18
  • $\begingroup$ It would be interesting to know the cube answer exactly, or if anyone can use their 'cow' type problems to answer this recent question that would be good! math.stackexchange.com/questions/4050628/… ... and the 3D version could be extended to 'missing volume' $\endgroup$ Mar 7, 2021 at 10:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .