Library · The Fiddler: Solutions · Chapter 136

Can You Squeeze Your Quads?

Revised Report an error

Squeeze two quadrilaterals into a unit circle (a circle of radius 11). They may share edges, parts of edges or corners, and their corners may sit on the circle itself, but their interiors may not overlap. Each may be convex or concave, but not “crossed” like a bowtie. What is the greatest combined area the two quadrilaterals can have?

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

The official solution appeared in the post of November 17, 2023 and gives 33/2≈2.5983\sqrt3/2 \approx 2.598 for the main puzzle and about 3.14883.1488 for the Extra Credit. Both agree with the answers below.

Solution

Start with a good arrangement. Cut a regular hexagon inscribed in the circle along one of its long diagonals. The two halves are congruent trapezoids, each a genuine quadrilateral, and together they fill the hexagon. The hexagon is six equilateral triangles of side 11, each of area 3/4\sqrt3/4, so the pair covers 6⋅34  =  332  ≈  2.598,6 \cdot \frac{\sqrt3}{4} \;=\; \frac{3\sqrt3}{2} \;\approx\; 2.598 , about 8383 percent of the circle.

Two trapezoids that together make the regular hexagon.
Two trapezoids that together make the regular hexagon.

The real work is to show that nothing does better. Two facts about polygons in a circle carry the argument.

Fact 1: the largest polygon with a given number of corners. Take a convex polygon with mm corners inside the unit disk. If one of its corners is strictly inside the disk, push that corner a little further from the line through its two neighbours. The polygon stays in the disk and gains area. So a largest such polygon has all its corners on the circle. Now join the centre to each corner. Neighbouring corners whose radii make an angle gg cut off a triangle of area 12sin⁡g\tfrac12 \sin g, so the polygon has area 12(sin⁡g1+sin⁡g2+⋯+sin⁡gm),g1+⋯+gm=2π.\tfrac12 \left( \sin g_1 + \sin g_2 + \dots + \sin g_m \right), \qquad g_1 + \dots + g_m = 2\pi . (If one angle exceeds π\pi, the centre lies outside the polygon and that triangle counts negatively, which the negative sine does automatically.) When every angle is below π\pi, the sine curve bends downwards on that range, so the sum of sines with a fixed total is largest when the angles are equal: the regular polygon, with area m2sin⁡(2π/m)\tfrac m2 \sin(2\pi/m). When one angle reaches π\pi, its sine is at most 00 and the others total at most π\pi, so the area is at most half their total, π/2\pi/2, which is less anyway. The values m2sin⁡(2π/m)\tfrac m2 \sin(2\pi/m) grow with mm, so any convex polygon with at most six corners has area at most that of the regular hexagon, 33/23\sqrt3/2.

Fact 2: the largest quadrilateral in a slice of the disk. A straight line cuts the disk into two slices. Measure each slice by the angle β\beta its arc makes at the centre, so the two slices have β\beta and 2π−β2\pi - \beta. Take a largest quadrilateral inside a slice. Pushing corners outwards as before, every corner ends on the boundary of the slice. A corner on the straight edge can slide along that edge to one of its ends without losing area (the area changes at a steady rate as the corner slides, so one direction or the other does not lose). So all four corners can be taken on the arc. If they cut it at angles g1,g2,g3g_1, g_2, g_3 with total s≤βs \le \beta, the closing angle is 2π−s2\pi - s and the area is 12(sin⁡g1+sin⁡g2+sin⁡g3−sin⁡s)  ≤  12(3sin⁡s3−sin⁡s),\tfrac12\left(\sin g_1 + \sin g_2 + \sin g_3 - \sin s\right) \;\le\; \tfrac12\left(3 \sin\tfrac s3 - \sin s\right), with equal angles again best. The right side increases with ss up to s=3π/2s = 3\pi/2 (its rate of change is 12(cos⁡s3−cos⁡s)\tfrac12(\cos\tfrac s3 - \cos s), which is not negative there). So for β≤3π/2\beta \le 3\pi/2, every quadrilateral in the slice has area at most f(β)  =  12(3sin⁡β3−sin⁡β),f(\beta) \;=\; \tfrac12\left(3 \sin\tfrac\beta3 - \sin\beta\right), and for larger β\beta at most f(3π/2)=2f(3\pi/2) = 2, the inscribed square.

