# Probabilities: That $A,B$ sit next to each other; That there are $3$ people are between $X$ and $Y$

1) Five persons $A,B,C,D,E$ occupy seats in a row at random. What is the probability that $A$ and $B$ sit next to each other?

2) $X$ and $Y$ stand in a line at random with $10$ other people. The probability that there are $3$ people between $X$ and $Y$ is?

-
Hello, welcome to Math.SE. Please, post only one question in one post. Posting several questions in the same post is discouraged and such questions may be closed, see meta. –  Lord_Farin Jun 17 '13 at 10:29

Hint:

1) Consider "gluing" person $A$ and person $B$ together. In how many ways can you do this, if order matters? After doing this, you will now have $5-2+1=4$ people to permute; for example: $$\boxed{AB}, \boxed{C}, \boxed{D}, \boxed{E}$$

Can you take it from here? Spoiler:

Your probability should be: $\dfrac{2!~4!}{5!}$

2) Suppose the other $8$ people are named $P_1,P_2,...,P_8$. Consider "gluing" $5$ people together such that $X$ and $Y$ are on the ends of this people sandwich (for example, $\boxed{YP_6P_8P_7X}$ is one possiblility). In how many ways can you do this, if order matters? After doing this you will now have $10-5+1=6$ people to permute; for example: $$\boxed{YP_6P_8P_7X}, \boxed{P_1}, \boxed{P_2}, ..., \boxed{P_5}$$

Can you take it from here? Spoiler:

Your probability should be: $\dfrac{(2\cdot 8 \cdot 7 \cdot 6 \cdot 1) \cdot 6!}{10!}$

-
Let's visualize the seats as $$X\quad X \quad X\quad X \quad X.$$ There are $\dbinom{5}{2}$ equally likely ways to choose the pair of seats to be reserved for A and B. Note that we are not assigning A or B to a specific one of these seats, just putting reserved signs on the seats.
There are $4$ ways to choose a pair of adjacent seats. So our probability is $\dfrac{4}{\binom{5}{2}}$.
Let's visualize the lineup as $$X\quad X \quad X\quad X \quad X\quad X\quad X \quad X\quad X \quad X .$$ There are $\binom{10}{2}$ equally likely ways to choose a pair of locations in the lineup. There are $6$ ways to choose the pair so that they are separated by $3$, since the leftmost chosen position can be any of $1,2,3,\dots,6$.