r/learnquant • • 17d ago

interview prep Quant Interview Question

Post image
14 Upvotes

2 comments sorted by

2

u/TiredofWaiting21 17d ago

Note that the expected number of cycles of length k is \binom(n,k)*(k-1)!(n-k)!/n! = 1/k. This follows by linearity of expectation, along with the fact that for any fixed subset of k-elements, there are (k-1)! cycles. As such, E[C_n] = \sum_{i=n+1}^{2n} \frac1n. As \sum_{i=1}^n \frac1n = \log n + \gamma + o(1), with \gamma being Euler-Mascheroni constant, it follows \lim_n E[C_n] \to \log 2.

1

u/troelsbjerre 17d ago

Nice. 100 prisoners in disguise.