There is an eastwest 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?
(In reply to
simulation by Charlie)
The line
sb = sb + 1
should not be in the program. It was left from when the FOR... NEXT loop was a DO... LOOP loop. However, it did not affect results, which only depended on fillable spaces being filled; it did not depend on the order of their fillingI've verified the results are the same. It does however slow down the simulation, as cars were turned away even though there were spaces available in untried spaces, though laterarriving cars filled the preferred spaces so the nonpreferred spaces got into preferred locations in the array.

Posted by Charlie
on 20040702 08:16:52 