Living in a social group requires mental effort.
Mountain gorillas that live in oversized groups may have to limit the number of strong social relationships they form, new research suggests.
Scientists have identified up to seven types of relationship between the animals - ranging from close mother-offspring ties to "weak" associations
Usually mountain gorillas live in groups of between 12 and 20, and the study found the richest range of relationships in groups of this size.
When the groups were smaller or larger - sometimes up to 65 gorillas - there was less diversity of social relationships.
Dr Robin Morrison, of the Fossey Fund and the University of Exeter's Centre for Research in Animal Behaviour, said: "It is often assumed that animals living in larger groups will have more diverse and complex social lives.
"However, our study suggests that social diversity is lower in very large groups where gorillas must maintain a larger number of relationships - with most relationships falling into the weakest category.
"Strong social relationships still exist in the big groups, but they seem to make up a smaller proportion of the total relationships.
"We cannot say for certain why this is, but it may be that gorillas only have enough time and mental energy to maintain a certain number of relationships at a given strength.
"So they keep their key relationships and simply maintain weak ties with all the other gorillas in the group."
Dr Morrison added: "Living in a social group requires mental effort.
"Indeed, one of the big ideas in social evolution is that humans developed large brains and language to deal with social complexity."
Researchers used 12 years of data on 13 gorilla groups monitored by the Fossey Fund in Volcanoes National Park, Rwanda.
Mountain gorilla numbers in the park have risen in recent years, which may explain why unusually large groups have formed.
The animals live in stable social groups, moving and feeding together in the day and nesting together at night.
The study used data on how much time individuals spent close together to measure social relationships.
Dr Morrison said: "In many primates, social interaction can be measured by how much time individuals spend grooming each other.
"However, gorillas spend less time grooming than most other primates.
"Instead, a lot of gorilla society is about who individuals choose to sit next to, and who they move away from."
Researchers found that the diversity of social relationships experienced by individual gorillas varied by age and sex.
Both males and females experience a diverse range of relationships as youngsters, but as they grow older this changes.
While females maintain a relatively consistent diversity of relationships through adolescence and adulthood, this declines rapidly in males as they enter adolescence, reaching the lowest levels at around 14, when they are still several years from sexual maturity.
This is also the period when males are most likely to decide whether to leave the group they were born into - so they may be socially distancing themselves in the lead up to this departure.
Roughly half choose to remain, and if they do they then gradually build up a diverse set of relationships through adulthood as they take on key social roles protecting the group and fathering and caring for offspring.
The research findings could be useful for gorilla conservation, including efforts to limit the spread of disease.
Dr Tara Stoinski, president and chief executive of the Dian Fossey Gorilla Fund and one of the study co-authors, said: "By better understanding these social relationships, we can better understand how diseases would spread through these social groups.
"This is really important right now for mountain gorillas because disease is one of the major threats to their conservation.
"They catch many of the same diseases as humans, including Ebola, and it's extremely likely they would also catch Covid-19 if they were exposed to it."
The study is published in the journal Proceedings of the Royal Society B.
Nina Massey is the PA science correspondent.