Plant Finds in Mill Creek Canyon, UT

Gosh, I love hiking. There are so many neat things you can see, if you keep your eyes open. I was on the Mt. Aire trail. It’s awesome!


Not sure which moss this is, but if you look closely, you can see the operculum!

(This moss in the middle of its reproductive stage. The stalks growing out of the moss have capsules that contain spores.)


Scarlet gilia – a bright, cheery, red wildflower.


Black twinberry. Poisonous!


Ninebark. Physocarpus malvaceus. Of the rose family.


Sweet pea. Lathyrus latifolius. Fun fact: it’s a long-lived erosion control plant AND a legume.


Plants are neat!

I got the chance to take pictures of some microscopic plants. The level of complexity of these tiny things is amazing.

Volvox colony.

Valonia colony.

Sellaginella rhizoid cross section.

Pinus leaf cross section. It looks like stained glass!

My favorite: Hydrodictyon: How symmetric!

The Geometry of Nature

This is a post from a series in my project.
PBS Nova is a great TV show. They have really neat episodes. One of my favorites is “Hunting the Hidden Dimension.” It’s about basic ideas of fractal geometry, applications of fractals to our lives, and a little history about the people involved in exploring fractals.

Fractals are everywhere in our lives. You could call it nature’s geometry. Bacterial growth, plant growth and development, and lightning patterns can be fractal.

This is a cousin of the broccoli family: Romanesco. It’s Mandelbrot’s favorite vegetable.

Cut a red cabbage in half. What do you get? A neat, complicated pattern.

Sea urchins, too!

What’s a fractal? Strangely, a simple Google search of the term “fractal” yields a wide range of results. Some definitions claim self-similarity as a prerequisite, while others rely on various numerical methods. A simple interpretation: a fractal is a geometric shape whose complexity is independent of any spatial scale. Between the particulars of varying definitions, one thing is consistent: they all agree that the main idea of fractals is that a simple condition undergoes many iterations to become a very complex process. This implies that you can model complicated processes via fairly simple underlying principles.

In my opinion, the kind gentleman in the video below explains the Mandelbrot set and Julia sets really well. Enormous complexity comes from a deceivingly simple equation: f(z) = z^2 + c. You don’t need to know that much about fractals or mathematics to understand what he’s telling you. (Well I guess you should know that there are such things as imaginary numbers and when you have a combination of real and imaginary numbers, it’s called a complex number).

There are many ways to create fractals on the computer, and a popular mathematical theory of plant development is called a Lindemayer system, or L-system for short. Aristid Lindenmayer, a biologist, developed L-systems to capture the developmental processes of plants. The central concept of L-systems is rewriting; defining complex objects by continually overwriting parts of a simple initial object using a particular set of rewriting rules. This quality (rewriting) is what naturally lends this method of modelling to fractal geometry. He collaborated with Przemyslaw Prusinkiewicz to write this book: The Algorithmic Beauty of Plants. The book explores various algorithms to generate realistic images of plants on the computer. The value of this kind of work is that you can find out how significantly (or insignificantly) certain factors (climate change, pollution, drought, fire, etc.) affect plant growth without actually spending months or years cultivating a plant. Modeling plant growth on the computer is a way of quickly finding out what we need to do to preserve our environment. Other applications of this work are in computer graphics (think movies like Star Wars or video games like Assassin’s Creed); there are a lot of problems computer scientists face to make scenery look realistic and to keep things within memory limits. This post is a general overview of the main ideas of this book. You can easily implement the ideas from this book into any programming language. I generated the plots below in Matlab.


To see an L-system in action, you should visualize a small turtle on the display of your personal computer. This turtle will only move once he is given the proper instructions. His state is defined in terms of (x,y,\alpha), where (x,y) is his position on the Cartesian plane and \alpha is the direction he is facing. For instance, moving one step forward of length d is encoded as F, turning to the left at the angle \alpha + \delta is + and turning right at the angle \alpha - \delta is -. The increment angle \delta is simply a constant combined with the turtle’s initial direction. The figure below demonstrates how a turtle would interpret these encoded instructions:


