College Math Teaching

February 26, 2011

Ants and the Calculus of Variations

Filed under: applied mathematics, calculus of variations, optimization, popular mathematics, science — collegemathteaching @ 10:38 pm

Yes, ants appear to solve a calculus of variations problem despite having little brains. Here is the “why and how”:

embedded in the ants’ tiny brains is not an evolutionary algorithm for solving the Steiner problem, but a simple rule combined with a fact of chemistry: ants follow their own pheromone trails, and those pheromones are volatile. As Wild explains, ants start out making circuitous paths, but more pheromone evaporates from the longer ones because ants take longer to traverse them while laying down their own scent. The result is that the shortest paths wind up marked with the most pheromone, and ants follow the strongest scents.

Wild shows a nice simulation video on his site, demonstrating how, given these simple assumptions, ants wind up taking the shortest trails.

Before we say that evolution can’t explain a behavior, it behooves us to learn as much as we can about that behavior.

From the website cited (and sighted) by Professor Coyne:

Ants find the shortest route because of three simple facts:

1. Ants follow pheromone trails
2. Pheromone trails degrade over time
3. Short paths take less time to traverse

When two points (say, two nests, or a nest and a food source) need to be connected, ants may start out tracing several winding pheromone paths among them. As ants zing back and forth down trails, pheromone levels build up. Long trails take more time to travel, so long-trail ants makes fewer overall circuits, more pheromone dissipates between passes, and the trails end up poorly marked. Short trails enable ants to make more trips, less time elapses between passes, so these trails end up marked more strongly. The shortest trail emerges.

Here’s a simulation showing digital ants selecting the shortest of 4 possible routes. Note how and where pheromone concentration builds:

They solved the geodesic problem and haven’t even had my numerical analysis class! 🙂


1 Comment »

  1. as say prof horia orasanu

    Comment by papasu — December 10, 2017 @ 7:06 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: