In

the original Crossing Strings problem, the attachment points for both of the strings and both of the posts were randomly chosen, and the resulting probability of crossing was ½. In a

modified version of the problem, with the attachment points for one string biased in a certain way, the probability of crossing was

^{35}/

_{72}.

In this post, I'll state a more general version of the problem and then provide an expression one can use to calculate the probability of a crossing when these more general conditions obtain. (Because, you know, you might need this someday.) We'll also consider an interesting special case. And if you stick with me to the end, there's a funny story about a mathematician.

Here's the more general version of the problem.

- Two posts are divided into
*N* equal-length sections. The sections of the left post are labeled D_{1}, …, D_{N}. The sections of the right post are labeled E_{1}, …, E_{N}.
- On the left post, a green string has probability γ
^{L}_{i} of attaching to a point in section D_{i} (and all attachment points in section D_{i} are equally likely).
- On the left post, a red string has probability ρ
^{L}_{j} of attaching to a point in section D_{j} (and all attachment points in section D_{j} are equally likely).
- On the right post, a green string has probability γ
^{R}_{k} of attaching to a point in section E_{k} (and all attachment points in section E_{k} are equally likely).
- On the right post, a red string has probability ρ
^{R}_{ℓ} of attaching to a point in section E_{ℓ} (and all attachment points in section E_{ℓ} are equally likely).

What is the probability that the strings cross?

Here is a diagram showing all the symbols for the case

*N* = 4.

In the diagram, the green string attaches to the left post at a point in section D

_{4}; the probability of this is γ

^{L}_{4}. Note that γ

^{L}_{1} + γ

^{L}_{2} + γ

^{L}_{3} + γ

^{L}_{4} = 1, and similarly for the γ

^{R} quantities and the ρ

^{L,R} quantities. (These are probability distributions.)

The calculation I gave

here can be straightforwardly generalized to produce the crossing probability in the general problem as follows:
Probability of crossing =

\[ 2\left( \frac{1}{2}\sum_{n=1}^N{\gamma^{\rm L}_{n}\rho^{\rm L}_{n}} + \sum_{i < j}{\gamma^{\rm L}_{i}\rho^{\rm L}_{j}}\right)\left( \frac{1}{2}\sum_{m=1}^N{\gamma^{\rm R}_{m}\rho^{\rm R}_{m}} + \sum_{k>\ell}{\gamma^{\rm R}_{k}\rho^{\rm R}_{\ell}}\right)\,.\]
I think this general expression is right…certainly it gives the correct results for the previous two versions of the problem. The problem in the original post corresponds to

*N* = 1, γ

^{L}_{1} = 1, ρ

^{L}_{1} = 1, γ

^{R}_{1} = 1, ρ

^{R}_{1} = 1. Then the general expression becomes
\[2\left(\frac{1}{2}\cdot 1\cdot 1 + 0\right)\left(\frac{1}{2}\cdot 1\cdot 1 + 0\right) = \frac{1}{2}\]
as expected.
The modified problem from the

previous post corresponds to

*N* = 2, γ

^{L}_{1} = ⅓, γ

^{L}_{2} = ⅔, γ

^{R}_{1} = ⅓, γ

^{R}_{2} = ⅔, ρ

^{L}_{1} = ρ

^{L}_{2} = ρ

^{R}_{1} = ρ

^{R}_{2} = ½. Then the general expression becomes

\[2\left(\frac{1}{2}\left(\frac{1}{3}\cdot\frac{1}{2}+\frac{2}{3}\cdot\frac{1}{2}\right) + \frac{1}{3}\cdot\frac{1}{2}\right)\left(\frac{1}{2}\left(\frac{1}{3}\cdot\frac{1}{2}+\frac{2}{3}\cdot\frac{1}{2}\right) + \frac{2}{3}\cdot\frac{1}{2}\right) = \frac{35}{72}\]

as expected.

A special case is interesting. If the colors are treated the same way on each post (meaning that γ

^{L}_{m} = ρ

^{L}_{m} ≡ π

^{L}_{m} and γ

^{R}_{m} = ρ

^{R}_{m} ≡ π

^{R}_{m}), then the probability of a crossing is ½ regardless of the probability distributions {π

^{L}_{m}, π

^{R}_{m}}. To see how this follows from the general expression, note that under the stated assumptions, the general expression becomes