L-systems rewrite strings in parallel and simultaneously, and this is what differentiates them from other string rewriting methods, such as Chomsky grammars. In Chomsky grammars, strings are rewritten sequentially. Biologically speaking, many natural processes occur simultaneously and in parallel to each other (e.g. cell division). L-systems follow this principle most closely. For instance, consider cell division of the filamentous cyanobacteria, Anabaena catenula.


Anabaena catenula lives in ponds. You might consider it a type of pond scum. Interestingly, it is also found in the roots of certain cycads, participating in a symbiotic relationship with them. Cycads with this relationship have apogeotrophic roots (roots that grow towards the sun) in addition to subterranean ones so that the cyanobacteria can photosynthesize. This cyanobacteria reproduces asexually. Each cell splits into two daughter cells, each with a different polarity (orientation) and size. Once a cell has reached a certain maturity (indicated by its size), it may divide into two more cells. This process can occur at any place in the filament.

Let us begin with four characters: a_r, a_l, b_r and b_l. The symbols a and b represent different types of cells in the filament. The subscripts l and r represent the directions left and right, respectively, and indicate a cell’s polarity. Furthermore, let us implement some rewriting rules. For every a_r in our character string, let us use the rule a_r \rightarrow a_lb_r. This means that a_lb_r will replace every instance where a_r occurs in our character string. The remaining rules are listed below:

a_r \rightarrow a_lb_r
a_l \rightarrow b_la_r
b_r \rightarrow a_r
b_l \rightarrow a_l

We can capture the cytological states of the cells (their size and readiness to divide) with these symbols and rewriting rules. The figure below is a pictorial representation of a few iterations of our new rules:


This was a simple example that should help you understand the underlying logic of an L-system. But, let’s be real. This model draws a straight line. B-o-r-i-n-g. Making the system a little more complicated will generate some really cool shapes. Due to the discrete nature of L-systems, the main limitation of this model is that it cannot capture the infinitely many subdivisions that take place. Thus, there is another parameter that determines the maximum number of iterations for each L-system, N. L-systems are a powerful tool because they help us decompose an aspect of a complex process into a set of rewriting rules, an axiom, and a maximum number of iterations.

This is the evolution of a Gosper curve.

\omega = X (here, \omega just means the starting place.)
\delta = \frac{\pi}{3}
X \rightarrow X+YF++YF-FX--FXFX-YF+
Y \rightarrow -FX+YFYF++YF+FX--FX-Y





This sequence of pictures represents how many iterations the computer did to generate the last picture: N = 4. That’s the power of L-systems. You can get incredibly complicated shapes in just 4 repetitions! Compare that to other fractal modeling methods, like stochastic models, which require thousands of iterations to converge. How neat is this?


What about plants? Right. Here is a carrot leaf:


This is how you would model it in the computer:
\omega = X
\delta = 25.7\frac{\pi}{180}
X \rightarrow F[+X][-X]FX
F \rightarrow FF

I had to use some new symbols and techniques to create this leaf in the computer: the square brackets. It’s not a really complicated idea, but it may seem strange to people who aren’t familiar with computer science. The brackets represent when to “push” or “pop” something off of the “stack.” Every time you see a “[“, it means “Store the current drawing position and orientation. Write it to a stack (a type of data structure) so that many states are saved in order.” A “]” means “Use the last state (the top of the stack) as the current state of the turtle.” The stack is just a way of bookkeeping turtle orientations. And here are the iterations:





For a stick figure, I think this is a pretty close representation of a carrot leaf! (Although since I coded it, I guess I am a little biased.) This is basically what the book explores. It has much more detail, many more examples, and many other techniques. You can model the way the scales on a pineapple form or maybe you’re interested in the way seeds on a sunflower orient themselves. Both of these examples are in the book. There are so many applications of fractals to our lives and our world. This is just one example of how they apply to us. Think about your cell phone. How does it receive signals? The antennae in it is bent into a fractal pattern because it turns out that this pattern maximizes the amount of antennae you can fit into a small space, which means you can receive the widest range of signals (bluetooth, radio, satellite, etc.). The world around us is teeming with fractals just waiting to be discovered.

