Discussion about this post

User's avatar
Benjamin Phillabaum's avatar

I think I figured out your slope, but it's a bit hand-wavy

For large N and N=m: P(N, m -> m) ~ N!/N^N << 1

What this means is that we are essentially averaging T(N) assuming it is greater than O(N).

Next regime then is what happens when N >> m: P(N, m -> m) ~ 1 - (m)(m+1)/(2N) so 1/(1-P(N,m -> m)) = 2N/(m (m+1))

In this regime P(N, m -> m-i) ~ N^(m-i)/N^m so we would expect the m-> m-1 transition to dominate. It would then be sufficient to sum up the contribution to the expected value. Thus

T(N) ~ sum(2 N / (m (m+1)) with m from 1 to infinity)

The sum is telescopic so we get T(N) ~ 2 N

Expand full comment

No posts