Sunday, March 26, 2017

truchet tiles

A short while back, I posted about the images found in books about Froebelian kindergarten exercises, like The Paradise of Childhood (on Google Books here). These old books provide great examples of patterns and designs that can be easily drawn by hand with graph paper, in many cases only using arrangements of congruent 45-90 triangles.


Nineteenth Century Froebelian Doodles

A surprising variety of patterns can be formed by restricting things even further, considering the case where each square is cut in half along a diagonal with half of the square coloured black, the other coloured white.

Some arrangements of four Truchet Tiles

Arrangements of these tiles were studied extensively by Sebastien Truchet, whose book on the subject (Method for creating an infinite number of different designs with squares halved into two colours along a diagonal) can be found online here.


Truchet tiles, as they became known, have been studied extensively and generalised to include other tile sets that are not rotationally symmetrical. In the image below, we start with a traditional Truchet tiling, then only show the diagonals, and finally replacing the diagonals with quarter circles, centred around the vertices where the diagonals used to touch (these tiles, introduced by Cyril Stanley Smith, create interesting patterns of blob-like paths and circles).

Three popular variations on Truchet tiles:
traditional, diagonal, and semi-circles


To play around with these I've put together a "Truchet Tiles" page here.

There are a number of illustrations in Truchet's text that are worth checking out, and you can reproduce them using the page mentioned above. Here is tiling "38" from Truchet:

tile pattern 38 from Truchet

Here is the same tiling using the Truchet tile page, also rendered using only diagonals and the Smith tiles.
tile pattern 38, generated here


There are lots of questions that can be asked about arrangements of the tiles. Truchet enumerates some of the possible arrangements using symbols and illustrations - below are the first two tables of rows of tiles that he lists (how many will be in the next two tables?).


Here is another rendering of one of Truchet's original patterns, number 52:


And replacing the traditional truchet tiles with similarly oriented diagonal and Smith tiles -  as you might have noticed, doing this looses information by a factor of 2 for each tile:


Try out the Truchet tile page here: https://dmackinnon1.github.io/truchet/.

Friday, March 24, 2017

probability simulations using R

An ongoing side project of mine is learning how to use the statistics scripting language R, and have been putting putting together R markdown files that set up simulations for a variety of probability problems. You can find some of them here: https://dmackinnon1.github.io/r_examples/.

These are simulations that generate data based on problems like the Birthday problem, the Monty Hall problem, and the Burnt Pancake problem. Learning scripting languages aside, it is always good to keep digging into probability problems: they confuse practically everyone.

Tuesday, March 7, 2017

Ulam's two step cellular automata


Above are some of the nice images generated by a cellular automata described in one of Martin Gardner's essays about Conway's Game of Life (you can find the essays here). Cells have four neighbours (north, south, east, west), and follow only two rules that are applied at each step: if a cell has one live neighbour it turns on, and if a cell is on it turns off after two steps. The images above start happening around step 100 after turning on a single cell at the centre of a 61 by 61 grid.

You can play with these here. Eventually, these will start to repeat or disappear completely (I suspect they will oscillate, but have not found out when yet). On a 5 by 5 board, a single central cell will lead to a pattern that dies out in 10 generations; once you get to the uniform checkerboard state, the next is an empty board.



Monday, March 6, 2017

the ants go marching...


It's not exactly pride or satisfaction, but some related feeling, when you see your little ant marching off on the highway that emerges from the initial chaos it seemed lost in. Keep marching little buddy.


You can create a small ant farm here, if you'd like.

Saturday, February 11, 2017

fibonacci foolery

Some misleading dissections

Consider a square whose sides are 5 units in length. We are going to dissect the square by cutting it as shown below.  We can then re-arrange the pieces to form a rectangle.


But wait, the square has area 5 * 5 = 25, while the rectangle has area 8 * 3 = 24... somewhere we lost one square unit. This paradoxical result tells us that something is wrong, but what is it?

Let's look at another very similar dissection, this time using a square with sides length 8 units, sliced up and re-assembled in a similar way:


Here the square has area 8 * 8 = 64, but the rectangle has area 13 * 5 = 65. In this case we have gained one square unit (maybe borrowed from puzzle above?).

In both cases, the discrepancy in the areas tells us that we are doing something illegal when we re-assemble the square into the rectangle. You can see where the problem is if you look at the triangles within the rectangles. Consider the first problem, where we split up the length 5 into lengths 2 and 3. Can we really put those pieces together? Apparently not - if we try to fit one of the triangles and quadrilaterals pieces together, we find that they don't actually form a right-triangle - the hypotenuse is not straight, it bumps out a bit:



In the (2,3,5) problem, if the figure did line up properly, the large triangle with base 8 and height 3 would be similar to the smaller triangle with base 5 and height 2. This would mean that 2/5 equals 3/8, which is not true. If we place the original triangle of base on top of the larger triangle, the pieces would not line up:


The Fibonacci connection

You may have noticed something familiar in the numbers used in the dissections above. Both triples (2, 3, 5), used in the first dissection, and (3, 5, 8), used in the second, are successive terms in the Fibonacci sequence:

0, 1, 1, 2, 3, 5, 8, 13, 21, ..

The Fibonacci sequence is defined recursively by:



Can we construct another misleading dissection using the next Fibonacci triple (5, 8, 13)? Let's see:


Our square in this case has area 13 * 13 = 169, while our rectangle has area 21 * 8 = 168. So we are back to losing a square unit when we re-assemble the dissected square into the rectangle.

It turns out that Fibonacci triples like these will always generate these "off by one" illusions, because three successive terms in the Fibonacci sequence always obey the Cassini identity, which expresses the situation shown in these diagrams: if you have a Fibonacci triple (a, b, c), then the product of a times c is going to be either one more or one less than the square of b. More precisely, Cassini tells us:

The Cassini identity can be proved in a variety of ways, including induction. For n = 1, we have 0*1-1 = -1, so the identity is satisfied.  If we assume the relationship holds for n = - 1, we can prove the n = k case as follows:


See some more proofs of the Cassini identity here.

A Golden Solution

This dissection and re-assembly of the square into a rectangle looks like a nice one, and we'd like to find a case where it works: we want to find where to cut so that the square pieces fit correctly into the rectangle and the areas of the figures match up. Clearly basing the cut on the Fibonacci numbers won't work...

Let's start with a square whose sides are length 1. We would like to find two numbers a and b such that we can perform the dissection and assembly as shown below.


What we would like is the area of the rectangle to equal that of the square:


And taking the positive solution from the quadratic formula, we get:

We used the capital Greek letter Phi here because this quantity is known as the golden ratio conjugate, making the base of our rectangle, 1 + b, equal to the golden ratio.

This is a nice surprise because of the close association between Fibonacci numbers and the golden ratio  -  the quotient of consecutive Fibonacci numbers becomes closer and closer to the golden ratio as the Fibonacci numbers get larger.

So, while using Fibonacci numbers in the dissection always yields nice deceptions which alternate between gaining and loosing a square unit, slicing the square using the golden ratio (or golden ratio conjugate) gives us a perfect re-assembly of the square into a rectangle.