Saturday, November 03, 2012

Proof that a pyramid of hexagons contains a cubic number of tiles

In my previous blog post I observed that there are a cubic number of hexagons in a pyramid of hexagonal boards (such as found in the game Take It Easy).

My main aim is to provide a visual explanation of why this is so. But first I would like to prove the result algebraically...

The first few equations are reminders of some well-known mathematical results which we will need.


If f is a function defined on the numbers 0, 1, ... n, then

$$ \sum_{{i}={1}}^{n}[f(i)-f(i-1)] = f(n)-f(0) \tag{1}$$
This is true because if you expand out the summation, all the terms except f(n) and f(0) cancel out:
$$ [f(n)-f(n-1)] + [f(n-1)-f(n-2)]+...+[f(2)-f(1)] + [f(1)-f(0)] $$


Recall the formula for the triangular number series: $$ \sum_{{i}={1}}^{n}i= \frac{n \cdot \left(n+1\right)}{2} \tag{2} $$
[You can easily prove this using equation 1. Just set $ f(i) = \frac{i(i+1)}{2} $. Then $ f(i) - f(i-1) = i $ .]


Expand: $$ (n-1)^{3} = n^{3} -3n^{2} + 3n - 1 $$ Then rearrange the terms to give: $$ n^{3} - (n-1)^{3} = 3n^{2}- 3n + 1 \tag{3} $$

A hexagonal board can be seen as concentric rings of hexagonal tiles. Ring 1, the innermost "ring", simply contains the single hexagon at the centre of the board. Ring 2, just outside it, contains 6 hexagons. Ring 3 contains 12. Ring 4 contains 18, and so forth.

So the number of hexagons in ring k is:
$$ r(k)=\begin{cases} 1& \text{if k = 1,}\\ 6(k-1)& \text{if k > 1} \end{cases} $$

Hence the number of hexagons in all the rings from 1 to k is:

$$ \begin{align*} h(k) &= \sum_{{i}={1}}^{k}r(i) \\ &= r\left(1\right) + \sum_{{i}={2}}^{k}[6(i-1)] \\ &= 1 + 6 \cdot \sum_{{i}={1}}^{k-1}i & \text{by re-indexing the summation} \\ &= 1 + 6 \cdot \frac{ \left(k-1\right) \cdot k }{2} & \text{by equation (2)} \\ &= 1 + 3k^{2} - 3k \\ &= 3k^{2} - 3k + 1 \tag{4} \end{align*} $$

Let $ f(k) = k^{3} $

Then:
$$ \begin{align*} f(k) - f(k-1) &= k^{3} - (k-1)^{3} \\ &= 3k^{2} - 3k + 1 & \text{by equation (3) } \\ &= h(k) & \text{by equation (4) } \end{align*} $$ Hence: $$ h(k) = f(k) - f(k-1) \tag{5} $$

So the number of hexagonal tiles in a hexagonal pyramid with n layers is:

$$ \begin{align*} p(n) &= \sum_{{k}={1}}^{n}h(k) \\ &= \sum_{{k}={1}}^{n}[f(k) - f(k-1)] & \text{by equation (5)} \\ &= f(n) - f(0) & \text{by equation (1)} \\ &= n^{3} - 0^{3} \\ &= n^{3} \end{align*} $$

Q.E.D.


No comments: