Start with 100 separate noodles, each with 2 loose ends. Repeatedly pick two free ends uniformly at random and tie them together until no free ends remain. What is the expected number of closed loops formed?
Suppose at some stage there are k open chains remaining. Then there are exactly 2k free ends.
Pick one free end. Among the remaining 2k - 1 possible ends you could tie it to, exactly one is the other end of the same chain, which closes a loop.
So at stage k, the probability that the next tie creates a new loop is:
Each tie reduces the number of open chains by exactly 1.
Let L be the total number of loops formed.
At each stage with k open chains, we get a new loop with probability
1 / (2k - 1).
By linearity of expectation:
Click the button to simulate random pairings of all 200 ends and estimate the average number of loops.