Triangle cellular automaton


Dec. 2, 2019

Introduction

Cellular automata are grids of cells which can be different colours. The colours update each turn based on how the grid is currently coloured and some set of rules. They are normally generated by computer, but originally they were done with pencil and paper.

The most famous cellular automaton is probably Conway's Game of Life. This uses a 2D grid of cells which can be black or white (alive or dead). Each turn, the colour of every cell is updated based on the cells that surround it and some simple rules. Despite the simplicity of the rules, enormously complex behaviour can emerge.

Glider gun in Conway's Game of Life

I wanted to keep things as simple as I could for my five year old, so I used a triangular grid. A square grid seems simpler, but the triangular grid gives results faster and the colouring rule only uses two cells instead of three.

How it works

First you need a triangular grid, which you can print from here.

Start by colouring the top square. We used green because it was approaching Christmas and it looked a bit like a Christmas tree.

Then, go to the row below (with two squares) and colour any square that has exactly one coloured square above (which for the second row will be both of them).

Keep working your way down, row by row, following this rule until you have done all the rows.

+ = + = + = + =

Where is the maths

The first thing I like about this activity is that we are using the plus operator on colours. It shows how mathematics is about define some some simple rules and seeing what happens.

The image created by following these rules is the Sierpiński triangle. This is a type of fractal, meaning that you can zoom in on one part of the image to find a copy of the original image.

Sierpinski triangle

We could replace the empty square with 0 and the green square with 1 to get binary arithmetic. Or we can start with 1 and then use normal arithmetic. This generates Pascal's triangle, which is full of interesting properties. If you colour the odd numbers, then you will generate the same Sierpiński triangle.

1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1

After I tweeted about our activity, a friend told me Mathologer had just released a video that talks about these properties in more detail and explores rules for three colours. (The tiles in his grid were hexagonal, but that's purely a cosmetic difference.)

Screenshot of the Mathologer video.png

Our experience

My five year old quite enjoyed this project, but kept checking with me that he was doing it right. I probably should have just let him do what he thought was best and see what happened, but when I tried that, he just missed out regions. He also got a bit bored by the end, and didn't finish it. But, since it was it was nearly Christmas, he did decorate it.

cellular_automaton.jpeg

Before I explained what we were going to do, my son found the page with two grids I'd printed out and started colouring in cells. He made it so the grids where reflections on one another, because he'd been doing symmetry at school. It looks like there's a worthwhile activity in there somewhere.

IMG_2390.JPG

Leave a comment

cancel reply