Bacterial colonies would rather perform "evolutionary suicide" than put up with cheater strains that leech off the colony without giving anything back.

That's the finding made by a team of researchers who modeled how a colony responds to freeloading bacteria that consume more than their fair share.

Bacteria often work together as a colony to survive, producing resources that are used by other bacteria.

For example, bacteria often secrete enzymes that break down food sources into nutrients, which benefits neighboring bacteria.

Sometimes, however, they can be selfish operators that consume resources without contributing any themselves.

"It's costly for a bacterium to contribute to the community, so for a selfish individual, it's best to simply take what's offered without giving anything back," says Alex Moffett, a computational biologist at York University, Toronto, and the lead author of the new study. "But obviously this is bad for everyone, so the community needs a way to discourage bad behavior."

To determine the rate of biochemical products (also known as 'public goods') depending on the population density, bacteria colonies use a system called quorum sensing.

Quorum sensing works by regulating the expression of cooperative genes across a population of bacteria through small molecules called autoinducers.

The more bacteria there are, the more autoinducers accumulate. If the concentration of autoinducers rises above critical levels, this triggers changes in the bacteria which, as a group, have outgrown the available resources.

Through a mathematical model, the researchers found that quorum sensing has the effect of punishing freeloaders by reducing the availability of shared resources.

But, in some cases, doling out punishment to cheaters hurts the survival of the entire colony as the producers are also starved of resources.

"With no alternative nutrients, quorum sensing by producers withholds the only source of nutrients from the whole population, which harms both producers and cheaters in terms of the total population's mean extinction time," the researchers write.

"We didn't expect to see this behavior, which you might even call 'spiteful'," explains Andrew Eckford, a computational biologist also from York University. "But it indicates that quorum sensing is a remarkably flexible tool for enforcing fairness."

The researchers describe this behavior as "a possible example of demographically stochastic evolutionary suicide".

While full of assumptions, mathematical models are useful tools that help scientists get a grip on complicated, dynamic systems. In this case, understanding the brutal trade-offs that bacterial colonies make to survive might, with further research, shed light on how bacterial infections take hold and cause disease.

For instance, people with cystic fibrosis often contract lung infections, with Pseudomonas aeruginosa – a drug-resistant 'superbug' – being a common culprit.

In the lungs, P. aeruginosa forms small, dense biofilms of around 1,000 bacteria cells, which act as a tough protective layer, making it harder to kill the bacteria and clear the infection using antibiotics

The mathematical modeling of quorum sensing may help researchers understand how bacteria can colonize the lungs so effectively, which might point the way to new treatments, says Moffett.

This research was published in PLOS Computational Biology.