# Hexagonal vs square tiling: comparing total length of edges

Today I saw this short video: Why do honeybees love hexagons?

The video explains that bees want to store their food (honey) in appropriately sized cells and that wax -the thing that makes the cells- is quite 'expensive' for bees to create. So the bees want to choose an efficient cell shape. What would be the most efficient one? The video continues to explain that a circle is the most efficient shape since it needs the shortest length to enclose a certain size area. But because circles cannot tile a plane, we have to choose a tiling shape.

The main claim of the video is that hexagons (as opposed to squares or triangles) are the most efficient shape for bees to use, because they use less wax to store the same amount of honey. This is definitely true if we are talking about a single cell. A square of 1 unit area has a side of 1 unit length, and a total perimeter of 4 units length, while the equivalent regular hexagon of 1 unit area has a side of $\sqrt\frac{2}{3\sqrt3}\approx 0.62$ and total perimeter length of $6\cdot\sqrt\frac{2}{3\sqrt3}\approx 3.72$. So we need less length (wax) to enclose the same area (honey)

What happens with tiling though? This was not obvious to me despite the video presenting it like so. With tiling, edges are shared. Could this affect the efficiency? I thought about it and I have an answer, I just need other people to double check my reasoning.

First, we have to determine what we are comparing. I think that the tilings need to have the same area cells (whatever their shape) and the same number of cells. This way we are comparing tilings that have the same total area, and the same number of cells. I think that's fair but I am ready to listen to other opinions.

Let's first look at square tiling. Here's an image of an $8\times8$ unit squares:

What is the total length of all edges? It's easy to calculate. We have $9$ horizontal lines of length $8$ and $9$ vertical lines of length $8$. In general, for $n \times n$ unit squares we have $(n+1)n + (n+1)n = 2(n+1)n$ unit lengths.

How does this compare to hexagon tiling? Look at the following image of $8\times8$ unit hexagons:

We again can notice $9$ "zigzag" horizontal lines and $9$ "zigzag" kind of vertical lines. What is the length of each of these lines? As you can see from the image, they span 8 hexagons, and 2 sides of each hexagon making the length of each line $8\times 2\sqrt\frac{2}{3\sqrt3}$. But there is overlap between the horizontal and vertical lines. Let's say we start with the vertical lines, then you can see that we have included half of the horizontal lines as well (except for a line at the boundary). So the total length of edges for a grid of $8\times8$ unit hexagons is $9 \cdot 8\cdot 2h + 9 \cdot 8h + 7h$, where $h=\sqrt\frac{2}{3\sqrt3}$ is the length of the side of the unit hexagon.

In general for a grid of $n\times n$ unit hexagons the total length is:

$$2h\cdot(n+1)n + h\cdot(n+1)n + h\cdot(n-1) = h\cdot(3(n+1)n + n-1)$$

The ratio of the sum of side lengths of the hexagonal tiling over the square tiling is: $$\frac{3h}{2}+ \frac{h(n-1)}{2(n+1)n}$$

So it does depend on $n$. The ratio is always less than $1$ (so hexagonal is always more efficient). It's smallest value is for $n=1$ and its largest value is for $n=2,3$. As $n \rightarrow \infty$ the ratio approaches the value of the ratio for a single cell ($n=1$).

(Note: initially I had found that the ratio does not depend on $n$, which seemed surprising. The problem was that I had missed the term $(n-1)h$ )

My question has three parts:

1. Is my reasoning correct about the main result?
2. Can we do even better in efficiency? For example, what if we tile the hexagons to form a hexagonal bigger shape instead of a rhombus one? Or any other shape. My intuition says we probably can, but will this difference vanish as $n$ gets larger?
3. Is there any other shape that can tile the plane more efficiently in terms of the total length of edges used? Can we prove there isn't one?
• Nice question. Related: ams.org/journals/bull/1964-70-04/S0002-9904-1964-11155-1/… – Ethan Bolker Jun 18 '17 at 14:07
• Simply imagine that the bees made the cells individually but with walls half as thick. They then pack these prefab cells together to make their honeycomb tiling. The efficiency of the tiling as a whole is then exactly the same as the efficiency of the individual tiles. Note that outer boundary edges here count as half an internal edge, which is not how you counted it. However, as the tiling grows, the outer edge grows linearly whereas the total edge length grows quadratically. So the difference in how you count the boundary matters less as the number of cells grows. – Jaap Scherphuis Jul 24 '17 at 9:24
• @JaapScherphuis I had the intuition that as $n$ grows the efficiency should increase. The surprising result was that my analysis showed that efficiency did not depend on $n$ at all. Your analogy also pointed to a direction of the efficiency being $n$-dependent. I looked at my formulas again, and found a mistake. The efficiency is indeed dependent on $n$. So thank you for making me revisit the problem :) I'd be grateful if you could comment/answer any of my two last questions. – Thanassis Jul 24 '17 at 14:47

Imagine that the bees made the cells individually but with walls half as thick. They then pack these prefab cells together to make their honeycomb tiling. Clearly, the amount of wax per cell is constant here, so the efficiency of the tiling as a whole is then exactly the same as the efficiency of the individual tiles, regardless of how large it grows.

As hexagonal cells have a better area to perimeter ratio than squares or triangles, they are the best choice to build with for large numbers of cells.

