Strange Math Part 10: Fireflies Math

STRANGE MATH - PART 10

The Mathematics of Fireflies ✨

How can thousands of insects flash almost as if they share one clock?

A Mathivation Research Lab Initiative 

Synchronization • Oscillation • Waves • Networks • Collective Behaviour

Strange Opening Question

Imagine standing beneath a tree at night.

One tiny light flashes.

Then another.

Then another.

And suddenly, an entire tree appears to breathe light.

No conductor.

No orchestra.

No central clock.

So how can hundreds - or, in some spectacular displays, thousands - of tiny insects produce such coordinated flashes?

Who is keeping time?

Perhaps the strangest answer is:

Nobody.

The mathematics emerges from the interaction of many individual clocks.

Welcome to Strange Math Part 10 - The Mathematics of Fireflies.


The Amazing Fact

Not all fireflies synchronize.

In fact, synchronous flashing is a specialised behaviour found in certain species and populations. Some of the most spectacular examples occur among fireflies in Southeast Asia and among Photinus carolinus in parts of North America.

In Thailand, researchers studying Pteroptyx malaccae recorded males flashing with a period of about 560 milliseconds at 28°C, with flashes coinciding within roughly ±20 milliseconds.

That is approximately:

0.56 seconds per cycle, 

or about 

1 / 0.56 ≈ 1.8 cycles per second

flashing cycles per second.

And yet each firefly is an individual.

There is no master firefly saying:

"Ready… three, two, one… FLASH!"

Instead, synchrony can emerge through coupling between individual oscillators.

That is where biology becomes mathematics.


Historical Background

The Early Observations

Humans noticed synchronous fireflies long before mathematical models could explain them.

Naturalists observed spectacular displays in Southeast Asia, where males of certain species gather in trees and produce rhythmic flashes.

By the twentieth century, scientists began asking a much deeper question:

How does synchronisation actually happen?

John and Elisabeth Buck became major pioneers in this field.

Their 1966 Nature paper examined the biology of synchronous firefly flashing, while their 1968 Science paper investigated the mechanism of rhythmic synchronisation in Southeast Asian fireflies.

Their observations suggested something remarkable:

The fireflies could not simply be reacting instantaneously to a neighbour's flash, because the observed synchrony could occur on a timescale shorter than the minimum response time expected from direct visual stimulation.

The researchers therefore proposed that the insects' internal timing mechanisms and feedback were important.

The mystery had become a mathematical problem.


The New Mathematics

Modern researchers can now combine:

field observations + high-speed cameras + mathematical models + dynamical systems

to investigate how synchrony emerges.

Research on Photinus carolinus has shown that synchronized flashing can emerge as a form of self-organization rather than requiring a leader.

Mathematical models treat individual fireflies as oscillators - systems that repeatedly move through a cycle.

The same mathematical language appears in:

  • neurons firing,
  • biological clocks,
  • rhythmic movements,
  • coupled oscillators,
  • electrical systems,
  • and even some physical systems.

Fireflies are therefore not merely a biological curiosity.

They are a living demonstration of collective dynamics.


The Hidden Mathematics

● Every Firefly Is an Oscillator

Imagine one firefly has its own internal rhythm.

Let its phase be:

θᵢ(t)

where i identifies the firefly.

Its natural frequency can be represented by:

ωᵢ

If it were completely isolated, it might continue flashing according to its own rhythm.

But nature rarely gives it complete isolation.

It sees other flashes.

Those flashes influence its timing.

And that creates coupling.


 From Individual Rhythm to Collective Rhythm

A simplified mathematical model can be written as:

dθᵢ/dt = ωᵢ + K ∑ⱼ sin(θⱼ - θᵢ)

Don't let the equation frighten you.

It is essentially saying:

My natural rhythm + the influence of my neighbours = my new rhythm.

Here:

  • θᵢ = phase of firefly i
  • ωᵢ = its natural frequency
  • K = strength of interaction
  • θⱼ - θᵢ = difference between two fireflies' phases


When interaction is strong enough, the differences can shrink.

Eventually:

θ₁ ≈ θ₂ ≈ θ₃ ≈ ···

And the swarm begins to flash together.

This is the mathematical heart of synchronization.

Modern firefly models explicitly use oscillator dynamics and interactions to reproduce collective flashing patterns.

