Chaos – Computer Error not to Blame
Vector 11:4, page 125
Transcribed from the printed issue; not yet reviewed. Read it in the PDF of the issue, page 125
As Gérard Langlet states at the beginning of his article in Vector 11.2 (p.82), chaotic behaviour occurs when a small variation in initial conditions has far-reaching effects on the development of a dynamical system. The essence of the chaotic system is that there exists no solution which is stable in the normal sense — the smallest displacement grows without bound. Now, the definition of "small" in this context is open to argument, but if one allows that it would be a few orders of magnitude larger than one part in 1E15 (the typical precision of 64-bit floating point arithmetic), then any errors of computation (provided they are not cumulative — see below) are insignificant. In other words, if a system is not chaotic, rounding error is not of any consequence.
Accuracy in Arithmetic¶
In performing arithmetical computations, two common sources of loss of accuracy are: taking the difference of two values that are nearly equal; and, rounding repeatedly in the same direction. The most severe form of the latter is what might be termed an iterative random walk, the recipe for which is: after each new random step repeat all previous steps. As soon as two consecutive random steps are in approximately the same direction, the process moves in that direction at an exponentially increasing rate.
The case of repeatedly squaring a rotation matrix is an example of this. As soon as the determinant differs significantly from unity, the discrepancy doubles at each subsequent step. Typically, after about 45 squarings the value of the determinant is about 1.01 or 0.99; by 70, either LIMIT ERROR or zero is reached.
A random walk moving much more slowly, but no less surely, away from the starting point is obtained in the case of a biased random walk, in which the random component has a tendency to a particular direction. Consider the series that is the determinant of consecutive powers of a rotation matrix; there is randomness arising from the inaccuracy of each matrix multiplication, but if the determinant of the base matrix is not unity (though it typically is) then there is bias too. For most starting values, the error in the determinant never exceeds 1E-15; in the worst case that I found, the error had grown to only 3E-12 after 50000 terms of the series.
For many practical purposes, an error of one part in 1E15 — equivalent to less than one hundredth of an inch in measuring the distance from the earth to the sun — is of no consequence. However, there are occasions — for example if the number is to be the argument to a function such as sine, or in combinatorics — when the exact values of, or the differences between, very large numbers are required; in such circumstances, 64-bit floating point arithmetic is inappropriate.
The Logistic Equation¶
Contrast the discrepancies described in the previous section with the behaviour of the logistic equation examples in the following table, where two different starting values have been chosen with each of two values for the scale parameter. Light type shows where the figures for the second starting value differ from those for the first.
x[n+1]=3.3x[n](1-x[n]) x[n+1]=4x[n](1-x[n])
n x[n] x[n] n x[n] x[n]
0 0.4 0.45 0 0.4 0.40001
1 0.792 0.81675 1 0.96 0.960007
2 0.543628 0.493909 2 0.153600 0.153570
3 0.818718 0.824877 3 0.520028 0.519946
4 0.489781 0.476700 4 0.998395 0.998408
5 0.824655 0.823208 5 0.006407 0.006355
6 0.477176 0.480269 6 0.025466 0.025261
7 0.823280 0.823715 7 0.099272 0.098492
8 0.480115 0.479187 8 0.357670 0.355167
9 0.823695 0.823570 9 0.918969 0.916094
10 0.479230 0.479496 10 0.297859 0.307462
11 0.823576 0.823612 11 0.836557 0.851716
12 0.479484 0.479406 12 0.546916 0.505181
13 0.823611 0.823600 13 0.991195 0.999892
14 0.479410 0.479432 14 0.034908 0.000429
15 0.823601 0.823604 15 0.134761 0.001717
With parameter value 3.3, a relatively large difference in starting values has almost disappeared after 15 iterations, whereas with parameter value 4, a relatively small difference simply grows.
The "Non-Syllogistic Mathematical Proof"¶
I leave it as an exercise for the reader, firstly, to show how to extend the technique used to prove that any given mathematical function is linear; secondly, to consider the effect of a small perturbation in x[n]=2*N upon subsequent terms in the doubling sequence, and the impact of this upon the derived series sin(x[n]).