All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Parking Cars (Posted on 2004-07-01)
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?

 No Solution Yet Submitted by SilverKnight Rating: 4.0000 (2 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
 re: Different? | Comment 8 of 14 |
(In reply to Different? by Gamer)

For L = 2.9, why would it be hard to park only 2 cars?  Certainly no more than 2 will fit.  Simulation shows that 95% of the time two would fit, and the other 5% of the time only one.  Here's a finer breakdown between L=1 and L=3:

`1.00  1.001.10  1.001.20  1.001.30  1.001.40  1.001.50  1.001.60  1.001.70  1.001.80  1.001.90  1.002.00  1.002.10  1.192.20  1.342.30  1.462.40  1.572.50  1.662.60  1.762.70  1.822.80  1.892.90  1.953.00  2.00`

Note that a length of 3 is assured of fitting two cars, and there's zero probability of fitting 3.  The latter would require that the first car to arrive would place its front exactly at the beginning of the curb, exacty 1/3 of the way back or exactly 2/3 of the way back, which, being a finite number of points on a line, add to zero probability.

Edited on July 2, 2004, 12:45 am
 Posted by Charlie on 2004-07-02 00:34:05

 Search: Search body:
Forums (0)