---
title: Parking Function Statistics
url: https://www.emergentmind.com/topics/parking-function-statistics
type: topic
---

# Parking Function Statistics

A parking function of length $n$ is a preference vector $\alpha = (a_1,\ldots,a_n) \in [n]^n$ such that, under the canonical one-way parking protocol, all $n$ cars labeled $1,\ldots,n$ successfully park in a row of $n$ spots. Parking function statistics analyze random and enumerative properties of preference vectors, emphasizing probabilities and distributions of various features under both deterministic and probabilistic parking protocols. Parking function statistics are central in enumerative combinatorics, probability, and their connections to tree enumeration, Dyck paths, and shuffle conjectures.

## 1. Probabilistic Parking Protocol and $p$-Coin Invariance

The probabilistic protocol parameterizes the classical process by a bias parameter $p \in [0,1]$: when a car's preferred spot is occupied, it chooses to search forward with probability $p$ and backward with probability $1-p$. Strikingly, the overall probability that a random preference vector $\alpha \in [n]^n$ is a parking function is independent of $p$:
\[
\Pr_{\alpha\sim\mathrm{Unif}([n]^n)}[\alpha\in PF_n]
= \frac{(n+1)^{\,n-1}}{n^n}
\]
This invariance (Pollak–coin invariance) extends to $m \leq n$ cars, yielding:
\[
\Pr_{\alpha\sim[n]^m}\{\text{all $m$ cars park}\}
= \frac{(n+1-m)\,(n+1)^{m-1}}{n^m}
\]
These results are proved via a row-shift/circle argument equating the probability that a particular spot is the unique empty one, independently of $p$ [2211.00536].

## 2. Finer Statistics: Last-Car Preference, Conditional Distributions, and Phase Transitions

Although the global parking function count is $p$-invariant, conditional features—such as the distribution of the last-car preference $a_n$—depend on $p$:
\[
P\bigl(a_n=j\mid\alpha\in PF_n\bigr)
= \frac{2}{n+1} - \frac{1}{(n+1)^{n-1}}
\Bigl[
p \mathlarger{\sum_{s=n-j+1}^{n-1}} \!\binom{n-1}{s}(n-s)^{n-s-2}(s+1)^{s-1} \\
+ (1-p)\mathlarger{\sum_{s=0}^{n-j-1}} \!\binom{n-1}{s}(n-s)^{n-s-2}(s+1)^{s-1}
\Bigl]
\]
As $n\to\infty$,
\[
\mathbb{E}[a_n\mid\alpha\in PF_n] = \frac{n+1}{2} - (2p-1)\bigl[\tfrac{\sqrt{2\pi}}{4}\,n^{1/2} - \tfrac76\bigr]+o(1)
\]
For $p=1/2$, the $n^{1/2}$ term vanishes, so the mean is centered. There is a phase transition in the approach to equidistribution: the total variation distance between the last-car law and uniform satisfies
\[
d_{TV}(Q_{n,1/2},\mathsf{Unif}_n) = \Theta(n^{-1}),\qquad
d_{TV}(Q_{n,p},\mathsf{Unif}_n) = \Theta(n^{-1/2})\;\text{ for }p\ne1/2
\]
This transition quantifies how the probabilistic bias affects decorrelation of coordinates [2211.00536].

## 3. Combinatorial Consequences: Circle Models, Recurrences, and OEIS Arrays

Several combinatorial results arise from the analysis:
- **Circle Model:** Label spot $1$ on a circle and fix car 1’s preference. Let $U_n(k)$ be the expected number of circular preference vectors in $[n+1]^n$ with exactly $k$ unlucky cars (fail to park at their preference) among $\{2,\ldots,n\}$,
  \[
  U_n(k) = n!\!\sum_{C\subset\{2,\dots,n\},\,|C|=k}\prod_{i\in C}\frac{i-1}{(n+1)-(i-1)}
  \]
- **Weighted Pascal Recurrence:** For the count $E_n(i,k)$ of sequences in $[n+1]^i$ with $k$ unlucky cars,
  \[
  E_n(i,k) =[(n+1)-(i-1)]\,E_n(i-1,k) + (i-1)\,E_n(i-1,k-1)
  \]
  This yields a “Pascal's triangle with weights” structure.
- **Connection to OEIS A220884:** The expected number of such sequences satisfies
  \[
  Q_n(q) = \prod_{k=2}^n\bigl[(n+1-k)\,q + k\bigr] = \sum_{k=0}^{n-1}U_n(k)\,q^k
  \]
  giving a combinatorial interpretation for a previously unresolved array [2211.00536].

## 4. Abel-Binomial Identities, Shuffles, and Recurrence Techniques

The proofs exploit weighted Abel–binomial identities, “parking-function shuffle” decompositions, and circle-to-line reductions. Specifically, arguments repeatedly use the multivariate inversion principle (relating sums over preferences to weighted sums over outcomes via translation or rotation) and bijective shuffles reflecting the structure of preference vectors and outcome sequences under the parking protocol [2211.00536].

## 5. Connections and Research Directions

These probabilistic parking statistics prompt several research directions:
- **Phase Transition Analysis:** The sharp change at $p=1/2$ may admit couplings or martingale-based probabilistic analysis.
- **Weighted Statistics:** Other statistics, such as the number of forward vs.\ backward moves, vary significantly with $p$, offering additional combinatorial and probabilistic insight.
- **Generating Functions:** The resolving of OEIS triangles indicates further study of generating-function factorizations for weighted parking-function counts.
- **Statistical Inference:** Given the Bernoulli structure for success/failure in the circle model, Bayesian and large-deviation analyses may allow inference of $p$ from observed parking outcomes.

The interplay of combinatorics, probability, and weighted enumeration is central, with the parking function paradigm continuing to yield substantial theoretical and enumerative insight [2211.00536].

Source: https://www.emergentmind.com/topics/parking-function-statistics