At dinner recently, a friend mentioned the following problem:

There is a street of length x (not necessarily an integer) on which cars of length 1 wish to park. However, instead of parking in a nice organized way, they park at random, picking uniformly from the availible positions to park (they are apparently jerks). Assuming no cars leave, and continue to arrive until no more can fit, what is the expected number of cars that will fit?

For instance, if the street is length 2, then the first car will almost always park so that no other can fit, and so the expected number of cars is 1. If the street is length 3, the first car can never prevent a second from fitting; but a third car almost never will fit, and so the expected value is 2. The trend of simple answers is broken at street length 4, where the expected number of cars is . This came up as a fun, back-of-the-envelope type problem, but the answer is actually an iterated integral that becomes prohibitively difficult after a few steps. Perhaps a intrepid reader can solve more steps than I was able to.

The name of the game is finding the function , the expected value of the number of cars for a street of length x. We can find a relation this function has to satisfy in the following way.

Lets say the first car parks so its front is at , dividing the previously empty street into two pieces of length and . Hence, the expected number of cars that park *given* the exact place the first car parks is . We can get the overall expected value (that is, without fixed starting location) by averaging over all possible starting locations:

Of course, the integral splits apart into three pieces:

Notice that the second integral becomes the first after the change of variables , and so we get:

(*)

We should note that this formula is only valid for , since we implicitly assumed the first car could park.

The reason this equation is useful is because of its inductive flavor. To compute for some fixed x requires only knowledge of for , and we can start things with the simple observation that for .

Computationally, this amounts to plugging equation (*) into itself over and over again. Lets see how this works for one step.

Note that the lower limit of integration become 1, because equation (*) was only valid for ; similarly, the above equation is only valid for .

We can repeat this process as many times as we like (always being careful with the lower limit of integration and the validity of x). After every step, the only term with a reference to will be the last one, a big nested integral of . Ah, but must be at least 1 less than , etc, and so is less than . Therefore, if , then , and so the big nested integral will be zero. Hence, we can get an expression for which involves no references to itself (as long as we know what integers is between).

Heres the result (for :

Now all the trickiness is hidden in evaluating the integral. Its easy for the first few steps.

Thus, we can see that for ,

However, the next term of has resisted all of my attempts to integrate, and I haven’t found it in any of the integration tables I looked up. Its possible its not solvable, which would be a sad end to an otherwise interesting problem.

A related question is the behavior of for really large . It seems intuitively likely that if the street is very long, the complicated factors that affect the precise expected value will stay relatively small, and will look like a nice function of like multiplication by some number . This number would be a measure of the macroscopic efficiency of this random parking method. It would be a fun number to know, if it exists, but I can’t see how to find it.

Tags: math.PR

January 8, 2008 at 1:45 am |

Maple can do the next integral, but it involves the dilogarithm. But it can’t do the one after that, so exact answers hardly seem the way to go.

And I agree that E(x) ~ λ x for large x. Letting E(x) = λx (which isn’t true) the first equation with the integral is satisfied. Unfortunately it’s satisfied for any λ, so this gives no clue to the value of λ. I suspect the value of λ depends on the behavior of E(x) for

smallx — precisely the ones for which any sort of asymptotic resultisn’ttrue.One thing that’s clear is that λ ≥ 1/2 if it exists. If cars take up less than half the street, then there is more empty space than space taken up by cars, and the number of gaps between cars is the same as the number of cars (plus or minus one). So there’s some gap that’s big enough to fit a car.

January 8, 2008 at 2:17 am |

One can show without much trouble that exists, but I suspect that its value is not any particularly interesting number.

It’s slightly more convenient to look at the waste , which obeys the delayed integral equation

for large x, or (equivalently) the delayed differential equation

(Note that F becomes increasingly smooth as x increases, by the delayed integral equation, so all the formal computations here become valid for sufficiently large x, e.g. x > 3 is probably enough.)

One can observe that we have the explicit solutions for any constant , confirming the intuition of asymptotic linear behaviour of F and E. To exploit this, we use the variation of parameters method, selecting the ansatz , where is now a varying function of x. Some computation eventually gives the delayed differential equation

and hence by the mean-value theorem

for some . From this one easily shows that converges to zero very fast (super-exponentially fast, in fact), from which we see that E(x) converges quite rapidly to for some , equal to 1 minus the limiting value of . Because of this fast convergence, it would be possible to compute many digits of very quickly (and rigorously) simply by computing E numerically for a reasonable range of x. But I suspect that it will just converge to some generic transcendental number.

January 8, 2008 at 2:22 am |

A small correction: E(x) should converge super-exponentially fast to rather than . (Note that solves the delayed integral equation for E.)

January 8, 2008 at 5:40 pm |

This problem is called random sequential adsorption in physics, representing the adsorption of molecules onto surfaces. In one-dimension, the problem is exactly solvable for \lambda. See, for example, Krapivsky, J Stat Phys, vol 69, page 135, 1992. Look just below Eq. 12 for the parking coverage.

Actually, in physics one often considers a slightly more general problem: the objects that are added have some fixed integer length, and they can only be added with their left end at some randomly chosen integer. This mimics adding objects onto some underlying crystal lattice. The same technique as in Krapivsky’s paper also works here (don’t know a reference). There are also natural higher dimensional generalizations, but no exact solutions there except on lattices which are locally tree-like.

January 8, 2008 at 8:42 pm |

Matt,

I’m not at work, so I can’t see the paper without paying for it. Is the solution something relatively nice? I also would like someone to include a decimal approximation of it to several places, since I am curious as to what its actual value is.

January 8, 2008 at 11:09 pm |

The answer is given as a double integral. So, no, not especially nice. Not at work now either, but I recall it being around 0.75, with 6 decimal places or so given in the paper. So, if you just guessed something halfway between the lower bound of 0.5 given above, and the upper bound of 1.0, you’d actually be very close.

January 8, 2008 at 11:17 pm |

Btw, basic technique used is to compute survival probability of an empty interval, as a function of length of the interval and time.

January 9, 2008 at 7:27 am |

It’s actually a classical problem solved by Renyi – have a look at http://mathworld.wolfram.com/RenyisParkingConstants.html

for the value of the limit and references.

As far as an exact solution for E(x) goes, it looks like it could be possible to rewrite the iterated integral as a sum of special values of multiple polylogs…

January 9, 2008 at 4:00 pm |

I didn’t read the references in Krapivsky, I think he cites Renyi. How did Renyi solve it? The survival probability of an empty interval is a nice approach.

January 10, 2008 at 8:09 am |

I don’t have access to the Renyi paper (plus it’s in Hungarian!) and the Math Review doesn’t indicate his method, but looking at the answer given on the Mathworld page, the inner integrand is one of the terms you get when you take a Laplace transform of a shift by 1 so I’d suspect that if you take Laplace transforms of the delayed differential equation Terry gives, the final value theorem will give the limit of $alpha$.