Skip to content
Vamshi Jandhyala

Books · The Fiddler: Solutions

Chapter 43

Can You Squeeze the Squares?

A square board has side length AA. Your friend cleverly places one unit square anywhere on the board. You must then place a second unit square, entirely on the board and not overlapping the first (touching is allowed), no matter how adversarially the first was placed. What is the smallest AA for which you can always succeed?

The Fiddler, Zach Wissner-Gross, August 1, 2025(original post)

The worst first move is dead centre. At A=3A=3 a corner square just fits, touching the centre square at (1,1)(1,1).

Solution

The friend’s strongest move is to centre the unit square, leaving a symmetric frame of width A12\tfrac{A-1}{2} on every side. A unit square needs a clear run of at least 11 in some direction, and a rotated square only needs more room (its minimum width is 11, achieved axis-aligned), so the largest square that fits in a corner has side exactly A12\tfrac{A-1}{2}. You can always place the second square precisely when A121A3.\frac{A-1}{2}\ge 1\quad\Longleftrightarrow\quad A\ge\boxed{3}. At A=3A=3 the corner square [0,1]2[0,1]^2 is tangent to the centre square at (1,1)(1,1), which counts; below 33 the centred square blocks every position.

The computation

Encode the placement test with the separating-axis theorem: two squares miss exactly when some edge-normal separates them. Then sweep a candidate second square over positions and angles to see whether any placement avoids the centred blocker and stays on the board. It fails just below A=3A=3 and succeeds just above.

import numpy as np
def corners(cx, cy, th):
    h = .5; P = np.array([[-h,-h],[h,-h],[h,h],[-h,h]])
    R = np.array([[np.cos(th),-np.sin(th)],[np.sin(th),np.cos(th)]]); return P@R.T + [cx,cy]
def overlap(A, B, e=1e-9):
    for P in (A, B):
        for i in range(4):
            E = P[(i+1)%4] - P[i]; ax = np.array([-E[1], E[0]]); a = A@ax; b = B@ax
            if a.min() > b.max() - e or b.min() > a.max() - e: return False
    return True
def fits(bl, L, ng=80, na=16):
    cs = np.linspace(0, L, ng)
    for th in np.linspace(0, np.pi/2, na, endpoint=False):
        for cx in cs:
            for cy in cs:
                C = corners(cx, cy, th)
                if C.min() >= -1e-9 and C.max() <= L + 1e-9 and all(not overlap(C, b) for b in bl):
                    return True
    return False
for A in (2.9, 3.1):                  # 3.0 is the exact tangent threshold
    print(A, fits([corners(A/2, A/2, 0)], A))    # 2.9 -> False, 3.1 -> True

Extra Credit

Now the friend places three unit squares (which may touch but not overlap) on a board of side BB, and you must add a fourth. What is the smallest BB for which you can always succeed?

Solution

Three blockers cannot shrink all four corners at once, so a purely central defence no longer pins the answer; the optimal arrangement is an off-centre, pinwheel-like trio. This is a delicate continuous min–max. A search gives a verified blocking arrangement at B=3.3B=3.3 (no fourth square fits even under a fine position-and-angle sweep), while the defender succeeds throughout an extensive search by about B3.4B\approx3.4, so B3.4(numerical estimate).B\approx\boxed{3.4}\quad(\text{numerical estimate}). (The exact value is paywalled; the bound below is my own.)

A verified blocker at B=3.3B=3.3: three unit squares leaving no room for a fourth. The gaps look generous but each is just under 11 in its binding direction.

The computation

Reuse the same fits test on the pinwheel blocker at B=3.3B=3.3: sweeping a 200×200200\times200 grid of positions over 6060 angles finds no legal spot for a fourth square.

bl = [corners(2.181, 2.233, 0.802), corners(1.629, 0.957, 0.835), corners(0.711, 2.559, 0.516)]
print(fits(bl, 3.3, ng=200, na=60))   # False -> no fourth square fits anywhere