Library · The Fiddler: Solutions · Chapter 137

Iceberg, Right Ahead!

Revised Report an error

A large iceberg is a perfect cube. Because ice is less dense than water, 1010 percent of its mass sits above sea level and 9090 percent below. In its “optimal” orientation, the iceberg’s centre of mass is as deep below the water as possible. In that orientation, its highest point is a distance xx above sea level and its lowest point a distance yy below. What is the ratio x/yx/y?

The Fiddler, Zach Wissner-Gross, November 3, 2023(original post)

The official solution appeared in the post of November 10, 2023 and gives 1/91/9 for the main puzzle and about 0.243470.24347 for the Extra Credit. Both agree with the answers below.

Solution

Take the cube to have side 11, with its centre at the origin. Whatever the orientation, the sea level is the horizontal plane that leaves exactly 10%10\% of the cube’s volume above it. The centre of mass is the centre of the cube, so its depth is just the distance hh from the centre up to that plane. If the cube’s highest point is ww above the centre, its lowest point is ww below it, by symmetry, and so x  =  w−h,y  =  w+h.x \;=\; w - h, \qquad y \;=\; w + h . The question is which way up makes hh largest. The natural candidates are the three most symmetric ones.

Face up. The top 10%10\% is a slab 0.10.1 thick, so the water is 0.40.4 above the centre: h=0.4h = 0.4 and w=0.5w = 0.5.

Edge up. Every cross-section across the top edge is a square of side 11 standing on a corner, so the part above water is a prism whose end is a right-angled isosceles triangle. With legs cc, its volume is 12c2⋅1=0.1\tfrac12 c^2 \cdot 1 = 0.1, so c=0.2≈0.447c = \sqrt{0.2} \approx 0.447, and the triangle’s height is c/2≈0.316c/\sqrt2 \approx 0.316. The top edge is w=2/2≈0.707w = \sqrt2/2 \approx 0.707 above the centre, so h≈0.707−0.316=0.391h \approx 0.707 - 0.316 = 0.391.

Vertex up. The part above water is a corner of the cube: a pyramid with three mutually perpendicular edges of length cc meeting at the top, of volume c3/6=0.1c^3/6 = 0.1, so c=0.61/3≈0.843c = 0.6^{1/3} \approx 0.843. Its height above the waterline is c/3≈0.487c/\sqrt3 \approx 0.487. (The pyramid’s base is an equilateral triangle of side c2c\sqrt2, whose centre is c2/3c\sqrt{2/3} from each corner, and Pythagoras gives the height.) The top vertex is w=3/2≈0.866w = \sqrt3/2 \approx 0.866 above the centre, so h≈0.866−0.487=0.379h \approx 0.866 - 0.487 = 0.379.

Cross-sections through the centre (dot) for the face-up and edge-up orientations, with the water shaded. The face-up cube floats with its centre deeper.
Cross-sections through the centre (dot) for the face-up and edge-up orientations, with the water shaded. The face-up cube floats with its centre deeper.

The vertex-up orientation, which looks the most “keel-like”, is the worst of the three. The reason is that a corner is a narrow place to cut: to put 10%10\% of the ice above water through a small triangular cross-section, the cut must come low, near the centre. Face up, the exposed ice is spread over a whole face, so a thin slab is enough and the waterline sits high above the centre. That the face-up orientation beats every tilted one, not just these three, is harder to prove by hand than it looks (the official write-up calls the proof “a beast”), and it is settled here by the computation below, which checks every orientation and finds none with hh above 0.40.4. So the iceberg floats face up, with x=0.1x = 0.1 and y=0.9y = 0.9:  xy  =  19. \boxed{\ \frac{x}{y} \;=\; \frac19 . \ } The ratio is the same as the ratio of the volumes above and below water, as it must be for a slab.

The computation

The check searches over the directions that could point straight up. For each direction it finds the waterline by bisection, using an exact formula for the volume of the part of a cube on one side of a plane (inclusion and exclusion over the corners the plane has passed), and records how deep the centre sits. By symmetry it is enough to search one eighth of the directions, on a grid of 199×199199 \times 199 angles that stops just short of the faces, where the formula would divide by zero.

from itertools import combinations
from math import acos, cos, degrees, pi, sin

def below(n, s):
    """Volume of the unit cube [0,1]^3 with n.u <= s, for a
    direction n with positive parts (inclusion-exclusion over
    the corners the plane has passed)."""
    a, b, c = n
    total = 0.0
    for k in range(4):
        for S in combinations(n, k):
            total += (-1) ** k * max(0.0, s - sum(S)) ** 3
    return total / (6 * a * b * c)

