# Thread: Probability 2 people are next to eachother

1. ## Probability 2 people are next to eachother

Here is the 2 part question. Given n people are in a straight line what is the probability

A: They are next to eachother

B: They are seperated by exactly one person

For a i worked it out a few ways and it looks like 2/n but im not sure why and part b im kinda lost on how to figure it out.

2. Originally Posted by ChrisBickle
Here is the 2 part question. Given n people are in a straight line what is the probability

A: They are next to eachother

B: They are seperated by exactly one person

For a i worked it out a few ways and it looks like 2/n but im not sure why and part b im kinda lost on how to figure it out.
What is part one? WHO?
Otherwise, none of this is meaningful.

3. You must choose a subgroup from n,
or n is a subgroup of a larger group.

As things stand, all n are next to each other and no-one is seperated.

4. Originally Posted by Archie Meade
You must choose a subgroup from n,
or n is a subgroup of a larger group.

As things stand, all n are next to each other and no-one is seperated.
What does that mean?

5. If they are in a straight line but not next to each other,
and we only have the value n,
the problem to me is undefined as seperation from each other has
as many possibilities as one wishes.
Maybe i misread the question,
but i'd expect a subgroup to be examined from the entire group.

6. Sorry i wasnt very specific. Here is the full question. Given 2 people person a and person b are standing in a straight line with n people. What is the probability they are standing next to eachother. And the second part is what is the probability they are seperated by exactly 1 person.

7. There are n! arrangements of n people.
If 2 of these n are considered as a pair, then they are a "unit" out of n-1.
They then have n-1 possible positions as a unit in the line of n people.
There are 2! arrangements of the 2 people side by side,
hence the first probability is

$\frac{(n-1)2!}{n!}$ times the remaining (n-2) people arranged ......added in hindsight

Having 1 person between them....
Take a "unit" as 3.
There are n-2 such "units", with only 2! variations of that "unit" countable.
However, this "unit" can be in n-2 positions.
Hence, the probability is

$\frac{(n-2)^{2}2!}{n!}$ times the remaining (n-3) people arranged ......added in hindsight

Whoooops!!!!

I forgot to arrange the remaining (n-2) and (n-3) people... sorry.

8. Originally Posted by ChrisBickle
Sorry i wasnt very specific. Here is the full question. Given 2 people person a and person b are standing in a straight line with n people. What is the probability they are standing next to eachother. And the second part is what is the probability they are seperated by exactly 1 person.
The correct answer to the first question is $\frac{2(n-1)!}{n!}=\frac{2}{n}$.
Note that is 1 when n=2

The answer to the second part is $\frac{(n-2)(2)(n-2)!}{n!}=\frac{2(n-2)}{n(n-1)}$.
Note that is 0 if n=2 and it is $\frac{1}{3}$ if n=3.

9. Person "a" and person "b" are 2 specific people or any two people??

i read that as specific.

10. Originally Posted by Archie Meade
Person "a" and person "b" are 2 specific people or any two people??

i read that as specific.
That is clearly what it says: "Given two people, person a and person b,..."

11. Sorry!
i just realised my mistake,
thanks!

12. Hello, ChrisBickle!

Plato is absolutely correct!
Here is the resoning . . .

Given $n$ people standing in a line.
There are $n!$ arrangements of the people.

(a) What is the probability that two particular people, $A$ and $B$, are adjacent?
Duct-tape $A$ and $B$ together.
They can be taped like this: . $\boxed{AB}\:\text{ or like this: }\boxed{BA}$ . . . 2 choices.

Then we have $n-1$ "people" to arrange.
. . .There are: . $(n-1)!$ ways.

Hence, there are: . $2(n-1)!$ ways for $A$ and $B$ to be adjacent.

Therefore: . $P(A\text{ and }B\text{ adjacent}) \;=\;\frac{2(n-1)!}{n!} \;=\;\frac{2}{n}$

(b) What is the probability they are seperated by exactly one person?

If there is exactly one person between A and B,
. . they can be arranged: . $\boxed{A\,X\,B}\,\text{ or }\,\boxed{B\,X\,A}$ . . . 2 choices.

Then $X$ can be any of the other $n-2$ people.

And we have $n-2$ "people" to arrange.
. . There are: . $(n-2)1$ ways.

Hence, there are: . $2(n-2)(n-2)!$ ways for $A$ and $B$ to be separated by one person.

Therefore: . $P(A\text{ and }B\text{ separated by one person}) \;=\;\frac{2(n-2)(n_2)!}{n!} \;=\;\frac{2(n-2)}{x(n-1)}$