Complex sentence: The Barbary macaque is gregarious, forming mixed groups of several females and males; the troop of 10 to 100 individuals is matriarchal, with its hierarchy determined by lineage to the lead female.
Split into simpler sentences: The Barbary macaque is gregarious, forming mixed groups of several females and males. A troop consists of 10 to 100 individuals is matriarchal, with its hierarchy determined by lineage to the lead female.