Expected Number of Loops from Tying Rope Ends

Expectation · Medium · Free problem
You have $N$ ropes, each with two free ends, giving
N$ free ends total. At each step you pick two free ends uniformly at random and tie them together. This reduces the number of free ends by 2, so after $N$ steps every end is tied and the process stops. The result is some collection of closed loops. What is the expected number of loops formed? Express your answer as a closed-form sum and give its asymptotic behavior for large $N$.

Open the full interactive solver, hints, and worked solution →