现充|junyu33

What is the radius of the smallest ball that can contain three unit cubes?

In 2018, I wrote a math exam and left this as a bonus problem.

Arrange three unit cubes so that their interiors do not overlap. They may float freely in space. What is the smallest radius of a ball that can contain all three?

Back then, I suspected the optimal arrangement was T-shaped, but I couldn't prove it. Eight years later, GPT-6.2 Astra finally confirmed it.

The problem

As stated above, we want to fit three cubes of side length 1 inside the smallest possible ball. The rules are simple.

Find the minimum radius of a ball that contains all three cubes.


For a single cube, the answer is half its space diagonal, 32. The case n=2 is also easy to picture. Put two cubes face to face and you get a radius of 62. The next section shows that this is optimal.

Things get more interesting when n=3. An L-shaped arrangement gives a natural candidate, shown on the left below.

alt text

Its radius is (1/2)2+12+12=3/2. The T-shaped arrangement on the right does better. A little middle-school geometry gives its radius. Let x be the distance from the ball's center to the top cube. Equating the two radii in the cross-section gives

(x+1)2+(1/2)2=12+(1−x)2

Solving gives x=3/16, so the radius is (x+1)2+(1/2)2+(1/2)2=48916. That was the best arrangement I found in eighth grade.

I had no proof that this was optimal, so I put it on the exam as a bonus question and scored it as follows.

Give enough information to determine the positions of the three cubes, such as the coordinates of four noncoplanar points, together with the center and radius of the ball. After checking which solutions are valid, rank them from smallest to largest radius and award points according to

score=10×2−rank+1

In other words, first place gets 10 points, second place 5, third place 2.5, and so on.

As for how the scoring worked in practice, there wasn't a single submission. Ninth grade was around the corner, and even the distance between two points in space was outside the syllabus. Nobody felt like taking on my bonus problem.

Back to the problem. Here's how it was solved eight years later.

The case n = 2

The obvious candidate is the 2×1×1 box obtained by placing two cubes side by side. It has radius 12+(12)2+(12)2=62. Here's why no smaller radius than 62 is possible.

The ball's center cannot be in the interior of both cubes, so choose a cube whose interior excludes it. In that cube's own coordinate system, at least one coordinate differs from the ball's center by a distance ≥12. Take the farther face along that coordinate and the difference is $ \ge 1$.

For each of the other two coordinates, take the max of the distances to the two endpoints of the unit interval. Each is ≥12. These choices give a single vertex at distance ≥12+(12)2+(12)2=62 from the ball's center.

Vu-Le's breakthrough for three squares in the plane

An important breakthrough came this September. The-Anh Vu-Le formalized the optimal packing of three unit squares in a disk in Lean 4 and published the main results and an outline of the proof on his website.

Here's the idea. As in three dimensions, the T-shaped arrangement is the candidate for the optimum. Its enclosing radius is

(19/16)2+(1/2)2=51716

Draw a circle of radius 3/8 around the center, as shown below. A short calculation shows that each square covers 1/3 of the circumference.

alt text

The proof shows that if three unit squares fit in a disk of radius 51716, then both of the following hold.

Together, these conditions force equality. Analyzing the equality case shows that the T-shaped configuration is unique. For the details, see The-Anh's original proof.

When I brought the problem back to GPT in November, GPT-6.2 Astra used this proof as a building block. Given what I'd seen of Astra's reasoning, I doubt my paper would exist without The-Anh's proof. I wrote to thank him.

Dear Vu-Le,

I recently came across your Lean formalization of optimal packings of unit squares in a disk, and I would like to express my sincere gratitude for your work.

I have been interested in the problem of finding the smallest ball containing three unit cubes since 2018, when I was in middle school.

I recently established an exact reduction from the three-dimensional cube packing problem to its planar counterpart. Your formalization of the optimal radius and equality cases for three unit squares provided the final ingredient in proving the conjecture posed by Gensane and Ryckelynck in 2008, as well as in characterizing all optimal spatial configurations.

My manuscript is now publicly available on Zenodo:

https://zenodo.org/records/24488342

Your work helped bring a mathematical question that I had carried with me for eight years to a conclusion.

Thank you again for making your formalization publicly available.

Best regards,

Junyu Zhou

He replied in less than half an hour.

Hi Junyu,

Great work! Congratulations! Glad to know that my work helped you.

Best,

The-Anh

Proof outline for n = 3

Back to three dimensions. The main result (Theorem 1) relates the optimal radius s3 in two dimensions to the optimal radius R3 in three dimensions as follows.

R32=s32+14

This gives R3=48916 and proves the conjecture Gensane and Ryckelynck posed in 2008.

1. Proving the upper bound

