Genetics, in addition to nutrition, decides an ant's place in society, according to researchers at Lausanne University.
The discovery that interaction between genes is stronger than previously thought explains why queen ants mating with multiple partners results in the optimal balance in a colony between queens and workers.
"We found two things. The first is that differentiation between queens and workers is not due only to environmental factors. Genetics is also involved," Laurent Keller, a professor at the university's Department of Ecology and Evolution, told swissinfo.
Until now it was believed that, as in honey bees, food was the all-important factor. With honey bees, a female larva reared on nothing but royal jelly develops into a queen as opposed to a humble worker.
"The second is that there is no gene to become a queen or a worker – it is the interaction of the genes of the mother and the father which is important."
So for example mating queens with males of one colony could result in a lot of queens, whereas mating the same queens with males from another colony could produce many workers.
"This is really important for caste determination in insects, but I think the same phenomenon is likely to occur under a wide range of conditions," he said, adding that the behaviour and physiology of many organisms – ultimately wherever genes are involved – might be influenced by the interaction between several genes.
"In terms of medicine this could have important consequences," said Keller, one of the world's leading myrmecologists – ant experts – adding that genetic incompatibility could be responsible for various diseases.
"It could explain for example whether a female with a given gene is reproductably compatible with a male. It may also explain the sterility of some couples."
Keller and Tanja Schwander have published their findings in the latest edition of Science and are conducting similar experiments on other ant species "to confirm that it is a general phenomenon".
Another consequence of genetic incompatibility among ants is that for a colony to be successful, the queens should sleep around: if a lack of genetic variation is the problem, polygamy is the solution.
"If a queen mates with a single male, by chance their combination may give rise to many workers or many queens. Both those scenarios are bad: too many workers means not enough reproductive individuals, and too many queens could be really bad during colony founding because the number of workers needs to grow," Keller said.
"So it's good to have both, and the best way to have a balanced number of queens and workers is to mate with multiple males. Some of these males will give a lot of queens and some will give a lot of workers. Basically you shouldn't put all your eggs in one basket."
For Keller, the role of genetic interaction is the study's most significant result.
"Many people will at some point get results in their labs, but with a different background you could get different results. I think it's really due to this interaction between genes," he said.
"Geneticists like things to be simple, but they are not simple, and I think interaction needs to be taken into account in genetics studies much more than it is at present."
swissinfo, Thomas Stephens
Ants are social insects of the family Formicidae and belong, with wasps and bees, to the order Hymenoptera. Ants evolved from wasp-like ancestors in the mid-Cretaceous period 110-130 million years ago and diversified after the rise of flowering plants.
Today, more than 12,000 species are classified, ranging in size from 0.75-52mm.
Ants form colonies that range in size from a few tens of predatory individuals living in small natural cavities to highly organised colonies which may occupy large territories and consist of millions of individuals.
The bigger colonies are mostly sterile females forming castes of "workers", "soldiers", or other specialised groups. Ant colonies also have some fertile males called "drones" and one or more fertile females called "queens".
Ants go through four developmental stages: egg, larva, pupa, adult. If the egg is fertilised, the progeny will be female; if not, it will be male. The larva is largely immobile and is fed and cared for by workers.
The queens can live for up to 30 years, and workers live from one to three years. Males survive only a few weeks.