Fact 2 gives a clean bound for two quadrilaterals on opposite sides of a line. If both slices have β\beta and 2π−β2\pi - \beta at most 3π/23\pi/2, the two sin⁡β\sin\beta terms cancel, since sin⁡(2π−β)=−sin⁡β\sin(2\pi - \beta) = -\sin\beta, and f(β)+f(2π−β)=32(sin⁡β3+sin⁡2π−β3)=3sin⁡π3cos⁡β−π3  ≤  332,\begin{align*} f(\beta) + f(2\pi - \beta) &= \tfrac32\left(\sin\tfrac\beta3 + \sin\tfrac{2\pi - \beta}{3}\right) \\ &= 3 \sin\tfrac\pi3 \cos\tfrac{\beta - \pi}{3} \;\le\; \frac{3\sqrt3}{2}, \end{align*} with equality only when the line is a diameter. If one slice is larger than 3π/23\pi/2, the other is smaller than π/2\pi/2, and the total is at most 2+f(π/2)=2.252 + f(\pi/2) = 2.25. Either way, two quadrilaterals separated by a line cover at most 33/23\sqrt3/2. Equality needs two half-hexagons on a diameter, which is the arrangement we started with.

Putting it together. Let HH be the smallest convex region containing both quadrilaterals (stretch a rubber band around them). It is a convex polygon whose corners are some of the eight corners of the quadrilaterals, and it contains both, so the combined area is at most the area of HH.

If HH has at most six corners, Fact 1 caps its area at 33/23\sqrt3/2.

Otherwise HH has seven or eight corners, so at most one of the eight corners lies inside HH. A concave quadrilateral has its inward-pointing corner inside the triangle formed by its other three, and so inside HH. Hence at most one quadrilateral is concave.

  • If both are convex, they can be separated by a straight line: two convex shapes whose interiors do not meet always can.

  • If one, say Q1Q_1, is concave, write a,b,ca, b, c for its corners on HH and rr for the inward one, so Q1Q_1 is the triangle abcabc with the notch arcarc removed, and abab, bcbc are edges of Q1Q_1. The four corners of Q2Q_2 are all corners of HH, so none lies inside the triangle abcabc. If Q2Q_2 reached into that triangle, one of its edges would have to cross the triangle, entering through one side and leaving through another. A straight edge meets the side acac at most once, so it would cross abab or bcbc, and next to those sides lies the interior of Q1Q_1. That is not allowed. So Q2Q_2 stays outside the triangle abcabc, and a straight line separates Q2Q_2 from the triangle, which contains Q1Q_1.

In both cases a line separates the two shapes, and the triangle in the second case is a quadrilateral with a corner to spare, so the bound for separated quadrilaterals applies. Every arrangement therefore covers at most 33/23\sqrt3/2, and the two trapezoids reach it:  greatest combined area  =  332  ≈  2.598. \boxed{\ \text{greatest combined area} \;=\; \frac{3\sqrt3}{2} \;\approx\; 2.598. \ }

The computation

The program searches for good pairs directly. It describes the eight corners in polar form, clamps each radius to the disk, and scores a pair as its combined area, or as −1-1 if either quadrilateral crosses itself or the two interiors overlap. From random starts it moves one corner at a time by a shrinking random step and keeps any move that does not lower the score.

import math, random
from shapely.geometry import Polygon

def point(r, a):
    r = max(0.0, min(r, 1.0))       # stay inside the disk
    return (r * math.cos(a), r * math.sin(a))

def score(v):
    p = [point(*v[k]) for k in range(8)]
    A, B = Polygon(p[:4]), Polygon(p[4:])
    if not (A.is_valid and B.is_valid):
        return -1                    # a crossed (bowtie) shape
    if A.intersection(B).area > 1e-12:
        return -1                    # interiors overlap
    return A.area + B.area

random.seed(1)
best = 0
for start in range(8):
    v = [[1.0, random.uniform(0, 2 * math.pi)]
         for _ in range(8)]
    s = score(v)
    for it in range(20000):
        step = max(0.3 * 0.9993 ** it, 1e-5)
        k = random.randrange(8)
        w = [q[:] for q in v]
        w[k][0] += random.gauss(0, step)
        w[k][1] += random.gauss(0, step)
        t = score(w)
        if t >= s:
            v, s = w, t
    best = max(best, s)
