You are given numbers $N$ and $K$. Consider the set $S = {1, 2, 3,\ldots , N}$. An ordered
tuple is a sequence of integers from this set. For example, $(2, 4, 1)$ is a tuple, and
it is different from $(1, 2, 4)$. You need to partition the integers ${1, 2, 3, . . . , N}$ into
ordered tuples such that each tuple has at most $K$ integers. That is, you need to
get a set of tuples, such that each element of $S$ is in exactly one tuple, and each
tuple has at most $K$ elements. Find the number of ways to do so.Note that elements inside a single tuple cannot be reordered. But tuples can be
reordered as a whole. For instance, if $N = 3$ i.e., $S = \{1, 2, 3\}$ — then $\{ (2, 3),(1) \}$ and $\{ (1),(2, 3) \}$ are considered the same partitions. But $\{ (3, 2),(1) \}$ is a different
partition.For example, if $N = 2$ and $K = 2$, there are exactly $3$ valid ways to partition $S$, as
given below:
$\{ (1),(2) \}$
$\{ (1, 2) \}$
$\{ (2, 1) \}$
Compute the number of ways to partition ${1, 2, 3,\ldots , N}$ into ordered tuples of size
at most $K$ for the following instances.$(a) N = 4,\, K = 3$
$(b) N = 5,\, K = 3$
$(c) N = 6,\, K = 3$
Answers are : $(a)\, 49 ,\, (b)\, 261,\, (c)\, 1531$
My Attempt:
I am bad at explaining but here we go.
What I attempted to do was partition $N$ into parts such that each is less than $K$.
I got $3$ such partitions for $N = 4$, $K = 3$ :
- $(2, 2)$
- $(1, 1, 2)$
- $(3, 1)$
Then there were $N!$ such ways to place the numbers into these partitions. This gives me the answer:
$$4! \cdot 3 = 72$$
However that logic seems to be wrong. Can anyone suggest a better path?
(source) [$Q4$ ZIO-$2018$ India$]$
This is the first question that I am asking on Math.SE. I am sorry if I am being too direct in asking the question.
Best Answer
Your main problem is the distinct tuples of the same size are not ordered. So the partition $\{(1,2),(3,4)\}$ is the same as the partition $\{(3,4),(1,2)\}$.
Your second problem is that you wrote down the partitions wrong. $1,1,1,2$ adds to $5$, not $4$, and you missed the trivial partition $1,1,1,1$. So the complete list:
Total : $49$