Pictures of chaos from a spreadsheet

Barry Kissane
Murdoch University


I have recently had the pleasure of reading a rather remarkable little book (Tuck & de Mestre, 1991) directed at the middle secondary years and based around the difference equation

Xn+1 = bXn(1 - Xn),

which models the annual size of an animal population that is restrained by a limited food supply or limited space.

While it is not immediately obvious why this difference equation should be a useful model for such a form of growth, it is perhaps easier to see that the related difference equation

Xn+1 = bXn

deals with the case of unrestrained growth, readily recognised as leading to an exponential growth model.

Tuck and de Mestre present students with the chance of exploring the consequences of models for growth like these using very simple BASIC computer programs, and suggests many interesting computer experiments to perform. If you haven't seen this inexpensive book, and would like to know something about chaos theory, presented in a friendly style, I recommend that you acquire a copy. It is one of a vanishingly small species: it contains mathematical work involving computer programming intrinsically and unavoidably, yet is quite suitable for a high school audience.

An alternative approach to the same idea, and the focus of this note, is to use a spreadsheet instead of BASIC programs to do the programming - essentially to get successive values of the population X under various starting conditions and with different growth factors b. The spreadsheet shown below was used to do this and to draw graphs of successive iterates of the relationship, all starting with an initial population of X1 = 0.1. (It is convenient to think of the population as a fraction of some ultimate population size, so that X values are constrained to be somewhere between 0 and 1.) If you examine the spreadsheet carefully, you will note that successive X-values appear in the A column, starting with A1 = 0.1, and later values calculated by an iterative process. The value for b is stored in cell C1, so that changing the contents of this cell changes all the values in the A column except the first. The common notation $C$1 refers to the absolute addrtess of C1, necessary in this case since the same b value is to be used each time.

It is usually more convenient to see the numbers rather than the formulas that generate them; the diagram below shows the first 10 iterates when b = 3.2 and X1 = 0.1.

The actual graphs are drawn using an automatic charting procedure that plots (i, Xi) for the first 40 or 50 values of i. I find the graphs to be rather more suggestive than the numerical values used to draw them. This is especially so when the graphs appear more or less instantaneously - it is hard to get the same feel for a set of numbers as that provided by the images. In this case, I have used a powerful integrated package, ClarisWorks on a Macintosh, but almost any modern spreadsheet on any modern computer will allow similar investigative and experimental work to be tackled.

The case of b = 3.2 shown in the spreadsheets above looks on the graph like a 'boom and bust' situation, with an apparent cycle of period two.

b = 3.2

This is in rather marked contrast to the case of b = 2.6, shown below, which seems to converge. It is not too hard to see in fact that it converges to a solution of the quadratic equation, x = 2.6x(1 - x).

b = 2.6

The graphs for b = 3.74 and b = 3.75 illustrate dramatically how a small difference in the growth factor can lead to a substantial difference in the result. Although we should be very cautious at leaping to conclusions on the basis of the first few iterates of this difference equation, it appears that the regularity (is it a 4-cycle?) for b = 3.74 is missing for the case of b = 3.75.

b = 3.74

b = 3.75

The case of b = 3.9 seems to lack a regular pattern, at least in the short term, and appears to be the beginning of an example of what is known as 'chaos', although again, caution is needed at jumping to conclusions with so little data and no analytic attack on the outcome. The remarkable feature of the behaviour is that there is no random element involved - the model is deterministic.

b = 3.9

What strikes me about all this, however, and what prompted me to write this brief note, is the remarkable ease of exploring this mathematically interesting (and extremely rich) situation using a spreadsheet and a graphing facility attached to it. Once the spreadsheet has been constructed, it is a relatively simple matter to change b or the starting value X1 or both and to see the effects visually and almost instantaneously. It is quite hard to describe this, and I suggest that you try it rather than reading about it to evaluate the impact for yourself. For my part, the experience has changed my views about the value of spreadsheets in mathematics to an extent.

Tuck, E. O. & de Mestre, N. J. (1991) Computer ecology and chaos: An introduction to mathematical computing, Longman Chesire, Melbourne.

Please cite as:

Kissane, B. 1992. Pictures of chaos from a spreadsheet, Cross Section, 4(2), 8-10.