I've had this problem for a few years. It was on an informatics contest in my town a while back. I failed to solve it, and my teacher failed to solve it. I haven't met anyone who was able to solve it. Nobody I know knows the right way to give the answer, so I decided to post it here:
Ze problem
Given a rectangle, X by Y, find the minimum amount of circles N with a fixed given radius R, necessary to fully cover every part of the rectangle.
I have thought of ways to solve it, but I have nothing definite. If each circle defines an inner rectangle, then R^2 = Wi^2 + Hi^2
, where Wi
and Hi
are the width and height of the practical area covered by each circle i
. At first I thought I should make Wi
equal to Wj
for any i
=j
, the same for H
. That way, I could simplify the problem by making the width/height ratios equal with the main rectangle (Wi/Hi
= X/Y
). That way, N=X/Wi
. But that solution is surely wrong in case X
greatly exceeds Y
or vice versa.
The second idea was that Wi
=Hi
for any given i
. That way, squares fill space most efficiently. However if a very narrow strip remains, it's much more optimal to use rectangles to fill it, or better yet - use rectangles for the last row before that too.
Then I realized that none of the ideas are the optimal, since I can always find better ways of doing it. It will always be close to final, but not final.
Edit
In some cases (large rectangle) joining hexagons seem to be a better solution than joining squares.
Further Edit
Here's a comparison of 2 methods: clover vs hexagonal. Hexagonal is, obviously, better, for large surfaces. I do think however that when the rectangle is small enough, rectangular method may be more efficient. It's a hunch. Now, in the picture you see 14 circles on the left, and 13 circles on the right. Though the surface differs much greater (double) than one circle. It's because on the left they overlap less, thus waste less surface.
The questions still remain:
34 (1997) 63–79), Heppes and Melissen have determined the thinnest coverings of a rectangle with up to five equal circles and also for seven circles if the aspect ratio of the rectangle is either between 1 and or larger than .
the minimum radius for 23 circles to over a unit square is at most 0.14124482238793135951.
For X and Y large compared to R, a hexagonal (honeycomb) pattern is near optimal. The distance between the centers of the circles in the X-direction is sqrt(3)*R
. The distance between rows in the Y-direction is 3*R/2
, so you need roughly X*Y/R^2 * 2*/(3*sqrt(3))
circles.
If you use a square pattern, the horizontal distance is larger (2*R
), but the vertical distance is much smaller (R
), so you'd need about X*Y/R^2 * 1/2
circles. Since 2/(3*sqrt(3) < 1/2
, the hexagonal pattern is the better deal.
Note that this is only an approximation. It is usually possible to jiggle the regular pattern a bit to make something fit where the standard pattern wouldn't. This is especially true if X and Y are small compared to R.
In terms of your specific questions:
The hexagonal pattern is an optimal covering of the entire plane. With X and Y finite, I would think it is often possible to get a better result. The trivial example is when the height is less than the radius. In that case you can move the circles in the one row further apart until the distance between the intersecting points of every pair of circles equals Y.
Having a regular pattern imposes additional restrictions on the solution, and so the optimal solution under those restrictions may not be optimal with those restrictions removed. In general, somewhat irregular patterns may be better (see the page linked to by mbeckish).
The examples on that same page are all specific solutions. The solutions with more circles resemble the hexagonal pattern somewhat. Still, there does not appear to be a closed-form solution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With