Probability in Permutation A permutation of $1,2,3,\ldots,n$ is chosen at random. Then the probability that the numbers $1$ and $2$ appear as neighbours equals ______?
Options are
A) $\dfrac 1 n$
B) $\dfrac 2 n$
C) $\dfrac{1}{n-1}$
D) $\dfrac{1}{n-2}$
 A: Suppose $a_{i} = 1$, so $a_{i-1} = 2$ or $a_{i+1} = 2$.
If $1 \le i \le n$ , then number of valid positions $2(n-1)(n-2)!$, so the answer is :
$$\frac{2(n-1)(n-2)!}{n!}$$, answer B
A: Remove two numbers from the set. You have $n-2$ left. There are $(n-2)!$ ways to allocate them. For each such allocation there are two ways to order the removed numbers. Last thing, you have $n-1$ ways of putting these two together. Hence:
$$
\frac{2 (n-1)(n-2)!}{n!} = \frac{2}{n}
$$
A: Let $E$ stand for the event that $|\pi(1)-\pi(2)|=1$, i.e. $1$ and $2$ end up as neighbours.
Let $R$ stand for the event that $\pi(1)\in\{1,n\}$, i.e. only one spot for a neighbor.
Then:
$$P(E)=P(E\mid R)P(R)+P(E\mid R^c)P(R^c)=\frac1{n-1}\frac2{n}+\frac2{n-1}\frac{n-2}{n}=\frac2{n}$$

edit (alternative, inspired by the neat outcome $\frac2{n}$):
Think of a round table with $n+1$ spots. Place the numbers $0,1,\dots,n$ randomly. Starting at (and also disregarding) the place where $0$ is seated you will yield a random permutation of $1,2,\dots,n$ by going clockwise from there. The place where $1$ is seated is flanked by $2$ spots and there are $n$ candidates for these spots. So the probability that $2$ is seated on one of these spots is $\frac2{n}$.
