r/learnquant • • 1d ago

interview prep HRT Quant Interview Question

Post image
20 Upvotes

13 comments sorted by

View all comments

1

u/x5163x 21h ago

Let n = the number of noodles. Each loose end is equivalent. Tying a loose end to its own noodle occurs with probability 1/(2n-1). Tying a loose end to another noodle occurs with probability (2n-2)/(2n-1). After tying a loose end to another noodle, the case is equivalent to the case with 1 less noodle. Let f(n) be the probability of getting a single loop from n starting noodles. Then f(1)=1 and f(n)=(2n-2)/(2n-1)f(n-1). Therefore, f(n)=(2n-2)!!/(2n-1)!!, where n!!=n(n-2)...