Playing with L-Systems

For today’s session of the math circle I jointly run for 5-7 year-olds, we got the kids to play with Lindenmayer Systems (L-Systems for short). L-Systems can be used as compact representations of complex geometric shapes, including fractals. The aim of the session was for children to understand that simple formulae can describe complex geometric objects, building on the intuition that properties of shapes can be described algebraically that we got through a previous session on symmetry and algebra.

I stumbled across this excellent L-System generator on the web, which was perfect for our needs as we didn’t need to install any software on the school laptops. After illustrating how the Koch Snowflake could be generated, we simply let them loose to experiment, suggesting that each time they set the number of iterations to 1 before exploring a greater depth of iteration. They seemed to really enjoy it. On a one-to-one basis, we discussed the reason that various formulae generated their corresponding shapes, trying to embed the link between the equations and the graphical representation, but the main emphasis was generating visually pleasing images.

Here are some of the curves they produced. In each case, the caption is of the form: number of iterations, angle, axiom, production rule.

I would have liked to have the time to discuss in more depth why the curve that appeared to fill the triangle had no white space visible.

Once we had finished, we finally drew together where I presented a simple L-System for the Sierpinski Triangle, an object they’d seen before in a previous session. There were several exclamations of awe, which are always great to hear!

Algebra and symmetry for 5-7 year-olds

At the encouragement of one of the teachers, I have resumed the math circle I was running a few years ago, jointly with her. Previous posts can be found here. This time we are targeting some of the youngest primary school children. So far, I’ve attended two sessions. In the first, we played with Polydron and I mainly used the session to observe the children and see what they’re capable of. In the second – described here – we experimented with symmetry.

Before the session, we created a few cardboard templates of three well-defined shapes, numbered 1, 2, and 3 in the picture below.

IMG_9197 (1).jpg

We told the children that we would be exploring a way of describing shapes as codes, and first had them cut out several copies of the shapes from coloured paper. This was not as easy as I had hoped – the children varied considerably in speed and accuracy of cutting.

We then told them that there were two operations that could be written down in our code, “next to”, written “;” meaning “the thing on the left of the semicolon is placed immediately to the left of the thing on the right” and “F” meaning “flip the shape in a vertical axis”. They seemed to understand this quite easily, and had no problems coming up and seeking clarification of any points. I hadn’t considered that they had not encountered the semicolon before, though, but this was not a problem, even if it was rendered more like a “j” in most of their written formulae.

We asked them to construct a couple of shapes, such as 2;F2 and F1;2, and then experiment with their own. They seemed to have a lot of fun, and the lower part of the photograph shows some that they were keen to show us when we reconvened in a circle on the carpet.

The children noticed that some shapes such as 2;F2 and F2;2 were symmetric, whereas some were not. I pointed out that nobody had tried to construct a shape such as FF1, and asked what that might look like. Several children correctly identified that FF1 would be indistinguishable from 1, so I wrote “FF1 = 1”, and I think I saw a flicker of an “ah ha!” moment in at least one child who seemed excited by the use of equations here.

At this point we ran out of time in our 1hr session. I would like to take this simple algebra further. In particular, I would like to get them to explore:

  • the generalisation from the observed FF1 = 1 to ∀x.FFx=x.
  • the observation that symmetry in a vertical mirror line corresponds to the statement Fx = x
  • the observation that all shapes of the form x;Fx are symmetric, and relate this to the algebraic definition of symmetry
  • the property F(x;y) = Fy;Fx

For those of a mathematical bent, these are the properties of a semigroup with involution.

I enjoyed myself, and I think the children did too!

Math Circle Session 13: Infinity

Given the number of questions we’ve been asked by the children about infinity in recent weeks, I decided that today we’d have a session just on infinity.

I opened the session by asking the children whether they had any questions about infinity they’d like to try to answer in this session. I received the following suggestions:

  • Why does infinity have the symbol \infty?
  • What is infinity plus infinity?
  • Why do we sometimes say infinity is a number and sometimes not?
  • What are the rules for adding and subtracting with Aleph numbers? (From a child who had discussed infinite cardinals at home in the past.)

We began the session by one child answering the first question: “it represents going round and round and never stopping, which would also be a circle, but that’s zero.” I hoped the others would crop up during the discussion that followed.

