Friends in a queue We have a queue of N humans. At this queue there are two friends. What is the probability that between friends will be M humans. (M + 2 < N)
So, what we got:


*

*total number of combinations  = N!;


Lets take some example:
N=10, M=3. For that case, between friends can be 3 humans, any humans, so its not just 3!, its something like (10-2)! but grouped by 3... and in that place I stuck.
Can someone help with direction to solving?
 A: Say our two friends are $a$ and $b$. Then we can line the remaining people up in $(N-2)!$ ways. Then we can squeeze our two friends in such that there are $M$ people between them in $N-1-M$ ways, but we also have to choose which friend is first in line, so we get that there are a total of $2\cdot(N-2)!\cdot(N-1-M)$ arrangements such that $a$ and $b$ have $M$ people between them. I am assuming with this you can find the probability.
A: It is maybe a little simpler to use a sample space different from yours. There are $\binom{N}{2}$ equally likely ways to choose an unordered pair of two locations to be occupied by the two friends.
Now we count the favourables, the number if ways to choose an unordered pair of locations that are separated by $M$. Altogether, these $2$ locations  plus the block of $M$ take up $M+2$ spaces, leaving $N-M-2$. Thus we can have any of $0$ to $N-M-2$ people in front of the leftmost friend, a total  of $N-M-1$ choices.
The required probability is therefore $\frac{N-M-1}{\binom{N}{2}}$.
A: Since only probability is asked for, we can just focus on ways of placing the "special" people ($A$ and $B$, say, with $m$ others in between)
For favorable placements, the $1st$ of them  can be in any position from $1$ to $(n-m-1)$,
so $A$ and $B$ can be placed in $2(n-m-1)$ ways against a total of $n(n-1)$ ways,
hence $Pr = \dfrac{2(n-m-1)}{n(n-1)}$  
