[Math] cover a circle with squares

geometry

I want to cover a circle of radius $r$ with squares of side $l$. How can I find a good lower and upper bound for the number of squares $N(r,l)$ I need to use?

Best Answer

You have a circle (disk) of radius $r$, and cover it with squares having edge length $l$. Since the scale does not matter, we can use their ratio $$\lambda = \frac{r}{l}$$ Essentially, the answer is exactly the same if we are covering a circle of radius $\lambda$ with unit squares.

We know that the unreachable minimum is when the $n$ squares cover exactly the same area as the circle, i.e. $$\bbox{n \gt \pi \lambda^2} \quad \iff \quad \bbox{N(\lambda) \ge \lceil \pi \lambda^2 \rceil} $$ where $\lceil\,\rceil$ denote the ceiling operation, rounding up to next higher integer. ($\lceil 1 \rceil = 1$, $\lceil 1.001 \rceil = 2$.)

The foolproof method would be to create a square with same size as the circle diameter, so $$\bbox{n \le (2 \lambda)^2} \quad \iff \quad \bbox{N(\lambda) \le \lceil 2 \lambda \rceil^2}$$

This gives us our initial bounds, $$\bbox[#ffffef, 1em]{ \lceil \pi \lambda^2 \rceil \le N(\lambda) \le \lceil 2 \lambda \rceil^2}$$ which isn't that bad, really.

We already know from Erich Friedman some interesting values of $N(\lambda)$ for small $\lambda$: $$\begin{array}{ll} N(\lambda) & \text{upper limit for } \lambda \\ \hline 1 & 0.5 \\ 2 & 2 - \sqrt{2} \approx 0.585 \\ 3 & \approx 0.794 \\ 4 & 1 \\ 5 & \approx 1.028 \\ 6 & \approx 1.126 \\ 7 & \approx 1.239 \\ 8 & \approx 1.375 \\ 9 & 1.5 \\ 10 & \approx 1.546 \\ 11 & \approx 1.608 \\ 12 & \approx 1.701 \\ 13 & \approx 1.779 \\ 14 & \approx 1.883 \\ 15 & \approx 1.991 \\ 16 & \approx 2.007 \\ 17 & \approx 2.042 \\ 18 & \approx 2.116 \\ \end{array}$$ Note that our upper bound for each $\lambda$ above is greater than the tabulated $N(\lambda)$.

If we look at what those solutions actually look like, it's clear that each one uses a different strategy, and constructing the cover is no trivial task.

So, there is not much we can do to get better bounds (more sensitive to small changes in $\lambda$) for small $\lambda$.

For larger lambda, we can get a tighter upper bound by selecting a method of constructing such a covering; in that case, we have "small" squares and a "large" circle.

One way would be to first cover a square the same size as the circular disk symmetrically, then remove the squares near the corners we know cannot be covering the disk.

Another way is to use a regular rectangular grid, where the circle is centered either at a grid intersection, or at a center of a cell, with each square covering exactly one cell, and count how many squares are needed in each row or column. This not only yields an exact answer, but the cover method is also quite clear. This is what I'll explore below.

Squares covering circles There are two cases: $N_0(\lambda)$ for when the center of the circular disk is at a corner of a square, and $N_1(\lambda)$ for when the center of the circular disk is at the center of a square.

We know that we can describe a circular arc of radius $r$ centered at origin spanning the positive quadrant ($x, y \ge 0$) using $$y = \sqrt{r^2 - x^2}$$ From the illustration above, we can see that the number of squares in each column (in the positive quadrant) is dictated by where the circle intersects the vertical grid line on the side closer to origin.

For the left case, we get $$\bbox[#ffffef, 1em]{N_0(\lambda) = 4 \sum_{i = 0}^{\lfloor\lambda\rfloor} \left\lceil \sqrt{\lambda^2 - i^2}\right\rceil}$$

For the right case, the bluish cross in the center has area $2 \lceil 2\lambda \rceil - 1$, and $$\bbox[#ffffef, 1em]{N_1(\lambda) = 2 \lceil 2 \lambda \rceil - 1 + 4 \sum_{i=1}^{\lfloor\lambda\rfloor} \left\lceil \sqrt{\lambda^2 - (i - 0.5)^2} - 0.5 \right\rceil}$$

These work for all $\lambda \gt 0$.

If we look at the results, we find that $N_0(\lambda)$ and $N_1(\lambda)$ are closer to the lower bound than the upper bound. Other than $N_0(\lambda) \lt N_1(\lambda)$ for $\lambda \in \mathbf{N}$ (i.e. $\lambda = \lfloor \lambda \rfloor$), and $N_1(\lambda) \lt N_0(\lambda)$ for $\lambda = \lfloor \lambda \rfloor + 0.5$, it is not obvious which one is better for any given $\lambda$. Squares covering circles - Statistics The larger $\lambda$ gets, the closer $N_0(\lambda)$ and $N_1(\lambda)$ get to the minimum estimate. At $\lambda = 1000$, $\lceil\pi\lambda^2\rceil = 3141593$ and $N_0(\lambda) = 3145520$; only $0.125%$ of the squares total area is outside the circular disk.

If you don't want to calculate the two sums, you can always start from the definitions of $N_0(\lambda)$ and $N_1(\lambda)$, and create a (possibly piecewise) polynomial $f(\lambda)$ such that $f(\lambda) \ge \min( N_0(\lambda), N_1(\lambda) )$ for all $\lambda \gt 0$. I personally would use the numerical sums directly.

Related Question