I'm not even sure this is the right forum for it, but I'm hoping to get some help. Thank you very much in advance.

I'm trying to find an equation (maybe that's not even what I need, I'm not sure) that describes how larger numbers (e.g. a population) take from smaller numbers that they interact with until only one large number remains (some sort of decay or growth equation, maybe?).

An example to illustrate what I mean:

Group A has 10 X, group B has 7 X, and group C has 2 X. The groups now start interacting but only interacts with Xs from the two other groups. One group may interact with one other group at a time or with two. This interaction causes one group to lose one X and another group to gain it. When one is lost in a smaller group, one is added to a larger, until only one group remains. It is only the fact that one group was larger to begin with that makes it 'win' in the end.

What can mathematically be used to describe these relationships between the numbers/groups?