● Phase: The Secret Ingredient

Suppose Firefly A flashes slightly before Firefly B.

Their phase difference is:

Δθ = θₐ - θᵦ

If each interaction reduces this difference:

|Δθ| → 0

then synchrony emerges.

But here is the beautiful part:

The fireflies don't need identical clocks.

Their individual rhythms can differ.

Interaction can still bring them into coordination.

That is one of the most important ideas in synchronization mathematics.


● Synchronization Is Not the Same as Uniformity

A swarm doesn't necessarily behave like thousands of identical machines.

There can be:

  • differences in natural flashing rates,
  • noise,
  • environmental disturbances,
  • changing positions,
  • imperfect responses,
  • and temporary loss of synchrony.

Researchers have even studied how synchronized groups can form, break apart and reorganize.

So the real mathematical story is not:

Perfect individuals → perfect group.

It is:

Imperfect individuals + interaction → organised collective behaviour.

That is much more interesting.


● The Wave of Synchronization

Imagine a few fireflies becoming synchronized.

Their neighbours see the pattern.

Those neighbours adjust.

Then the next group adjusts.

The effect can propagate through the swarm.

Mathematically, this resembles a wave of phase adjustment.

We can represent the idea simply as:

Local Synchrony → Neighbour Interaction → Phase Adjustment → Collective Synchrony

A tiny local change can therefore produce a large-scale pattern.

This is emergence.

Equations & Formulae

The Firefly Formula

For a simple conceptual model:

dθᵢ/dt = ωᵢ + K ∑ⱼ sin(θⱼ - θᵢ)

Synchronization condition

A simplified way of expressing the goal is:

θᵢ - θⱼ → 0

Flash frequency

If a firefly flashes once every  T seconds:

f = 1 / T

For the approximately 0.56-second period reported for Pteroptyx malaccae:

f ≈ 1.79 Hz

Phase difference

Δθ = θᵢ - θⱼ

When:

Δθ → 0

the two oscillators approach in-phase synchrony.


A Small Mathematical Experiment

Imagine three fireflies:

A, B, C

Their initial rhythms are slightly different:

fₐ = 1.70 fᵦ = 1.78 fc = 1.86

Without interaction, their flashes gradually drift apart.

Now introduce coupling.

Each firefly adjusts slightly toward its neighbours.

After repeated interactions:

fₐ ≈ fᵦ ≈ fc

The remarkable result is that coordination can emerge without a central controller.

That is the strange mathematics.


The Mathematics of Light

The synchronisation is only half the story.

First, the firefly has to produce the light.

Firefly bioluminescence involves a chemical reaction involving luciferin, oxygen and the enzyme luciferase; ATP also plays an important role in the biochemical process.

The light-producing chemistry is remarkably efficient, and fireflies are famous examples of biological cold light, producing very little heat compared with conventional light sources.

So there are actually two mathematical stories:

Chemical Energy → Light 

and 

Individual Rhythms → Collective Synchrony

Chemistry creates the flash.
Mathematics coordinates the pattern.


Mathematical Curiosity 

  • There Is No Need for a Leader

One of the most fascinating features of synchronization is that a large-scale pattern can emerge without a central controller.

This is called:

Self-organization

The group becomes organized through local interactions.


  • Fireflies Are Living Clocks

Each flashing firefly can be modelled as an oscillator.

That makes fireflies mathematically related to many other rhythmic systems.

The same broad mathematical framework can be used to study coupled oscillators in biology and physics.


  • Synchrony Can Be Measured

Scientists don't simply look at a swarm and say:

"They look synchronized."

They can analyse:

  • flash timing,
  • phase differences,
  • flash frequency,
  • spatial position,
  • and statistical correlations.

Modern studies use cameras and quantitative analysis to reconstruct the spatial and temporal structure of firefly swarms.

In other words:

Beauty becomes data.
Data becomes mathematics.


  • Not Every Firefly Plays the Same Mathematical Game

This is an important scientific caution.

There are thousands of firefly species, and their communication systems differ. Some use flashing patterns; some species do not have glowing adults at all.

Therefore:

"Fireflies synchronize" is not a universal rule.

A more accurate statement is:

Certain firefly species and populations exhibit remarkable synchronized flashing.