Speaking of sunflowers, this is a nice video that explores them as an aspect of the golden ratio, yet another fascinating number.

In the words of the late and great Mandelbrot: “Clouds are not spheres, mountains are not cones, coastlines are not circles, and bark is not smooth, nor does lightning travel in a straight line.”

Save the Turtles!

This is a post from a series in my project.

Remember the sea turtles in Finding Nemo?

They are cute, aren’t they? It probably isn’t a surprise to most people that sea turtles (Carretta carretta) are endangered – they’ve been on the endangered species list for quite some time. What is a surprise is that you can use linear algebra (how to do stuff with matrices) to analyze the dynamics of a population of sea turtles to find out which life stage (hatchlings, juveniles, adults, or seniors) has the most impact on overall population viability. This post is a general overview of the findings of this research paper (1987) by Deborah T. Crouse, Larry B. Crowder and Hal Caswell.

Modeling populations with matrices is an important and useful technique in the field of mathematical biology. Matrices are used to determine which life stage(s) of a population are the most significant in population growth and decline. The authors describe how the matrix model is applied to the population of loggerhead sea turtles. In particular, they investigate how the population matrix aids in the prediction of population trends (growth or decline). Their findings lead them to make an argument that the most signifi cant life stages for loggerhead sea turtle population survival are the juvenile and mature breeder stages. In other words, don’t focus on protecting beaches with brand new turtle eggs. Get the word out to fishermen, recreational boaters, commercial fishing operations, and anyone else who has a net: Don’t let juvenile or mature adult turtles get hurt. They are the ones who have the most impact on population survival.


Life cycle

What are the stages in a turtle’s life? I admit, it’s an arbitrary line you’re drawing when you put certain turtles in some stages and others in different stages. All of these uncertainties and possible miscategorizations aside, the argument can be made that there are seven cycles.


The researchers divided up a turtle’s life into seven stages. These seven stages are supposed to characterize a turtle’s whole life, so they form the rows and columns of this population matrix. Each life stage has a certain probability of survival (P), fecundity (reproduction) (F), and growth (G). The arrows in the picture above show you the progression of a turtle as she passes through life. The self loops (labelled P) represent how probable it is that this turtle stays in its life stage for one time step. The arrows pointing from one stage to the next (labelled G) show you how probable it is that any given turtle in a particular life stage will advance to the next stage in the next time step. Finally, the arrows along the bottom (labelled F) represent how probable it is that a turtle will reproduce. It’s important to note that the turtles modeled in this simulation are all females because it turns out that they are the easiest to keep track of – given a turtle’s mobile and long lifestyle, it’s hard to track them.

The value of such a convoluted life cycle graph is that you can turn the relationships it shows into a matrix of numbers:


Note the columns of the matrix correspond to the current life stage of the turtle, and the rows represent the stages that follow. Each entry in the projection matrix can be thought of as corresponding to the transition from the stage-class in the given column to the stage-class in the given row. For example, the first row of the matrix lists the probability of reproducing for a turtle from a certain stage class. The red arrow shows the probability of a Stage 3 turtle surviving in its own stage, the purple arrow shows the probability of a Stage 3 turtle surviving and growing to the fourth stage, and the green arrow shows the probability of a Stage 6 turtle surviving in its own stage.

That’s it. That’s the model. Sort of anticlimactic, right? Well, the interesting bits are in the analysis that follows.

Population projection

Basically what you do is you take this sparsely populated (pun intended) matrix and you multiply it by a vector of some initial population distribution of turtles in stage 1, stage 2, stage 3, … all the way to stage 7. Each time you do a multiplication step, it counts as one time step. Think of it as one year. Then, you add up all the elements in that vector to get an idea of how many turtles (across all life stages) are in that population at that time step. When you do this enough times, you get a plot that looks something like this:


