parking function
Tags: #definition
parking function
Suppose you have
cars with parking spots on a one-way road. - Each driver's favorite spot is encoded by
, mapping the th driver to their favorite spot. - Drivers will arrive one by one by their index (so driver 1 arrives first) and drives straight to their favorite spot.
- If that spot is taken, they drive forwards until they see an empty spot and park there. If they do not find one, they drive away.
We say that
Properties
- The following are equivalent:
is a parking function for all - there exists a permutation
such that for all
- The number of parking functions for
is (proof)