Cars park randomly next to a sidewalk of length 100. Each car is length 1. How many cars will fit on average?

95 Views Asked by At

I'm looking for a mathematical solution to this problem, not an answer through a simulation.

Clarification of the problem: $x$ is a random number (not only integers) uniformly distributed between $0$ and $99$ (the maximum is $99$ because parking between $99.1$ and $100.1$ is impossible). $\operatorname{car}_1$ takes the space between $x$ and $x+1$. $\operatorname{car}_2$ comes and parks at a random spot between $0$ and $x$ or at a spot between $x+1$ and $99$, uniformly distributed among available locations. This goes on until all the parking spaces left are smaller than $1$.

On average, how many cars will fit?