There has been a long-standing debate and discussion in learning contexts for what is the best way to form groups for optimal learning when there are different abilities in those groups.
The two classic strategies are one, put those of similar ability together so that everyone can operate at a similar level and hopefully benefit from more targeted learning. And two, put differing abilities together so that the peers can also benefit from each other and those with stronger ability can also pull along the weaker ones.
This applies to many scenarios, from sports training, to educational contexts, and even in business.
However different research has pointed to different things — for example in peer learning differences, if not too large seem to be beneficial. But if differences are too large, it becomes detrimental. So, to answer this question enter mathematicians from the University of Rochester.
They analysed this using mathematical principles which included multiple assumptions such as: multiple groups would be formed; the individuals involved would have different skill levels; an optimal teaching environment would be one in which a student is taught at a level that matches his or her skill level; and the optimal grouping system would maximise the collective benefit for all students.