Probability of consecutive items being divided into the same bucket Suppose we have $mn$ items which are numbered $1,2,\ldots,mn$ and we want to equally divide these items into $n$ buckets. What is the probability that two consecutive numbers will be placed in the same bucket? How does the probability change for $3$ consecutive numbers?
I know that the number of ways to divide $mn$ items into $n$ equal buckets is $$\frac{(mn)!}{(m!)^nn!}$$ but I am not sure how to account for the ordering of items. I suspect there must be analogy between this question and the probability of hashing collisions though.
 A: This answer proves that for any $1 \leqslant k \leqslant m$, the probability that $k$ designated items are in the same bucket is $\dfrac{nC(m, k)}{C(mn, k)}$, where $C(a, b) = \dbinom{a}{b} = \dfrac{a!}{b!\,(a - b)!}$.
First, to clarify the process of filling buckets with items, label all buckets with $1, \cdots, n$ before filling and assume that buckets are filled one by one. Thus the number of placements such that each bucket has $m$ items is $\dfrac{(mn)!}{(m!)^n}$ (Note that buckets are labeled).
Now in order to calculate the number of placements such that each bucket has $m$ items and one bucket has the designated $k$ items, note that there are $C(n, 1)$ ways to choose a bucket to place these $k$ items, $C(mn - k, m - k)$ ways to choose $m - k$ items from the rest of the items to fill up this bucket, and $\dfrac{(m(n - 1))!}{(m!)^{n - 1}}$ ways to fill all other buckets. Hence there are$$
C(n, 1) · C(mn - k, m - k) · \frac{(m(n - 1))!}{(m!)^{n - 1}} = \frac{n(mn - k)!}{(m - k)!\, (m!)^{n - 1}}
$$
such placements, and the probability is$$
\frac{\dfrac{n(mn - k)!}{(m - k)!\, (m!)^{n - 1}}}{\dfrac{(mn)!}{(m!)^n}} = \frac{n · m!\, (mn - k)!}{(mn)!\, (m - k)!} = \frac{nC(m, k)}{C(mn, k)}.
$$
