Why do flies suddenly appear every time you open a beer?
Why do flies suddenly appear every time you open a beer?

It is a truth universally acknowledged that a beer cracked open outside must be in want of a couple of annoying flies.

Of course, nobody really wants those flies - but still they come, following the opening of a beer like Monday follows the weekend.

Now scientists have figured out how fruit flies have such a knack for magically appearing whenever a can of beer or bottle of wine is opened.

The team based at the California Institute of Technology have published their results in the journal Nature - findings which have overturned earlier scientific consensus.

Their study spanned thousands of experiments conducted over a six-year period and discovered that contrary to prevailing thought, fruit flies were in fact attracted to carbon dioxide (CO2) and not repulsed.

The study was led by Dr Floris van Breugel and resolved a paradox surrounding fruit flies' response to CO2 which had baffled boffins for decades.

"The scientific literature about insects broadly shows that CO2 is a universal attractant," said Professor Michael Dickinson, whose laboratory was used to carry out the research.

"But a long series of papers claimed that fruit flies are averse to CO2. They're basically the only insect for which that was reported."

The consensus was baffling because fruit flies eat yeast, a single-celled fungi that produces CO2 as it ferments sugars.

"Drosophila melanogaster, the standard laboratory fruit fly, evolved to eat the yeast that lives in fermenting fruit," Prof Dickinson said.

"It is a yeast specialist, and not just a yeast specialist but basically a brewing yeast specialist.

"The flies co-evolved with humans to live off of what we use to make beer and wine."

Dr van Breugel was inspired to pursue the experiment when thinking about fermentation during the course of a home brewing project.

At the time, an experiment in the Dickinson Lab's wind tunnel involved mosquitoes or flies buzzing around or landing on a platform from which plumes of CO2 were released while cameras tracked their movements.

"I thought, 'Why don't I put some flies in the same arena and see what they do?'" Dr van Breugel said.

"After I ran the experiment, I found that the flies had actually crawled through the tube where the CO2 was being emitted into the wind tunnel-they just kept crawling!

"So that confirmed that they are, indeed, attracted to CO2 and that I should really investigate that more closely."

During the course of the investigation, the researchers found that flies seek out CO2 when they're in an active state, but avoid it when they're sleepy or moving slowly because of wind factors or hunger.

The team believes this observation has resolved the contradiction between the laboratory's results and other studies.

Dr van Breugel said the behaviour was probably the result of a balance between the reward of proximity to food sources and the risk of danger.

He noted that CO2 is produced by animals when they breathe and it attracts predators like parasitoid wasps which lay their eggs on fruit fly eggs, larvae, and adult flies.

"So, if a fly is going to sleep and not trying to find food, it wouldn't want to be near a gas that is going to attract things that are trying to eat it and its babies," he added.