Chemical Compounds: the board game!

I have previously mentioned my strong interest in science / technology / engineering / mathematics education and in networks and in board games. This has prompted me to start designing educational games, such as the World Solar Challenge game. Joining the collection is my new Chemical Compounds game, which looks like this:

The online game store (faciliated by the wonderful people at The Game Crafter) has a free download link for the rules, should anyone wish to take a look. I also have a few other educational games there.

On fairy tales

“About once every hundred years some wiseacre gets up and tries to banish the fairy tale,” C.S. Lewis wrote in 1952. The wiseacre of our time seems to be Richard Dawkins who, two years ago, told the world that fairy tales could be harmful because they “inculcate a view of the world which includes supernaturalism” (he had said similar things in 2008). In a later clarification, he added that fairy tales could “be wonderful” and that they “are part of childhood, they are stretching the imagination of children” – provided some helpful adult emphasises that “Do frogs turn into princes? No they don’t.”

But many scientists grew up with, and were inspired by, fantasy literature. For example, Jane Goodall tells of growing up with the novel The Story of Doctor Dolittle (as I did!). In fact, many science students and professional scientists avidly read fantasy literature even as adults (as they should). The booksthatmakeyoudumb website lists, among the top 10 novels read at CalTech and MIT, Harry Potter, Dune, and The Lord of the Rings. And Alice in Wonderland was written by a mathematician.

This is a science blog, so I have a strong emphasis on scientific truth, which tells us many important ecological and physiological facts about, for example, frogs. Without science, we’d all still be struggling subsistence farmers. But there is actually more than scientific truth out there.

There is also mathematical truth. Are the links in this frog network all equivalent? Yes, they are – but that is decided by mathematical proof, not by scientific experiment. It is in fact a purely abstract mathematical question – the background picture of the frog is actually irrelevant.

And there is ethical truth. Is it OK to eat frog’s legs? Science does not give us the answer to this (although logic can help us decide if our answer is consistent with our other beliefs), but fantasy literature often helps us to explore such ethical questions. Tolkien’s The Lord of the Rings is one superb example. Would you “snare an orc with a falsehood”? Would you attempt to take the One Ring and “go forth to victory”?

There is metaphorical truth. A frog may, in spite of what Dawkins says, be a handsome prince – there’s more to the universe than can be seen at first glance. Or, as Antoine de Saint-Exupéry put it, “What is essential is invisible to the eye.” Children often learn this important fact from fairy tales.

And there is even religious and philosophical truth. Does the frog-goddess Heqet exist, for example? Does the universe exist? Is there a spoon? The methods of philosophy are different from the methods of science, and some amateur philosophers simply state their beliefs without actually justifying them, but philosophy is actually very important. Science itself is based on certain philosophical beliefs about reality.

Ecological networks and the Australian dingo

I’m excited at the publication of a joint paper on network ecology, with a focus on the Australian dingo: “Trophic cascades in 3D: Network analysis reveals how apex predators structure ecosystems” (by Arian D. Wallach, Anthony H. Dekker, Miguel Lurgi, Jose M. Montoya, Damien A. Fordham & Euan G. Ritchie, and appearing in Methods in Ecology and Evolution).

Associated with this publication is an animation I put together for the paper showing how the ecological network changes if the role of the dingo as apex predator is weakened. I’m grateful to my ecologist co-authors at the opportunity to contribute my mathematical skills to such an interesting project.

Chromatic polynomials

Network colouring is an fascinating branch of mathematics, originally motivated by the four colour map theorem (first conjectured in 1852, but proved only in 1976). Network colouring has applications to register allocation in computers.

For each network there is a chromatic polynomial which gives the number of ways in which the network can be coloured with x colours (subject to the restriction that directly linked nodes have different colours). For example, this linear network can be coloured in two ways using x = 2 colours:

The corresponding chromatic polynomial is x (x − 1)3, which is plotted below. Zeros at x = 0 and x = 1 indicate that at least 2 colours are required.

For the Petersen network below, the chromatic polynomial is:

x (x − 1) (x − 2) (x7 − 12 x6 + 67 x5 − 230 x4 + 529 x3 − 814 x2 + 775 x − 352)

This polynomial has zeros at 0, 1, 2, and 2.2051, and is plotted below:

Chromatic polynomials provide an interesting link between elementary and advanced mathematics, as well as an interesting case study of network algorithms.

Mathematics in action: “Skin groups”

There are three main (though closely related) branches of mathematics – the study of number, the study of shape, and the study of relationships. An interesting ethnomathematical example of the latter is the “skin group” system of the Lardil people of Mornington Island in Australia.

Lardil children

Similar systems (often with two groups, called moieties) can be found around the world (I first discovered the concept as a child, in the classic young adult science fiction novel Citizen of the Galaxy). Among the Lardil, there are eight groups, each associated with particular totemic creatures or objects:

Skin Group Name Totem
1 Burulungi Lightning
2 Ngariboolungi Shooting star
3 Bungaringi Turtle
4 Yugumari Seagull
5 Gungulla Grey shark
6 Bulunyi Crane
7 Bulyarini Sea turtle
8 Gumerungi Rock