If you take the present year to be considered Time = 0 years, then this plot is supposed to project into the next 100 years. Sadly, this model predicts that there will be basically zero loggerhead sea turtles in the year 2113. What can change this unfortunate trajectory? Which stage of turtles has the most impact on the survival of the species? How do we find out which life stage is the one we should target conservation efforts at?

Sensitivity analysis

The researchers used matrix methods to analyze the stability of this model. In other words, they tried to find out which parameter in the model had the most effect on the long-term behavior of the model. This type of analysis is called a “sensitivity” analysis. The idea is to measure how much the population projection changes when you change certain parameters (reproductive rates, growth rates, or survival rates) of certain life stages (hatchlings, juveniles, adults, etc.), and then use this information to figure out which life stage has the most effect on the population’s survival. Sensitivity analysis paints a small picture of what’s behind the dynamics of this population model. Abstracting away the equations and numerical simulations, this is the result the researchers were looking at:


Basically, the plot shows that the survival (P) of the juvenile life stages (stages 2, 3, 4) and the survival of the mature breeders (stage 7) is the most “elastic.” Elasticity is another way of saying that these stages probably play the dominant roles in population growth. Let’s test the hypothesis! Ideally, if conservation eff orts were successful, the loggerhead population would stabilize to a constant value as time goes on. Therefore, this was what the authors looked for when manipulating stage parameters.

Let’s examine the two highest values on the graph, survival (P) of stage 2 and stage 7, and the stage that conservation efforts before 1987 were focused on, growth (G) of stage 1. This is a projection of turtle populations over time if you increase the probability of survival of stage 7 (mature breeders) by about 17%:


This is a projection of turtle populations over time if you increase the probability of survival of stage 2 (juveniles) by about 22%:


To get the population projection to be as stable as the ones demonstrated above, it turns out that you have to increase the probability of growth of stage 1 (the hatchlings) by 175%:


What a difference that makes! Making a 175% effort is significantly more than making a 22% or a 17% effort for the same result: population conservation. Crouse et. al made a huge discovery when they published this paper in the 1980s. Their results were so influential that this paper is one of the most highly cited mathematical biology papers today. This team of researchers changed the way many people approached sea turtle conservation and impacted the way population biology research is carried out.

Swarming Dynamics: Locust Marching Hopper Bands

This is a post from a series in my project.

I’m sure most of us are familiar with this biblical reference: the locust plague. As it turns out, there is quite a bit of interesting mathematics behind the dynamics of swarm formation. I know farmers and governments are probably the first ones to fund this kind of research; locust swarms cost billions of dollars in lost crops. Swarms can be huge – on the order of millions of individuals – and they can cover hundreds of square miles per day. If you aren’t familiar with locusts, the youtube video below should clarify some things:

Locusts are strange, little creatures.

  • a cross between a cricket and a grasshopper
  • two main behavioral states: solitary and sociable
    • sparse environments, with low population densities: solitary bugs
    • overabundant nutrients, with high population densities: sociable bugs
  • behavior change induces bodily changes (ew, they get bigger)
    • Bigger wings, legs, and eyes. All this, to fly long distances for food. In other words, a swarm is born.


Of course, there are many factors that cause this phase change, but generally, there’s a high correlation between population density and swarming. This research paper by a slew of researchers led by Chad Topaz from Macalester investigated the conditions required for an outbreak; that is, the research team investigated what triggers a solitary locust to become sociable. The researchers also posed some strategies for locust management policies. Here are some statements from that research paper:

  • The condition for an outbreak is expressed as a ratio of known biological parameters. It is a threshold population density of locusts. Densities less than this point lead to solitary populations. Densities greater than this point lead to swarms.
  • It is easier to prevent the formation of a swarm (e.g., reducing growing populations of locusts by killing a few suckers off) than to control an existing swarm (e.g., killing individuals within a swarm).

