User:Christo Keller/sandbox

In mathematics, a parking function is an $n$-tuple of positive integers corresponding to ways that cars can fill parking spots on a one-way street. They were introduced by Alan Konheim and Benjamin Weiss in 1966 as part of a study on hash functions and have since been generalized to more complicated combinatorial objects and applied to other fields of math such as graph theory (labelled trees) geometry (polytopes and hyperplanes) and algebra (the vector space of diagonal harmonics).

Definitions
Imagine $n$ cars turn onto a one-way street with $n$ parking spots. Each car wants to park in a particular spot (its parking preference), and as they drive in they take their spot if it's open. Otherwise they park in the next available spot. The $n$-tuple of parking preferences is called a parking function if the cars all park without driving off the street. Alternatively, an $n$-tuple of positive integers is called a parking function if its $i$-th largest entry is no larger than $i$. That these characterizations are equivalent can be checked by induction on the number of cars (the length of the parking function). Because the order of the entries do not matter, the set of parking functions is therefore closed under permutations. Similarly, entries can be reduced arbitrarily without affecting the parking function status.

Enumeration
The number of parking functions of length $n$ is ($n$+1)$n$-1, which is exactly the number of labelled trees on $n$ vertices by Cayley's formula. The proof (due to Pollack) proceeds by adding an ($n$+1)-th parking spot and bending the parking spots into a circle. A bijection to labelled trees was given by Marcel-Paul Schützenberger in 1968, and to regions of the Shi hyperplane arrangement by Richard Stanley in 1996. The number of parking functions also counts dimensions in the vector space $DH_{n}$ of diagonal harmonics.

Applications
Parking functions have been used to give "purely combinatorial" proofs of facts about the Hilbert series of diagonal harmonics, as well as a formula to compute the discrete volume of the Pitman-Stanley polytope $Π_{n}$.

Generalizations
More expansive parking rules have been explored, resulting in objects like parking sequences (which allow for wider cars), the j