-1

The answer I have seen is unclear, which is

$P_i$ = probability that $x$ is in $a = \frac{1}{n}$ cycle of length $i$

$n\sum_{i=1}^n \frac{1}{i}·P_i = $ expected number of cycles = $\sum_{i=1}^n \frac{1}{i}$

I have no idea about how to get the answer, could you give me a detailed solution? It would be very helpful for my final exam. Thanks!

Coconut
  • 21

1 Answers1

0

The answer may depend on the nature of randomness, i. e., on the way the graph is selected. If self-loop is allowed and the graph is selected uniformly among all such labeled digraphs on $n$ vertices, then this graph is equivalent to a random permutation. It is easy to prove that expected number of cycles in the random permutation of $n$ elements is corresponding harmonic number $H_n = \sum_{i = 1}^n \frac{1}{i}$.

If self-loop is not allowed and the graph is selected uniformly among all such labeled digraphs on $n$ vertices, then this graph is equivalent to a random derangement. The expected number of cycles of length $k$ in derangement of $n \ge 2$ elements is $$\frac{1}{k}\cdot \frac{1 / 0! - 1 / 1! + 1 / 2! + \cdots + (-1)^{n - k} / (n - k)!}{1 / 0! - 1 / 1! + 1 / 2! + \cdots + (-1)^n / n!} = \frac{1}{k}\cdot \frac{\sum_{i = 0}^{n - k}(-1)^i / i!}{\sum_{i = 0}^{n}(-1)^i / i!} = \frac{1}{k}\cdot \frac{!(n - k) / (n - k)!}{!n / n!},$$ where $!n$ is the number of derangements. So the expected number of cycles of all lengths is $$\sum_{k = 2}^n\frac{1}{k}\cdot \frac{!(n - k) / (n - k)!}{!n / n!} = \frac{n!}{!n} \cdot \sum_{k = 2}^n \frac{!(n - k)}{k \cdot (n - k)!}.$$

If the graph is uniformly selected among unlabeled digraphs, the problems becomes equivalent to computing expected number $k$ of summands in equation $n = a_1 + a_2 + \dots + a_k$, where $1 \le a_1 \le a_2 \le \ldots \le a_k$, when such equation is selected uniformly among all such possible equations. This problem is not so easy to get a closed formula, however both number of such representations of $n$ and the total number of summands in all representations can be computed using dynamic programming. (If self-loop is not allowed, then $a_1 \ge 2$.)

If the graph is selected non-uniformly, then we need to consider a certain probability distribution, which is not given.

Smylic
  • 8,098