Expected value = sum of all possible values each multiplied by the probality of its occurence.
In any directed graph , possible length of cycle will be = $1$ , $2$ , $3$ , $4$ .... $(N - 1)$ , $N$
Because maximum length cycle may have N nodes , and length will be N.
Now expected value = $1$ * probality(cycle_length = $1$) + $2$ * probality(cycle_length =$2$) + .... + $N$ * probality(cycle_length = $N$ )
Now probality of cycle length = $1$ will be $\frac{1}{N}$ , because
($1->1 , 2->2 , 3->3 ..... N->N$) (self loop total $N$ values out of which $(1->1)$ count )
Now probality of cycle length = $2$ will also be $\frac{1}{N}$
Because , total posiible cycle will be = $N * (N-1)$ ( First node may have $N$ choices , and second may have $N - 1$ choices )
Number of favourable cases will be = $1 * (N-1)$ ( one place is fixed for $1$ and second may have $N - 1$ ) choices
probability of cycle length = 2 = $\frac{1*(N-1)}{N*(N-1)}$
Similalry for L length cycle = $\frac{(N-1)*(N-2) *....* (N-L+1)}{N*(N-1)*(N-2) *....* (N-L+1)} = \frac{1}{N}$
Means for any length cycle probality will be $\frac{1}{N}$.
Now expected value = $1 * \frac{1}{N} + 2 * \frac{1}{N} + 3 * \frac{1}{N} ..... (N-1)* \frac{1}{N}$ + N * \frac{1}{N}$
= $\frac{1}{N} ( 1 + 2 + 3 + 4 + 5 .... (N-1) + N ) $
= $\frac{N+1}{2}$
Option 4 is the correct answer.