Parking function

Last updated

Parking functions are a generalization of permutations studied in combinatorics, a branch of mathematics.

Contents

Definition and applications

A parking function of length is a sequence of positive integers, each in the range from 1 to , with the property that, for every up to the sequence length, the sequence contains at least values that are at most . That is, it must contain at least one 1, at least two values that are 1 or 2, at least three values that are 1, 2, or 3, etc. Equivalently, if the sequence is sorted, then for each in the same range, the th value of the sorted sequence is at most . [1]

For instance, there are 16 parking functions of length three:

(1,2,3), (2,3,1), (3,1,2),
(3,2,1), (2,1,3), (1,3,2),
(1,1,2), (1,2,1), (2,1,1),
(1,1,3), (1,3,1), (3,1,1),
(1,2,2), (2,1,2), (2,2,1),
(1,1,1).
Parking along a one-way road (Portobello Road in London) Portobello Rd - geograph.org.uk - 5530747.jpg
Parking along a one-way road (Portobello Road in London)

The name is explained by the following thought experiment. A sequence of drivers in cars travel down a one-way street having parking spaces, with each driver having a preferred parking space. Each driver travels until reaching their preferred space, and then parks in the first available spot. A parking function describes preferences for which all cars can park. [1] For instance, the parking function (2,1,2,1) describes preferences for which the first and third drivers both prefer the second space, while the other two drivers both prefer the first space. The first driver parks in space 2, the second in space 1, and the third in space 3 (because space 2 is taken). The fourth driver starts looking for a free space at space 1, but doesn't find it until space 4; all previous spaces were taken. The sequence (3,3,1,3) is not a parking function: too many drivers prefer space 3, so the last driver starts looking for a space after already passing the only free space, and will be unable to park. [2]

Parking functions also have a more serious application in the study of hash tables based on linear probing, a strategy for placing keys into a hash table that closely resembles the one-way parking strategy for cars. [3]

Combinatorial enumeration

The number of parking functions of length is exactly

For instance for this number is . [2]

John Riordan credits to Henry O. Pollak the following argument for this formula. On a circular one-way road with spaces, each of cars will always be able to park, no matter what preference each driver has for their starting space. There are choices for the preferences, each of which leaves one vacant space. All spaces are symmetric to each other, so by symmetry, there are choices for preferences that leave space as the vacant space. These choices are exactly the parking functions. The parking functions can also be placed in bijection with the spanning trees on a complete graph with vertices, one of which is designated as the root. This bijection, together with Cayley's formula for the number of spanning trees, again shows that there are parking functions. [2]

Much research has studied the number of parking functions of a special form. As a very simple special case, the parking functions that allow each car to park in its own preferred spot are exactly the permutations, counted by the factorials. The parking functions that allow each car to park either in its preferred spot or in the next spot are counted by the ordered Bell numbers. [4]

Related Research Articles

<span class="mw-page-title-main">Bijection</span> One-to-one correspondence

A bijection, bijective function, or one-to-one correspondence between two mathematical sets is a function such that each element of the second set is mapped to from exactly one element of the first set. Equivalently, a bijection is a relation between two sets such that each element of either set is paired with exactly one element of the other set.

<span class="mw-page-title-main">Hash function</span> Mapping arbitrary data to fixed-size values

A hash function is any function that can be used to map data of arbitrary size to fixed-size values, though there are some hash functions that support variable length output. The values returned by a hash function are called hash values, hash codes, hash digests, digests, or simply hashes. The values are usually used to index a fixed-size table called a hash table. Use of a hash function to index a hash table is called hashing or scatter storage addressing.

<span class="mw-page-title-main">Permutation</span> Mathematical version of an order change

In mathematics, a permutation of a set can mean one of two different things:

In combinatorial mathematics, the Bell numbers count the possible partitions of a set. These numbers have been studied by mathematicians since the 19th century, and their roots go back to medieval Japan. In an example of Stigler's law of eponymy, they are named after Eric Temple Bell, who wrote about them in the 1930s.

de Bruijn sequence Cycle through all length-k sequences

In combinatorial mathematics, a de Bruijn sequence of order n on a size-k alphabet A is a cyclic sequence in which every possible length-n string on A occurs exactly once as a substring (i.e., as a contiguous subsequence). Such a sequence is denoted by B(k, n) and has length kn, which is also the number of distinct strings of length n on A. Each of these distinct strings, when taken as a substring of B(k, n), must start at a different position, because substrings starting at the same position are not distinct. Therefore, B(k, n) must have at leastkn symbols. And since B(k, n) has exactlykn symbols, de Bruijn sequences are optimally short with respect to the property of containing every string of length n at least once.

Quadratic probing is an open addressing scheme in computer programming for resolving hash collisions in hash tables. Quadratic probing operates by taking the original hash index and adding successive values of an arbitrary quadratic polynomial until an open slot is found.

In combinatorics, the twelvefold way is a systematic classification of 12 related enumerative problems concerning two finite sets, which include the classical problems of counting permutations, combinations, multisets, and partitions either of a set or of a number. The idea of the classification is credited to Gian-Carlo Rota, and the name was suggested by Joel Spencer.

<span class="mw-page-title-main">One-way compression function</span> Cryptographic primitive

In cryptography, a one-way compression function is a function that transforms two fixed-length inputs into a fixed-length output. The transformation is "one-way", meaning that it is difficult given a particular output to compute inputs which compress to that output. One-way compression functions are not related to conventional data compression algorithms, which instead can be inverted exactly or approximately to the original data.

