PHP Chaos
I really
do not believe, as the proverbial story goes, that the
fluttering of a butterfly in the Amazon can affect the weather in
Europe. But
Chaos Theory obviously has some reality as can be
understood from this
link
When I worked in the Nuclear Industry I wrote Fortran computer programs
to calculate temperatures in a counterflow boiler which worked in
reality by hot CO2 (from the top of the reactor) passing down through
the boiler while water (from the turbine condenser) entered the boiler
tubes at the bottom and was heated as it was pumped to the top. We solved the
equations by finite difference and integrated from the bottom. To begin
the process we therefore had to guess a value for the CO2
outlet
temperature. If this guess was only a few degrees out we got totally
chaotic results with wildly impossible temperatures. This represented
no kind of reality. Mother Nature had no problem getting things right
and there was no possibilty whatever of a real boiler behaving in this
way.
When a friend developed an algebraic solution to similar equations for
the counterflow in the reactor, it was clear that they involved the
difference between large exponentials and double length arithmetic was
necessary to get satisfactory solutions.
I have long been of the view, therefore, that so called chaos arises from
the way we represent numbers by a finite number of decimal places (or
in a computer hexadecimal places) which introduces discontinuities
where in nature there are none. If you read the paper to which I refer
you will find the very simple equation:
Xn+1 = K*Xn*(1.0-Xn)
It is a very simplified model of population growth. X, a number between
zero and one, representing the population and K is some parameter
representing things affecting how the population grows. I have
programmed in PHP a simple histogram graph of this equation and you can
try it with differen values of K and starting values X0. Obviously
the steady state answer to the equation is given by :
Xs = 1 - 1/K
The question is: does real population
ever go into chaotic behaviour as can be brought about with K=3.8 and
X0=0.8 for which the steady state solution would be 0.736842105 to nine
decimal places???