I mentioned today in class that something rather special happens if you colour the even and odd numbers in Pascal’s triangle differently.

A quick reminder that Pascal’s triangle looks like:

pascal

For the first 9 layers.

In the animation below I have simply put an “o” for an odd number and put it in red, and “e” for an even number and put it in brown. Here I am starting with the Pascal triangle with a single entry, and building up in the animation two lines at a time, up to 100 lines. You see that a rather interesting pattern emerges.

ezgif.com-optimize

The Mathematica code for this is:

tt = Table[With[{n = nn, p = nn},
   Graphics[Table[Text[Style[With[{x = Binomial[n – j, n – i]}, If[OddQ[x], Style[o, Red], e]],Round[200/Sqrt[p]]], {Sqrt[3] (i – j/2), 3 j/2}], {i, n}, {j, i}], ImageSize -> 1000]], {nn, 1, 100, 2}]

and then exported as a .gif. (see here for a simplified version and some more Pascal’s triangle code).

This is known as the Sierpinski triangle, but we need to know something about fractals to really see what’s happening here.

Some systems seem to be pretty simple when you look at them at first, but they can actually have some amazing properties when you start to look more carefully.

Let’s start off discussing some apparently simple shapes which we define iteratively. Let’s start off with an equilateral triangle. Take each of the sides and cut out the middle third of each one, and replace it with two sides of another triangle as in:

koch2

Now take each line and cut out the middle third and replace that with two sides of a smaller triangle.

You can work out the length of the line at each stage. Clearly the total length of the lines in the first triangle (if we say that each side is of length 1) is 3. The second figure has had 3 sections cut out, each of which are length 1/3, but they have been replaced by 6 lines, of length 1/3, so the second figure has 3-3(1/3)+6(1/3)=4. The third figure has had 12 pieces of length 1/9 cut out, and 24 pieces of the same length have been put back in their place so the length of the line in the third figure is now: 3-3(1/3)+6(1/3)-12(1/9)+24(1/9)=3+3/3+12/9. For the fourth we have cut out another 96 pieces of length 1/27 and replaced them with 192 pieces of this length: 3-3(1/3)+6(1/3)-12(1/9)+24(1/9)-48(1/27)+96(1/27)=3+3/3+12/9+48/27.

Can we see a pattern here and can we work out what the length of the line will look like as we iterate over and over again? We see that after each iteration, the number of sides increases by 4 (each individual line is split into four pieces) but the length of each line is 1/3 that of the previous. Thus, at the n^{th} step, the total length of the perimeter will be:

 

Length=3\left(\frac{4}{3}\right)^n

 

Hang on a minute! This goes to infinity as we take the number of iterations to infinity!  Does that mean that the length of the perimeter of the Koch snowflake is infinite, even though it would appear to fit into a finite region (and indeed you can prove this) with area:

 

Area=\frac{8}{5}\frac{\sqrt{3}}{4}

 

Yup.

Let’s do something a bit different now, and rather than start off with the lines making up a triangle, let’s start with a solid triangle, and work backwards by removing parts of it at each iteration. Let’s start by removing a triangle from the centre, which leaves us with three triangles (and a space in the middle).

st1

We can then do the same thing, removing a quarter of each remaining triangle at each iteration. We’ll certainly end up with something with smaller and smaller area as we’re cutting out more of the area each time.

st2

st3

st4

In fact we end up with something (called a Sierpinski triangle) with zero area!! That seems pretty crazy, but then it seemed pretty crazy that the length of the perimeter of the Koch snowflake was infinite, so maybe we shouldn’t be so surprised with such a result when we are iteratively doing things like this.

Notice now how this figure looks like the animated figure of the odd and even numbers from Pascal’s triangle.

In fact what is strange is that we can also construct this same object by starting with lines, in the same way that we can construct the Koch snowflake, but just with a different iteration rule.

This should seem a little strange that we can either draw this object using an infinite number of one dimensional lines of increasingly smaller length, or we can construct it by starting with an area and chipping away smaller and smaller bits.

I said something rather peculiar above, which was that it wasn’t perhaps right to call the length of the Koch snowflake a length, when we’ve taken an infinite number of iterations. Indeed if you figure it out, the ‘length’ is infinite. But it certainly doesn’t look much like an area, does it?

A line is a one dimensional object and so the perimeter of a triangle can be said to be one dimensional. If we’ve taken a finite number of iterations in the construction of our Koch snowflake, it is certainly one dimensional, but how about if we take an infinite number of iterations (we can’t do that, but we can still ask questions about the object you would get, and ask if it is more like a one dimensional object, or somehow closer to 2 dimensions). It turns out that when you iterate these operations infinitely we can end up with objects with fractional dimension

How clear is this post?