[Math] Parking lots probability

combinationsprobability

A car is parked among $N$ cars in a row, not at either end. On his return the owner finds exactly $r$ of the $N$ places are still occupied. What is the probability that both neighbouring places are empty ?.

The solution given for this problem is
$$\frac{\dbinom{N-3}{r-1}}{\dbinom{N-1}{r-1}}$$This makes perfect sense to me. However I would like to know whether we could approach the problem in the following way as well ( though something about my answer doesn't look right ).

$$\frac{\dbinom{N}{3} (N-3)^{N-r}} {N^N}$$

Best Answer

The first expression is correct. There are exactly $r-1$ other cars, which are equally likely to be in any combination $r-1$ of the remaining $N-1$ places. The number of combinations where both adjacent slots are empty is the number where all the $r-1$ cars are in the other $N-3$ places.

I don't understand where the second expression comes from, but it is easy to see it can't be right, because if $r=1$ the probability should be $1$.

Related Question