Series

Lsystem — the series

12 essays on one idea, from the one that introduces it to the one that assumes the rest.
  1. An L-system after 4 rewrites of two rules. X → F[+X]F[-X]+X and F → FF, walked by a turtle turning 22.5°. 130 segments, and not one of them knows anything about light, water or auxin.

    L-systems describe, they do not explain

    Two rewriting rules and a turtle produce something indistinguishable from a plant, and there is no plant in it — no light, no water, no auxin, no mechanics. That is worth demonstrating precisely because the output is so convincing.

    part 2 · branching
  2. The number of growing points after each season, for buds that wait no season, one, two, three or four. From one mature apex, each season every mature apex makes a new bud, and a bud branches only after it has waited its delay. With no delay the counts run 1, 2, 4, 8, 16, 32, 64, 128, 256, 512 and settle into growing by 2.0000 a season; with one season the counts run 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 and settle into growing by 1.6180 a season; with two seasons the counts run 1, 2, 3, 4, 6, 9, 13, 19, 28, 41 and settle into growing by 1.4656 a season; with three seasons the counts run 1, 2, 3, 4, 5, 7, 10, 14, 19, 26 and settle into growing by 1.3803 a season; with four seasons the counts run 1, 2, 3, 4, 5, 6, 8, 11, 15, 20 and settle into growing by 1.3247 a season. On a logarithmic axis each settles into a straight line whose slope is its growth rate, the positive root of x^(d+1) = x^d + 1.

    A count set by a delay

    An L-system describes a plant and forbids nothing, because none of its parameters is anything a plant has. One branching grammar is the exception: a mature apex makes a new bud every season, and a bud waits d seasons before it branches. Its counts grow at the root of x^(d+1) = x^d + 1, a delay of one season gives Fibonacci's numbers and nothing else does, and the fourth count already separates a one-season wait from every longer one. So a Fibonacci count in a branching plant is a measurement of how long its buds wait. It is also a fragile one: if one bud in ten waits two seasons instead, eleven counts in a row come out Fibonacci's three times in a thousand.

    part 3 · branching
  3. The rate a branching count grows at, against the chance a growing point dies. Every point dies with probability q each season and the survivors rewrite as before, so the expected counts obey x^(d+1) = (1 − q)·x^d + (1 − q)^(d+1). Substituting x = (1 − q)y returns the deathless equation exactly, which makes every line here straight: the rate is the deathless root multiplied by the survival. No delay runs from 2.0000 to one at q = 0.5000; one season runs from 1.6180 to one at q = 0.3820; two seasons runs from 1.4656 to one at q = 0.3177; three seasons runs from 1.3803 to one at q = 0.2755; four seasons runs from 1.3247 to one at q = 0.2451. Below the marked line a lineage shrinks.

    A count that loses its growing points

    The branching grammar behind the Fibonacci claim has no deaths in it, and a stem that loses shoots is the common case. Giving every growing point a chance q of dying each season leaves the counts a linear recurrence and does exactly one thing to it: the growth rate becomes the deathless root multiplied by 1 − q, at every delay and every death chance, to the last bit a double holds. So each waiting time has a death chance above which its lineage shrinks — a half with no wait, 0.3820 at one season, 0.2451 at four — and a longer wait tolerates less. What does not survive is the count itself: a plant losing one growing point in ten a season shows eight Fibonacci counts in a row one time in ten thousand, against one time in eight for a bud that occasionally waits an extra season.

    part 4 · branching
  4. How many scars a lineage carries for every growing point still alive. Deaths arrive at q times the standing count and the count grows by x a season, so the scars settle at q/(x − 1) — the curves. The dots are the ratio the expected counts actually reach after eighty seasons, and they agree to within 1.0 per cent. A bud waiting no delay at q = 0.1 carries 0.1250; a bud waiting one season at q = 0.1 carries 0.2192; a bud waiting two seasons at q = 0.1 carries 0.3135; a bud waiting three seasons at q = 0.1 carries 0.4128. Each curve runs to infinity at its own threshold, where the living stop outgrowing the dead.

    What a scar is worth

    Counting the scars a dead shoot leaves does not put a branching count back on the sequence it would have had. A scar records a growing point and a dead growing point takes every branch it would have made, so living points plus scars reach 39.2 per cent of the deathless count after twenty seasons at one death in twenty, and 1.9 per cent at one in five — falling without limit rather than closing. What the scars restore is the other number. Scars per living point settle at q/(x − 1) exactly, so a rate with a scar share beside it recovers the death chance and then the waiting time, where a rate alone is reached by a one-season wait losing a tenth, a two-season wait losing 0.64 per cent and no wait at all losing 27.2 per cent.

    part 5 · branching
  5. Every pair of death chances that reproduces each count, for one plant. A plant with a wait of two seasons, apices dying at 0.05 and buds at 0.15: a rate of 1.3351, 0.3098 scars per living point and 0.2225 of its scars left by apices. Each line is every pair of chances at that wait reproducing one count; the dashed lines either side are the same count one per cent high and low. The rate's and the scar share's lines cross at the plant's own pair, at an angle of 11.6°, so a one per cent error lets the pair slide along them — apex chances from 0.004 to 0.097 and bud chances from 0.100 to 0.198. The line for scars sorted by kind crosses the rate's at 51.5°, and read with it the same error leaves 0.044 to 0.056 and 0.134 to 0.166.

    Two ways to die, three things to count

    Giving a branching plant's waiting buds a death chance of their own leaves its counts a linear recurrence, but breaks the collapse onto the survival: the rate becomes the apex survival times the root of y^(d+1) = y^d + r^d, where r is the bud survival over the apex survival. The one-chance reading then names the wrong waiting time on 171 of 477 plants with waits of two to four seasons, shorter when the buds are the fragile ones and longer when the apices are. The two chances are separable from a rate and a scar share, exactly — but the two counts' loci cross at eight to sixteen degrees, so a one per cent error lets the chances wander by a factor of two. A third count is owed, and it is the scars sorted by kind.

    part 6 · branching
  6. Four hundred plants whose seasons are sometimes bad, each measured against the count the average season predicts. A two-season wait, and every season bad with chance 0.1, killing each growing point with chance 0.5; good seasons kill with 0.0556, so the chance averaged over seasons is 0.1. Four hundred sequences of forty seasons, each plant's living count divided by the count the independent model expects at 0.1. The dashed line at one is the expectation over every sequence of seasons; the mean of these four hundred is 1.073 at season forty, as near as a sample carried by its luckiest few plants comes. The solid line is the median plant, 0.540 of the expected count by season forty, and the band holds the middle ninety per cent, from 0.080 to 3.640.

    A bad year does not average out

    Let every growing point on a plant share one season's death chance, bad one season in ten and good otherwise, with the average held at 0.1. Averaged over every sequence of seasons the counts are exactly the independent model's. But no plant is an average over sequences: with bad years at 0.5 a plant settles on a rate of 1.3001 against the expected 1.3190, the median plant holds 54 per cent of the expected count by season forty, and the scar share never settles, because it is set by how many seasons ago the last bad year was — 1.35 the season after one, 0.17 twelve seasons on. So the reading of a plant's waiting time from a rate and a scar share gets worse the longer it runs: right for 57 per cent of plants over ten seasons, 22 per cent over eighty.

    part 7 · branching
  7. One plant's scars dated by season, and the wait they name when the recurrence is run through its own seasons. A plant with a two-season wait, grown point by point for 20 seasons from one apex; each season is bad with chance 0.1, when each point dies with chance 0.5. Top: the share of living points that died each season, read from that season's scars, with the bad seasons marked. Bottom: the living count on a logarithmic scale, and the counts a wait of one, two and three seasons predicts when the recurrence is run from one apex through these same seasons' death shares. The two-season line follows the plant; dated, the scars name a wait of 2. Read as two totals — the rate after the first 5 seasons and scars over living points — the same plant names 1.

    Scars with dates on them

    A bad season shared by every growing point wrecks the reading of a branching plant by two totals: over eighty seasons the rate and the scar share name a two-season wait for 22 per cent of plants. Date the scars — by position along a shoot, by growth ring — and each season's death chance is read off its own scars, so the bad years stop being noise and become a known input. Running the branching recurrence through the plant's own seasons names the wait for 94 per cent of plants over twenty seasons whether bad years kill a tenth of the points or seven tenths, and for every plant over eighty. What a plant cannot read from its own scars is the climate: the averaged chance comes only as fast as seasons do.

    part 8 · branching
  8. One plant's scars sorted into apices and buds and dated by season, and the kind of bad year its seasons show. A plant with a two-season wait, grown point by point for 20 seasons from one apex, apices dying at 0.05 and buds at 0.15 averaged over the climate: frost, bad years 5 times a good one. Each season has two bars, the share of living apices that died that season and the share of living buds; bad seasons (6, 10, 11, 18) are marked. In a frost the bud bars jump and the apex bars do not. Run through both series, the recurrence names a wait of 2; run through one share per season it names 2. The plant ends with 438 living points.

    A frost and a drought in the scars

    A branching plant whose buds and apices die at chances of their own, in a climate with bad years, leaves two kinds of scar in every season. Sorted by kind as well as dated, the scars give two shares a season, and the branching recurrence run through both names a two-season wait for 97 to 98 per cent of ten-season plants where one share a season names it for 81 to 83 — even when buds and apices die alike, because a small plant's deaths fall on one kind or the other by chance and the sorted series knows which. The three totals that the two chances were first thought to need fail under either kind of bad year, leaving the bud chance a tenth out however many seasons are read. And the sorted series can say what kind of bad year it had: a frost that strikes buds alone is told from a drought that strikes both at nine plants in ten over forty seasons, and one frost season is seen once the plant carries a few hundred buds.

    part 9 · branching
  9. How often a late window of dated, sorted scars names a plant's wait, against the early seasons lost: a wait of 3. A wait of 3, 2000 finite plants, apices dying at 0.05 and buds at 0.15 on average; drought, bad years 5 times a good one. Each plant's first seasons are lost and the next 10 read, dated and sorted, from four starts at the window's first season. True ages: 90.4%, 92.2%, 95.8%, 97.5%, 99.4%, 99.9%, 100.0%. Steady-growth ages: 90.4%, 78.9%, 91.4%, 94.1%, 98.4%, 99.9%, 100.0%. Living total split: 10.8%, 77.0%, 87.8%, 93.0%, 98.2%, 100.0%, 100.0%. No history: 90.4%, 3.0%, 9.6%, 4.9%, 2.0%, 0.1%, 0.0%, after 0, 2, 4, 6, 10, 20, 30 seasons lost. From the first season, one dated share a season names the wait for 52.3% and the sorted series for 90.4% — the two dashed lines. The median plant at the window's start holds 1, 3, 4, 7, 15, 133, 1147 points.

    The seasons a plant no longer shows

    A branching plant found in the field has grown over its oldest scars. Read dated and sorted from a window of ten seasons that starts late, it names its wait better than from its first season, not worse — a two-season wait for every plant once ten seasons are lost, and a three-season wait for every one once thirty are — because the seasons it keeps are large ones. What the window's start must supply is the buds counted as buds: treat every living point as an apex and the reading names almost nothing. Split the buds by age as steady growth would, and the only loss that costs is a small one, on a young plant that is not yet growing steadily. One share a season catches up in a calm climate and never under bad years. And the frost test, which waited for buds, gains.

    part 10 · branching
  10. How often a late window names a plant's wait when its youth grew under another climate. 2000 plants with a wait of two seasons and 2000 with a wait of three, grown 20 seasons before a window of 10 is read, dated and sorted, from the steady-growth start; the climate before the change is one of four youths and after it the present drought, apices dying at 0.05 and buds at 0.15. More bad years, a wait of 2: 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%. Dear youth, a wait of 2: 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%. Kind youth, a wait of 2: 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%. Bud-killing youth, a wait of 2: 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%. More bad years, a wait of 3: 99.9%, 99.9%, 100.0%, 99.9%, 99.9%, 99.9%. Dear youth, a wait of 3: 97.4%, 97.8%, 98.2%, 98.4%, 99.2%, 100.0%. Kind youth, a wait of 3: 100.0%, 100.0%, 100.0%, 100.0%, 100.0%, 100.0%. Bud-killing youth, a wait of 3: 97.6%, 97.9%, 98.8%, 98.9%, 99.0%, 99.9%, with the change 0, 1, 2, 3, 6, 10 seasons before the window. Steady plants: 100.0% and 100.0%. Every wait of two is named; a wait of three is missed on at most 2.6% of plants, those whose dear or bud-killing youth ended as the window opened.

    A plant's buds forget the climate that grew them

    A branching plant read from a late window was named right when the seasons it had lost looked like the seasons it kept. Grown under a harsher, kinder or more erratic youth and read after the climate changed, it still is: a wait of two seasons for every plant, a wait of three for 97 to 100 per cent. The hoped-for sign of the change — buds and apices at the window's start in a mix the window's own survivals would not produce — barely exists, because a steadily growing plant holds about the same number of buds per apex whatever it dies of. Death chances that differ tenfold move that ratio by a few per cent, the plant forgets a change within two turns of its wait, and what a changed youth does leave is the plant's size.

    part 11 · branching
  11. One plant whose wait lengthens from two seasons to three once it reaches a hundred living points, and the windows it can be read from. A branching plant under the present climate whose buds wait two seasons until its living total first reaches 100, at season 15, and three seasons after. Its living total by season, with the change marked and a ten-season window opening at season 10; the change falls in season 5 of the window. Read dated and sorted from the steady-growth start, windows opening at seasons 0, 5, 10, 15, 20 name waits of 2, 2, 2, 3, 3 seasons; this one names 2.

    A late window names the wait it mostly saw

    A branching plant read from a late window names its buds' wait reliably, and its age structure forgets the climate it grew under. Every plant there kept one wait for life. Give a plant a wait that lengthens from two seasons to three once it reaches a stated size, and the window names the wait that held for most of the ten seasons it covers: the new wait if the change fell in its first three seasons or before, the old one from its sixth season on, and never a third. So across plants, read at their sizes, a wait that lengthens with size shows as one — the reading turns at a quarter to a half of the size the wait changed at. The age structure, which forgets a climate, remembers a wait that shortened for two seasons and one that lengthened hardly at all.

    part 12 · branching
  12. One plant whose buds wait three seasons with a chance of 0.5 and two seasons otherwise, read from five windows. A branching plant under the present climate, every bud its surviving apices make waiting three seasons with probability 0.5 and two seasons otherwise. Its living total by season, with ten-season windows opening at seasons 0, 5, 10, 15, 20 marked along the foot; read dated and sorted from the steady-growth start, they name waits of 3, 3, 3, 2, 2 seasons. Every season on this plant holds buds of both waits.

    A plant with two waits is named for the nearer

    A late window reads a branching plant as having one wait. Give every bud its own — two seasons or three, by a stated share — and the window names the wait whose growth the mixture's is nearer: two below a share of 0.47, three above, never an average and no third wait more often than a pure plant shows. The buds per apex, which caught a shortened wait, cannot see the mixture on any plant large enough to matter. What does see it is reading the same plant through several windows: near the turn, nine plants in ten are named both two and three.

    part 13 · branching

All series