Membership of a “skin group” implies a complex set of tribal obligations and taboos, but the most significant is that only certain kinds of marriages are permitted. Members of group 1 must marry people from group 2 (and vice versa), and similarly for the pairs 3/4, 5/6, and 7/8. All other marriages are considered to be incestuous.

We can define a mathematical function, the spouse function σ, that maps each person’s “skin group” to the “skin group” that their spouse must have: σ(1) = 2, σ(2) = 1, σ(3) = 4, σ(4) = 3, etc. For each of the eight kinds of valid marriage, there is also a rule for determining the “skin group” of the children:

Father Mother Children
1 2 8
2 1 3
3 4 2
4 3 5
5 6 4
6 5 7
7 8 6
8 7 1

We can define two mathematical functions, the father-of function φ and the mother-of function μ, that map the “skin group” of a father or mother to the “skin group” that their children must have: φ(1) = 8, μ(1) = 3, φ(2) = 3, μ(2) = 8, etc.

This is all much clearer when displayed visually. In the diagram, two-part black arrows →→ indicate valid marriages. The arrows run from the “skin group” of the wife to the “skin group” of the husband. Red arrows run from each marriage arrow to the “skin group” of the children. Together, the arrows form an octagonal prism:

Following a single black arrow and then a red arrow () gives the mother-of function μ, with μ(1) = 3, etc. It can be seen that this function has a four-generation cycle: μ(μ(μ(μ(x)))) = x or, as it is often expressed, μ4(x) = x. In other words, each person’s “skin group” is the same as that of their great-great-grandmother in the female line (the maternal grandmother of their maternal grandmother).

Following a single black arrow backwards (from the head end) and then a red arrow () gives the father-of function φ, with φ(1) = 8, etc. It can be seen that this function has a two-generation cycle: φ(φ(x)) = x or, as it is often expressed, φ2(x) = x. In other words, each person’s “skin group” is the same as that of their grandfather in the male line (their paternal grandfather).

The combination of the two cycles makes the Lardil “skin group” system a very effective way of shuffling genes within a small population, thus avoiding inbreeding. It also highlights the fact that mathematics can be found in some surprising places. And there are even more patterns to be found in this example. Among others, σ(x) = φ(μ(x)). Also, μ(φ(μ(x))) = φ(x), which some readers may recognise as indicating a dihedral group.

Data Sculpture

Recently I blogged about a plaster model made by James Clerk Maxwell in 1874 to visualise a relationship between volume, energy, and entropy. Follow-up discussion touched on the topic of data sculpture more generally, and I thought that such tangible three-dimensional data visualisations deserved their own post. The image below, for example, is of a spiral periodic table designed by Sir William Crookes and constructed in 1898 by his assistant:

The photograph below (courtesy of the Museum of History of Science, Oxford) shows a three-dimensional electron density map for Penicillin calculated from X-ray crystallography by Dorothy Hodgkin:

Similar transparent data sculptures are relatively easy to make. The wide availability of 3d printers also allows easy generation of data sculptures. Jeff Hemsley explains how to do this with network data using R:

Finally, several beautiful population visualisations were on display at the Tate Modern in 2007. Lorenzo G took the photograph below:

Mathematics in action: Alea jacta est and Random graphs

Having posted about the mathematics of dice, here is a way to use dice to teach a seemingly unrelated concept, that of random graphs (also known as Erdős–Rényi networks).

Random graphs are networks where the links are introduced at random, among a pre-existing set of nodes. Here, the nodes will be the numbers from 1 to N = 20. The theory of random graphs, described in the classic textbook by Béla Bollobás, is quite beautiful.

The theory of random graphs is sometimes introduced as a game involving buttons and string. However, I cannot recommend that – it leads to the most horrible tangled mess. Instead, I suggest using a pair of icosahedral (d20) dice, like this one (such dice can be obtained from games shops, although I must confess to using to do my dice rolls):

The first dice roll gives 2 and 4 (we re-roll any pairs which are doubles, or which have come up before). Each pair of numbers like this represents a random link in the network. We write the numbers 1 to 20 on a piece of paper, and draw a line between 2 and 4:

The second dice roll gives 1 and 12, so we add a link between those two numbers. A common measure of the density of links is the average degree, which is the average number of links per node. In this case, the average degree is the number of links divided by 10 (not by 20, because each link connects two nodes):

We keep repeating this process, and at an average degree of 1, something interesting starts to happen. A giant component begins to emerge – one big cluster containing many nodes (accompanied by smaller clusters and isolated nodes). The giant component is more impressive with a larger number of nodes, of course.

At an average degree of around log(N), taking (natural) logarithms to the base e = 2.7182818284…, enough random links have been introduced that the network becomes connected. We have log(20) = 3.00, but for this particular set of dice rolls, the network becomes connected at an average degree of 2.5. For larger networks, this connectivity threshold becomes quite sharp.

Additional random links reduce the average distance (mean path length) between pairs of nodes. This is the average number of “hops” needed to get from one node to another. Here the average degree is 6, and the average distance is 1.758:

For connected networks with an average degree of d, the average distance will be approximately log(N) / log(d). This function is shown by the red line below (with black dots showing measured values for our set of dice rolls). For large networks, this formula gives quite a small number, and the property of having small average distances is often called the “small world” property.

There is much more to the study of random graphs, of course, but we can see that a simple pair of icosahedral (d20) dice is enough to introduce the basics.