Number of combinations of $m$ ordered sets

72 Views Asked by At

Say we have $m$ ordered sets each of size $n$ with distinct elements. I want to find the number of ways I can form a merged set that maintains each individual set's relative ordering. This is similar to this post, but now generalized to $m$ sets and not just $2$.

My approach is as follows-

We have $mn$ slots in the merged set. We start by picking $n$ slots corresponding to the first set. Then pick $n$ more slots from the remaining $nm-n$ slots for the second set and carry on. The formula I obtain looks like this - $$ \binom{mn}{n} \times \binom{mn-n}{n} \times \binom{mn-2n}{n} \times \binom{mn-3n}{n} \times \dots \times \binom{mn-(m-2)n}{n} $$

This simplifies to $\frac{(mn)!}{(n!)^m}$.

Is this a right approach or am I doing something wrong?

Edit : Fixed typos as caught by @joriki

1

There are 1 best solutions below

0
On BEST ANSWER

You’re basically doing it right, but a) you omitted $\binom{mn-n}n$ and the parentheses in $(mn)!$ and b) you don’t need to take a detour through all these binomial coefficients, you can directly use the multinomial coefficient

$$ \binom{mn}{\underbrace{n,\ldots,n}_{m\text{ times}}}=\frac{(mn)!}{n!^m}\;. $$