There is an east-west street of length L units. And we park cars of unit length along the north side until we can't place any more cars. Each car is placed randomly (uniformly).
What is the expected number of cars that can be parked (as a function of L)?
I'll start you off...
For 0 <= L < 1, F(L) = 0
For 1 <= L < 2, F(L) = 1
Okay... now the easy ones are out of the way, can you describe the function for L>=2?
2 <= L < 3, F(L) = (3L-4)/L
There are only two possibilities at this length: one car or two. The probabiliy of being able to park two cars is 2(L-2)/L because the first car must be near one end. The probability of parking two cars is then 1 - 2(L-2)/L = (4-L)/L.
The expected number of cars is then 2*(2(L-2)/L)+1*(4-L)/L = (3L-4)/L.
As the road gets longer, there are other possible numbers of cars. Each has its own probability. This method may get out of hand.
Posted by Jer
on 2004-07-01 14:50:39