An 1-meter rope is marked by two points chosen uniformly and independently on the span of the rope. Given that the two points lie on the same half of the rope, what is the expected distance between them?
For example, we choose two points at 0.1 and 0.2 (both <0.5), then the distance is counted as 0.1. If we choose 0.1 and 0.7 (one < 0.5, the other > 0.5), we disregard the result. If we choose 0.8 and 0.8 (both > 0.5), the the distance is 0.