Cars in Traffic

119 Views Asked by At

There is a very long, straight highway with some number of cars (N) placed somewhere along it, randomly. The highway is only one lane, so the cars can’t pass each other. Each car is going in the same direction, and each driver has a distinct positive speed at which she prefers to travel. Each preferred speed is chosen at random. Each driver travels at her preferred speed unless she gets stuck behind a slower car, in which case she remains stuck behind the slower car. On average, how many groups of cars will eventually form? (A group is one or more cars travelling at the same speed.)

For example, if the car in the very front happens to be slowest, there will be exactly one group — everybody will eventually pile up behind the slowpoke. If the cars happen to end up in order, fastest to slowest, there will be N groups — no car ever gets stuck behind a slower car.

1

There are 1 best solutions below

0
On BEST ANSWER

We're assuming all cars moving to the right in the same direction.

Let $X_n$ be the indictor that the $n$-th car from the right will form a new group. This will happen if and only if its speed is slower than the speed of the slowest among the the first $n-1$ on the right, because otherwise it will join an existing group to its right.

Letting $U_1,\dots,U_N$ denote the speeds of the cars from right to left, we therefore see that

$$P(X_n=1)= P( U_n < \min (U_1,\dots,U_{n-1}) = P( U_1 = \min(U_1,\dots,U_n))=\frac 1n.$$

Since the number of groups is $X=\sum_{n=1}^N X_n$, it follows that

$$E X = 1+ \frac{1}{2}+\dots + \frac {1}{N}\sim \ln N.$$