In cryptography, a pseudorandom permutation (PRP) is a function that cannot be distinguished from a random permutation (that is, a permutation selected at random with uniform probability, from the family of all permutations on the function's domain) with practical effort.

<span class="mw-page-title-main">Ordered Bell number</span> Number of weak orderings

In number theory and enumerative combinatorics, the ordered Bell numbers or Fubini numbers count the weak orderings on a set of elements. Weak orderings arrange their elements into a sequence allowing ties, such as might arise as the outcome of a horse race.

In computer science, locality-sensitive hashing (LSH) is a fuzzy hashing technique that hashes similar input items into the same "buckets" with high probability. Since similar items end up in the same buckets, this technique can be used for data clustering and nearest neighbor search. It differs from conventional hashing techniques in that hash collisions are maximized, not minimized. Alternatively, the technique can be seen as a way to reduce the dimensionality of high-dimensional data; high-dimensional input items can be reduced to low-dimensional versions while preserving relative distances between items.

<span class="mw-page-title-main">Fisher–Yates shuffle</span> Algorithm for generating a random permutation of a finite set

The Fisher–Yates shuffle is an algorithm for shuffling a finite sequence. The algorithm takes a list of all the elements of the sequence, and continually determines the next element in the shuffled sequence by randomly drawing an element from the list until no elements remain. The algorithm produces an unbiased permutation: every permutation is equally likely. The modern version of the algorithm takes time proportional to the number of items being shuffled and shuffles them in place.

SHA-3 is the latest member of the Secure Hash Algorithm family of standards, released by NIST on August 5, 2015. Although part of the same series of standards, SHA-3 is internally different from the MD5-like structure of SHA-1 and SHA-2.

In cryptography, the fast syndrome-based hash functions (FSB) are a family of cryptographic hash functions introduced in 2003 by Daniel Augot, Matthieu Finiasz, and Nicolas Sendrier. Unlike most other cryptographic hash functions in use today, FSB can to a certain extent be proven to be secure. More exactly, it can be proven that breaking FSB is at least as difficult as solving a certain NP-complete problem known as regular syndrome decoding so FSB is provably secure. Though it is not known whether NP-complete problems are solvable in polynomial time, it is often assumed that they are not.

In mathematics and in particular in combinatorics, the Lehmer code is a particular way to encode each possible permutation of a sequence of n numbers. It is an instance of a scheme for numbering permutations and is an example of an inversion table.

In combinatorial mathematics, a partial permutation, or sequence without repetition, on a finite set S is a bijection between two specified subsets of S. That is, it is defined by two subsets U and V of equal size, and a one-to-one mapping from U to V. Equivalently, it is a partial function on S that can be extended to a permutation.

In computer science and data mining, MinHash is a technique for quickly estimating how similar two sets are. The scheme was invented by Andrei Broder, and initially used in the AltaVista search engine to detect duplicate web pages and eliminate them from search results. It has also been applied in large-scale clustering problems, such as clustering documents by the similarity of their sets of words.

<span class="mw-page-title-main">Telephone number (mathematics)</span> Number of ways to pair up n objects

In mathematics, the telephone numbers or the involution numbers form a sequence of integers that count the ways n people can be connected by person-to-person telephone calls. These numbers also describe the number of matchings of a complete graph on n vertices, the number of permutations on n elements that are involutions, the sum of absolute values of coefficients of the Hermite polynomials, the number of standard Young tableaux with n cells, and the sum of the degrees of the irreducible representations of the symmetric group. Involution numbers were first studied in 1800 by Heinrich August Rothe, who gave a recurrence equation by which they may be calculated, giving the values

In mathematics and computer science, a stack-sortable permutation is a permutation whose elements may be sorted by an algorithm whose internal storage is limited to a single stack data structure. The stack-sortable permutations are exactly the permutations that do not contain the permutation pattern 231; they are counted by the Catalan numbers, and may be placed in bijection with many other combinatorial objects with the same counting function including Dyck paths and binary trees.

<span class="mw-page-title-main">Affine symmetric group</span> Mathematical structure

The affine symmetric groups are a family of mathematical structures that describe the symmetries of the number line and the regular triangular tiling of the plane, as well as related higher-dimensional objects. In addition to this geometric description, the affine symmetric groups may be defined in other ways: as collections of permutations (rearrangements) of the integers that are periodic in a certain sense, or in purely algebraic terms as a group with certain generators and relations. They are studied in combinatorics and representation theory.

References

  1. 1 2 Yin, Mei (2023), "Parking functions: interdisciplinary connections", Advances in Applied Probability, 55 (3): 768–792, arXiv: 2107.01767 , doi:10.1017/apr.2022.49, MR   4624028
  2. 1 2 3 Riordan, John (1969), "Ballots and trees", Journal of Combinatorial Theory, 6 (4): 408–411, doi: 10.1016/S0021-9800(69)80039-6 , MR   0234843
  3. Konheim, Alan G.; Weiss, Benjamin (November 1966), "An occupancy discipline and applications", SIAM Journal on Applied Mathematics, 14 (6): 1266–1274, doi:10.1137/0114101
  4. Meyles, Lucas Chaves; Harris, Pamela E.; Jordaan, Richter; Kirby, Gordon Rojas; Sehayek, Sam; Spingarn, Ethan (2023), Unit-interval parking functions and the permutohedron, arXiv: 2305.15554 ; Meyles et al credit the connection between parking functions and ordered Bell numbers to a 2021 bachelor's thesis by Kimberly P. Hadaway of Williams College