We began by discussing prime numbers. All children had heard of primes, but only the older children could give a clear unambiguous definition. I had them list out some prime numbers, and asked how many there were. Opinion was divided: one child thought there would be an infinite number (after all, the session was on infinity!), while another child thought that this can’t be true “because most numbers are not prime, and there are infinite counting numbers, so there can’t be infinite primes too.” I then showed them Euclid’s proof that there are infinite primes.

Starting first with a hotel with a finite number of rooms, I then explained Hilbert’s  Hotel. For blog readers, there is an excellent animation of these ideas on TED. This seemed to get them quite excited, which is what I was hoping to see! We covered one new arrival and an infinitely large coach of new arrivals, each time stopping to see whether they could contrive of a construction that would allow the new arrivals to fit in the full hotel. The child who had previously seen infinite cardinals suggested a solution to one new arrival, but nobody came up with a solution to the infinitely large coach of new arrivals. However, it was great to see the thought going into this (most children wanted to move each person from their room to one infinitely further down the corridor.)

At this point, there were two directions I had thought we might go, given enough time: one on an infinite number of infinitely large coaches using a prime construction, given our proof of Euclid’s Theorem, and the other to look at a diagonal argument proof of the uncountability of the continuum, as a route into the final question the children asked. However, given we only had five minutes left, I decided it was better to just let the children’s discussion free-range, since they were still talkative after the hotel story. A variety of discussion points emerged involving infinity, and I just let them talk to each other: is space infinite, how can space not be infinite, are there an infinite number of life-supporting planets out there, what happened “before” the big bang, etc.! It was great to see this discussion, even if we hadn’t manage to answer all the questions posed at the beginning.

Math Circle Sesion 12: Eulerian Circuits

Yesterday we turned our attention to Eulerian circuits in math circle. This was a completely “homebrew” session.

We started by asking the children to solve the classical puzzle of drawing this “house” without taking pen off paper, and without retracing your steps.

Screen Shot 2015-05-06 at 20.22.52

Surprisingly, they hadn’t seen it before, but it didn’t take long for them to solve, and also to discover that the path was not unique. We then asked whether it is possible to draw the same shape, following the same rules, but ending up at the end of the drawing back where you started. The children made many attempts at this. Nobody could find a way, but nobody suggested a reason why it wasn’t possible. One child noticed that if you remove the bottom most edge, the problem has a solution.

Screen Shot 2015-05-06 at 20.23.02

As a result, we began to enumerate all the connected graphs with one vertex, with two vertices, with three vertices, and with four vertices. For each graph, children quickly solved the problem where it had a solution. For small enough graphs, where there wasn’t a solution, they could see this through complete enumeration of paths.

One child suggested that there may be a link between the parity of the number of vertices in the graph, and whether or not an Eulerian circuit exists, but I demonstrated this to be false by reference to the two houses – the complete one and the one with the missing floor.

I suggested we look at the act of entering and exiting a vertex, using two edges each time. That, combined with drawing the order on each vertex of each of the graphs we’d enumerated, resulted in the conjecture from one of the kids that Eulerian circuits can only exist when all vertices have even order, and we together constructed an argument why this should be the case.

I then posed the (much harder) converse question: does an Eulerian circuit exist for every connected graph with even order vertices. I am not sure the children clearly understood the difference between this and the previous question; since they had shown that every graph with an Eulerian circuit has even order vertices, I think this seemed “obvious” to them (we must look at logic during one session – any reader with a child-friendly introduction to logic, please let me know!) I asked them to try to produce a graph with even order vertices that does not admit an Eulerian circuit, and they tried for some time before suggesting it is not possible, though none were clear why.

In a step towards trying to answer this question, I wanted to demonstrate that every graph with only even order vertices contains a circuit. I had them first try to construct graphs where each vertex has even order but the graph contains no circuit. Some elaborate failed attempts ensued, but then one child made the following remarkable claim: “it’s possible if the number of vertices is infinite”. I queried this child, and he drew the following “graph”:

Screen Shot 2015-05-06 at 20.19.07

His argument was that all these vertices have order two, yet the graph clearly contains no circuit. I thought this a fairly remarkable construction for a 7 or 8 year old! After restricting ourselves to finite graphs (infinity crops up so often, and absorbs so much interest, we should have a session on infinity also!) we all agreed that every graph with even order vertices contains a cycle.

