Having healthy gut bacteria could have as much to do with a strategy that insurance companies use to uncover risk as with eating the right foods, according to researchers at the University of East Anglia (UEA).

Findings published in Ecology Letters show how researchers applied a strategy used by insurance companies to understand how animals and plants recruit beneficial bacteria.

The breakthrough brings scientists closer to understanding the human body's relationship with bacteria, which account for nine cells out of every 10 in our bodies.

The research has been carried out by Dr Douglas Yu from UEA's school of Biological Sciences and Dr István Scheuring from Eötvös University in Hungary.

Dr Yu said: "It looks like every plant and animal on earth, including humans, receives a multitude of benefits from their microbial communities. The good bacteria in our bodies help digest our food, protect us from infections, and perhaps even prevent some cancers.

"The selection of symbionts can't be random. Hosts appear to choose beneficial microbial partners out of a huge pool of candidates. But until now, it hasn't been known how successful partner choice evolves. This is now one of the leading questions in biology.

"One great example is the leafcutter ant - they have a lot of nice bacteria on them that make antibiotics, which kill pathogenic moulds on the fungus that they farm for food.

"We argue that the ant host has evolved living conditions under which antibiotic-producing bacteria have a competitive advantage for the ant niche.

"To do this, we applied the same sort of strategic thinking that insurance companies use to identify high-risk customers. For instance, car breakdown insurers differentiate customers with bad cars from those with good cars by forcing drivers to pay more if they also want their cars rescued at home, known as the 'homestart' option.

"If homestart is priced high enough, mostly drivers with bad cars will choose it because they have a greater fear that their car won't start in the morning. Their choice reveals the kind of car that they have, which lets the insurer avoid costly inspections and still 'screen out' bad-car owners from the cheaper policies.

"We argue that a host can also 'screen out' bad bacteria and 'screen in' good, antibiotic-producing bacteria, even if a host cannot tell the bacteria apart.

"Our model shows that if the host produces a lot of food for bacteria, it fuels fighting via antibiotics. It's the reason bacteria produce antibiotics in the first place - to kill competitors. And once the ant's surface is covered in antibiotics, it becomes intolerable for non-antibiotic-producing bacteria, the freeloaders, because they tend to be less resistant to antibiotics. If the host sets the right conditions, the bacteria screen themselves, just like the car owners."

It is hoped that the findings will also advance our understanding of the human body.

"The same logic can be used, for instance, on the human vaginal microbiome, which provides high levels of carbohydrates, glycogen, for its beneficial bacteria, Lactobacillus. Some of that glycogen is turned into lactic acid, producing an acidic environment that deters the growth of pathogenic bacteria.

"A bonus feature of our model is that it naturally creates 'alternative stable states,' which are distinct communities of bacteria. In the gut they are called enterotypes, and people all around the world belong to one of a few different types.

"The invasion resistance of these alternative states, their 'stability,' is why it's difficult to make a permanent shift from one enterotype to a different, possibly healthier, one - despite eating the right foods and drinking pro-biotic drinks."