ArticleslgStudy

mathematics

Parking function

Parking function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Parking function rather than just read about it. In short: Parking functions are a generalization of permutations studied in combinatorics, a branch of mathematics. Definition and applications A parking function of length n {\displaystyle n} is a sequence of n {\displaystyle n} positive integers, each in the range from 1 to n {\displaystyle n} , with the property that, for every i {\displaystyle i} up to the sequence length, the sequence contains at least i {\displaystyle i…

Parking function — main illustration
Parking function — illustration

Key takeaways

  • Parking function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Parking function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Parking function from memory before moving on to harder problems.

Reference excerpt

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

Definition and applications A parking function of length n {\displaystyle n} is a sequence of n {\displaystyle n} positive integers, each in the range from 1 to n {\displaystyle n} , with the property that, for every i {\displaystyle i} up to the sequence length, the sequence contains at least i {\displaystyle i} values that are at most i {\displaystyle i} . 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 i {\displaystyle i} in the same range, the i {\displaystyle i} th value of the sorted sequence is at most i {\displaystyle i} . 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).

The name is explained by the following thought experiment. A sequence of n {\displaystyle n} drivers in cars travel down a one-way street having n {\displaystyle n} 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. 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. 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.

Combinatorial enumeration The number of parking functions of length n {\displaystyle n} is exactly ( n + 1 ) n − 1 . {\displaystyle (n+1)^{n-1}.} For instance for n = 3 {\displaystyle n=3} this number is 4 2 = 16 {\displaystyle 4^{2}=16} . John Riordan credits to Henry O. Pollak the following argument for this formula. On a circular one-way road with n + 1 {\displaystyle n+1} spaces, each of n {\displaystyle n} cars will always be able to park, no matter what preference each driver has for their starting space. There are ( n + 1 ) n {\displaystyle (n+1)^{n}} choices for the preferences, each of which leaves one vacant space. All spaces are symmetric to each other, so by symmetry, there are ( n + 1 ) n − 1 {\displaystyle (n+1)^{n-1}} choices for preferences that leave space n + 1 {\displaystyle n+1} 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 n + 1 {\displaystyle n+1} 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 ( n + 1 ) n − 1 {\displaystyle (n+1)^{n-1}} parking functions. 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.

References

Worked examples

Example 1 — a first encounter with Parking function

Start with the simplest possible case. Write down what Parking function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Parking function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Parking function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Parking function

In research
Parking function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Parking function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Parking function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Factorial and binomial topics, so understanding it makes those chapters shorter.
In everyday life
Look for Parking function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Parking function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Parking function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Parking function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Parking function in simple terms?

Parking functions are a generalization of permutations studied in combinatorics, a branch of mathematics. Definition and applications A parking function of length n {\displaystyle n} is a sequence of n {\displaystyle n} positive integers, each in the range from 1 to n {\displaystyle n} , with the p…

Why does Parking function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Parking function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Parking function.

Tags

  • Factorial and binomial topics

Keep exploring