Growth of an organism or a population can be simulated using a deterministic context free grammar, also known as a parallel string rewriting 'L'-System. The simulation is started with an initial string called the 'axiom'. Here the symbol B represents a developing (subadult) organism and the symbol A represents a reproducing (adult) organism. In this example there are two grammar rules which are applied "in parallel" (simultaneously to all corresponding symbols at each step or generation):
|Rule 1||B => A|
|Rule 2||A => AB|
Here are the results from the first ten generations (starting with the axiom) and counts for the populations size (number of organisms present) at each step:
Note that for the resulting population growth the size (number of organisms) at each generation is the sum of the sizes of the previous two generations. This pattern is called a Fibonacci sequence, and is commonly found in nature.