That distinction matters.

Strange Math is strange - but it must remain mathematically and scientifically honest.

Human Reflection

Now step away from the equations.

Look at the swarm again.

No firefly possesses the whole picture.

Each one knows only its own rhythm and responds to signals around it.

Yet together, they create something no individual could produce alone.

Isn't that strangely human?

A classroom.

A family.

A research team.

A community.

A society.

Each person has a different rhythm.

Different experiences.

Different ideas.

Different speeds.

And yet, sometimes, something beautiful happens.

Not because everyone becomes identical—

but because everyone learns when to adjust.


Mathivation Insight

Perhaps synchronization teaches us something deeper than mathematics.

Coordination does not require sameness.

The fireflies don't need identical clocks.

They need interaction.

In mathematical language:

Individual Difference + Interaction = Collective Order

And perhaps this is one of the most beautiful equations hidden in nature.

Too little interaction:

No Synchrony 

Too much rigid control:

No Individual Rhythm 

But somewhere between independence and coordination lies:

Harmony

That is where mathematics meets human experience.


Takeaways

  • Firefly synchrony is real - but species-specific.
  • A flashing firefly can be modelled as an oscillator.
  • Synchronization can emerge through interaction and phase adjustment.
  • A group can create large-scale order without a central leader.
  • Firefly light itself comes from highly controlled bioluminescent chemistry.
  • Mathematics allows scientists to measure and model collective behaviour.
  • Difference does not prevent harmony.
  • Sometimes, the secret of a system is not in its individual parts - but in the relationship between them.

A Curious Question

If thousands of fireflies can create harmony without a conductor,

what happens when thousands of human minds learn to listen to one another without trying to become identical?

Would that be chaos?

Or could it become another form of mathematics?


Closing Note

A firefly does not know the equation.

It does not know:

dθ/dt

It does not know what an oscillator is.

It does not understand phase coupling.

It simply flashes.

Another responds.

Another adjusts.

And slowly - 

the forest begins to calculate.

Perhaps that is the strangest part.

Nature does not always solve mathematics by writing equations.

Sometimes,

nature becomes the equation.


References & Further Reading

  • Buck, J. & Buck, E. - Biology of Synchronous Flashing of Fireflies, Nature (1966).
  • Buck, J. & Buck, E. - Mechanism of Rhythmic Synchronous Flashing of Fireflies, Science (1968).
  • Sarfati, R., Hayes, J. C. & Peleg, O. - Self-organization in natural swarms of Photinus carolinus synchronous fireflies, Science Advances (2021).
  • McCrea, M., Ermentrout, B. & Rubin, J. E. - A model for the collective synchronization of flashing in Photinus carolinus, Journal of the Royal Society Interface (2022).
  • Peleg, O. - A new chapter in the physics of firefly swarms, Nature Reviews Physics (2024).
  • Smithsonian Magazine - Firefly biology, bioluminescence and synchronized flashing.

Disclaimer

This article is intended for educational, exploratory and informational purposes. Firefly behaviour varies considerably among species, populations and environmental conditions. Mathematical equations presented here are simplified models designed to explain the underlying ideas of oscillation, coupling and synchronization; they are not complete biological descriptions.

Claims about synchronization should therefore be understood as applying to specific species and observed populations, rather than to all fireflies.

The purpose of Strange Math is not to turn every strange fact into a mathematical certainty, but to ask a better question:

What mathematical structure might be hiding behind what we observe?

 

From the Desk of the Author

I began this article with a simple question:

How can thousands of tiny insects appear to share one clock?

The deeper I went, the more I realised that there may be no single clock at all.

There are only individuals—

each carrying its own rhythm—

responding to one another.

And somehow, from those tiny adjustments, something extraordinary emerges.

Perhaps mathematics is not always about calculating the answer.

Sometimes it is about understanding how many small decisions can create one beautiful pattern.

That is where Strange Math lives.

Where Mathematics meets Human Experience.


Rakesh Kushwaha

Founder, Mathivation Research Lab Initiative
Strange Math Series

Stories shape us. Math refines us.

Comments

Popular posts from this blog

Sunday Special: The Unfiltered Confessions of a Classroom Life

Sunday Special: The Truth

Sunday Series 6: The Silent Suffering of Good Teachers