The researchers cover more detail about the specifics of the model, stability analysis, and numerical simulations of their results in the official research paper than I do, so this post should just be a simple overview of what’s happening. Below is the model the researchers came up with to predict how locusts change their behaviors from being solitary to sociable and vice versa. Another name for this model is a reaction-diffusion model. It really just tries to capture how the density of solitary locusts s(x,t) and the density of sociable (also known as gregarious) locusts g(x,t) change in any given area.


The left hand side of this system of equations are derivatives in time and space that describe the rate the locusts change behavior from solitary to sociable. The right hand side is what we look at to analyze the system at equilibrium, which reveals the long-term behavior of the system. Together, they form the full model.

For you chemistry whackos out there, you can think of this system of equations as a system of chemicals. There is a predefined amount of chemicals you pour into the system (a finite number of solitary and sociable locusts), and then you wait for a while for the reaction to happen. When it’s all over, you look inside your reaction jar (or whatever you hold chemicals in) and see how the reaction progressed and what’s left over at the end. What’s the relationship between solitary and sociable locusts? They add up to a total number of locusts:

\rho(x,t) = s(x,t) + g(x,t)

How do we know how fast (or slow) locusts change their behaviors from one phase to the next? We model them with equations that increase (or decrease) with increasing density – f_1(\rho), f_2(\rho). If you’re into the specifics, this is what the terms mean:

  • \dot{s} is the rate of change of density of solitary individuals
  • \dot{g} is the rate of change of density of sociable (gregarious) individuals
  • \nabla\cdot(\mathbf{v_s}s), \nabla\cdot(\mathbf{v_g}g) is the change in velocity of the solitary (gregarious) individuals multiplied by the density of solitary (gregarious) individuals
  • f_{1,2}(\rho) represent conversion rates from one phase to the other, which depend on density

One of the main assumptions that the authors make for their model is that the rate that locusts change to being solitary (f_1) decreases with increasing population density and that the rate of locusts changing to being sociable (f_2) increases with increasing population density. In fact, these rates are monotonically decreasing and increasing, respectively. A plot of f_{1,2} may help visualize these trends.


Steady states (or equilibrium)

When you set the differential equations to zero, you can find the equilibrium points \phi_{s,g} of the model. What I mean is: rearrange these equations to get an expression for s, g. We’ll call these special points s_0, g_0.

\rho(x,t) = s(x,t) + g(x,t)

s_0 = g_0\frac{f_1}{f_2}

g_0 = \frac{\rho}{\frac{f_1}{f_2} +1}

In other words, at these points, the locust densities are stable in their behavioral phase (they settle in either solitary or sociable behaviors). A plot of this situation may clarify:

As you can see, when population density increases (the x axis), the number of initially solitary locusts (the y axis)decreases because they change their behavior to be sociable.

After a significant amount of algebra and transformations (irrelevant for us), the authors concluded that the conditions for an outbreak of a swarm are based on a ratio of known biological parameters.

\phi_g + \phi_s = 1
\phi_g = \frac{g_0}{s_0+g_0}

What this relation is trying to express is that once the density of sociable insects \phi_g becomes greater than the equilibrium point \phi_g^*, the locusts begin to swarm. The researchers found a precise way to calculate this density threshold (above), where:

  • R_{s,g},A_g are the interaction amplitudes that determine the strengths of attraction to other insects
  • r_{s,g},a_g are the interaction length scales that represent typical distances over which one locust can sense and respond to another

The reason why the authors think that controlling locust populations before they swarm is easier than controlling an active swarm is because of the following plot. It’s a representation of how stability changes as the density of the locust population changes:


The solid red line represents stable solitary phase, and the dashed red line shows unstable solitary behavior. The green line is stable sociable behavior. The arrows indicate that as you increase locust density \rho_0, the population is stable in the solitary phase. However, once you move past the point marked with an asterisk, stability jumps from the solitary phase to the sociable phase. After this point, no matter how much you reduce the locust population, the individuals will continue to tend towards swarming behaviors. The technical name for this phenomenon is called hysteresis.

Numerical simulations

Numerical simulations of the model show some pretty neat results. They are meant to find the time elapsed until a swarm breaks out. You can see how the population is initially distributed between solitary and sociable insects, and as time goes one, how the distribution changes to favor swarming dynamics. For a certain set of parameters (chosen to illustrate a specific case), this is what they observed:


The dashed lines are solitary individuals and the solid lines are the sociable ones. You can see that in a matter of hours (about 3.45 hours), the dynamics change dramatically. At the end, you are just left with a travelling band of gregarious insects; no more solitary ones.

The findings of this paper have some neat implications for locust management that could save a big chunk of money for farmers and governments. Due to the sudden stability changes after a certain density threshold (hysteresis), it’s clear that the wise thing to do is to keep an eye on existing locust population densities so that they don’t pass that critical density. The plot of hysteresis shows that even if you were to reduce a population of millions of locusts in a swarm to close to zero individuals, these individuals would still want to swarm. That is a disheartening observation, but it’s possible to prevent this situation from happening if management techniques were focused on prevention rather than control of the swarms.

I’m always amazed at how advances in mathematics and new findings can lead us to unraveling some of nature’s mysteries. It makes things like ominous biblical plagues a lot less intimidating. To me, that’s the real value of math. It gives us the power and capability to begin to understand how seemingly impossibly complicated events happen.

(Moses from Charlton Heston’s Ten Commandments)

Mushrooming Season Is Upon Us!

In high anticipation for the Colorado Mycological Society’s first meeting of the year, I decided that a post about mushrooms is in order. Here are the details of the meeting:

7:30 pm 
at the Denver Botanic Gardens

TALK:  Edible Mushrooms of Colorado 
Speaker: Ed Lubow
Since most members of CMS are interested in hunting mushrooms so they can eat them, we’ll start off the year with a presentation about some of the edible ones that are actually worth hunting. There will be mushrooms appropriate for any level of hunter, including those who are just starting out. The focus will be on showing how to accurately identify the mushrooms presented so that poisonings due to misidentification can be avoided. There will also be a showing of the winners of the October 2012 photo contest. Ed is a past president of CMS, a photography expert, and one of our chief mushroom identifiers. He is also a volunteer at the Sam Mitchel Herbarium of Fungi at the Denver Botanic Gardens.

Like most of my interests, I came upon mycology by way of reading a super neat book: Chanterelle Dreams, Amanita Nightmares: The Love, Lore, and Mystique of Mushrooms, by Greg Marley. Actually, what happened was: I tried hiking for the first time last summer, found a bunch of neat plants, decided to embark on a project of photographing, identifying, and cataloging them, and realized that the mushrooms I found were the best of the lot. Then, in the course of a class on plant biodiversity, I read that book. And then I got super excited and joined the CMS.

Ah, if only my school offered a class in mycology.

Anyway, I’ve discovered mushrooming is a blend of two of my favorite things: hiking and mushrooms. No, not the magic mushrooms. Wild mushrooms! I’ve been mainly hiking around Rocky Mountain National Park, and here are some of my finds from last season:


Amanita muscaria, popularly known as the Fly Agaric (So pretty, but so poisonous)


Pleurotus ostreatus, aka oyster mushrooms (delicious!)


Lycoperdon perlatum, aka puffball mushrooms (delicious!)


Ramaria largentii, (edible, but with caution)


Mystery ‘shroom. I have yet to figure out what this is; my suspicions: Russula decoloransLactarius torminosus, or perhaps it’s neither of those!

I’m really bummed I have to miss the height of Colorado’s mushrooming season this year. Since there were so many forest fires last year, there should be a great number of delicious chanterelles and morels taking advantage of the nutrient-rich soil. Hopefully, Salt Lake City has some neat finds; I’ll be there for my first internship with Goldman Sachs.

In the spirit of mushrooming, here is a relevant TED talk from leading mycologist, Paul Stamets: