If a 1 meter rope is cut at two uniformly randomly chosen points, what is the average length of the smallest piece?

If a $1$ meter rope is cut at two uniformly randomly chosen points (to give three pieces), what is the average length of the smallest piece?

I got this question as a mathematical puzzle from a friend. It looks similar to MathOverflow question If you break a stick at two points chosen uniformly, the probability the three resulting sticks form a triangle is 1/4.

However, in this case, I have to find the expected length of the smallest segment. The two points where the rope is cut are selected uniformly at random.

I tried simulating it and I got an average value of $0.1114$. I suspect the answer is $1/9$ but I don't have any rigorous math to back it up.

How do I solve this problem?


Solution 1:

My approach is maybe more naive than the others posted.

Break the unit interval at $x$ and $y$ where $x < y$. Our lengths are then $x$, $y - x$, and $1 - y$. It's not hard to show that they all have probability $1/3$ of being the shortest. In any case, our joint PDF is given by $f(x,y) = 6$ (since $x$ and $y$ remain uniform random variables on $1/6$th of the square $[0,1] \times [0,1]$). Each triangle in the diagram below corresponds to the domain of the PDF for one of the three cases.

Each triangle corresponds to which length is shortest

I'll take care of the case when $x$ is shortest, that is, $x \leq y - x$ and $x \leq 1 - y$. This is the leftmost triangle. Since we're assuming $x$ is least, we are looking for $$E[x] = \int_0^{1/3} \int_{2x}^{1 - x} 6x \;dy \;dx = 1/9$$

The cases when $y - x$ and $1 - y$ are shortest are similar.

Solution 2:

Update: The current version of this answer is more intuitive (IMHO) than the previous one. See also this similar answer to a similar question.

The generalization of this problem to $n$ pieces is discussed extensively in David and Nagaraja's Order Statistics (pp. 133-135, and p. 153).

If $X_1, X_2, \ldots, X_{n-1}$ denote the positions on the rope where the cuts are made, let $V_i = X_i - X_{i-1}$, where $X_0 = 0$ and $X_n = 1$. So the $V_i$'s are the lengths of the pieces of rope.

The key idea is that the probability that any particular $k$ of the $V_i$'s simultaneously have lengths longer than $c_1, c_2, \ldots, c_k$, respectively (where $\sum_{i=1}^k c_i \leq 1$), is $$(1-c_1-c_2-\ldots-c_k)^{n-1}.$$ This is proved formally in David and Nagaraja's Order Statistics, p. 135. Intuitively, the idea is that in order to have pieces of size at least $c_1, c_2, \ldots, c_k$, all $n-1$ of the cuts have to occur in intervals of the rope of total length $1 - c_1 - c_2 - \ldots - c_k$. For example, $P(V_1 > c_1)$ is the probability that all $n-1$ cuts occur in the interval $(c_1, 1]$, which, since the cuts are randomly distributed in $[0,1]$, is $(1-c_1)^{n-1}$.

If $V_{(1)}$ denotes the shortest piece of rope, then for $x \leq \frac{1}{n}$, (following Raskolnikov's comment) $$P(V_{(1)} > x) = P(V_1 > x, V_2 > x, \ldots, V_n > x) = (1 - nx)^{n-1}.$$

Therefore, $$E[V_{(1)}] = \int_0^{\infty} P(V_{(1)} > x) dx = \int_0^{1/n} (1-nx)^{n-1} dx = \frac{1}{n^2}.$$

David and Nagaraja also give the formula Yuval Filmus mentions (as Problem 6.4.2):

$$E[V_{(r)}] = \frac{1}{n} \sum_{j=1}^r \frac{1}{n-j+1}.$$

Solution 3:

If we divide the rope into $n$ segments then the $k$th largest segment will have expected length $$\frac{1}{n} \left( \frac{1}{n} + \cdots + \frac{1}{k} \right),$$ but I don't remember why. In particular, the smallest segment has expected length $1/n^2$.

Note that equivalently we could throw $n$ random points on a circle of unit circumference and consider lengths of segments on the circle.

Derivation of the general formula from the formula for the smallest segment

Len $n$ points be thrown uniformly on the circle. Suppose the smallest segment has length $x$. We can remove an initial prefix of length $x$ from each segment to get a uniformly generated ensemble of $n-1$ segments on a circle of length $1-nx$. In this new arrangement, the smallest segment has expected size $(1-nx)/(n-1)^2$. Therefore the expected size of the second smallest segment is $$Ex + \frac{1-nEx}{(n-1)^2} = \frac{1}{n^2} + \frac{1-1/n}{(n-1)^2} = \frac{1}{n^2} + \frac{1}{n(n-1)}.$$ We can get the general formula in the same way.

Derivation of the formula for the smallest segment

Use the same method and come up with one more equation that will enable you to find this unknown.

Solution 4:

Here you have two independent random variables $X,Y$, both uniform on $[0,1]$. Let $A=\min (X,Y), B=\max (X,Y)$ and $C=\min (A, 1-B, B-A)$. First you want to find the probability density function $f_C(a)$ of $C$. Let $F_C(a)$ be the cumulative distribution function. Then $$ 1- F_C(a) = P(C\ge a)=P(A\ge a, 1-B\ge a, B-A\ge a)$$ $$=P(a\le X\le 1-a, a\le Y\le 1-a, |X-Y|\ge a)$$ This is equal to the total area of the two sets $$\lbrace (x,y): 0\le x,y\le 1, y\le x-a, x\le 1-a, y\ge a\rbrace$$ and

$$\lbrace (x,y): 0\le x,y\le 1, y\ge x+a, x\ge a, y\le 1-a\rbrace$$ which is $(1-3a)^2$. Note that for these sets to be nonempty, one must have $0\le a\le 1/3$.

Hence $F_C(a)=1-(1-3a)^2$, from which it follows $f_C(a)=F_C'(a)=6(1-3a)$. Therefore the expected value of $C$ is $$\int_0^{1/3} 6a(1-3a) da= \frac{1}{9}.$$