# Probability 2 people are next to eachother

• Jan 13th 2010, 02:44 PM
ChrisBickle
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.
• Jan 13th 2010, 02:55 PM
Plato
Quote:

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.
• Jan 13th 2010, 03:01 PM
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.
• Jan 13th 2010, 03:03 PM
Plato
Quote:

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?
• Jan 13th 2010, 03:25 PM
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.
but i'd expect a subgroup to be examined from the entire group.
• Jan 13th 2010, 04:41 PM
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.
• Jan 13th 2010, 08:25 PM
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

$\displaystyle \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

$\displaystyle \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.
• Jan 14th 2010, 07:20 AM
Plato
Quote:

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 $\displaystyle \frac{2(n-1)!}{n!}=\frac{2}{n}$.
Note that is 1 when n=2

The answer to the second part is $\displaystyle \frac{(n-2)(2)(n-2)!}{n!}=\frac{2(n-2)}{n(n-1)}$.
Note that is 0 if n=2 and it is $\displaystyle \frac{1}{3}$ if n=3.
• Jan 14th 2010, 11:49 AM
Person "a" and person "b" are 2 specific people or any two people??

• Jan 14th 2010, 11:53 AM
Plato
Quote:

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

That is clearly what it says: "Given two people, person a and person b,..."
• Jan 14th 2010, 11:57 AM
Sorry!
i just realised my mistake,
thanks!
• Jan 14th 2010, 04:09 PM
Soroban
Hello, ChrisBickle!

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

Quote:

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

Quote:

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

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

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

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

Quote:

(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: .$\displaystyle \boxed{A\,X\,B}\,\text{ or }\,\boxed{B\,X\,A}$ . . . 2 choices.

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

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

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

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