Imagine you have N pieces of rope in a bucket. You reach in and grab one end-piece, then reach in and grab another end-piece, and tie those two together. What is the expected value of the number of loops in the bucket?
Imagine you have N pieces of rope in a bucket. You reach in and grab one end-piece, then reach in and grab another end-piece, and tie those two together. What is the expected value of the number of loops in the bucket?
-There are nn entirely unattached pieces of rope in a bucket
-A loop: any number of rope attached in a closed chain
-Suppose the expected number of loops for n−1n−1 pieces of rope is denoted Ln−1Ln−1
-Consider the bucket of nn pieces of rope; there are 2n2n rope ends
Pick an end of rope. Of the remaining 2n−12n−1 ends of rope, only one end creates a loop (the other end of the same piece of rope). There are then n−1n−1 untied pieces of rope. The rest of the time, two separates pieces of rope are tied together and there are effectively n−1n−1 untied pieces of rope. The recurrence is therefore:
-Ln=12n−1+Ln−1Ln=12n−1+Ln−1
Clearly, L1=1L1=1 so:
-Ln=∑nk=112k−1=H2n−Hn2Ln=∑k=1n12k−1=H2n−Hn2
-Where HkHk is the kthkth harmonic number
Since Hk≐γ+lnkHk≐γ+lnk for large-ish k, where gamma=0.57722. is the Euler-Mascheroni constant, we have:
-Ln≐ln(2n)−ln(n)2=ln2n−−√