\[ 2\left( \frac{1}{2}\sum_{n=1}^N{{\left[\pi^{\rm L}_{n}\right]}^2} + \sum_{i < j}{\pi^{\rm L}_{i}\pi^{\rm L}_{j}}\right)\left( \frac{1}{2}\sum_{m=1}^N{{\left[\pi^{\rm R}_{m}\right]}^2} + \sum_{k>\ell}{\pi^{\rm R}_{k}\pi^{\rm R}_{\ell}}\right)\]

\[ = 2\left(\frac{1}{2}\left(\sum_{n=1}^N{\pi^{\rm L}_{n}}\right)^{\!\!2}\,\right)\left( \frac{1}{2}\left(\sum_{m=1}^N{\pi^{\rm R}_{m}}\right)^{\!\!2}\,\right)\]

\[ = 2\left(\frac{1}{2}\cdot 1^2\right)\left( \frac{1}{2}\cdot 1^2\right)\]

\[ = \frac{1}{2}\,.\]
It wasn't obvious to me

*a priori* that the probability of a crossing is ½ when colors are treated the same way (even when the posts are not treated the same way, and even when the probability distribution along a given post is non-uniform). Is it obvious in retrospect?*

I'm not sure "obvious" is the word I'd use, but I do believe it's possible to appreciate, without any algebra, why the answer to the color-symmetric problem has to be ½. Here's one way to explain it—you may have a better way.

To begin with, I think a natural way to imagine building a random configuration would be as follows:

- Draw a
**green **line from a randomly chosen left-hand point to a randomly chosen right-hand point, choosing the left-hand point according to the probability distribution for the left post and choosing the right-hand point according to the probability distribution for the right post.
- Draw a
**red** line from a randomly chosen left-hand point to a randomly chosen right-hand point, choosing the left-hand point according to the probability distribution for the left post and choosing the right-hand point according to the probability distribution for the right post.

But we don't have to do things in this order. We could instead do things like so:

- Mark a
**green** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**red** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**green** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Mark a
**red** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Draw segments connecting endpoints of the same color.

Nothing says green has to come before red. So another alternative would be:

- Mark a
**red** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**green** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**red** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Mark a
**green** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Draw segments connecting endpoints of the same color.

Yet another approach:

- Mark a
**red** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**green** endpoint on the left post, choosing randomly according to the probability distribution for the left post.
- Mark a
**green** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Mark a
**red** endpoint on the right post, choosing randomly according to the probability distribution for the right post.
- Draw segments connecting endpoints of the same color.

Given the identical probabilities for green and red on either post, we could even do things this way (here is the version to pay attention to):

- Mark an endpoint on the left post, choosing randomly according to the probability distribution for the left post. Label this endpoint A.
- Mark another endpoint on the left post, choosing randomly according to the probability distribution for the left post. Label this endpoint B.
- Toss a fair coin to decide which endpoint is
**red** and which is **green**. This is a valid approach because on the left post, red and green endpoints are drawn from the same distribution.
- Mark an endpoint on the right post, choosing randomly according to the probability distribution for the right post. Label this endpoint X.
- Mark another endpoint on the right post, choosing randomly according to the probability distribution for the right post. Label this endpoint Y.
- Toss a fair coin to decide which endpoint is
**red** and which is **green**. This is a valid approach because on the right post, red and green endpoints are drawn from the same distribution.
- Draw segments connecting endpoints of the same color.

Using this last method, I think it is apparent that following four configurations are equally likely:

- A green segment AX and a red segment BY
- A red segment AX and a green segment BY
- A green segment AY and a red segment BX
- A red segment AY and a green segment BX

Two of these configurations have a crossing, while two do not. So the probability of a crossing is 2 ÷ 4 or ½.

-----------------

*At Harvard they used to tell a story about Serge Lang, the mathematician (probably the identical story has been told in lots of places about lots of people). During a lecture, Lang was writing on the board. When making a transition from one equation to the next, Lang said, "… and so, it's obvious that …" whereupon he wrote the next equation. A student's hand went up. "Professor Lang, is that really obvious?" Lang paused and stared at his equation. He kept staring. After staring for some time, he placed his chalk in the tray and walked out of the lecture room. Some minutes later, Lang returned. "Yes," he said, "it's very obvious."