From that point it was a small step to prove by induction that every graph with even order vertices admits and Eulerian circuit. I think they understood this, but I don’t think I had time to properly emphasise the inductive nature of the proof, and again proof by induction is something we must revisit in the future.

As a final exercise, I had them find an Eulerian circuit in what I had imagined to be a complex case: a pentagram inscribed inside a pentagon, with vertices at all points of intersection. They solved this easily, after which my infinity-inspired child noticed that there is a small pentagon formed by the pentagram, and asked what would happen if we put a pentagram inside this pentagon, and so ad infinitum, forming a fractal graph: would the property still hold?

Lots of things to pick up in future sessions, I think! If I were to change anything when redoing this session, it would be to make the problems more concrete, e.g. using towns as vertices and roads as edges, as my wife had suggested before the session! I think the children “got” it without this, but it might have captured the imagination slightly more.


An Interlude: Is Infinity Odd or Even?

During the session, when infinity came up, I was asked a direct question by one of the younger children: “is infinity odd or even?” At a lull in the main session, I decided we should use this question as a way to talk about the importance of definitions once more. All children had presupposed an arithmetic in which infinity plays the same role as any “other number”, and therefore already had in their minds that, for example, 2 \times \infty = \infty and \infty + 1 = \infty. I didn’t question these suppositions (again – a possible topic for another session!) but instead decided to work with them. I asked for a definition of even, and got:

Definition: A number is even if it is two times a whole number.

I asked for a definition of odd, and got:

Definition: A whole number is odd if it is not even.

To which I added an additional alternative definition:

Definition: A whole number is odd if it is one more than an even number.

Children then quickly worked out for themselves that by their definition (and under their arithmetic) infinity is even. By the first definition of odd, infinity is not odd, but by the second definition, infinity is both odd and even! Thus the two definition of odd coincide for integers but not for their version of arithmetic with infinities. We left that as a talking and discussion point about the importance of definitions, rather than trying to draw any strong conclusions.

Math Circle Session 11: More Platonic Solids

Tuesday saw the next installment of our math circle. In the previous session, we had been investigating Platonic solids, and the aim of this session was to build up to a proof that there are exactly five such solids.

Since in the previous session the children had produced a lot of their own definitions, I produced a sheet summarising their definitions as well as standard mathematical definitions of some of the concepts we had been dealing with during the previous session. Below you can see the summary sheet of the children’s definitions, which was laid alongside the standard definitions. Names have been changed for privacy reasons.


Definition: Line-Shape

A line-shape is any shape made by a finite number of straight lines.

(Note the Thomas-Adrian Condition: The number of lines used by the shape must be finite, because an infinite number could lead to “curvy shapes”.)

Definition: Eve-Regular

An Eve-Regular line-shape is one whose sides all have the same length.

Definition: Line-Shape-Shape

A line-shape-shape is any 3D shape made by a finite number of line-shapes.

(Note the Christopher Convexity Test: Place a pencil on the object so it rests on at least two points; if you cannot create a space between the pencil and the object between these two points, the object is convex.)


The first part of the session was then taken up comparing these definitions to more standard ones. In particular, I pointed out that the standard name for Eve-Regular polygons is equilateral, and that polygons that are both equilateral and equiangular are referred to as regular. This approach seemed to work very well, especially with the younger children, who were very excited to see their names in print as part of a definition! Fortunately, I had been able to include the names of all children who had been present in the previous session, as all had been able to contribute.

After reminding the children of the {n,m} notation for the Schläfli symbol of a Platonic solid, I led them towards trying to systematically enumerate the solids. They were able to quickly tell me that the minimum values of n and m must be 3. We then worked our way through all possible Schläfli symbols until they found that m is bounded from above for each n, due to the need for the internal angles to add to a value strictly less than 360 degrees. By physically building each polyhedron as they went, they were able to show that every allowable m does indeed lead to a polyhedron, and we were able to construct all 5, showing that there were indeed only 5 of them in the process: the tetrahedron, the cube, the octahedron, the dodecahedron, and the icosahedron.

