18 Comments
Oct 27, 2023·edited Oct 27, 2023Liked by Zach Wissner-Gross

A slight modification to the sphere-stacking problem makes it really interesting! If you have only N spheres, what's the maximum tower height, as a function of N? (because, as JBL noted, with infinite spheres the tower can be made arbitrarily high.)

Spoilers below to my approach for this modification.

First, we can reduce this to stacking semicircles instead of hemispheres, which is equivalent by symmetry, and easier to work with. Also, set the bottom sphere to have R=1. First, I'll consider N=2: one more semicircle, on top of the R=1 one. Let's set it so that it rests on the lower semicircle at an elevation angle of A, i.e. the coordinates of the intersection point are (cos A, sin A). Clearly the radius of the upper semicircle is cos A, and its parametric form is (cos A cos t, cos A sin t + sin A). This is of the form (r*cos t, r*sin t + y0). This y-coordinate is maximized at t = pi/2 with a value of (cos A + sin A). So to solve this for N = 2, we need to pick A to maximize (cos A + sin A). This is simple to do, but let me dig a bit deeper (it'll be useful later). Maximizing (cos A + sin A) is equivalent to picking the point on the unit circle whose Cartesian coordinates sum to a maximum (since a unit circle is parameterized by (cos A, sin A)). This maximum occurs at A = asin(1/sqrt(2)) = pi/4, with a value of 2/sqrt(2).

Okay, on to N = 3. I'll again form the parametric equations for the stacked semicircles. The angle B will define where on the middle semicircle the top semicircle will be placed. From the previous part, the parametric equation for the middle semicircle is (cos A cos t, cos A sin t + sin A), so the point of intersection is at t = B -> (cos A cos B, cos A sin B + sin A). The new semicircle will clearly have radius cos A cos B, and will be shifted vertically up from the origin by a distance of (cos A sin B + sin A). The parameterized y-coordinate will be (cos A cos B) sin t + (cos A sin B + sin A), which is of the form (r*sin t + y0). Anyway, this is obviously maximized at t = pi/2, so now we need to pick A and B to maximize the following:

cos A cos B + cos A sin B + sin A

Now, this looks a lot like the Cartesian definition of spherical coordinates (just with the sines and cosines flipped, which is an equivalent way to parametrize a sphere, just with shifted bounds on the parameters. Proof left as an exercise for the reader). So now, we need to find the point on the unit sphere that maximizes X + Y + Z. Skipping the formal proof, this occurs when X = Y = Z, and so X = Y = Z = 1 / sqrt(3). Solving for A and B, we have A = asin(1/sqrt(3)) and B = asin(1/sqrt(2)) = pi/4, but more importantly, the value of the maximum, and the height of the highest N = 3 stack, is 3 * 1/sqrt(3); the sum of the Cartesian components of that maximizing point on the unit sphere.

The last step here is to demonstrate that increasing N gives an expression for the height of the stack that's equivalent to finding the maximum sum of the Cartesian coordinates of a point on a (N-1)-sphere. This value is N * 1/sqrt(N), or sqrt(N). This is the highest the stack can be with N semicircles, which grows without bound as N -> infinity.

Expand full comment
Oct 27, 2023Liked by Zach Wissner-Gross

Oh the extra credit is funny because there's a discontinuity at the upper limit, right? Let's say we take a strategy where we always put the new cap with radius c times the old radius (with 0 < c < 1). Then by similarity we have that the height we get in the end satisfies

f(R) = sqrt(R^2 - c^2 R^2) + f(c * R) = R * sqrt(1 - c^2) + c * f(R),

and hence

f(R) = R * sqrt(1 - c^2) / (1 - c) = R * sqrt( (1 + c) / (1 - c) ).

The thing about this function is that it grows to infinity as c approaches 1 from below. So no fixed strategy like this is optimal; instead, we should keep taking successively smaller ratios, and if we do that then our tower will grow without bound.

Expand full comment
Oct 27, 2023Liked by Zach Wissner-Gross

I computed the median number of minutes to get caught at 7. I think this is a much more meaningful metric in this case than average... but to each their own.

Expand full comment
Oct 28, 2023Liked by Zach Wissner-Gross

I understand the one chosen by Elephant Party is the Speaker and the other parties do not account for voting in our problem. And if those in Elephant Party choose a majority, is this the most votes or an absolute majority (50% or more)?

Expand full comment
Oct 28, 2023Liked by Zach Wissner-Gross

More extra credit solves than the regular puzzle, fun! Does that happen often?

Expand full comment

at the scale of the elephant party, 221/3 ≈ 74 is so far away from the threshold for a majority (111), we basically won't see one. so, to good approximation, voting will last for (num candidates - 1) rounds. would be interesting in a state senate, or an HOA...

Expand full comment

If anyone does this Fiddler with R, they definitely want to use lower.tail = FALSE. At least, if they don't want to get exactly 2.

Expand full comment