Comparing perimeters of arrays of hexagons vs. squares
April 25, 2006 8:42 AM
Let's say I have an array of 100 adjoining hexagons, 10 hexagons per side. Let's also say I also have an array of 100 adjoining squares, 10 squares per side. Each single hexagon and each square encloses the same area. Is the perimeter of the array of 100 hexagons longer than the perimeter of the array of 100 squares?
It seems to me that necessarily the lumpy exterior of the hexagonal array will be longer than the perimeter of the (square) 10 X 10 array of squares. However, each individual hexagon has a more efficient perimeter to area ratio, and so the overall array of hexagons should be smaller in diameter, perhaps compensating for the lumpiness. I know I could just draw a bunch of squares and hexagons but I'd like to know if there is a logical or pure geometric principles answer to this.
(It stems from a student expressing surprise at a result in a GIS simulation she was running - the result, which found arrays of squares gave better results than arrays of hexagons for a perimeter-minimizing objective function, seemed to me self evident but neither of us are geometers. Googling just gave me endless discourses on the wisdom of honeybees.)
It seems to me that necessarily the lumpy exterior of the hexagonal array will be longer than the perimeter of the (square) 10 X 10 array of squares. However, each individual hexagon has a more efficient perimeter to area ratio, and so the overall array of hexagons should be smaller in diameter, perhaps compensating for the lumpiness. I know I could just draw a bunch of squares and hexagons but I'd like to know if there is a logical or pure geometric principles answer to this.
(It stems from a student expressing surprise at a result in a GIS simulation she was running - the result, which found arrays of squares gave better results than arrays of hexagons for a perimeter-minimizing objective function, seemed to me self evident but neither of us are geometers. Googling just gave me endless discourses on the wisdom of honeybees.)
Assuming they tessellate, as ChasFile said, the hex array has 4 exposed sides for every 2 hexes, while the squares have only one. Without calculating all of the exposed sides and around the corners, and finding from here:
http://www.mathreference.com/geo,hex.html
the area/side relation of hexes, a hex is made up of 6 equilateral triangles, each of area bh/2, where h is the dropped perpendicular (h=3b*sqrt(3)/2), for an Area = 1, A=6bh/2=3bh=3*b^2*sqrt(3)/2, or,
b(hex) = 0.620
For the square, A = 1 = b^2, or
b(sq) = 1
So even though the square has the longer side, there are twice as many exposed sides for the hex, and 2*0.620 > 1, so a quick caluclarion suggests the hex perimeter is larger.
posted by toomanyplugs at 9:03 AM on April 25, 2006
http://www.mathreference.com/geo,hex.html
the area/side relation of hexes, a hex is made up of 6 equilateral triangles, each of area bh/2, where h is the dropped perpendicular (h=3b*sqrt(3)/2), for an Area = 1, A=6bh/2=3bh=3*b^2*sqrt(3)/2, or,
b(hex) = 0.620
For the square, A = 1 = b^2, or
b(sq) = 1
So even though the square has the longer side, there are twice as many exposed sides for the hex, and 2*0.620 > 1, so a quick caluclarion suggests the hex perimeter is larger.
posted by toomanyplugs at 9:03 AM on April 25, 2006
here's a sample sheet of hex arrays to illustrate:
http://www.fanaticus.org/DBA/campaigns/hexgrid/campaignhexmap.jpg
posted by toomanyplugs at 9:04 AM on April 25, 2006
http://www.fanaticus.org/DBA/campaigns/hexgrid/campaignhexmap.jpg
posted by toomanyplugs at 9:04 AM on April 25, 2006
Here's a hint: given an area, A, for both squares and hexagons, the side of a square is sqrt(A). The side of a hex is sqrt(4A/sqrt(3)). The perimeter of a 10x10 grid of squares is 40sqrt(A). Draw your picture of hexes, count the sides and multiply by sqrt(4A/sqrt(3)).
posted by plinth at 9:06 AM on April 25, 2006
posted by plinth at 9:06 AM on April 25, 2006
hmm doesn't seem right to me, but i'm no mathematician. instead of 100, i've used four, but the ratio should be the same
a 1" square has a 1" side, and you end up with 8 sides exposed, for a total of 8"
a 1" hex has a .62" side, and you end up with 16 sides exposed, for a total of 9.92"
but again, i could be wrong here
posted by poppo at 9:07 AM on April 25, 2006
a 1" square has a 1" side, and you end up with 8 sides exposed, for a total of 8"
a 1" hex has a .62" side, and you end up with 16 sides exposed, for a total of 9.92"
but again, i could be wrong here
posted by poppo at 9:07 AM on April 25, 2006
Let me try to resolve your problem. Hexagonal closest packing is the tightest way to pack spheres together. Accordingly, it should have the smallest perimeter.
However, if you are forcing your hexagons into ten rows of ten each (because you think in X-Y axes which are 90 degrees apart), that's not the smallest perimeter possible. Instead think of a center hexagon, surrounded by other hexagons - six surrounding it at distance 1, twelve more hexagons surrounding those, etc. THAT shape packs hexagons together in a nearly spherical fashion and accordingly has a small perimeter compared to the area covered... You can actually uses axes with that shape which are 120 degrees apart and it works well, by the way...
If you force the hexagons to pack into a square shape (10x10), you're effectively negating their advantage by making them pack non-optimally.
posted by jellicle at 9:13 AM on April 25, 2006
However, if you are forcing your hexagons into ten rows of ten each (because you think in X-Y axes which are 90 degrees apart), that's not the smallest perimeter possible. Instead think of a center hexagon, surrounded by other hexagons - six surrounding it at distance 1, twelve more hexagons surrounding those, etc. THAT shape packs hexagons together in a nearly spherical fashion and accordingly has a small perimeter compared to the area covered... You can actually uses axes with that shape which are 120 degrees apart and it works well, by the way...
If you force the hexagons to pack into a square shape (10x10), you're effectively negating their advantage by making them pack non-optimally.
posted by jellicle at 9:13 AM on April 25, 2006
poppo, I think you get 14 sides exposed on a 4 X 4 (8.68, still longer). Also, as you scale up, the sides of the hex array differ from the "corners" in a way that is different than the square array.
On preview: jellicle -- good point, that may be the root of my confusion. Can one demonstrate simply that the perimeter of the optimal "cluster" of tesselated hexagons of area A is smaller the optimal "cluster" (10X10 array) of squares of area A? Do the perimeter:area advantages of the single hexagon really scale into optimally packed hexagons when talking perimeter? (sorry if thats an obvious question, I never did any geometry to speak of)
posted by Rumple at 9:25 AM on April 25, 2006
On preview: jellicle -- good point, that may be the root of my confusion. Can one demonstrate simply that the perimeter of the optimal "cluster" of tesselated hexagons of area A is smaller the optimal "cluster" (10X10 array) of squares of area A? Do the perimeter:area advantages of the single hexagon really scale into optimally packed hexagons when talking perimeter? (sorry if thats an obvious question, I never did any geometry to speak of)
posted by Rumple at 9:25 AM on April 25, 2006
Also, as you scale up, the sides of the hex array differ from the "corners" in a way that is different than the square array.
good point, i hadn't thought of that
posted by poppo at 9:32 AM on April 25, 2006
good point, i hadn't thought of that
posted by poppo at 9:32 AM on April 25, 2006
Demonstrate simply, I don't know. But Google for hexagonal closest packing to find lots of info relating to 3-dimensional packing of spheres. Minimizing the area encompassed by 3-d spheres is basically the same problem as minimizing the perimeter of 2-D spheres.
I think your probem is this - to minimize the perimeter of n hexagons, when you add each new hexagon to the previously-existing group, you have to add it in such a way that touches the most neighbors possible. You would never add a hexagon that touches only on one face if you could add it somewhere else where it touches two faces or three faces, right? If you look at diagram 1 here (which is hexes in a grid shape), you see several hexes at the four corners which touch only on two faces, while there are areas on the outer surface at the top and bottom where those hexes could be placed where they would touch on three faces instead of two. So simply moving those four corner hexes would reduce the perimeter without changing the surface area.
posted by jellicle at 9:46 AM on April 25, 2006
I think your probem is this - to minimize the perimeter of n hexagons, when you add each new hexagon to the previously-existing group, you have to add it in such a way that touches the most neighbors possible. You would never add a hexagon that touches only on one face if you could add it somewhere else where it touches two faces or three faces, right? If you look at diagram 1 here (which is hexes in a grid shape), you see several hexes at the four corners which touch only on two faces, while there are areas on the outer surface at the top and bottom where those hexes could be placed where they would touch on three faces instead of two. So simply moving those four corner hexes would reduce the perimeter without changing the surface area.
posted by jellicle at 9:46 AM on April 25, 2006
The number of sides exposed in a square grid of tesselated hexagons is always (I think) 8n-2, taking into account corners, where n is the number of hexagons on a side of the grid. The number of sides exposed in a grid of squares with that many squares is 4n. The ratio of sides exposed (square sides to hex sides) is therefore 4n:(8n-2) for any square grid. Since the ratio of a single hexagon side to a single square side (assuming equal area) is 1:1.612 (as people have shown how to calculate above), the ratio of perimeters will be 6.448n:(8n-2). (square to hex.) This will only be greater than 1 for n=1 (the line crosses 1 at n=1.552), so for greater values of n, a hex grid is guaranteed to have a larger perimeter.
posted by advil at 10:02 AM on April 25, 2006
posted by advil at 10:02 AM on April 25, 2006
advil -- perfect, thanks, that makes sense.
Now, I wonder ..... heh ... how one might express the relationship as one deviates from optimal packing of hexes in jellicle's concentric sense, either towards a regular, symmetrical array, or towards an elongate or even irregular array. Presumably, the more you deviate not just from concentric but even from symmetrical N by N the hex-based perimeters become even proportionally longer than the square-based ones.
Again, the reason being, the student was modelling Marine Protected Areas within a complex archipelago, using a GIS, in which small management units were constructed as either hexagonal or square cells. Each cell had attributes such as fish spawning productivity or shellfish productivity, and based on these attributes, an algorithm tried to lump cells together to create coherent managment zones (protected areas). To avoid fragmentation into an archipelago of tiny management zones (hard to actually manage) the algorithm seeks to minimize the perimeter of the zone(s) and thus create 3 or 4 large zones rather than hundreds of tiny ones.
Hence the student's surprise that squares worked better than hexagons.
However, there are numerous edge effects (islands, study area boundaries) that prevent perfectly "round" protected areas, that is, the perimeter-reduction algorithm cannot optimize given other constraints of the system. I would find it interesting to know under what boundary conditions (in this case, the shape of the environment being a complex set of long thin islands creating complex, basically linear water bodies) a hex cell approach becomes less preferable to a square cell approach, and whether any other shape is preferable -- eg, elongate parallelograms or something. The "optimal" solution shape for a Marine Protected Area in this study area may, in fact, be a long ovoid or something...
Probably trial and error is the way to go but it interests me since it challenges naive assumptions of optimality built into some GIS programs which don't translate well into the real world.
posted by Rumple at 10:48 AM on April 25, 2006
Now, I wonder ..... heh ... how one might express the relationship as one deviates from optimal packing of hexes in jellicle's concentric sense, either towards a regular, symmetrical array, or towards an elongate or even irregular array. Presumably, the more you deviate not just from concentric but even from symmetrical N by N the hex-based perimeters become even proportionally longer than the square-based ones.
Again, the reason being, the student was modelling Marine Protected Areas within a complex archipelago, using a GIS, in which small management units were constructed as either hexagonal or square cells. Each cell had attributes such as fish spawning productivity or shellfish productivity, and based on these attributes, an algorithm tried to lump cells together to create coherent managment zones (protected areas). To avoid fragmentation into an archipelago of tiny management zones (hard to actually manage) the algorithm seeks to minimize the perimeter of the zone(s) and thus create 3 or 4 large zones rather than hundreds of tiny ones.
Hence the student's surprise that squares worked better than hexagons.
However, there are numerous edge effects (islands, study area boundaries) that prevent perfectly "round" protected areas, that is, the perimeter-reduction algorithm cannot optimize given other constraints of the system. I would find it interesting to know under what boundary conditions (in this case, the shape of the environment being a complex set of long thin islands creating complex, basically linear water bodies) a hex cell approach becomes less preferable to a square cell approach, and whether any other shape is preferable -- eg, elongate parallelograms or something. The "optimal" solution shape for a Marine Protected Area in this study area may, in fact, be a long ovoid or something...
Probably trial and error is the way to go but it interests me since it challenges naive assumptions of optimality built into some GIS programs which don't translate well into the real world.
posted by Rumple at 10:48 AM on April 25, 2006
By the way, you may be interested in the circle packing problem.
posted by advil at 10:49 AM on April 25, 2006
posted by advil at 10:49 AM on April 25, 2006
Cool. So based on that Wolfram page, is there a definable relationship between "packing density" and perimeter, for regular shapes of the same area?
Ignoring the gaps between the circles, does the circular hex-pack solution have a smaller perimeter than the hexagonal hex-pack solution?
Back to google for me!
Thanks everyone for their very helpful ideas in this. I emailed a summary to the student....
posted by Rumple at 10:57 AM on April 25, 2006
Ignoring the gaps between the circles, does the circular hex-pack solution have a smaller perimeter than the hexagonal hex-pack solution?
Back to google for me!
Thanks everyone for their very helpful ideas in this. I emailed a summary to the student....
posted by Rumple at 10:57 AM on April 25, 2006
Mathematics aside (never thought I'd say that) the reason that your objects dont preserve the same area/perimeter properties is that this is now a packing problem and, although you can pack squares into larger squares, you cannot pack hexagons into larger hexagons. A square tiling happens to be a self-similar tiling. You cant generalize from the unit to the collection.
As another example, you can take right triangles and pack them into an array of squares (each triangle is half a square) In this case you have, through packing, actually increased the area/perimeter efficiency. Likewise, packing circles will always lower their efficiency - since you cant pack circles into circles.
posted by vacapinta at 10:57 AM on April 25, 2006
As another example, you can take right triangles and pack them into an array of squares (each triangle is half a square) In this case you have, through packing, actually increased the area/perimeter efficiency. Likewise, packing circles will always lower their efficiency - since you cant pack circles into circles.
posted by vacapinta at 10:57 AM on April 25, 2006
Off-topic:
In Mandelbrot's book there's a picture of a rather modified hexagon (it's got six-fold symmetry, anyways) with the property that when you put seven of them together, you get a larger such guy. (Like four squares, but not like seven hexagons.) It has a fractal boundary, of dimension > 1 (as I recall it's log3 7), so infinite length, which would make formulating a corresponding question more difficult.
posted by Aknaton at 8:15 AM on April 26, 2006
In Mandelbrot's book there's a picture of a rather modified hexagon (it's got six-fold symmetry, anyways) with the property that when you put seven of them together, you get a larger such guy. (Like four squares, but not like seven hexagons.) It has a fractal boundary, of dimension > 1 (as I recall it's log3 7), so infinite length, which would make formulating a corresponding question more difficult.
posted by Aknaton at 8:15 AM on April 26, 2006
I like advil's answer.
The question does ask for equal area hexagons, not inscribed hexagons, and it is silent on hexagon orientation, implicity leaving both alternatives to consider (i.e., vertex to vertex or tesselated.)
For fun, I did the proof of area for hexagons! Doesn't take too long, but it's good to do some basic geometry periodically.
I calculate the radius (thus each side) of the equivalent area hexagon to be 6.21, the number of exposed hexagon sides tesselated to be 8n-2 and the number of exposed hexagon sides vertex to vertex to be 10n-1, where n is the order of the square matrix. This leaves perimeters of 400 for the squares, 484 for the tesselated hexagons and 608 for the vertex aligned hexagons.
Fun problem! Thanks for the diversion.
posted by FauxScot at 11:16 AM on April 26, 2006
The question does ask for equal area hexagons, not inscribed hexagons, and it is silent on hexagon orientation, implicity leaving both alternatives to consider (i.e., vertex to vertex or tesselated.)
For fun, I did the proof of area for hexagons! Doesn't take too long, but it's good to do some basic geometry periodically.
I calculate the radius (thus each side) of the equivalent area hexagon to be 6.21, the number of exposed hexagon sides tesselated to be 8n-2 and the number of exposed hexagon sides vertex to vertex to be 10n-1, where n is the order of the square matrix. This leaves perimeters of 400 for the squares, 484 for the tesselated hexagons and 608 for the vertex aligned hexagons.
Fun problem! Thanks for the diversion.
posted by FauxScot at 11:16 AM on April 26, 2006
This thread is closed to new comments.
posted by ChasFile at 8:52 AM on April 25, 2006