In case they finished early, my plan was to have them compute the Euler characteristic for each Platonic solid, and then try to build other polyhedra to see whether the value held, however the proof of five solids took up the whole session. After two sessions building polyhedra with Polydron, some of the children may have reached the limits of their interest in the topic for now, so if we do explore Euler characteristics for polyhedra, it will be in a later session.

Math Circle Session 10: Platonic Solids

Today was the 10th session of our math circle, and the first session I’ve led without the support of my wife. I had asked the school headteacher whether he could attend, so I was not alone faced with five children, and he thankfully agreed!

Today we explored three dimensional geometry. Over the Easter break, I’ve been reading a book by Kaplan and Kaplan on their experiences with their math circles (review to come in a future blog post), and this inspired me to try something different. We would spend a considerable time on definitions (which are the heart of mathematics, and often lost in trying to make mathematics appeal to primary school pupils) but these would – often – be definitions that the children themselves came up with through discussion and refinement. I was pleasantly surprised that even the “jumpiest” math circle members seemed to be OK with this approach, and contributed to the process of forming definitions.

We started by looking at 2D shapes. I drew some polygons on the board and one curvy shape and asked what the general name for the polygons was, expecting one of the older children to suggest the name “polygon”. However, this was not forthcoming. So we began discussing the differences between the shapes. Here we hit the second unexpected perspective: one of the children – rather creatively – suggested that “every” 2D shape is a polygon, because if you zoom in enough then the boundary becomes straight. We thus took a brief informal detour into limits, and ended up by concluding that this child had made a great contribution by ensuring “straight” and “finite” ended up in any definition they came up with. Since they were unsure what these shapes were called, following Kaplan and Kaplan, I suggested they find a name for them, and they settled on line-shape. Their final definition was: a line-shape is any shape made by a finite number of straight lines.

During the discussion on naming, two of the younger children suggested the word regular for those 2D shapes made from straight line segments. The older children disagreed, because they had seen regular polygons before, and instead insisted that a regular shape is a shape where the sides have the same length. (Nobody mentioned angles.)

Extending to 3D shapes, the children also did not naturally suggest the word “polyhedron“, however I was very impressed by the reasoning of one child, who suggested the term line-shape-shape “because if line-shapes are 2D shapes made of lines, then line-shape-shapes should be 3D shapes made of line-shapes!” After exploring these definitions a little more, I revealed the names polygon and polyhedron, and suggested we use them to avoid my own confusion!

I then had children make polyhedra using Polydron. As expected, they made a wide variety of weird and wonderful polyhedra. The oldest child had seen a (regular) icosahedron before and wanted to build one, but was trying to do so by constructing its net blind, unsuccessfully. All the polyhedra they constructed were convex, so I built a non-convex polyhedron and asked the children what made it different. They all agreed that it was because it “went in”, but I challenged them to figure out how they would convince someone else that this polyhedron “went in”. Eventually, I took a pencil and placed it on the polyhedron, at which one of the children noticed that there is a part of the pencil between the two touching points which is not itself part of the polyhedron. Thus we came to an agreed understanding of convexity.

The "pencil test" for convexity
The “pencil test” for convexity

These definitions were sufficient for me to (incorrectly at first!) define a Platonic solid as a convex polyhedron whose faces are regular polygons of the same shape and size.

I asked children to construct as many Platonic solids as possible, and they quickly came up with a tetrahedron and a cube. One child also came up with a decahedron consisting of two pentagonal-base pyramids joined, at which point I realised I had forgotten to include “and with the same number of faces meeting at each vertex” in my definition of a Platonic solid!

Tetrahedron {3,3}
Tetrahedron {3,3}
Cube {4,3}
Cube {4,3}
Not a Platonic solid. Oops!
Not a Platonic solid. Oops!

I introduced the children to Schläfli symbols {n,m} for a Platonic solid with m n-gon faces meeting at each vertex, and asked them to explore other Platonic solids. One child quickly discovered that hexagons cannot form the faces of a Platonic solid (because they tessellate three around a vertex, tiling the plane – in the words of the child “because of the angles”), but just moved onto another search rather than highlighting this important negative result; luckily I spotted it and queried him!

Hexagons can't form the faces of a Platonic solid because they tessellate the plane
Hexagons can’t form the faces of a Platonic solid because three around a vertex tessellate

