TOPICS
Search

Parking Function


A parking function of length n is a sequence (a_1,...,a_n) of integers between 1 and n whose nondecreasing rearrangement (b_1,...,b_n) satisfies

 b_i<=i for (1<=i<=n).

It describes preferences for n cars arriving in order at n numbered parking spaces. Each car takes its preferred space if free, or the next free space with a larger number. The sequence is a parking function iff every car parks (Konheim and Weiss 1966).

For example, (2,1,2) is a parking function, with cars occupying spaces 2, 1, and 3. The sequence (2,2,2) is not. The rearrangement criterion shows that permuting the cars' preferences preserves the parking-function property.

There are (n+1)^(n-1) parking functions of length n>=1. One proof uses n+1 spaces arranged in a circle. Every preference sequence then leaves one space empty, and rotational symmetry makes each space equally likely to be empty. Cutting the circle at the empty space gives the linear parking rule. The number of nondecreasing parking functions is the Catalan number C_n.

The Naples parking function generalizes the rule by allowing a bounded backward search.

The classical rightward rule is a bilateral parking procedure. The same count (n+1)^(n-1) holds for every local bilateral parking procedure, including the rule that chooses the closer of the nearest free spaces on the two sides, with ties resolved to the right (Nadeau 2026, p. 2).


See also

Catalan Number, Frustrated Parking Function, Naples Parking Function

Explore with Wolfram|Alpha

References

Konheim, A. G. and Weiss, B. "An Occupancy Discipline and Applications." SIAM J. Appl. Math. 14, 1266-1274, 1966.Nadeau, P. "Bilateral Parking Procedures." Elec. J. Combin. 33, P4.15, 2026. https://doi.org/10.37236/15244.Yan, C. H. "Parking Functions." In Handbook of Enumerative Combinatorics (Ed. M. Bóna). Boca Raton, FL: CRC Press, pp. 835-893, 2015.

Cite this as:

Weisstein, Eric W. "Parking Function." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/ParkingFunction.html

Subject classifications