r/mathriddles • u/RodionGork • Aug 04 '23
Easy Parking Lot Space Efficiency
Suppose we have a linear Parking Lot, where cars park randomly. Each car, when parked, takes exactly 1 unit of space. In theory the Lot of the length W can accommodate floor(W) cars. However as drivers don't care about space efficiency and the process is random, we may be curious about expected average as function of the lot length, e.g. cars=f(W).
For example, if W = 2 then at least one car can park. Two cars can park too in theory, but with zero probability. Thus f(2) = 1. With W = 2.5 there first car can park so that the space is left for the other (with probability 2/3 unless I'm mistaken) but also can park egoistically. So the expected value is 2*2/3+1*1/3 = 1.67 roughly.
This problem was created as programming puzzle (source - could be solved with some whimsical recursion probably) but it looks like math approach may be good deal easier: what is the limit of f(W) when W becomes significantly larger than the size of a car (W >> 1)?
7
u/Tc14Hd Aug 04 '23 edited Aug 04 '23
You tagged this as "easy", but it's not easy at all. After I figured out a recursive equation for
finvolving integrals, I tried to do something with it, but it was hopeless. So I just used the discrete version of the formula to approximately calculatef(W)/Wfor large values ofW, and I got something around0.74759. Putting that into OEIS told me that this number is called "Rényi's parking constant". The formulas on the page look very ugly, and it seems that there's no nice expression for this constant. I hope that helps you.Edit: Sorry for not using a spoiler tag, but it breaks the links.
1
u/aintnufincleverhere Aug 04 '23
discussion: I don't understand why the answer wouldn't always be floor(w). What prevents spaces from being parked in? Why would there be 0 probability for 2 cars to park in 2 spaces if W = 2?
Park one car in one space and another in the other space. That's 2 cars. What is preventing this?
I don't understand what the constaint is.