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 ofn
, 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:
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