1

We start with $k$ balls, labelled $1, 2, \dots, k$ sorted in ascending order, let us call this a chain with length $k$. Now, we place $s \in \mathbb{N}$, $s < k$, bars between them "at random", i.e. for each of those $k-1$ gaps the probability of placing a bar should be the same ($p = (k-1)/s$), and we can only place at most one bar in each gap. After placing all bars, the initial chain has been split into $s+1$ sub-chains, and we may study the lengths of the resulting sub-chains, i.e. the number of balls between two consecutive bars - or the number of balls before the first bar and the number of balls after the last bar.

I am interested in the distribution of those lengths.

E.g. let us consider $k = 11$ balls and $s = 4$ bars. Then a possible outcome is $1.2|3.4|5|6.7.8|9.10.11$, which corresponds to $1$ chain with length $1$, $2$ chains with length $2$, also $2$ chains with length $3$ and $0$ chains with all other lengths.

I realize that placing the $s$ bars can be done in $\binom{k-1}{s}$ different ways. I have naively tried to model the probability that a single chain has length $\ell$ using a geometric distribution (the "first success" determines the length of the chain), but this does not work, as it sometimes yields chains larger than $k$, and it does not guarantee that the initial chain is split into exactly $s+1$ sub-chains. I have found this thread: What is the distribution of gaps? but the mentioned formula has a flaw in my eyes: At one time $M_i$ is computed by using a $\min(n,\lfloor \frac{m-n}{i-1} \rfloor)$. But, for a length $i=1$ this fraction is not well-defined, the denominator is equal to $0$.

I have the feeling that this should be a problem that was already solved. I am happy for a hint into the right direction, a hint to where I can find a solution, or of course a solution.

NG98
  • 25
  • Let me see if I got this right: we iterate trough all the $\binom{k-1}{s}$ placings and collect each time the $s+1$ chain lengths? For $k=11, s=4$ is the correct distribution 1: 2/5, 2: 4/15, 3: 1/6, 4: 2/21, 5: 1/21, 6: 2/105, 7: 1/210 ? It seems it is given by $j \mapsto \frac{\binom{k-j}{s} - \binom{k-j-1}{s}}{\binom{k-1}{s}}$. If this is correct, I'll try to make an answer. – ploosu2 Apr 21 '25 at 18:54
  • @ploosu2 I think what you suggest may be a good idea, if I understand you correctly: Checking all the cases (of separator placing) and counting the resulting chain lengths for small number of balls and bars. From this maybe a general formula can be found. I will check the formula you suggest later, just to be clear, you say $$P(X=j) = \frac{\binom{k-j}{s}-\binom{k-j-1}{s}}{\binom{k-1}{s}}$$ ? – NG98 Apr 23 '25 at 07:20
  • Yes, $X$ being the random variable "length of a chain" when the chain is chosen uniformly at random among the $(s+1) \binom{k-1}{s}$ ones. – ploosu2 Apr 23 '25 at 08:12
  • Your formula perfectly matches my data. Thank you! The denominator is explained by all possible choices of the bars. I assume that the numerator comes from the sums of chains with length at most j and we subtract the sum of the chains with length at most j-1 (which results in the sum of chains with length exactly j. Am I correct? – NG98 Apr 23 '25 at 10:04

1 Answers1

1

Let $j$ be an integer between $1$ and $k-s$.

Let $G(z, u, v)$ be the generating function of all "chain configurations", where the power of

  • $z$ records the number of balls
  • $u$ records the number of chains
  • $v$ records the number of chains of length $j$.

Since a configuration is either empty or a chain followed by another configuration, we have the equation

$$ G = 1 + \left( \color{brown}{ z^juv} + \color{blue}{\frac{zu}{1-z} - z^ju} \right) G. $$

Note: we have taken the cases of the first chain having length $j$ (weighting these by $v$) and not having length $j$ separately.

In order to count the number of appearances of chain of length $j$, we derive $G$ w.r.t $v$ and set $v=1$.

We get

$$ \frac{d}{dv} \vert _{v=1} G = \frac{uz^j}{\left( 1 - \frac{uz}{1-z} \right)^2}. $$

Extracting the coefficient $[z^k u^{s+1}]$ we get the result

$$ (s+1)\left(\binom{k-j}{s} - \binom{k-j-1}{s}\right). $$

To get the probability, divide this by the total number $(s+1)\binom{k-1}{s}$. So the probability is

$$ \mathbb P (\text{chain has length } j) = \frac{\binom{k-j}{s} - \binom{k-j-1}{s}}{\binom{k-1}{s}}. $$

ploosu2
  • 12,367