User:JBG~enwikiversity/Exponential growth simulation

Exponential Growth – Conveying Intuition via Animated Simulation

My hope is that a person with programming skills will read this and be inspired. Improvements on the text are also, of course, welcome.--JBG 19:20, 14 August 2009 (UTC)

The stark facts are (a) the earth is finite, and (b) the demands of people aren't. Conclusion: If we don't rein in the latter, we will lose the former, and soon. Both people and technology are growing exponentially, against a fixed ceiling. The impact is occurring RIGHT NOW, and if we don't get control soon, our grandchildren are likely to live the way people in Cairo and Calcutta live now, because the whole world will be both overrun and ruined.

Most people don't understand diddly about exponential growth, their implicit intuitive view being that things are linear (tomorrow's rate of change will be like today's). For most people, descriptions and graphs aren't enough to change that view. "One showing is worth a hundred tellings", the Chinese say. The object here is to provide a "showing".

Here is a little story, a cartoon-like fable really, that may provide a usable pedagogic device: There is a certain lake where a lily-pad takes root. This kind of lily-pad reproduces itself every day, so there are two at the end of the first day, four at the end of the second day, and so forth. That is to say, the lily pads double in number each day – which is to say that the lily pad population is growing exponentially. Most people will find the resulting behavior, when they actually see it, astonishing. The object here is to make it possible for them to see it.

Thus, the simulation uses lily pads spreading on a lake to illustrate exponential growth. The simulation does not describe the behavior of real lily pads, but merely uses lily pads as a readily accessible visual model. There are many real and important examples of exponential growth that operate very much as the model does, including growth in conditions of ample resources of many biological populations (cancer cells, germs, rabbits, people).

The lily pad illustration has been around for a long time. I do not know who originated it. A search on line some months ago was unsuccessful in turning up an animated version, nor did I find a compelling presentation of any other suitable model. Hence the present effort. I present below a sketch of a simulation design. My hope is that someone with programming skills will be inspired to turn it into a working program.

START of design statement

The numerical aspects of the following description are given precisely, so that the programmer doesn't have to work them out. The directions for the interaction of the user with the program are much looser, since much will depend on "feel", and that is much easier to judge by the person working in a tight loop with the program during development.

In the demonstration, a lily pad is posited to cover a square foot, and to produce another pad like itself each day. The lake is taken to cover about 77 square miles, a size chosen so that the simulation runs to completion in a 31-day month.

The simulation begins with an outline of the lake shown on the screen, a single pixel lit out in the middle somewhere with an arrow pointing to it. The caption reads:

The arrow points to the location of the first lily pad. The pad occupies an area of one square foot. The lake has an area of 77 square miles (about two billion square feet), and it occupies a little over half a million screen pixels, so the pixel the arrow points to represents 4000+ square feet. Press Enter to begin.

Under the picture but above the caption is a message reading: Start. When Enter is pressed, the message changes to Day 1, then after about a second (value to be chosen after try-out) the numeral changes to 2, then 3, etc. Positive/negative inversion of the numeral with each advance might be useful to draw notice.

Possible alternatives to having Enter start a fixed, timed sequence:
 * Allow user to set the time interval, between, say, 2/10 sec and 2 sec, by 10ths
 * Have Enter advance one "frame" with each press

Perhaps that last should be the first thing to try. It will take some experience to optimize the interaction.

On the screen, nothing happens until Day 13, when a second pixel appears next to the initial one. After that, the number of contiguous pixels doubles each Day until, with Day 31, the lake is fully covered.

An enhanced version of the simulation could include a square portion of the screen off to the lower left that would, at a 1 pixel/sq ft scale, show behavior of the model during the first 13 days. The square should be fairly large, say 200x200, so that the final area covered by lily pads would still be a fairly small proportion of its area. On the 12th day, the simulation would stop momentarily and give a message:

The lily pads now cover an area large enough to show up as an increase in the main picture. Look closely at the original point on the lake and press Enter.

When Enter is pressed, a pixel appears next to the original one and the simulation continues, until halting at Day 31 with a message: Out of room! Press Enter to run again.

Pad count:
 * 1: Start
 * 2: End of Day 1
 * 4: End of Day 2
 * 8: Etc.
 * 16
 * 32
 * 64
 * 128
 * 256
 * 512
 * 1024
 * 2048
 * 4096: End of Day 12:  First pixel in main picture is now fully occupied
 * 8192: End of Day 13:  Second pixel is now lit; along with final doubling in small square
 * 16384: End of Day 14:  No further action in small square
 * 32768
 * 65536
 * 131072
 * 262144
 * 524288
 * 1048576
 * 2097152
 * 4194304
 * 8388608
 * 16777216:
 * 33544432
 * 67108864: End of Day 26:  ~3% of pixels lit
 * 134217728
 * 268435456: End of Day 28:  1/8 of pixels lit
 * 536870912
 * 1073741824: End of Day 30:  Half of pixels lit
 * 2147483648: End of Day 31:  All pixels lit

At the end of day 31, the lily pads cover 2 exp 31 square feet. A square mile is 27878400 square feet. So the lily pads cover a bit more than 77 square miles.

1280x1024 = 1310720 = # of pixels on a typical screen

728x1024 = 745472 screen area set aside within which to depict lake

lake is given 524288 pixels, each pixel designates 4096 sq ft,

first *new* pixel appears on Day 13;

little square is 200x200 and coverage in it stops at 8196 (with appearance of first new pixel in main picture); last change in little square occurs on Day 13

END of design statement

The lily pad model has the rhetorical defect that at its conclusion, the lake sits there benignly in a steady state. Much better would be a model carrying the emotional force of real exponential growth consequences. A breast cancer tumor that grows to grotesque size and then halts with DEATH written across the picture, for example. Or some natural history case of population explosion and crash following removal of the relevant carnivore from the system.