print(f"best combined area found: {best:.3f}")

It prints

best combined area found: 2.598

which is 33/23\sqrt3/2 to three decimal places. A search like this can only approach the best value from below, and it gets no further than the hexagon.

Extra Credit

For four distinct points on the unit circle, let ZZ be the area of the quadrilateral they form plus the area of the largest triangle formed by any three of them. For the corners of a square, Z=2+1=3Z = 2 + 1 = 3. What is the greatest possible value of ZZ?

Solution

Label the points in order around the circle. Any three of them leave one out, so every triangle consists of one diagonal of the quadrilateral and one of the two corners off that diagonal. Call the largest triangle ABDABD, with diagonal BDBD, and let CC be the fourth point.

Two moves can only increase ZZ. Slide AA along its arc to the midpoint of that arc. This takes it as far from BDBD as possible, which enlarges the triangle ABDABD and with it the quadrilateral, since the quadrilateral is ABDABD plus CBDCBD. Then slide CC to the midpoint of its arc, which enlarges CBDCBD and so the quadrilateral again. The largest triangle is still at least ABDABD, so ZZ has not dropped. After both moves AA and CC sit on the perpendicular bisector of BDBD, which passes through the centre, so ACAC is a diameter and the shape is a kite.

The best kite. The chord BD sits x \approx 0.281 from the centre. The shaded triangle ABD is the largest, and Z counts it on top of the whole kite.
The best kite. The chord BDBD sits x≈0.281x \approx 0.281 from the centre. The shaded triangle ABDABD is the largest, and ZZ counts it on top of the whole kite.

Now one number describes everything. Let x≥0x \ge 0 be the distance from the centre to the chord BDBD, with AA on the far side. The chord has half-length 1−x2\sqrt{1 - x^2}. Triangle ABDABD has height 1+x1 + x and CBDCBD has height 1−x1 - x, so area ABD=(1+x)1−x2,kite=21−x2,\text{area } ABD = (1 + x)\sqrt{1 - x^2}, \qquad \text{kite} = 2\sqrt{1 - x^2}, and ABDABD is indeed the largest triangle. Therefore Z(x)  =  (3+x)1−x2.Z(x) \;=\; (3 + x)\sqrt{1 - x^2}. Setting the rate of change to zero and multiplying through by 1−x2\sqrt{1 - x^2}, (1−x2)−x(3+x)=0⟺2x2+3x−1=0,(1 - x^2) - x(3 + x) = 0 \quad\Longleftrightarrow\quad 2x^2 + 3x - 1 = 0 , whose root between 00 and 11 is x=17−34≈0.281.x = \frac{\sqrt{17} - 3}{4} \approx 0.281 . At x=0x = 0 (the square) Z=3Z = 3 and at x=1x = 1 it is 00, so this turning point is the maximum. Substituting and simplifying gives Z2=(107+5117)/32Z^2 = (107 + 51\sqrt{17})/32:  Zmax⁡  =  107+511732  ≈  3.1488. \boxed{\ Z_{\max} \;=\; \sqrt{\frac{107 + 51\sqrt{17}}{32}} \;\approx\; 3.1488. \ } Amusingly, that is within 0.010.01 of π\pi.

The computation

The program works from the definition of ZZ: it places four points on the circle, computes the area of the quadrilateral they form (taking the points in order round the circle) and the largest of the four triangles, and climbs from random starts as before.

from itertools import combinations

def area(ps):
    n = len(ps)
    return abs(sum(ps[i][0] * ps[(i + 1) % n][1]
                   - ps[(i + 1) % n][0] * ps[i][1]
                   for i in range(n))) / 2

def Z(angles):
    ps = [(math.cos(a), math.sin(a))
          for a in sorted(a % (2 * math.pi) for a in angles)]
    return area(ps) + max(area(t) for t in combinations(ps, 3))

random.seed(1)
best = 0
for start in range(20):
    v = [random.uniform(0, 2 * math.pi) for _ in range(4)]
    s = Z(v)
    for it in range(5000):
        w = [a + random.gauss(0, 0.2 * 0.998 ** it) for a in v]
        if Z(w) >= s:
            v, s = w, Z(w)
    best = max(best, s)
print(f"greatest Z found: {best:.4f}")

It prints

greatest Z found: 3.1488
Report an error on this page

Reports are stored by Netlify. See the privacy note.