Answer:
p(at most one space between) = (4n-6)/(n(n-1))
Step-by-step explanation:
There are n-1 ways the cars can be parked next to each other, and n-2 ways they can be parked with one empty space between. So, the total number of ways the cars can be parked with at most one empty space is ...
(n -1) +(n -2) = 2n-3
The number of ways that 2 cars can be parked in n spaces is ...
(n)(n -1)/2
So, the probability is ...
(2n-3)/((n(n-1)/2) = (4n -6)/(n(n -1))
___
If the cars are considered distinguishable and order matters, then the number of ways they can be parked will double. The factor of 2 cancels in the final probability ratio, so the answer remains the same.
__
<em>Check</em>
For n=2 or 3, p=1 as you expect.
For n=4, p=5/6, since there is only one of the 6 ways the cars can be parked that has 2 spaces between.