## Tuesday, June 23, 2009

### self avoidance

Our expeditions are but tours, and come round again at evening to the old hearthside from which we set out. Half the walk is but retracing our steps. We should go forth on the shortest walk, perchance, in the spirit of undying adventure, never to return, prepared to send back our embalmed hearts only as relics to our desolate kingdoms. If you are ready to leave father and mother, and brother and sister, and wife and child and friends, and never see them again -- if you have paid your debts, and made your will, and settled all your affairs, and are a free man - then you are ready for a walk.
from Walking, by Henry David Thoreau

If you write a program to generate self-avoiding random walks akin to the ones that Thoreau describes, I think the first thing that will strike you is how short they tend to be - you quickly end up closing yourself within the path you've already followed. It is easy to imagine infinitely long walks (a straight line, or a slightly jagged variation), but these seem to be rare.

It seems that putting the constraint of self avoidance on a walk makes it into a much nicer object of study. Depending on what other constraints you apply, you can actually enumerate the walks of a given size (see the mathworld entry).

If you let walks run until they can go no further you might notice that for some walks you can tell where the start point is (it is not closed in) and where the end point is (it is closed in). Sometimes it happens that you can't distinguish these by looking at the path (where did the walk below start, and where did it end?).

Clicking on the applet below will create a random walkers that avoid themselves and each other - pressing a key while the applet is selected will clear the screen.

The applet was built using Processing. See also this post about implementing random walks (non-self-avoiding) in Fathom and TinkerPlots.

## Friday, June 19, 2009

### mere calculation

But do we even know the meaning of a single comet's mathematical prowl?
- Robert Penn Warren, After Restless Night

Mathematics is often criticized for missing the point. It describes of all kinds of phenomena, but somehow it cannot provide insight into the meaning that is assumed to lurk behind the formal descriptions that it offers up. Walt Whitman's When I Heard the Learn'd Astronomer shows us that this is a particular affront to the romantic sensibility:
WHEN I heard the learn’d astronomer;
When the proofs, the figures, were ranged in columns before me;
When I was shown the charts and the diagrams, to add, divide, and measure them;
When I, sitting, heard the astronomer, where he lectured with much applause in the lecture-room,
How soon, unaccountable, I became tired and sick;
Till rising and gliding out, I wander’d off by myself,
In the mystical moist night-air, and from time to time,
Look’d up in perfect silence at the stars.
Long before Whitman, Seneca faulted mathematics for missing the point, and for failing to provide guidance where it really matters:
Oh the marvels of geometry! You geometers can calculate the areas of circles, can reduce any given shape to a square, can state the distances separating stars. Nothing is outside your scope when it comes to measurement. Well, if you are such an expert, measure a man's soul; tell me how large or how small that is. you can define a straight line; what use is that to you if you have no idea what straightness means in life?
- Seneca, from Letter LXXXVIII
To the romantic (or moral) sensibility, mathematics is worse than wrong; its formal descriptions kill the true meaning of things and renders them impersonal. Not only does it not evoke the personal, it requires no 'personality' - it is mere calculation: work fit for machines, not thinking humans. As Schopenhauer disdainfully noted,
That arithmetic is the basest of all mental activities is proved by the fact that it is the only one that can be accomplished by means of a machine. Take, for instance, the reckoning machines that are so commonly used in England at the present time, and solely for the sake of convenience. But all analysis finitorum et infinitorum is fundamentally based on calculation.
These two ideas, that mathematics misses the 'deeper meaning' of things and requires no 'personality' are closely related. The idea that there must be an underlying or hidden meaning beneath the surface of phenomena structures much of our thinking about the world and is connected closely to the concept of the self. Just as we have an inner personality and identity, so to do the heavens (as we see in the poems cited above). Consequently, to deny meaning in the world beyond what can be described formally seems equivalent to a denial of personal identity.

Simone Weil, while accepting the formal and impersonal nature of mathematics, sees things differently. To her, the idea of the personal is a distraction which keeps us from true understanding. Rather than missing the point, mathematics provides a means for attaining something beyond the merely personal:
Gregorian chant, Romanesque architecture, the Iliad, the invention of geometry were not, for the people through whom they were brought into being and made available to us, occasions for the manifestation of personality.
. . .
It is pure chance whether the names of those who reach this level are preserved or lost; even when they are remembered they have become anonymous. Their personality has vanished. Truth and beauty dwell on this level of the impersonal and the anonymous...

