A State and a Rule
Anything that changes over time can be written as a list of numbers describing how things stand now, plus a rule that turns that list into the next one. Choosing the list is the real work.
A valley has rabbits in it, and foxes that eat the rabbits. You want to know what
happens over the next fifty years.
The question seems to call for biology, and it does, but only at one point: to
write down the rule. After that it is arithmetic, and the arithmetic is the same
arithmetic as for heat spreading along a bar or a weight bouncing on a spring.
This lesson is about the shape all of these share, and about the one genuinely
difficult decision in setting such a problem up, which is deciding what has to be
known.
Two things, not one
Everything in this course is built from exactly two pieces.
- the state after k steps, meaning the list of numbers that says how things stand right now. For the valley it is two numbers, a rabbit count and a fox count
- the rule, which takes a state and answers with the rates of change of every number in it. It is fixed once and for all and is the only place the subject matter enters
- the length of one step of time. It is a choice made by whoever is doing the arithmetic, not a feature of the system, and the previous course measured what a poor choice of it costs
- the state one step later, obtained by moving each number by its rate times the length of the step
The separation is worth dwelling on because it is so often blurred. The state is
different at every moment. The rule is the same at every moment. When people say a
system is complicated, they usually mean its history is complicated, and that is
compatible with a rule that fits on one line. The valley rule does fit on one line,
and nobody can tell you where the rabbits will be in forty years.
Advancing it by hand
Here is the rule for the valley, applied with a pencil. Rabbits breed in proportion
to how many rabbits there are, and are eaten in proportion to the number of
encounters between a rabbit and a fox, which is proportional to the product of the
two counts. Foxes die off at a steady proportional rate, and are born in proportion
to the same encounters.
| step | step | rabbits | foxes | change in rabbits | change in foxes | what happened |
|---|---|---|---|---|---|---|
| 1 | 0 | 100 | 20 | 2 | 0.4 | Both counts are rising. The rabbits are breeding faster than they are being eaten, and the foxes are finding enough to eat to more than replace their losses. |
| 2 | 1 | 102 | 20.4 | 1.9 | 0.45 | The rabbit increase is already smaller than it was, and the fox increase is already larger. Nothing was changed to cause this: the rule read a different state and answered differently. |
| 3 | 2 | 103.9 | 20.85 | 1.7 | 0.5 | The same drift continues. More foxes means more encounters, and more encounters is a loss for the rabbits and a gain for the foxes. |
| 4 | 3 | 105.6 | 21.35 | 1.5 | 0.55 | Halfway through the table the rabbit gain has shrunk by a quarter while the fox gain has grown by a third. |
| 5 | 4 | 107.1 | 21.89 | 1.3 | 0.59 | Extrapolating the fourth column, the rabbit change is heading for zero. When it reaches zero the rabbit count is at its peak, and after that it falls. |
| 6 | 5 | 108.5 | 22.49 | 1.1 | 0.64 | Still rising, but visibly about to turn. A reader who stopped the table here and reported that both populations grow would be reporting an artefact of where the table stopped. |
This is the ordinary situation. There is no expression into which forty can be
substituted to get the rabbit count in year forty. The table is the method, and the
previous course measured what that costs in accuracy. What this course adds is a
set of questions that can be answered about the valley without building the table
at all.
The hard part is choosing the list
Writing the rule is usually the easy half. Deciding what the state is can be
genuinely difficult, and the test for whether you have it right is worth stating
plainly.
- everything you propose to write down about the present moment
- the whole requirement. Two situations agreeing on the list must go on to do the same thing. If they can differ, the list is not a state
- what happens next, which is the only thing the list is for
Try it on a thrown ball. Proposed state: its height. Two balls at the same height,
one rising and one falling, do very different things next, so height is not a state.
Add the speed and the direction, and the test passes. Try it on the valley with
rabbits alone: two valleys with a hundred rabbits each, one with no foxes and one
with fifty, go on to do completely different things. So the fox count belongs in the
state even for someone who only cares about rabbits.
This is where the count of numbers comes from. It is not a stylistic choice. Each
number in the state is a quantity that has to be measured before any prediction can
be made, which is why a system needing four numbers is substantially harder to use
in practice than one needing two, independently of how hard the mathematics is.
One that can be checked
Most rules cannot be solved. A few can, and those few are valuable out of all
proportion to their number, because they are the only way to find out whether the
arithmetic is being done correctly.
Two things in that figure matter for the rest of the course. The first is that the
value one is special: a system sitting exactly at one would not move at all, because
the gap it closes a fraction of is zero. That is a resting state, and finding them is
the next lesson. The second is that the system approaches one no matter where it
starts, which is a different and stronger claim than merely resting there. Deciding
which resting states have that property is the lesson after.
What is coming
The valley table is the honest situation and it is unsatisfying, because it answers
one question at a time and gives no understanding. The rest of the course is about
what can be extracted from the rule itself.
Where would the system sit still, which is a question about the rule having a
zero. Whether it would stay there if disturbed, which is a question about the sign
of something near that zero. Whether it circles forever instead of settling, which
happens in the valley and has a quantity behind it that never changes. What
happens when there are a hundred parts instead of two. How quickly two nearly
identical starts come apart, which is the difference between a prediction and a
guess. And finally, what can be said about the long run, and how to tell when a
long simulation has quietly stopped describing the system it started from.
None of those questions require a solution, which is fortunate, because for the
valley there is not one.
Recap
- A system is two separate things: a state, which is the shortest list of numbers that determines what happens next, and a rule, which turns a state into rates of change. Confusing them is the source of most of the confusion about systems, because the state changes constantly and the rule usually does not change at all.
- The test of whether your list is the whole state is this: given only the list, is the future determined? If two situations share your list and go on to behave differently, something is missing from it. That test is what decides how many numbers a system needs, and it is answerable without solving anything.
- Systems from completely unrelated subjects turn out to be the same object once written this way, which is why one set of questions works on all of them: where would it sit still, would it stay there, does it circle, and how far ahead can it be predicted.
This is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents