Cooperating bacterial populations are more likely to survive in changing habitats, new research shows.

Dr Mauro Mobilia, from the University of Leeds, and Professor Erwin Frey and Karl Wienand, from Ludwig-Maximilians-University in Munich, have mathematically modelled bacterial colonies competing in an environment with randomly fluctuating amounts of resources.

Their findings, published in Physical Review Letters, showed that a randomly changing environment can create a level playing field between self-serving bacteria and bacteria that work together.

Like other biological communities, bacterial collectives engage in social interactions that promote their survival. For example cooperating bacteria that produce and secrete compounds which stimulate colony growth are found in many bacterial populations despite the fact this uses a large amount of their energy.

In a stable environment, a bacterial strain that makes this energy sacrifice often dies out because it cannot reproduce at the same rate as bacteria that is "freeloading." Using mathematical models, the researchers were able to simulate environments where various community sizes of cooperative and freeloading bacteria had to compete for randomly switching levels of resources.

The study showed that a random switch from resource abundance to scarcity reduces the size of a bacterial community, giving the cooperating bacteria a fighting chance against their freeloading rivals.

Study co-author Dr Mobilia, from the School of Mathematics at Leeds, said: "Generally, the environments where you find bacteria are constantly changing. Our bodies, for example, with their ever-shifting levels of hormones and nutrients, provide a highly variable environment to a number of microorganisms.

"The study showed that a random switch from resource abundance to scarcity reduces the size of a bacterial community, giving the cooperating bacteria a fighting chance against their freeloading rivals."

First author Karl Wienand, a biophysicist from LMU Munich, said: "Some of the cooperative behaviour of bacteria can appear at odds with the well-known idea of 'survival of the fittest.' Bacteria don't have brains or social conventions to enforce cooperation, but in analysing the combined effects of environment and population on the survival of a bacterial strain, our models show that a variable environment allows bacteria to overcome the price of cooperation."

Bacteria are generally considered unsophisticated organisms, but there is evidence that shows microbial communities are complex systems, with bacteria having intricate relations with their environment and among themselves.

Dr Mobilia said: "More modelling work is needed but our approach can be used to study different types of bacterial interactions and cooperation to further unravel the social lives of bacteria.

"A better understanding of the way bacteria interacts with its environment could even have an impact on how best to cultivate bacteria strains and how to treat bacterial infections."