Take a disk of optimal radius for n=3, and use its center as the center of the ball. The disk has radius s3. Extend each square by 12 in both directions perpendicular to the disk to get three cubes. The Pythagorean theorem gives an enclosing radius of s32+14.

This proves R32≤s32+14. The hard part is the reverse inequality.

2. Describing the positions of the cubes with separating planes

In high school, we learned to write the equation of a plane in space as follows.

Ax+By+Cz=t

Here A,B,C,t are the parameters of the equation. The left-hand side is the dot product of the normal vector (A,B,C) with (x,y,z). In linear algebra, vectors are often written as columns. Write the normal as n and the point (x,y,z) as x. (Notice the boldface for vectors. I'll use it throughout.) The equation becomes

n⊤x=t

The plane divides space into two sides. On the side the normal points toward, n⊤x>t. On the other side, n⊤x<t. The diagram shows both sides.

alt text

Here we also take n to have length 1, written ∥n∥2=1.

This notation denotes a norm. The subscript 2 gives Euclidean distance, and 1 gives Manhattan distance (think of moving only along the coordinate axes). For a real exponent p≥1, the general formula is

∥n∥p=|A|p+|B|p+|C|pp.

Since n is a unit normal, the point-to-plane distance formula gives the distance from the origin O to the plane as |t|.

Why describe planes this way? We want to turn geometric conditions we can picture into precise algebraic inequalities we can use in the proof. First, though, we need one more tool, the separating hyperplane theorem.

A set is convex if the entire line segment joining any two of its points lies in the set. A cube is convex.

The figure shows a convex set on the left and a nonconvex set on the right.

alt text

In our setting, the separating hyperplane theorem says that if two cubes have disjoint interiors, there is a plane with one cube on each side. Either cube may touch the plane.

For the three cubes Q1,Q2,Q3, choose a separating plane for each pair. Write the plane between Qi and Qj as

nij⊤x=tij,

Here nij is the unit normal pointing toward Qi. Thus

Qi⊆{x:nij⊤x≥tij},Qj⊆{x:nij⊤x≤tij}.

Separating plane and normal vectors for two cubes

We also have nij=−nji, tij=−tji.

We know how to describe planes algebraically. To do the same for a cube Qi, we need two more ideas.

We can now write any unit cube in three-dimensional space as

Q=c+U[−1/2,1/2]3

Here c is the center of the cube.

Define ρ(Q) as the greatest distance from the origin to any point in the cube. Formally,

ρ(Q)2=maxx∈Q∥x∥22.

Now let's work out the formula. With −1/2≤a,b,d≤1/2, the first step is

∥x∥22=‖c+U(abd)‖22=‖U⊤c+(abd)‖22.

Geometrically, this aligns the cube with the coordinate axes, as shown below.

alt text

The next step is fairly direct. Write

U⊤c=(pqr).

Then ∥x∥22=(p+a)2+(q+b)2+(r+d)2. Because a,b,d can vary independently, we can maximize each of the three terms separately. For the first term, for example, consider the sign of p.

maxa∈[−1/2,1/2](p+a)2=(|p|+12)2.

The other two terms work the same way, so

ρ(Q)2=(|p|+12)2+(|q|+12)2+(|r|+12)2=p2+q2+r2+|p|+|q|+|r|+34.

We also have

p2+q2+r2=∥U⊤c∥22=∥c∥22,|p|+|q|+|r|=∥U⊤c∥1.

This gives our first useful formula.

ρ(Q)2=34+∥c∥22+∥U⊤c∥1.

Back in middle school I already had the candidate bound ρ(Q)2≤489256. Using ∥U⊤c∥1≥∥U⊤c∥2=∥c∥2 gives

∥c∥22+∥c∥2+34≤489256.

Solving yields ∥c∥2≤1116. In other words, however we rotate or translate the cube, its center can be at most 11/16 from the center of the ball in a packing within that radius.

A unit cube contains a ball of radius 1/2 centered at its center. This means a separating plane must be at least 1/2 from either cube's center.

alt text

Since nij points toward Qi, we have nij⊤ci−tij≥12. Therefore

tij≤nij⊤ci−12≤∥ci∥2−12≤316.

Swapping i,j gives tji≤316 by symmetry. Using tij=−tji gives our second useful bound.

|tij|≤316

3. Projecting the three cubes separately

Extending the planar result to three dimensions runs into a problem. A packing with disjoint interiors in space can overlap after projection. For example, look straight down at two cubes stacked into a 1×1×2 box and their projections coincide.

So projecting all three cubes directly won't work. Instead, we'll use the algebraic relationships from the previous section. Here is what they look like for three cubes.

alt text

By the definition of the separating planes, points in Q1 satisfy

{n12⊤x≥t12,n13⊤x≥t13.

Take the two normals nij,nik and choose a plane Pi through the origin containing them. If they are not collinear, they span the plane, just as (1,0) and (0,1) span the xOy coordinate plane. In linear algebra notation, Pi=span{nij,nik}. If the normals are collinear, any plane containing their common line will do. See the diagram below.

alt text

Take a point x in the cube. Project it orthogonally onto Pi to obtain y=projPi(x). Since x−y is perpendicular to Pi, we have nij⊤(x−y)=nik⊤(x−y)=0. The inequalities above therefore become

{n12⊤y≥t12,n13⊤y≥t13.

We've now reduced the three-dimensional inequalities to two-dimensional ones.

4. Finding a unit square in each projection

So far we've projected one point at a time. Project every point in the cube Qi onto the plane Pi and the resulting planar shape is

projPi(Qi)={projPi(x)∣x∈Qi}.

We call projPi(Qi) the orthogonal projection of Qi onto Pi. The result from the previous section holds for every x∈Qi, so every point y∈projPi(Qi) in the projected shape satisfies

{nij⊤y≥tij,nik⊤y≥tik.

Let's put aside the relationships between the three cubes for a moment and look at the projection of a single unit cube. To keep the notation light, write Q for the cube and P for any projection plane through the origin.

What does the projection of a cube Q onto P look like? If you have a Rubik's cube nearby, try holding it under a lamp. There are three possibilities.

Here's the real question. Whatever the projection looks like, can we always find a square of side length 1 inside it?

The first two cases are straightforward, so let's look at the hexagon. Before getting into the details, here's a more basic question.

If we fix the cube's position and orientation, what determines the shape of its projected hexagon?

It depends on the tilt of the projection plane relative to the cube. Take the coordinate axes parallel to the three sets of cube edges and keep the ball's center as the origin. Section 2 described a plane using a unit normal and a constant. Since P passes through the origin, its unit normal n is enough. To describe the tilt, we'll use spherical coordinates for a three-dimensional vector.

A unit vector n in three dimensions can be described by two angles θ,φ. The angle θ is measured from the z-axis. To get φ, project the vector onto the xOy plane and measure its angle from the x-axis, as shown below.

alt text

Thus n=(sin⁡θcos⁡φ,sin⁡θsin⁡φ,cos⁡θ)⊤. The geometry explains why the vector has unit length, and you can also check algebraically that the sum of the three squared coordinates is 1.

For shorthand, set s=sin⁡θ,q=cos⁡θ and u=(cos⁡φ,sin⁡φ)⊤=(u1,u2)⊤. Then

n=(su1su2q)

We have s2+q2=1,u12+u22=1.

Let n be the unit normal that determines the tilt of P. By permuting the coordinate axes and reversing their signs as necessary, we may assume

q≥su1≥su2≥0.

The hexagonal case also gives s>0 and q<1 (why?). It follows that

u1≥u2≥0.

A normal of length 1 immediately gives q≥13. Then s2+q2=1 implies s≤23.

There's another observation. Because P passes through the origin, we can look along a direction parallel to both P and the xOy plane. From this viewpoint the situation reduces to two dimensions, as shown below.

alt text

Projecting the unit vector u onto P reduces its length to cos⁡θ. The direction perpendicular to u in the xOy plane, u⊥, keeps its length.

To set up orthogonal coordinates on P, use the directions corresponding to u and u⊥. In the xOy plane, how do we split a vector w=(w1,w2)⊤ into components along u and u⊥?

Recall that the u direction shrinks by a factor of q=cos⁡θ, while the u⊥ direction stays the same. So the projected two-dimensional coordinates are

w′=q(u⊤w)u+w−(u⊤w)u=w−(1−q)(u⊤w)u=w−(1−q)uu⊤w=(I−(1−q)uu⊤)w.

This gives the compression matrix used in the paper.

A=I−(1−q)uu⊤.

That settles the projection of vectors in the horizontal plane. For example, if B=[−1/2,1/2]2 is the unit square centered at the origin, its image is AB={Aw∣w∈B}. Now let's extend this to the whole cube.

The extension is simple. Given a point in space,

x=(w1w2z)=(wz).

Handle the xOy component and the z component separately. We've already dealt with the first. For a unit vector along z, recall s=sin⁡θ. With a bit of geometric imagination (I'm too lazy to draw another figure), its projected coordinates are −su, and scaling gives −szu. Thus the two-dimensional coordinates of the projection of x onto P are

y=Aw−szu.

Now that we can project any point in three dimensions, we can return to projecting the cube onto P. Time for another prerequisite, the Minkowski sum.

For two sets X,Y, define X+Y={a+b∣a∈X,b∈Y}. For example, if X={1,2,3},Y={4,5}, then X+Y={5,6,7,8}.

The same definition applies to vectors, using vector addition.

You may see what's coming. Think of the cube as a stack of planar slices, project each slice, and combine the projections with a Minkowski sum.

First, set aside the cube's position by taking a unit cube Q=[−1/2,1/2]3=B×[−1/2,1/2] centered at the origin. Since {−szu, z∈[−1/2,1/2]}=[−s/2,s/2]u, the Minkowski sum gives its projection projP(Q) in two-dimensional coordinates as follows.

projP(Q)=AB+[−s/2,s/2]u

Taking the cube to be centered at the origin is enough to show that its projection contains a unit square. We'll bring the center back when we study the radius bound.

We can now express the claim in this section's title as follows.

B⊆?AB+[−s2,s2]u

At last, the proof. For every w∈B, we need to show that w∈AB+[−s2,s2]u. We just computed the compression matrix.

A=I−(1−q)uu⊤

Thus Aw=w−(1−q)(u⊤w)u. Rearranging gives w=Aw+(1−q)(u⊤w)u. Since Aw∈AB, what remains is to show (1−q)(u⊤w)u∈[−s2,s2]u. This simplifies to

|(1−q)(u⊤w)|≤?s2.

Because w∈B=[−1/2,1/2]2 and u1≥u2≥0, we have |u⊤w|=|u1w1+u2w2|≤u1|w1|+u2|w2|≤u1+u22. The condition reduces to

(1−q)(u1+u2)≤?s.

But we have

s1−q=1+qs>2qs≥2u1≥u1+u2

The inequality follows, so every hexagonal projection contains a unit square. Adding the first two cases proves the claim. Whatever the projection direction, the projected shape contains a unit square.

5. Bounding the enclosing radius of the unit square

In the previous section, we centered the cube at the origin to study the shape of its projection. Now restore its actual center c.

Q=c+[−12,12]3,

Translating the cube does not change the shape of its projection, so the unit square from the previous section still exists. But now we have a different question. Can we find a unit square whose placement also keeps it close enough to the origin?

More precisely, take any plane P through the origin. We want the orthogonal projection to contain a unit square S with S⊆projP(Q) such that

maxy∈S∥y∥22≤ρ(Q)2−14.

This is Lemma 2 of the paper. Recall the Rubik's cube experiment from Section 4. There are three cases.

Projection shape Condition
Square s=0
Rectangle s>0, u2=0
Hexagon s>0, u2>0

In the square case, of the top and bottom faces, at least one lies at distance from the xOy plane of at least 1/2. The Pythagorean theorem gives the bound, with equality when the cube's center lies in xOy.

Now take s>0, the rectangle or hexagon case. First we'll show that the unit square can slide along the u direction within the projection. Then can we use that freedom to choose a square closer to the origin?

For the first part, let d=1−q, k=u1+u2. The previous section showed dk<s, so define m=s−dk2>0. We want to prove

B+[−m,m]u⊆AB+[−s2,s2]u.

Proof. For any y∈B, since u1,u2≥0, we have

|u⊤y|≤u1+u22=k2.

For every |t|≤m, substitute A=I−duu⊤ and add tu to both sides to obtain the identity

y+tu=Ay+(t+du⊤y)u.

We also have

|t+du⊤y|≤m+dk2=s2.

This proves the inclusion.

Geometrically, we've shown that the square has room to move along u while staying inside the projection.

Recall the projection formula projP(c)=y=Aw−szu. Substituting A=I−duu⊤ gives w−d(u⊤w)u−szu. Set v=−d(u⊤w)−sz to obtain projP(c)=w+vu.

Remember that translating a cube moves its projection without changing its shape. For a cube anywhere in space, shift the boxed inclusion for projP(Q) by w+vu to obtain

B+w+[v−m,v+m]u⊆projP(Q).

For the second part, choose a center from the range on the left. Take K∈[v−m,v+m] and form the unit square S=B+w+Ku, centered at b=w+Ku. How should we choose K?

The paper takes the number of smallest absolute value in [v−m,v+m]. There are three cases, which I'll skip here. In every case min(0,v)≤K≤max(0,v), so the square's center b lies on the segment w⟷w+vu. We also know that c=(w,z)⊤ satisfies

∥w∥2≤∥c∥2, ∥w+vu∥2≤∥c∥2.

The two vectors are the orthogonal projections of the cube's center onto the xOy plane and onto P. Since b lies on the segment joining them and the disk is convex, ∥b∥2≤∥c∥2 follows.

Now that we know where the center is, we need to account for the whole square. The goal is to find the distance from the origin to the square's farthest point. In Section 2, we derived the corresponding formula for the cube.

ρ(Q)2=34+∥c∥22+∥U⊤c∥1.

In Section 4 we already aligned the axes with the cube's edges, so the rotation matrix U drops out. That gives

ρ(Q)2=34+∥c∥22+∥c∥1=34+∥c∥22+∥w∥1+|z|

The same calculation as in Section 2 gives the two-dimensional formula.

maxy∈S∥y∥22=12+∥b∥22+∥b∥1.

Plug ρ(Q)2 and maxy∈S∥y∥22 into Lemma 2's target bound maxy∈S∥y∥22≤ρ(Q)2−14. After simplification, what remains to prove is

∥b∥22+∥b∥1≤?∥c∥22+∥w∥1+|z|.

We know ∥b∥2≤∥c∥2, but the relationship between ∥b∥1 and ∥w∥1+|z| takes more work. The proof is technical and splits into several cases, so I'll leave those details to the paper. The result is that Lemma 2 holds for every cube Q inside the ball under consideration and every plane P through the origin.

6. Adjusting the separating directions so the three planes can be aligned

It's time to return to how the three cubes relate to each other. Bring back the indexed notation Qi,Pi,Si. For each cube Qi, we've found a plane Pi containing a unit square Si with three properties.

Si⊆projPi(Qi)maxy∈Si∥y∥22≤ρ(Qi)2−14∀y∈Si, {nij⊤y≥tij,nik⊤y≥tik.

The rest of the proof uses these three properties.


In Section 1 we proved R32≤s32+14, so what remains is R32≥s32+14. Recall that s3 is the radius of the smallest disk that can contain three unit squares with disjoint interiors. At the end of Section 5, however, our three squares lie in P1,P2,P3. They are not necessarily coplanar, so we cannot yet apply Vu-Le's planar result.

Squares in three different planes and the target common disk

We need a geometric transformation that puts the squares in a position where

There's good news and bad news. We can satisfy the first two by rotating about the origin. Keeping the interiors disjoint takes more care, and that's the problem in this section.

In Section 2, we introduced separating planes to express disjoint interiors as inequalities. The constructions in Sections 3–5 carry those inequalities over to the squares. Take S1,S2 for example. For any x∈S1, y∈S2, we have

{n12⊤x≥t12,n21⊤y≥t21.

Using n12=−n21, t12=−t21, we can write both inequalities with the same normal.

{n12⊤x≥t12,n12⊤y≤t12.

If the two squares are already coplanar, these inequalities put them on opposite sides of the same line. So all we need to do is preserve their separation.

If you've read this far, you've probably noticed the same idea running through the preceding sections. We start with a geometric question about overlap, put it into algebraic language, and turn it into precise inequalities that we can prove. This is one of the reasons to learn linear algebra in the first place.


What happens to these separating relationships when we rotate the three planes?

Before we go on, here's what I mean by rotation. In three dimensions we can pick any line through the origin and rotate the entire shape around it. We can then choose a different axis for the next rotation. Try this with a Rubik's cube if you have one handy.

From Section 2, each rotation corresponds to a matrix U. Two successive rotations give the product U2U1, itself a rotation matrix. Any sequence of rotations preserves the shape, its size, distances from the origin, and angles between vectors.

Rotate P1 onto another plane through the origin, carrying the square S1 and its two normals n12,n13 along with it. Rotations preserve dot products, so the separating inequalities still hold with the same offsets t12,t13.

The catch is that we rotate the three planes separately. Two normals that originally satisfied n12=−n21 need not remain opposite after different rotations. If that happens, the inequalities no longer give a single separating line.

Start with just two planes. Both P1 and P2 pass through the origin. If they are distinct, they intersect in a line through the origin.

Rotating a plane about its intersection with another plane

Use that line as the axis and rotate P2 until the planes coincide.

Recall from Section 3 that n12,n13∈P1, n21,n23∈P2, and n12=−n21. If the planes are distinct, then P1∩P2=span{n12}. Rotating about the common line fixes the normals along it. After the planes coincide, we still have

n12=−n21,t12=−t21.

If the planes already coincide, there's no rotation to make. That settles the two-plane case.


Now suppose P1 and P2 already coincide and we want to bring P3 into the same plane. With one or more rotations about suitable axes, we can always arrange n13=−n31, as shown below.

Matching the first separating normal of the third plane

Next rotate about the axis n13 to make all three planes coincide.

The remaining pair of normals need not match when the planes coincide

We now have n12=−n21′ and n13=−n31′, but the final pair need not satisfy n32′=−n23′.

Why might the last pair fail to match? Rotating a plane preserves the angle between its two normals. For later use, define

λi=∠(nij,nik).

This is the angle between the two separating normals in a plane. In particular, λ1=∠(n12,n13), λ2=∠(n21,n23), and λ3=∠(n31,n32). Each λi∈[0,π].

Angles satisfy a triangle inequality, much like absolute values. Take three unit vectors a,b,c and set

α=∠(a,b),β=∠(b,c),γ=∠(a,c).

We want to prove

γ≤α+β.

Proof. If α+β≥π, the result follows immediately from γ≤π. So suppose α+β<π.

As in Section 4, decompose a,c into components parallel to b and components perpendicular to b.

a=cos⁡αb+a⊥,c=cos⁡βb+c⊥.

By the Pythagorean theorem,

∥a⊥∥2=sin⁡α,∥c⊥∥2=sin⁡β.

Now take the dot product. The cross terms vanish by orthogonality, and Cauchy–Schwarz gives

cos⁡γ=a⊤c=cos⁡αcos⁡β+a⊥⊤c⊥≥cos⁡αcos⁡β−∥a⊥∥2∥c⊥∥2=cos⁡αcos⁡β−sin⁡αsin⁡β=cos⁡(α+β).

Cosine decreases on [0,π], so

γ≤α+β.

This proves the inequality.

Back to our goal. A sufficient condition for all three pairs of unit normals to point in opposite directions is λ1+λ2+λ3=π. The figure shows an example.

Three pairs of opposite normals with angles summing to π

On the other hand, using equality of vertical angles, the triangle inequality, and n12=−n21, we get λ1+λ3+λ2=∠(n12,n13)+∠(n13,n23)+∠(n23,−n12)≥π.

So we want the three angles to sum to π, and their original sum is at least π. We only need a way to shrink these angles.

Rotating an entire plane preserves the angle between its two normals. We need to do something else. Keep each square fixed and adjust the directions of the separating normals while preserving the inequalities. This is the job of Lemma 3.


As in Sections 4 and 5, focus on a single square S. Lemma 3 starts with two unit vectors a,b and offsets t,u in a plane, such that every x∈S satisfies

{a⊤x≥t,b⊤x≥u.

Suppose the following three conditions hold.

Then for any γ∈[0,∠(a,b)], there are two new unit vectors a′,b′ satisfying

{a′⊤x≥t,b′⊤x≥u,∠(a′,b′)=γ,∀x∈S.

That's the main statement of Lemma 3. Picture keeping the square fixed and turning both separating lines so the angle between their normals shrinks. The square stays on the required side of each line throughout. You can make the angle as small as you like, all the way down to zero.

Two separating directions before and after shrinking their angle

Let's prove it. Since we're looking at one square, we can align the axes with its edges without moving the origin, just as we did for the cube in Section 4. Write the center as (p,q)⊤. By swapping axes and reversing signs if necessary, assume p≥q≥0. Recall the formula for the farthest vertex in Section 5.

maxx∈S∥x∥22=12+p2+q2+p+q.

The first hypothesis of Lemma 3 gives 12+p2+q2+p+q≤425256. Rearranging yields p2+q2+p+q≤297256.

By the third hypothesis, max{t,u}≥0. Assume t≥0 without loss of generality. Then every x∈S satisfies a⊤x≥t≥0. The square therefore lies on one side of the line a⊤x=0 through the origin. The origin cannot lie in the square's interior, though it may lie on its boundary. It follows that p≥12.

Substitute p≥12 into p2+q2+p+q≤297256 and solve to get 0≤q≤516. Together, the first and third hypotheses give two useful bounds on the center's coordinates.

p≥12,0≤q≤516.

To tell which normals satisfy the separating inequalities, define v(φ)=(cos⁡φ,sin⁡φ)⊤, φ∈[−π,π] and M(φ)=minx∈Sv(φ)⊤x. Geometrically, this is the smallest signed coordinate of a point in S along the direction of the normal, as shown below.

The minimum signed projection of the square along the normal

Now compute M(φ). Any point in the square can be written as x=(p+x1,q+x2)⊤,x1,x2∈[−12,12]. Taking the dot product gives

v(φ)⊤x=pcos⁡φ+qsin⁡φ+x1cos⁡φ+x2sin⁡φ.

Since x1,x2 can vary independently, we get

M(φ)=pcos⁡φ+qsin⁡φ−12(|cos⁡φ|+|sin⁡φ|).

Now consider which values of φ are possible. If the unit vector points into the left half-plane, cos⁡φ<0, so cos⁡φ=−|cos⁡φ|. Since q≥0, we also have qsin⁡φ≤q|sin⁡φ|. Therefore

M(φ)=pcos⁡φ+qsin⁡φ−12(|cos⁡φ|+|sin⁡φ|)≤−p|cos⁡φ|+q|sin⁡φ|−12(|cos⁡φ|+|sin⁡φ|)=−(p+12)|cos⁡φ|−(12−q)|sin⁡φ|.

Substituting our bounds p≥12, q≤516 into the last inequality gives

M(φ)≤−|cos⁡φ|−316|sin⁡φ|<−316(|cos⁡φ|+|sin⁡φ|)≤−316cos2⁡φ+sin2⁡φ=−316.

The second hypothesis of Lemma 3 is t,u≥−316, so a normal pointing into the left half-plane cannot satisfy either separating inequality. We only need to consider cos⁡φ≥0, or equivalently φ∈[−π/2,π/2]. From here it comes down to the monotonicity of sine and cosine.

This gives the observation we need. Turning a separating normal toward the positive x-axis preserves its separating inequality, whichever quadrant it starts in.

We can now tune the angle between the normals to any value we want. Let the directed angles of a,b from the positive horizontal axis be φa,φb. Use a parameter h∈[0,1] and define φa(h)=hφa, φb(h)=hφb. At h=1 nothing moves, at h=0 both normals coincide with the positive half of the x-axis, and at h=0.5 both angles have been halved. The angles vary linearly throughout.

Write the two normals during this rotation as follows.

a(h)=(cos⁡(hφa)sin⁡(hφa)),b(h)=(cos⁡(hφb)sin⁡(hφb)).

Both a(h) and b(h) are vector-valued functions of h.

Now define f(h).

f(h)=∠(a(h),b(h)).

We have f(1)=∠(a,b) and f(0)=0, and f is continuous. If you've taken calculus, you can probably see what's coming: the intermediate value theorem.

Since f is continuous on [0,1], for every

γ∈[0,∠(a,b)],

there is at least one h0∈[0,1] with f(h0)=γ.

By the monotonicity of M(φ), both normals move toward the positive x-axis throughout the rotation. Thus

M(h0φa)≥M(φa)≥t,M(h0φb)≥M(φb)≥u.

Take a′=a(h0), b′=b(h0). These vectors satisfy all three requirements of Lemma 3.

A careful reader may have noticed that because the angles shrink linearly, f(h)=hf(1). So we don't even need the intermediate value theorem here.


Now we can apply the lemma to the three original squares. Bring back the indexed notation Si,Pi,nij,tij. Recall the three hypotheses of Lemma 3.

Once again, there's good news and bad news.

The proof is short. Suppose without loss of generality that both S1 and S2 fail the third hypothesis. Then

{t12<0,t13<0,t21<0,t23<0.

But t12=−t21, and two opposite real numbers cannot both be negative. This is a contradiction.

Recall that λ1+λ2+λ3≥π. We want to choose new angles γ1,γ2,γ3 such that

{0≤γi≤λi,γ1+γ2+γ3=π.

There are two cases.

In either case, apply Lemma 3 to every square whose angle needs to change.

Denote the adjusted separating normals by n~ij. The lemma gives

∠(n~ij,n~ik)=γi.

The original separating inequalities still hold.

∀y∈Si,{n~ij⊤y≥tij,n~ik⊤y≥tik.

At the same time,

γ1+γ2+γ3=π.

The three local angles now sum to π. We have kept the squares in the same positions and at the same size, with the same separating offsets.

7. Fitting the three squares into one disk

At the beginning of Section 6 we tried rotating the three planes into one, but we couldn't ensure that the last pair of normals would point in opposite directions. Here's the full stack of subproblems we worked through.

Prove the lower bound for the 3D packing radius
└── Fit the three squares into one disk
    └── Rotate the three local planes until they coincide
        └── Keep the interiors of the three squares disjoint
            └── Make each pair of separating normals point in opposite directions
                └── Make the three local angles sum to π
                    ├── Show that the original angles sum to at least π
                    │   └── Prove the triangle inequality for angles
                    ├── Show that angles can shrink while preserving the separation inequalities
                    │   └── Lemma 3
                    │       ├── Bound the coordinates of the square's center
                    │       ├── Define and compute the minimum projection M(φ)
                    │       ├── Rule out normals pointing into the left half-plane
                    │       ├── Prove monotonicity of M(φ)
                    │       └── Construct a continuous way to shrink the angle
                    ├── Handle a square that fails the hypotheses of Lemma 3
                    └── Choose the three new angles

We've solved the innermost subproblems, so we can work our way back up the stack to rotating the planes.

Prove the lower bound for the 3D packing radius
└── Fit the three squares into one disk
    └── Rotate the three local planes until they coincide
        └── Keep the interiors of the three squares disjoint
            └── Make each pair of separating normals point in opposite directions  ← You are here
                └── Make the three local angles sum to π  [Solved]

Keep P1 fixed and rotate P2 and P3 onto P1 in turn. Since we changed the separating directions in the previous section, n~12 and n~21 need no longer be opposite. The same can happen for the other two pairs. Use the method from the start of Section 6 for P3 and apply it to P2. First rotate P2 to obtain n~12=−n~21′, then rotate about the line spanned by n~12 until the two planes coincide.

Once the planes coincide, we can still rotate by 180∘ about that line. This flips n~23′ to the other side if it does not lie on the line, without disturbing the matched pair. We can therefore arrange for n~13 and n~23′ to lie in the same closed half-plane, as shown below.

Angles between adjusted normals after aligning the first two planes

The preceding section gave γ1+γ2+γ3=π, so the angle between the two unmatched normals in the diagram is ∠(n~13,n~23′)=π−γ1−γ2=γ3.

Now consider P3. By the construction in Lemma 3, we have ∠(n~31,n~32)=γ3. Reversing both normals preserves the angle, so ∠(−n~13,−n~23′)=∠(n~13,n~23′)=γ3. Combining these gives ∠(n~31,n~32)=∠(−n~13,−n~23′).

Repeat the procedure we used for P2. First rotate P3 to make n~13=−n~31′, then rotate about that common axis until all three planes coincide. The angles already agree, so an additional rotation of 180∘ about that axis, if needed, gives n~32′=−n~23′ as well. We've achieved the goal: make each pair of separating normals point in opposite directions.

Prove the lower bound for the 3D packing radius
└── Fit the three squares into one disk
    └── Rotate the three local planes until they coincide
        └── Keep the interiors of the three squares disjoint  ← You are here
            └── Make each pair of separating normals point in opposite directions  [Solved]

Back up another level. A rotation preserves the dot product, so the rotated squares still satisfy the separating inequalities. For example, rotate S2 and S3 to S2′,S3′. Then for any x∈S2′, y∈S3′,

{(n~23′)⊤x≥t23,(n~32′)⊤y≥t32.

Our rotations give n~23′=−n~32′. Combining this with the original offsets t23=−t32 yields

{(n~23′)⊤x≥t23,(n~23′)⊤y≤t23.

The two squares lie on opposite sides of a single separating line. The same argument applies to the other two pairs. We finally have three coplanar unit squares with disjoint interiors.

Prove the lower bound for the 3D packing radius
└── Fit the three squares into one disk  ← You are here
    └── Rotate the three local planes until they coincide  [Solved]
        └── Keep the interiors of the three squares disjoint  [Solved]

One level up, how large a disk do we need to contain these three squares?

Rotation about the origin preserves distances from it, so the radius bound from Section 5 still holds. Since S1 stayed fixed, use Si′ for the rotated squares and set S1′=S1. By Lemma 2, each square satisfies

maxy∈Si′∥y∥22=maxy∈Si∥y∥22≤ρ(Qi)2−14.

Suppose the original three cubes fit in a ball of radius R centered at the origin. Then each cube satisfies ρ(Qi)≤R, and hence

maxy∈Si′∥y∥22≤R2−14.

This reduces packing three unit cubes in a ball of radius R to packing three unit squares in a disk of radius R2−14.

Prove the lower bound for the 3D packing radius  ← You are here
└── Fit the three squares into one disk  [Solved]

By definition of s3, a disk containing three unit squares with disjoint interiors has radius at least s3. Thus

s3≤R2−14.

Squaring both sides and rearranging gives

R2≥s32+14.

Recall from Section 2 that our argument assumed R≤48916. If R>48916, The-Anh's planar optimum s3=51716 gives R2>s32+14 directly.

So the lower bound holds for the enclosing radius R of any arrangement of three unit cubes with disjoint interiors. In particular, the optimal radius R3 satisfies

R32≥s32+14.

And that's the last item off the stack.

8. Putting the bounds together

Sections 2–7 gave R32≥s32+14, and the Pythagorean argument in Section 1 gave R32≤s32+14. Together,

R32=s32+14.

Substitute The-Anh's planar optimum s3=51716 to get

R3=s32+14=(51716)2+14=48916.

This settles the conjecture Gensane and Ryckelynck posed 18 years ago.

There is some freedom even at the optimum. With the three centers of the original T-shaped arrangement fixed, a horizontal rotation of the top cube can still attain the optimal radius R3=48916. See the paper for the details.

Afterword

That summer in 2018, I got 48916, but I didn't know why the answer couldn't be smaller.

On December 4, 2026, I finally knew.

There wasn't any special reason I was still willing to spend this much time on the problem eight years later, or to write this long a post about it.

I never felt I needed to find a better reason.

I just wanted to know.

The last bonus question on my 2018 math exam finally has a solution.

References

  1. T. Gensane and P. Ryckelynck, Producing dense packings of cubes. Discrete Mathematics, 308(22), 5230–5245, 2008.
  2. T. Montanher, A. Neumaier, M. C. Markót, F. Domes and H. Schichl, Rigorous packing of unit squares into a circle. Journal of Global Optimization, 73, 547–565, 2019.
  3. T.-A. Vu-Le, Optimal packings of one to seven unit squares in a disk. Lean 4 formalization, Palomar Registry, PALOMAR-2026-10-02-000002, 2026.
  4. J. Zhou, The smallest ball containing three unit cubes. Zenodo, 2026.