The school headteacher found {3,4}, the octahedron (identified immediately as ‘the shape of a d8’, i.e. an 8-sided die, by one of the children). The child who had previously tried to construct the icosahedron found that {3,6} does not exist, and therefore conjectured that {3,5} would be the missing icosahedron, which it was, much to her delight. The Schläfli symbol provided the extra information to enable her to make it, and she asked for permission to take a photo of it at the end “to show my dad!”

Octahedron {3,4}
Octahedron {3,4}
The elusive icosahedron
The elusive icosahedron

I was hoping to get to a proof that there are exactly five Platonic solids, but I will postpone this for next time, I think. And in the mean time, I will produce a worksheet summarising the definitions and results from this session.

Math Circle Session 9: Parity

Today’s session was inspired by a different math circle book: that by Anna Burago, which is targeted at slightly older children.

We started with 7 coins, and asked the children to place them so that 4 were heads up and three tails up. The rules of the game are as follows:

  • in each turn, you can pick any two coins of your choice
  • you must turn both those coins over

Your aim is to get all 7 coins facing heads up.

The task is impossible, but the children didn’t see so immediately. One child even thought he had found a solution, but was unable to repeat it. One child noticed that he could get them to all tails, but not to all heads. Very quickly, children of all ages noticed that “odds” and “evens” had something to do with this difficulty.

One of the older children offered a partial explanation: by turning over two heads, the number of heads-up coins decreases by 2; by turning over two tails, it increases by 2; by turning over one head and one tail, it stays the same. So the only possibilities after one move are to have 2, 4, or 6 heads face up, and all these are even.

I helped the children to generalise this to “an even change in the number of heads up” after any number of moves. Unexpectedly, one child objected to zero being considered an even number, which led me to take a detour. One serious concern I have with typical primary school mathematical education, which I share with Hung-Hsi Wu, is the absence of clear definitions. So I viewed this as an ideal opportunity to get the children to formulate the definition of an even number. I received these suggestions from the children:

  • a number that you can divide by two
  • a number that is a multiple of two
  • a number that ends in 0, 2, 4, 6 or 8

One child objected to the first definition, “because I can divide 1 by 2, to get 0.5”. So after some prompting, the children changed the first definition to “a number that you can divide by two and the answer is a whole number”.

We then worked through each definition in turn, testing it for whether zero was an even number. The oldest child provided a clear verbal proof that the first two definitions were equivalent, and a proof that any number meeting the third criterion also met the other two (but not vice versa).

The child who had objected to zero being even seemed to accept that by these definitions zero was even, but suggested that this would make \frac{0}{0} = 2, “which is not the case because \frac{0}{0} = 0“. I paused this question, writing on the board to return to, because we were in danger of getting too far off track.

For the last part of the session, I tried to get the children to reason algebraically, suggesting that – from their own definition – any even number can be written as 2n and, therefore because 4 + 2n = 2 \times 2 + 2n = 2(2+n), we still have an even number after any number of moves. I think I overestimated the preparedness of the children for this form of reasoning. The older kids were fine with this, one of the middle kids who had obviously seen but not understood algebraic notation before, upon seeing the n exclaimed “oh no, those numbers, I hate those numbers!” and the youngest had not met brackets in arithmetic expressions. Trying to cover all this at once was probably too much, but I hope we managed to get the basic ideas across.

Finally, I returned to the question, which I had rephrased, “what is zero divided by zero”. We looked at the equation 2 \times 0 = 0, and how – if the child who suggested it were correct, we could equally conclude from 3 \times 0 = 0  that the answer was “3” and from 4 \times 0 = 0 that the answer was 4. I suggested that there is no well defined answer, so we refer to it as undefined. Seemingly unsatisfied with this answer, one child left to get a calculator. I was hoping this to be my moment of triumph where the calculator reported “-E-“. Stupid calculator reported “0” (!) However, at least one child obviously could see what was going on, and asked whether 1 divided by zero would therefore be infinity. In the last few moments, I managed to explore this question with a subset of the children by looking at the growth of \frac{1}{1/n} as n increases in size, while the others packed away.

I’d view this as a mixed session. Lots of very interesting questions raised, not all answered satisfactorily, but at least most of the children were thinking mathematically.