Tuesday, December 27, 2011

67: Chaos

    Last week I made the mistake of trying to feed applesauce and
yogurt to my 19-month old daughter in a single sitting, and letting
her use the spoon and handle the small open bowls by herself.  As I
cleaned up the resulting disaster, it occurred to me that I had yet to
do a podcast on chaos theory.  In addition, this topic has been in the
news lately due to the death of one of its modern founders, American
climate scientist Edward Lorenz.
    Not a mathematician by trade, Lorenz got involved in this area
back in 1960, when he was implementing early computer models of how
air moves around in the atmosphere.  He was hastily trying to rerun
some calculations, and the second time around, to save time, he
rounded off some input values to only a couple of decimal digits.
Percentage-wise, this was a miniscule change in the values.  But he
was surprised to see that when he reran his simulation, he got
completely different results.  This led to a fundamental insight, that
certain classes of functions, now known as chaotic functions, can
generate widely varying results due to a very slight change in input
conditions.  This leads to the famous "butterfly effect", where in
certain models, the flapping of a butterfly's wings in Texas can
eventually make the difference in whether a tornado strikes Brazil.
We should also point out that while Lorenz founded modern chaos
theory, the general concepts were known and discussed by
mathematicians since Poincare' in 1890.  But the existence of modern
computers is what made its study practical.
    As a simple example, let's look at the function f(x) = x squared +
1/4, and see what happens when we continually iterate it, or apply the
function again to its result.  If we start with 1/2, you can see that
the function yields itself, so we just repeatedly get 1/2 forever.  If
you apply 0, you first get 1/4, then .3125, then approximately
.3477... and if you repeat enough times, you'll find the result gets
closer and closer to 1/2.  Try a few other numbers between 0 and 1/2,
and you'll see similar results.  But now try a number just slightly
higher than 1/2, like .51.  It's only off by 2%, so you should get to a
result that's pretty close, right?  Wrong!  You will see that the
results of this process veer off to infinity for any number greater
than 1/2.  It turns out that the range of numbers with absolute value
less than or equal to 1/2 all lead to the result of 1/2, which is
known as an "attractor".  For any number greater than 1/2, this
process leads to infinity!  If you follow the references in the show
notes, you'll also see much cooler multidimensional function plots
where the attractor is a solid in three-space, a set of
three-dimensional values that various ranges of inputs will lead to.
Lorenz discovered one such object, known as the "Lorenz attractor".
    You should see that while chaotic functions display fundamental
changes in output based on slight changes in input conditions, they
are still fully determinstic, without any true random element.  The
results may seem random to us, but that is entirely a result of not
having precise enough knowledge of the correct input conditions.  If I
had precise enough knowledge of the workings of my daughter's brain,
and measured to the nanometer exactly where I initially placed the
bowls, perhaps I could figure out exactly where each blob of yogurt
or applesauce would end up on her and my clothing.  But unfortunately,
at my knowledge level, I am doomed to have to guess the results and
deal with the apparent randomness.
    So, what does chaos theory mean in practice?  The fundamental
insight is that even if a process is fully determinstic and
scientifically modeled, it may be impossible for us to accurately know
the result if there is even the slightest uncertaintly about the
inputs.  When someone presents you with a computer simulation claiming
to prove something, you first have to ask whether they are analyzing a
chaotic function, and if so, how precise do they really have the
starting conditions.  So any scientist in a discipline that uses
computer simulations and modelling must be aware of and consider chaos
theory.  In part, this provides an explanation for why TV weather
prediction is so often inaccurate; no matter how good the models are,
there is never truly enough knowledge of the inputs to guarantee a
correct result.
    And this has been your math mutation for today.

  • Edward Lorenz at Wikipedia
  • Chaos Theory at Wikipedia
  • The Chaos Hypertexbook by Glenn Elert
  • No comments:

    Post a Comment