Chapter 71
Can You Crack The Case Of The Crystal Key?
Riddler Classic
The crystal key is a polyhedron with exactly six edges, five of them inch long; the sixth edge is whatever makes the volume largest. What is that volume?
Solution
Six edges force a tetrahedron, and five unit edges mean two of its faces are unit equilateral triangles sharing a common edge; only the remaining “hinge” edge (joining the two apexes) is free. Take one triangle as the base, with area , and swing the other about the shared edge: where is the height of the apex of the second triangle above the base plane. That apex lies at distance (the triangle’s own height) from the hinge, so its height is largest, equal to , exactly when the second face stands perpendicular to the base. Then Equivalently, writing the volume in terms of the hinge length, , which peaks at , again giving . (Contrast the four-unit-edge key, whose maximum was the smaller .)
The computation
Fix five edges at , leave the sixth free, and maximise the Cayley–Menger volume over that one length.
import numpy as np
from itertools import combinations
from scipy.optimize import minimize_scalar
edges = [frozenset(e) for e in combinations(range(4), 2)]
def vol(x, free):
d = {**{e: 1.0 for e in edges}, edges[free]: x}
M = np.ones((5, 5)); M[0, 0] = 0
for i in range(4):
for j in range(4):
M[i + 1, j + 1] = 0 if i == j else d[frozenset((i, j))]**2
return np.sqrt(max(np.linalg.det(M) / 288, 0))
best = max(-minimize_scalar(lambda x: -vol(x, f),
bounds=(0.01, 1.73), method='bounded').fun for f in range(6))
print(best) # 0.125 = 1/8