The Programmer's Guide to Chaos
The Programmer's Guide to Chaos
Written by Mike James   
Wednesday, 30 January 2013
Article Index
The Programmer's Guide to Chaos
Population Dynamics

You might well think that “chaos” isn’t something that really should be mentioned in the same breath as “computer” but you’d be wrong. Here's an overview of a  fascinating and disturbing topic and one that every programmer should know something about.




The computer has allowed us to study the phenomena of chaos and even managed to make bring it into a wider arena – there are popular books on the subject that philosophise, theologise and generally try to turn the idea into something all embracing.

But what is it all about and what does it have to do with butterflies, strange attractors and fractals?

If I could provide a 100% complete explanation of any of these ideas then I’d be doing better than the huge number of researchers trying to do the same. What I can do is give you some idea of what it's all about and indicate where it might all be leading.







Of course in practice we cannot know all of the initial conditions and so a probability model is used to describe certain features of the exact dynamics of the system. That is, the coin tends to come down equally on both sides unless there is something in its make up that makes it come down on one side more than the other for a range of initial conditions.

You need to think about this for a little while but it soon becomes clear that a probability model is an excuse for what we don’t know – but still very useful none the less.

The question of whether or not there are truly random processes, i.e. ones that are even in principle not predictable, is considered open for some people, and answered by quantum mechanics for others.

But the argument about whether or not quantum mechanics is truly random is another story.

The one we are interested in is what can go wrong when you know how to predict and you know the initial conditions. Chaos is what happens when we know everything there is to know about the penny and yet still cannot make a complete prediction about what it will do in the future.

The Universal Clockwork

This idea goes against the classical view of the universe as mechanism. After Newton it was generally believed that the universe was a sort of clockwork wind-up toy but as the 19th century was coming to an end the cracks were beginning to show. The Newtonian theory was so accurate that it allowed the existence of Uranus to be deduced from the wobbles in the orbits in the other planets.

Then the mathematician Poincaré discovered that a simple three-body system moving under gravity could not be proved to be stable. In his 1890 paper he essentially proved that the earth, moon and sun system was chaotic, even if he didn’t use these terms, and this was deeply disturbing for anyone who believed in the clockwork universe.

As with all radical ideas it took some time for it all to sink in and become accepted. But how can a set of simple equations result in behaviour so complicated that it appears to have no pattern or regularity in it?

The Butteryfly Effect

At its simplest chaos can be illustrated by the “butterfly effect", a term coined by the American mathematician and meteorologist, Edward Lorenz.

In 1963 Lorenz constructed a simple model of a weather system and using Poincaré’s mathematics he showed that the outcome depended on the initial conditions in a way that was so wild that he could well imagine that a butterfly flapping its wings in Hong Kong could cause a tornado in Texas.



Edward Lorenz (1917-2008)


The butterfly effect captures the basic principles that create chaos – and gives the weathermen a good excuse for being wrong.

Sensitivity to initial conditions, and to conditions that develop along the way, mean that very small changes produce very large changes in behaviour.

Some systems are so finely balanced that tiny seemingly insignificant effects can tip them in completely different directions. It is not just a matter of degree you can get completely different types of behaviour with very small changes in the initial conditions.

This is, again, not what you expect in classical theories where giving one of the planets in the solar system a small nudge isn’t expected to cause a huge rearrangement and send planets spinning off into deep space.

In fact this brings us to the next important idea in chaos theory – equilibrium and its generalisation.

<ASIN: 0192853783>


Last Updated ( Tuesday, 05 February 2013 )

RSS feed of all content
I Programmer - full contents
Copyright © 2018 All Rights Reserved.