# Organizing tournaments without re-matches

Supppose you want to organize a tournament for $$n$$ players split into a number of groups $$g$$.

You also have a fixed number of players $$m$$ per group.

The competition is split into a number of rounds $$r$$.

The situation in which two players are in the same group more than once is called an error. (If players are in the same group say 3 times you have 2 errors).

The goal is to minimise the number of errors for given $$n$$, $$m$$ and $$r$$, or find the maximum $$r$$ for given $$n$$ and $$m$$ without errors.

I currently know that there are certain $$n$$ for which the number of errors is 0. But I could not find a formula for these $$n$$ at arbitrary size.

Is there a way to find a function for these numbers or do you know in which field this topic would belong?

I would also like to find an algorithm to minimize the number of cases or be able to estimate/calculate the minimal number of errors.