Number the points on the string from 1 to . Let's say the distance from the left end of the string to point i is .
Define three by matrices L, M, and R as follows:
... the length of the left end of the string if points i and j are chosen
... the length of the middle segment
... the length of the right end of the string
Given a value , compute
if or or , 0 otherwise.
Then, assuming all pairs of points (i,j) are equally likely to be chosen, the probability of occurrence of is .