Partition set N into roughly-equal groups of size approximately k. How can I determine the "range" within which k can vary?

139 Views Asked by At

I'm a long way from uni, so please forgive me if I'm not presenting this question as clearly or concisely as I could. I've searched for similar questions, but they seemed to focus on "how many ways can I partition a set", which isn't what I'm looking for.

Imagine we have a finite number of sets, $S_{i}$, which each contain $N_{i}$ items (can be considered identical for our purposes). Each set needs to be divided into a number of groups. Ideally, each group would have $k$ elements in it; but it is not necessarily the case that $k|N_{i}$ for any given $S_{i}$. So my goal is to be able to divide any $S_{i}$ into a number of groups which will each contain between $m$ and $r$ items, where $m < k < r$.

If the "wrong" numbers are chosen for $m$, $k$, and $r$, then we could get a situation where we can't achieve our goal. For example, if $N_{1} = 18$, and $k = 12$ (our ideal group size is 12), and $m = 10$ and $r = 14$ (we're OK with groups having between 10 and 14 members), then we can't achieve our goals, because the "closest" we can come is either two groups of 9 (so we would need $m$ to be 9 instead of 10) or one group of 18 (we would need $r$ to be 18 instead of 14).

Is there a general way in which I could look at a range of possible values for $N_{i}$ (e.g. all integers from 10 to 150), choose a value for $k$ (e.g. 12), and then see/calculate what $m$ and $r$ would have to be to allow me to achieve my goal for that choice for that $k$ and all possible $N_{i}$?