Skip to main content
trivial fix
Source Link
Brendan McKay
  • 37.7k
  • 3
  • 80
  • 147

There are $$ \frac{\prod_{i=0}^{k-1}(n-i)^2}{k} $$ possible directed cycles with $2k$ vertices. Each such cycle occurs with probability $n^{-2k}$, so the exact expectation of the number of cycles is $$ \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(n-i)^2}{kn^{2k}} = \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(1-i/n)^2}{k}. $$ As $n\to\infty$, that sum is asymptotic to the integral $$ \int_1^\infty \exp(-x^2/n)/x~dx = \left[ -\frac12 Ei(1,x^2/n) \right]_1^n = \frac12\log n + O(1), $$$$ \int_1^\infty \exp(-x^2/n)/x~dx = \left[ -\frac12 Ei(1,x^2/n) \right]_1^\infty = \frac12\log n + O(1), $$ where $Ei$ is the exponential integral function and I'm relying on Maple a bit.

There are $$ \frac{\prod_{i=0}^{k-1}(n-i)^2}{k} $$ possible directed cycles with $2k$ vertices. Each such cycle occurs with probability $n^{-2k}$, so the exact expectation of the number of cycles is $$ \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(n-i)^2}{kn^{2k}} = \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(1-i/n)^2}{k}. $$ As $n\to\infty$, that sum is asymptotic to the integral $$ \int_1^\infty \exp(-x^2/n)/x~dx = \left[ -\frac12 Ei(1,x^2/n) \right]_1^n = \frac12\log n + O(1), $$ where $Ei$ is the exponential integral function and I'm relying on Maple a bit.

There are $$ \frac{\prod_{i=0}^{k-1}(n-i)^2}{k} $$ possible directed cycles with $2k$ vertices. Each such cycle occurs with probability $n^{-2k}$, so the exact expectation of the number of cycles is $$ \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(n-i)^2}{kn^{2k}} = \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(1-i/n)^2}{k}. $$ As $n\to\infty$, that sum is asymptotic to the integral $$ \int_1^\infty \exp(-x^2/n)/x~dx = \left[ -\frac12 Ei(1,x^2/n) \right]_1^\infty = \frac12\log n + O(1), $$ where $Ei$ is the exponential integral function and I'm relying on Maple a bit.

Source Link
Brendan McKay
  • 37.7k
  • 3
  • 80
  • 147

There are $$ \frac{\prod_{i=0}^{k-1}(n-i)^2}{k} $$ possible directed cycles with $2k$ vertices. Each such cycle occurs with probability $n^{-2k}$, so the exact expectation of the number of cycles is $$ \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(n-i)^2}{kn^{2k}} = \sum_{k=1}^n \frac{\prod_{i=0}^{k-1}(1-i/n)^2}{k}. $$ As $n\to\infty$, that sum is asymptotic to the integral $$ \int_1^\infty \exp(-x^2/n)/x~dx = \left[ -\frac12 Ei(1,x^2/n) \right]_1^n = \frac12\log n + O(1), $$ where $Ei$ is the exponential integral function and I'm relying on Maple a bit.