def depth(n):
    """Depth of the cube's centre below the water when n
    points straight up: find the plane leaving 10% of the
    cube above it, by bisection, and measure from the centre."""
    lo, hi = 0.0, sum(n)
    for _ in range(60):
        mid = (lo + hi) / 2
        if below(n, mid) < 0.9:
            lo = mid
        else:
            hi = mid
    return (lo + hi) / 2 - sum(n) / 2

best = (0.0, None)
K = 200                         # directions per angle
for i in range(1, K):
    for j in range(1, K):
        t, p = pi / 2 * i / K, pi / 2 * j / K
        n = (sin(t) * cos(p), sin(t) * sin(p), cos(t))
        best = max(best, (depth(n), n))
d, n = best
r = 3 ** -0.5
print(f"vertex up: centre depth {depth((r, r, r)):.4f}")
tilt = degrees(acos(max(n)))    # angle from nearest face
print(f"deepest centre found: {d:.4f}, {tilt:.2f} degrees"
      " from straight face-up")

It prints

vertex up: centre depth 0.3791
deepest centre found: 0.4000, 0.45 degrees from straight face-up

The deepest centre on the grid is at the grid point closest to a face, and its depth rounds to the face-up value 0.40.4.

Extra Credit

Now the iceberg is a perfect sphere, with 10%10\% of its volume above sea level. What is the ratio x/yx/y now?

Solution

A sphere looks the same every way up, so there is nothing to optimise. Take radius 11. The part above water is a cap of height xx, and a cap of height xx on a unit sphere has volume π3x2(3−x)\tfrac{\pi}{3} x^2 (3 - x). (Add up circular slices: at height zz above the centre the slice has area π(1−z2)\pi(1 - z^2), and integrating from 1−x1 - x to 11 gives this.) Setting it equal to a tenth of 43π\tfrac43\pi, x2(3−x)  =  25,orx3−3x2+25=0.x^2 (3 - x) \;=\; \tfrac25 , \qquad\text{or}\qquad x^3 - 3x^2 + \tfrac25 = 0 . This cubic has a neat exact solution. Put x=1+zx = 1 + z to remove the square term: z3−3z−85=0z^3 - 3z - \tfrac85 = 0. The identity sin⁡3ψ=3sin⁡ψ−4sin⁡3ψ\sin 3\psi = 3\sin\psi - 4\sin^3\psi says that z=−2sin⁡ψz = -2\sin\psi turns z3−3zz^3 - 3z into 2sin⁡3ψ2\sin 3\psi, so the equation becomes sin⁡3ψ=45\sin 3\psi = \tfrac45. The root with xx between 00 and 22 comes from 3ψ=arcsin⁡453\psi = \arcsin\tfrac45: x  =  1−2sin⁡ ⁣(13arcsin⁡45)  ≈  0.39160,x \;=\; 1 - 2\sin\!\left(\tfrac13 \arcsin\tfrac45\right) \;\approx\; 0.39160, y  =  2−x  ≈  1.60840,y \;=\; 2 - x \;\approx\; 1.60840 ,  xy  ≈  0.24347. \boxed{\ \frac{x}{y} \;\approx\; 0.24347 . \ } So although only a tenth of the sphere’s volume is above water, a fifth of its height is: the top of a sphere is thin, so it takes a tall cap to hold a tenth of the volume.

The computation

This check does not use the cap formula. It adds up thin circular slices of the ball directly to measure the share above a given waterline, and bisects for the waterline that leaves exactly 10%10\% above.

def cap_fraction(x, slices=20000):
    """Share of a unit ball's volume above the plane at height
    1 - x, adding up thin circular slices of area pi(1-z^2)."""
    dz = x / slices
    vol = sum(pi * (1 - (1 - x + (k + 0.5) * dz) ** 2) * dz
              for k in range(slices))
    return vol / (4 / 3 * pi)

lo, hi = 0.0, 1.0
for _ in range(50):
    mid = (lo + hi) / 2
    lo, hi = (mid, hi) if cap_fraction(mid) < 0.1 else (lo, mid)
x = (lo + hi) / 2
print(f"extra credit: x = {x:.5f}, x/y = {x / (2 - x):.5f}")

It prints

extra credit: x = 0.39160, x/y = 0.24347
Report an error on this page

Reports are stored by Netlify. See the privacy note.