If a child is doing a sum and does it wrong, the mistake bears the stamp of his personality. If he does the sum exactly right, his personality does not enter into it at all. Perfection is impersonal...
In many ways the quotations above represent an old-fashioned view of mathematics, now generally understood as highly creative rather than mechanical. And yet even in its creative aspects, mathematics seems to confound our usual understanding of what creativity means, as mathematical creativity somehow joins the personal with the impersonal. There is something special and mysterious about mere calculation that makes us wonder about what we are doing when we calculate, makes us wonder who is doing the calculating, and makes us wonder how calculation connects to the world.

## Friday, June 12, 2009

### Multiplication Table Rainbows

The multiplication table, much maligned as a symbol of rote learning, presents what should be considered one of the most accessible structures for mathematical exploration and recreation. In it you can find stars (described here), surprising relationships (here), and rainbows.

If you divide the range of the table into groups (for example, you could divide the range 0-100 into 7 groups for the ROYGBIV colouring of the rainbow), and colour in the table based on these, you'll find that the groups form rainbow-like curves.

It turns out that bands of colours form hyperbolic arcs. Think of the entries in the table in terms of y*x = k, where k is a constant representing a particular colour and x and y are the terms (column and row values) that are multiplied together to yield a particular k; solving for y gives y = k/x, the formula for a hyperbola.

These pictures were generated in Fathom (the bottom two) and in TinkerPlots (the top one). There is something subtly wrong with the rainbow shown below - it has the right range of colours, but Fathom puts them in the reverse order of what is observed in natural rainbows.

The Fathom and TinkerPlots files used to generate these graphs are here.

28-08-2012 Update - see this related post.

## Monday, June 8, 2009

### Polygons and the Multiplication Table

I was inspired to look at star polygons like the one above this after seeing this post by David Vancouvering, which was picked up by math teachers at play. It seems that there are a number of ways to use these polygon diagrams to explore multiplication and division facts.

Basically, students explore patterns in the digits of the multiplication table in the following way:

0. Start with the 10-point circle diagram below:

1. choose a row in the 10x10 multiplication table (for example, the row that shows the 6 times table);
2. put your pencil at "0" on the 10-point circle diagram;
3. looking only at the last digit of each entry in the row, draw a line to the point that has that digit (draw a line from 0 to 6);
4. continue until you have drawn a line back to zero (draw lines 6 to 2, 2 to 8, 8 to 4, 4 to 0).

Another way to generate the same diagram is to:

1. pick a number n (say 6);
2. put your pencil at "0" on the 10-point circle diagram;
3. moving clockwise, skip-count by n (skip over n-1 dots - in this example, skip over 5 dots);
4. draw connecting lines between the dots you land on (in order) until you reach zero (draw lines 0 to 6, 6 to 2, 2 to 8, 8 to 4, 4 to 0). The numbers you land on will match the last digits of the n times table (in order).

These diagrams were likely much more common in the 'new math' curriculum of the 60s and 70s when modular arithmetic became a standard part of grade-school mathematics. Here, in looking at the last digit of a number, we are evaluating the multiples "mod 10" or, in the language that was used in the (old) new math, we are doing "clock arithmetic on a 10-hour clock."

What are some things that we can observe about this?
1 and 9 give the polygon {10} (decagon)
2 and 8 give the polygon {5} (pentagon)
3 and 7 give the polygon {10/3} (10 verticies "skipping by 3")
4 and 6 give the polygon {5/2} (pentagram)
5 gives the 'degenerate' polygon {2} (digon)
10 gives the 'degenerate' polygon {1} (a point)
This highlights a nice symmetry among the last digit of the n and 10-n multiplication tables.

For a given n, how many points does its 'last digit polygon' have? This may be a nice way to motivate the idea of 'least common multiple,' since the number of verticies for the polygon you get from n is given by v = lcm(n, 10)/n. In general, if you look at drawing polygons by skip-counting by n around a d-point circle, the number of vertices you get is v = lcm(n, d)/n.

## Wednesday, June 3, 2009

### Halmos Aphorisms

Posting these quotes by Paul Halmos (1916 -2006) was inspired by seeing the  the film I want to Be a Mathematician and reading a few of Paul Halmos's essays.  Most of these quotes were taken from an essay "The Problem of Learning to Teach," which is a transcript of a lecture that Halmos delivered in 1974 at an AMS-MAA meeting.
Teaching is an ephemeral subject. It is like playing the violin. The piece is over, and it's gone. The student is taught, and the teaching is done.

The best way to learn is to do; the worst way to teach is to talk.

The best way to read a book..., with, to be sure, pencil and paper on the side, is to keep the pencil busy on the paper and throw the book away.

What mathematics is really all about is solving concrete problems.

The way a bad lecturer can be a good teacher, in the sense of producing good students, is the way a grain of sand can produce pearl-manufacturing oysters.

The best way to learn is to do - to ask, and to do.

Don't preach facts - stimulate acts.