In the 1972 MAA High School Mathematics Contest (Problem #28), students were presented with this geometric puzzle:
A circular disc of diameter $D$ is placed on an $8 \times 8$ checkerboard of total width $D$ so that the disc touches all four outer edges of the checkerboard. How many of the 64 squares of the checkerboard are completely covered by the disc?
Let's analyze the geometry:
Let each of the 64 squares have side length $s$. The board width is $8s$, so $D = 8s$.
The circular disc has diameter $D = 8s$, which means its radius is $R = \frac{D}{2} = 4s$.
Centering the checkerboard at the Cartesian origin $(0, 0)$, the board spans from $-4s$ to $+4s$ in both the $x$ and $y$ directions.
A square is completely covered if and only if all four of its corners lie within or on the circular boundary:
$$\text{dist}^2 = x_{\text{corner}}^2 + y_{\text{corner}}^2 \le R^2 = (4s)^2 = 16s^2$$
By symmetry, we can analyze one quadrant ($4 \times 4 = 16$ squares), where outer corner coordinates in units of $s$ are integers $(u, v)$ for $u, v \in \{1, 2, 3, 4\}$:
If $u = 4$ or $v = 4$ (the outer perimeter border): $u^2 + v^2 \ge 4^2 + 1^2 = 17 > 16$. None of the 28 border squares are completely covered.
$u = 3$: pairs $(3, 1)$ and $(3, 2)$ have $u^2 + v^2 \le 13 \le 16$ (2 covered). But the corner square $(3, 3)$ has $3^2 + 3^2 = 18 > 16$, so its outer corner pokes outside the circle!
Each quadrant contains $3 + 3 + 2 = 8$ completely covered squares.
Across all 4 quadrants, the total is:
$$8 \times 4 = 32 \text{ covered squares}$$
In this lesson, we write a program to test every square mathematically and draw the checkerboard and disc visually on the canvas!
s = 25; R = 4 * s circle(0, 0, R) covered = 0 for i = -4, 3 do for j = -4, 3 do u = math.max(math.abs(i), math.abs(i + 1)) * s v = math.max(math.abs(j), math.abs(j + 1)) * s if u*u + v*v <= R*R then covered = covered + 1 end end end
Move the mouse over a dotted box for more information.
The program finds that exactly 32 of the 64 squares are completely covered by the disc.
All 28 outer border squares and the 4 corner squares of the inner $6 \times 6$ grid poke outside the circle ($28 + 4 = 32$ uncovered, leaving $64 - 32 = 32$ covered).
Now you try. Run the code to see the 32 covered squares marked on the grid. Then check Example 1 to see how many squares are covered if the disc radius is increased!
Type your code here:
See your results here:
The code has ???? for checking if all 4 corners lie within the circle. Replace ???? with R * R and click Run to draw the checkerboard and circular disc!
Completely covered squares are marked with an X inside them.
Notice that:
The 28 outer border squares are not covered.
The 4 corner squares of the inner $6 \times 6$ subgrid poke outside the circle because their outer corner distance is $\sqrt{3^2 + 3^2} \cdot s = \sqrt{18} \cdot s \approx 4.24s > 4s$.