Number of ways to make n groups of size m each out of nm consecutive natural numbers so that the numbers contained in each group are in AP.

255 Views Asked by At

If we know the answer for first nm natural numbers, we can shift zero and know the answer for any consecutive nm natural numbers.

If the number is small, we can calculate by hand by considering all possible values of common differences and APs, is there a more general and more systematic approach than this?

ex. nm=12, n=3,m=4. ans - 4

EDIT : I am looking for a closed formula or an efficient way to calculate the answer by hand. One thing I observed is number of groups of common difference d must be multiples of d to fill the space, unless the space is filled by another ap.

My attempt : n=4,m=5 (notice m>n, so an ap of smallest common diff cannot fill space between two terms in a group with largest commom diff) aXb means a groups of common diff= b

cases/permutations (since 3X3, 2X2 1X1 etc move as one block, otherwise no way to fill space)

4X4/ 1

3X3,1X1/ 2

4X2/ 1

2X2,2X1/ 3

4X1/ 1

but, Grouping natural numbers into arithmetic progression says it's not 8 but 10.

1

There are 1 best solutions below

2
On

Consider all the divisors $d$ of the number $m$ in question. Then you can form a single partition of the numbers $1 ... m$ into $m/d$ groups of size $d$ such that each is an AP. You simply take all the numbers of the form $k$ $mod(d)$, which have common difference $d$, and form a group out of them. You do this for each $k = 0 ... d-1$