3
$\begingroup$

I have found similar questions in these links (1,2,3), but none of them is from CrossValidated (and I still don't grasp the solution, so here I am).

The problem is this:

Tom and Jerry park their cars in an empty parking lot with n>=2 consecutive parking spaces (i.e, spaces in a row, where only one car fits in each space). Tom and Jerry pick parking spaces at random; of course, they must each choose a different space. (All pairs of distinct parking spaces are equally likely.) What is the probability, in terms of n, that there is at most one empty parking space between them?

The solution is $\frac{2(2n-3)}{n(n-1)}$. I understand that the total possibilities are $n(n-1)$ as the first person to park his car has n possibilities and the second person has n possibilities minus the spot the first person parked, which would be $n-1$. Hence, the universe is $n(n-1)$. However, I don't get how to get the numerator. Can anyone explain it with apples, please?

I tried finding the pattern using n=2, n=3, n=4, and so on.. without success. As you can see here:

enter image description here

Where:

  • Each cell represents a parking spot and each row a possibility. 1 means if that possibility fulfills the restriction of the problem (at most one parking spot between them), 0 otherwise. The fraction is the number of occurrences that fulfills the restriction over the total universe (the probability, in other words).

I am trying two things here: The first is to grasp this problem and its details and the second is to find an efficient way to solve this problem. Why? Because I will have to solve similar problems in a future exam and this would be really helpful!

EDIT: Solution corrected

$\endgroup$
2
  • $\begingroup$ There is no need to discern Tom and Jerry. Just think in pairs of spaces. One of these pairs is picked out. $\endgroup$
    – drhab
    Commented Oct 10, 2022 at 14:51
  • $\begingroup$ Well, all answers match now (i.e. after your edit) with the formula. $\endgroup$
    – drhab
    Commented Oct 11, 2022 at 8:04

2 Answers 2

1
$\begingroup$

Tom and Jerry together randomly pick out a pair of parking spaces.

There are $\binom{n}2$ equiprobable pairs of parking spaces.

$n-1$ of the pairs consist of spaces that are not separated by any empty space.

$n-2$ of the pairs consist of spaces that are separated by exactly one empty space.

So: $$(n-1)+(n-2)=2n-3$$ of the pairs consist of spaces that are separated by at most one empty space.

Then the probability that Tom and Jerry pick out a pair consisting of spaces that are separated by at most one empty space equals:$$\frac{2n-3}{\binom{n}2}=\frac{4n-6}{n(n-1)}$$This based on the rule that probability equals number of favourable outcomes divided by number of possible outcomes. This rule works if the outcomes are equiprobable.

$\endgroup$
0
$\begingroup$

First, you fix the position of the first car and then you calculate the possible positions for the second car where the distance is equal to or less than 1 car.

T at Position 1: 2 desired positions out of $n-1$

T at Position 2: 3 desired positions out of $n-1$

T at Position 2<i<n-1: 4 desired positions out of $n-1$

T at Position n-1: 3 desired positions out of $n-1$

T at Position n: 2 desired positions out of $n-1$

The total probability will be:

$$P=\Sigma_{i=1}^{i=n}{P(\text{distance between T and J} \leq 1)}P(\text{T at position i}) $$

$$=\frac{1}{n} (\frac{2}{n-1}+\frac{3}{n-1}+\frac{4}{n-1}+...+\frac{4}{n-1}+\frac{3}{n-1}+\frac{2}{n-1}) =\frac{1}{n} (\frac{4n-2-1-1-2}{n-1}) =\frac{1}{n} (\frac{4n-6}{n-1})$$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.