Note however that to turn this into a sturdy honeycomb, they will still have to reinforce the outer boundary edges to a full wall thickness, and this loss is what counts. It shows that the efficiency of the honeycomb is best when the outer boundary is as small as possible.

Assuming they build the honeycomb out in two dimensions, the outer boundary grows linearly, whereas the total edge length (and number of cells) grows quadratically. So the relative loss shrinks as the number of cells grows. In fact, the efficiency approaches the theoretical limit (what it would be if they didn't need to reinforce the outer boundary).

Now the question is: If the bees have to stop building at some point, what is the best shape? I.e. what shape has the shortest boundary relative to the number of cells?

If there were big dents in the outer boundary, i.e. two consecutive 240 degree angles, then you could add a cell without changing the boundary length. So we can assume that there are no such dents.

Similarly, you can also assume that there is no cell that has four boundary edges. If there were one, you could reattach it anywhere else without changing the boundary length, and in doing so create a dent. (I'm assuming there are enough cells so that there is some side of 3 or more cells to attach it to). Since we can rearrange and add cells without changing the total border length when there are cells with four sides on the border, we can assume there are no cells sticking out like that.

From this you will find that the only shapes left are essentially hexagonal. Not all hexagons are equally efficient however.

Suppose one side of the hexagon shape consisted of k cells, and a non-adjacent side had k+2 (or more) cells, then you could move one whole row of k cells from the first side and stick it onto the other side. This does not change the total boundary length. You have however created a dent that you can fill by adding a cell, so you can improve the efficiency.

Therefore the most efficient shapes are hexagons where the sides are almost of the same length (differ by at most 1 cell). These are local maxima, in that there is no way to rearrange and add cells without also increasing the boundary. Nevertheless, if you compare them, I think you'll find that the regular hexagon arrangement (i.e. all sides have exactly the same number of cells) will be the most efficient for its size.

• Thank you, this is the kind of answer I was hoping for (starting to explore packing properties). Kudos for the illustrations! I do not understand this argument though: "you could reattach it anywhere else without changing the boundary length, and in doing so create a dent". As we start growing our comb, we are bound to have cells with 4 outer sides. – Thanassis Jul 26 '17 at 7:34
• Yes, as you add cells, you will get cells with 4 outer sides. The configuration you have at that point is not efficient though. You can then add more cells without changing the boundary length, making it more efficient. My argument is not really about finding the most efficient shape for a specific number of cells by minimising its boundary length (for some numbers of cells 4-outer-wall cells may be unavoidable). My argument is about finding the most efficient shape for a particular boundary length by maximising the number of cells. I show that the hexagon is the best point to stop building. – Jaap Scherphuis Jul 26 '17 at 9:21

You can make the hexagons a little more efficient by packing them into a shape closer to a circle like below. This will make the number of outside edges smaller compared to the inside edges, so less total edges for a given area. The difference is linear in the dimension of the overall shape while the area is quadratic, so the effect gets smaller with larger grids.

It is probably fairer to keep the hexagons and squares to the same diameter, not the same area, or maybe even the same side length. That will be a further advantage to the hexagons. For either shape it is clear the most efficient approach for a given area is one large cell, but there must be mechanical restrictions that make the bees divide the comb into cells of a given size. The idea is to be fairer about the mechanical stresses the cells must withstand. An individual cell with more sides (say eight) will be more efficient because it is closer to a circle, but it won't cover the plane and needs to be mixed with small squares which are rather inefficient.

• Thank you. What you describe about the packing, agrees with my intuition. I would be interested to know exact formulas, and/or proving that this is the best packing we can do. I am also intrigued by your suggestion of comparing non-equal areas. I do not think it's fair the way the problem was posed, but I can see your point on mechanical stress. However I am not concerned too much about what bees actually do (they seem to be packing circles, and a hexagonal packing just naturally falls into place). – Thanassis Jul 26 '17 at 7:20

A square of area 1 will have side 1, and thus its perimeter is 4.

A regular hexagon of side $s$ has area $s^2 \times 3\sqrt{3}/2$. So a regular hexagon of area 1 has side $\sqrt{2/(3\sqrt{3})} = (4/27)^{1/4} \approx 0.6204$ and thus its perimeter is $6 \times (4/27)^{1/4} \approx 3.722$.

Thus consider a large tiling of $n$ cells. If those cells are squares then the total amount of "wax" (in the honeycomb metaphor) used by all the tiles will be just a bit larger than $2n$ - there are $n$ cells, each of perimeter $4$, but each wall is used twice, except for linearly many walls (so some multiple of $\sqrt{n}$, which we can ignore if $n$ is large) used along the edges. If those cells are hexagons then the total amount of wax is just a bit larger than $3(4/27)^{1/4} n \approx 1.861n$ which is smaller.

Furthermore, the size of the big shape (hexagon vs. rhombus), for example, won't matter if $n$ is large - as the number of cells $n$ gets large, for a fixed shape, the amount of wax which is boundary wax decays like $1/\sqrt{n}$.

• Yes, I agree with all of the above, and I believe I mention all of these points in the description of the question (for some I just say "I believe" without providing any proof). Did I miss any new info in your answer? – Thanassis Jul 26 '17 at 7:43

Hexagonal packing is the most-efficient packing for circles in a two-dimensional plane.

Bees basically make circles, then expand them outward. When flattened as such, you get hexagons.

Basically, they use honeycombs because that's how you densely pack circular tubes.