Introduction
Consider a one-way street with n ∈ N = { 1 , 2 , 3 , … } n \in\mathbb{N} = \{1,2,3,\ldots\} n ∈ N = { 1 , 2 , 3 , … } sequentially numbered parking spots, and a queue of n n n cars waiting to park in those spots. Each car has a preferred parking spot, and we collect the preferences in a list α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1,a_2,\ldots,a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n , where a i a_i a i denotes the preferred parking spot of car i i i for each i ∈ [ n ] = { 1 , 2 , … , n } i \in[n] = \{1,2,\ldots,n\} i ∈ [ n ] = { 1 , 2 , … , n } . We call the list α \alpha α a preference list . The cars proceed to park under the classical parking scheme : Cars enter sequentially, from car 1 through car n n n , in that order. Car i i i attempts to park in its preferred parking spot a i a_i a i . If the spot is unoccupied, car i i i parks there, and then car i + 1 i+1 i + 1 enters the street, attempting to park. If car i i i finds its preferred parking spot a i a_i a i occupied, then car i i i continues down the one-way street and attempts to park in the first available spot it encounters past its preference. If no such spot exists, meaning all of the spots from a i a_i a i to n n n are occupied, then car i i i exits the street, and parking fails. If under this parking scheme all cars are able to park, then the preference list α \alpha α is called a *(classical) parking function of length n n n . For example, ( 1 , 4 , 4 , 3 , 2 , 2 ) (1,4,4,3,2,2) ( 1 , 4 , 4 , 3 , 2 , 2 ) is a parking function of length 6, resulting in the cars parking as illustrated in Figure 1 . In contrast, ( 2 , 4 , 4 , 3 , 2 , 5 ) (2,4,4,3,2,5) ( 2 , 4 , 4 , 3 , 2 , 5 ) is not a parking function since no car prefers parking spot 1 and thus at least one car fails to park.
Figure 1. The parking outcome for the preference list (1, 4, 4, 3, 2, 2) under the classical parking scheme. Hence, O ( ( 1 , 4 , 4 , 3 , 2 , 2 ) ) = 154236 \mathcal{O}((1, 4, 4, 3, 2, 2)) = 154236 O (( 1 , 4 , 4 , 3 , 2 , 2 )) = 154236 .
Given a classical parking function, the order the cars park on the street is a permutation of [ n ] [n] [ n ] . We let S n \mathfrak{S}_n S n denote the set of permutations of [ n ] [n] [ n ] , which we write in one-line notation as π = π 1 π 2 ⋯ π n \pi= \pi_1\pi_2 \cdots\pi_n π = π 1 π 2 ⋯ π n . Then, for a parking function α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1,a_2,\ldots,a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n , we let O ( α ) ∈ S n \mathcal{O}(\alpha) \in\mathfrak{S}_n O ( α ) ∈ S n be the permutation corresponding to the outcome of α \alpha α ; that is, we have O ( α ) = π = π 1 π 2 ⋯ π n ∈ S n \mathcal{O}(\alpha) = \pi= \pi_1\pi_2\cdots\pi_n \in\mathfrak{S}_n O ( α ) = π = π 1 π 2 ⋯ π n ∈ S n where π j = k \pi_j = k π j = k means that car k k k parks in parking spot j j j . Note that the outcome of the example in Figure 1 is the permutation π = 154236 ∈ S 6 \pi= 154236 \in\mathfrak{S}_6 π = 154236 ∈ S 6 .
Parking functions were introduced and studied by Konheim and Weiss in their study of hash functions [21 ] . They showed that, if P F n \mathrm{PF}_n PF n denotes the set of (classical) parking functions of length n n n , then ∣ P F n ∣ = ( n + 1 ) n − 1 |\mathrm{PF}_n| = (n+1)^{n-1} ∣ PF n ∣ = ( n + 1 ) n − 1 . Since their introduction, parking functions have received considerable attention in the literature due to their numerous connections with other areas of mathematics. For example, the study of parking functions is related to hyperplane arrangements, counting facets of the permutohedron, the QuickSort algorithm, Boolean intervals in the weak Bruhat order of the symmetric group, and the Tower of Hanoi game [4 , 7 , 9 , 17 , 20 , 28 ] . There are many generalizations of classical parking functions often involving either a change to the cars’ lengths, their preferences, or the parking scheme; see for examples [2 , 11 , 12 , 13 , 15 , 26 ] . For more information on parking functions, we recommend the chapter by Yan [30 ] and for a list of open problems in this area, we refer the interested reader to [8 ] .
In studying parking functions, a question of interest is the following: Supposing that one observes only the final parking outcome and not the preference list, how many distinct preference lists could have resulted in that parking outcome? In the classical parking function scenario, the result [13 Proposition 3.1] is a product of lengths of certain longest contiguous subsequences in the permutation describing the parking outcome. This question has also been considered under other parking schemes including MVP parking functions, k k k -cascading parking functions, k k k -Naples parking functions, pullback parking functions, and ℓ \ell ℓ -interval parking functions [3 , 1 , 13 , 16 , 19 ] .
A second area of interest is the study of parking functions with a given displacement multiset , formally defined in Definition 1.11 . In the classical setting, the displacement of a car i i i is defined as the difference between the spot car i i i parks in and the spot it originally preferred. In this paper, we will introduce new parking schemes in which a car may end up parking in a spot earlier than its preferred one, making the aforementioned difference negative. To address this, we henceforth define the displacement d i d_i d i of car i i i to be the absolute value of the difference between the spot car i i i prefers and where it ultimately parks. Note that this definition of displacement agrees with that of displacement under the classical parking scheme, since in that setting the difference between a car’s final parking spot and its preference is always nonnegative.
We define the displacement multiset to be the multiset consisting of the nonzero values d i d_i d i , and we denote this by D ( α ) \mathcal{D}(\alpha) D ( α ) . Then, given a (classical) parking function α \alpha α , the displacement of α \alpha α , denoted D ( α ) D(\alpha) D ( α ) is the sum of the displacements among all cars. Namely, D ( α ) = ∑ i = 1 n d i D(\alpha) = \sum_{i=1}^{n} d_i D ( α ) = ∑ i = 1 n d i , which is equal to the sum of the entries in D ( α ) \mathcal{D}(\alpha) D ( α ) .
A feature of classical parking functions is that a rearrangement of a parking function is again a parking function. This follows from the inequality characterization of classical parking functions: a preference list α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1, a_2, \ldots, a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n is a classical parking function if and only if its weakly increasing rearrangement denoted α ′ = ( a 1 ′ , a 2 ′ , … , a n ′ ) \alpha^\prime= (a_1^\prime, a_2^\prime, \ldots, a_n^\prime) α ′ = ( a 1 ′ , a 2 ′ , … , a n ′ ) , obtained by sorting the entries into weakly increasing order, satisfies a i ′ ≤ i a_i^\prime\leq i a i ′ ≤ i for all i ∈ [ n ] i \in[n] i ∈ [ n ] . Moreover, given a classical parking function with displacement k k k , every rearrangement of the parking function also has displacement k k k . For example, the parking functions ( 1 , 1 , 2 ) (1, 1, 2) ( 1 , 1 , 2 ) , ( 1 , 2 , 1 ) (1, 2, 1) ( 1 , 2 , 1 ) , and ( 2 , 1 , 1 ) (2, 1, 1) ( 2 , 1 , 1 ) all have displacement 2. However, while the displacement is the same, these displacements arise in different ways: the displacement of ( 1 , 1 , 2 ) (1,1,2) ( 1 , 1 , 2 ) arises from the sum 0 + 1 + 1 = 2 0+1+1=2 0 + 1 + 1 = 2 , while the displacements of ( 1 , 2 , 1 ) (1,2,1) ( 1 , 2 , 1 ) and ( 2 , 1 , 1 ) (2,1,1) ( 2 , 1 , 1 ) arise from the sum 0 + 0 + 2 = 2 0+0+2=2 0 + 0 + 2 = 2 .
Classical parking functions with displacement 1 always arise from a single car parking one spot away from its preference. Aguillon, Alvarenga, Harris, Kotapati, Martínez Mori, Monroe, Saylor, Tieu, and Williams II established a bijection between classical parking functions with displacement 1 and ideal states on the Tower of Hanoi game [4 ] . Unit-interval parking functions are classical parking functions in which all cars have displacement at most 1. Chaves Meyles, Harris, Jordaan, Rojas Kirby, Sehayek, and Spingarn established a bijection between unit-interval parking functions with k k k cars having displacement 1 and the set of k k k -dimensional facets of the permutohedron [9 ] . In this case, the displacement multiset is a multiset consisting of k k k ones.
The above-referenced work motivates the present study, where we introduce two new versions of parking functions inspired by the board games Monopoly and backgammon, in which cars finding their preferred spot occupied either return to the start of the street or bump the car occupying that spot to the start of the street, respectively. The car that returns to the start of the street then drives forward and parks in the first unoccupied spot it encounters. Next, we give the technical definitions of these parking schemes and present our major results related to the number of preference lists with specified parking outcomes, as well as our results related to displacement multisets.
Monopoly Parking Scheme
In the board game Monopoly [22 ] , there are Community Chest cards that instruct a player to “Advance to Go” which sends the player to the start of the board. Motivated by this feature of the game, we define the Monopoly parking scheme as follows:
Cars enter sequentially from car 1 to n n n , in that order.
Each car attempts to park in their preferred parking spot if available.
If a car’s preferred spot is occupied, then the car returns to the start of the street and parks in the first available spot it encounters.
If a preference list α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha=(a_1,a_2,\ldots,a_n)\in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n allows all cars to park under the Monopoly parking scheme, then α \alpha α is a Monopoly parking function . We denote the parking outcome of a preference list α \alpha α under the Monopoly parking scheme by O M ( α ) = π 1 π 2 ⋯ π n O_M(\alpha)=\pi_1\pi_2\cdots\pi_n O M ( α ) = π 1 π 2 ⋯ π n , where π j = k \pi_j=k π j = k denotes that car k k k parks in the j j j -th spot. For succinctness, we refer to the outcome of a preference list α \alpha α using the Monopoly parking scheme as the Monopoly outcome of α \alpha α . For example, using the preference list α = ( 1 , 4 , 4 , 3 , 2 , 2 ) \alpha=(1,4,4,3,2,2) α = ( 1 , 4 , 4 , 3 , 2 , 2 ) of length 6, we illustrate the Monopoly outcome of α \alpha α in Figure 2 .
Figure 2. The parking outcome for the preference list ( 1 , 4 , 4 , 3 , 2 , 2 ) (1,4,4,3,2,2) ( 1 , 4 , 4 , 3 , 2 , 2 ) under the Monopoly parking scheme. Hence, O M ( ( 1 , 4 , 4 , 3 , 2 , 2 ) ) = 134256 O_M((1,4,4,3,2,2))=134256 O M (( 1 , 4 , 4 , 3 , 2 , 2 )) = 134256 .
We let M P F n \mathrm{MPF}_n MPF n denote the set of all Monopoly parking functions. It is not difficult to see that every preference list α ∈ [ n ] n \alpha\in[n]^n α ∈ [ n ] n is a Monopoly parking function. We state this formally next, and prove it in Section 2.
Proposition 1.1. If n ∈ N n\in\mathbb{N} n ∈ N , then M P F n = [ n ] n \mathrm{MPF}_n=[n]^n MPF n = [ n ] n and ∣ M P F n ∣ = n n |\mathrm{MPF}_n|=n^n ∣ MPF n ∣ = n n .
Given that every tuple in [ n ] n [n]^n [ n ] n is a Monopoly parking function, we now ask: Given a permutation π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , what tuples in [ n ] n [n]^n [ n ] n have Monopoly outcome π \pi π ? We denote this set
O M − 1 ( π ) : = { α ∈ [ n ] n : O M ( α ) = π } O_M^{-1}(\pi):=\{\alpha\in[n]^n:O_M(\alpha)=\pi\} O M − 1 ( π ) := { α ∈ [ n ] n : O M ( α ) = π }
and as usual we let ∣ O M − 1 ( π ) ∣ |\mathcal{O}^{-1}_{M}(\pi)| ∣ O M − 1 ( π ) ∣ denote the cardinality of the set. To determine what is in the set O M − 1 ( π ) \mathcal{O}^{-1}_{M}(\pi) O M − 1 ( π ) and its cardinality, we introduce the following definition.
Definition 1.2. For an outcome π = π 1 π 2 ⋯ π n ∈ S n \pi= \pi_1\pi_2 \cdots\pi_n \in\mathcal{S}_n π = π 1 π 2 ⋯ π n ∈ S n , the set of good indices of π \pi π is defined as the set I π ⊆ [ n ] I_\pi\subseteq[n] I π ⊆ [ n ] satisfying the following condition: i ∈ I π i \in I_\pi i ∈ I π if and only if π j < π i \pi_j < \pi_i π j < π i for all j < i j < i j < i .
In other words, the set of good indices of an outcome consists of all parking spots i i i such that the car in spot i i i is numbered higher than every car parked to its left. Note that 1 is vacuously in the set of good indices for every permutation π \pi π , as there are no indices j < 1 j < 1 j < 1 . As an example, note that the set of good indices for π = 532618794 \pi= 532618794 π = 532618794 is I π = { 1 , 4 , 6 , 8 } I_\pi= \{1, 4, 6, 8\} I π = { 1 , 4 , 6 , 8 } . Then, we have the following result for Monopoly parking functions.
Theorem 1.3. Fix an outcome π = π 1 π 2 ⋯ π n \pi= \pi_1\pi_2 \cdots\pi_n π = π 1 π 2 ⋯ π n of length n n n and let I π I_\pi I π be the set of good indices of π \pi π . Then the number of preference lists α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1, a_2, \ldots, a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n whose Monopoly outcome is π \pi π is given by
∣ O M − 1 ( π ) ∣ = ∏ i ∈ I π π i . |\mathcal{O}^{-1}_{M}(\pi)| = \prod_{i \in I_\pi} \pi_i. ∣ O M − 1 ( π ) ∣ = i ∈ I π ∏ π i .
By Theorem 1.3, given that the set of good indices of π = 532618794 \pi= 532618794 π = 532618794 is I π = { 1 , 4 , 6 , 8 } I_\pi= \{1, 4, 6, 8\} I π = { 1 , 4 , 6 , 8 } , we have that the number of preference lists in [ n ] n [n]^n [ n ] n whose Monopoly outcome is π \pi π is given by π 1 ⋅ π 4 ⋅ π 6 ⋅ π 8 = 5 ⋅ 6 ⋅ 8 ⋅ 9 = 2160 \pi_1 \cdot\pi_4 \cdot\pi_6 \cdot\pi_8 = 5 \cdot6 \cdot8 \cdot9 = 2160 π 1 ⋅ π 4 ⋅ π 6 ⋅ π 8 = 5 ⋅ 6 ⋅ 8 ⋅ 9 = 2160 .
The key idea in the proof of Theorem 1.3 (see § 2 ) is that each car k k k contributes either 1 or k k k to the product. Consequently, the maximum possible product is n ! n! n ! , achieved by the outcome 12 ⋯ ( n − 1 ) n 12 \cdots(n - 1)n 12 ⋯ ( n − 1 ) n , while the minimum possible product is n n n , achieved by any outcome π = π 1 π 2 ⋯ π n \pi= \pi_1\pi_2 \cdots\pi_n π = π 1 π 2 ⋯ π n with π 1 = n \pi_1 = n π 1 = n .
Thus, we readily arrive at the following enumerative results:
Corollary 1.4. Let n ≥ 1 n \ge1 n ≥ 1 .
If π = 123 ⋯ ( n − 1 ) n \pi= 123 \cdots(n - 1)n π = 123 ⋯ ( n − 1 ) n is the identity permutation , then ∣ O M − 1 ( 123 ⋯ ( n − 1 ) n ) ∣ = n ! |\mathcal{O}^{-1}_{M}(123 \cdots(n - 1)n)| = n! ∣ O M − 1 ( 123 ⋯ ( n − 1 ) n ) ∣ = n ! .
If π = π 1 π 2 ⋯ π n \pi= \pi_1\pi_2 \cdots\pi_n π = π 1 π 2 ⋯ π n is any outcome such that π 1 = n \pi_1 = n π 1 = n , then ∣ O M − 1 ( π ) ∣ = n |\mathcal{O}^{-1}_{M}(\pi)| = n ∣ O M − 1 ( π ) ∣ = n . In particular, ∣ O M − 1 ( n ( n − 1 ) ⋯ 321 ) ∣ = n |\mathcal{O}^{-1}_{M}(n(n - 1) \cdots321)| = n ∣ O M − 1 ( n ( n − 1 ) ⋯ 321 ) ∣ = n .
Backgammon Parking Scheme
In the game of backgammon [5 ] , checkers are placed on a board. When a checker lands on a space occupied by exactly one of the opponent’s checkers, it sends the opponent’s checker off the board. On the opponent’s next turn, they get a chance to re-enter their checker onto the board.
Inspired by this feature of backgammon, we introduce the backgammon parking scheme :
Cars enter sequentially from car 1 to n n n , in that order.
Cars attempt to park in their preferred parking spot if available.
If a car’s preferred spot is occupied, then the car bumps the parked car out of its preferred parking spot. The bumped car returns to the start of the street and parks in the first available spot it encounters.
If the preference list α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1, a_2, \ldots, a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n allows all cars to park under the backgammon parking scheme, then α \alpha α is a backgammon parking function of length n n n . We denote the parking outcome of a preference list α \alpha α under the backgammon parking scheme by O B ( α ) = π 1 π 2 ⋯ π n \mathcal{O}_{B}(\alpha) = \pi_1\pi_2 \cdots\pi_n O B ( α ) = π 1 π 2 ⋯ π n , where π j = k \pi_j = k π j = k denotes that car k k k parks in the j j j -th spot. For succinctness, we refer to the outcome of a preference list α \alpha α using the backgammon parking scheme as the backgammon outcome of α \alpha α . For example, using the preference list α = ( 1 , 4 , 4 , 3 , 2 ) \alpha= (1, 4, 4, 3, 2) α = ( 1 , 4 , 4 , 3 , 2 ) of length 6, we illustrate the backgammon outcome of α \alpha α in Figure 3 . We let B P F n \mathrm{BPF}_n BPF n denote the set of backgammon parking functions of length n n n .
Figure 3. The parking outcome for the preference list ( 1 , 4 , 4 , 3 , 2 , 2 ) (1, 4, 4, 3, 2, 2) ( 1 , 4 , 4 , 3 , 2 , 2 ) under the backgammon parking scheme. Hence, O B ( ( 1 , 4 , 4 , 3 , 2 , 2 ) ) = 164325 \mathcal{O}_{B}((1, 4, 4, 3, 2, 2)) = 164325 O B (( 1 , 4 , 4 , 3 , 2 , 2 )) = 164325 .
Although similar, the definition of backgammon parking functions is different from that of Most Valuable Player (MVP) parking functions introduced by Harris, Kamau, Martínez Mori, and Tian [19 ] . Under the MVP parking scheme, when a car finds its preferred spot occupied, it bumps the current occupant out of that spot. The bumped car then seeks forward on the street for a new parking spot, and parking may fail if no spots are available past its original preference. If a preference list parks all of the cars under the MVP parking scheme, we say that it is an MVP parking function . In contrast, under the backgammon parking scheme, a bumped car returns to the start of the street and parks in the first available spot it encounters, which could be earlier than its preference.
The number of MVP parking functions of length n n n is ( n + 1 ) n − 1 (n+1)^{n-1} ( n + 1 ) n − 1 (see [19 Corollary 2.1] ), which is equal to the number of classical parking functions. Our first result for backgammon parking functions establishes that every preference list in [ n ] n [n]^n [ n ] n is a backgammon parking function of length n n n ; we prove this in § 3 .
Proposition 1.5. If n ∈ N n \in\mathbb{N} n ∈ N , then B P F n = [ n ] n \mathrm{BPF}_n = [n]^n BPF n = [ n ] n and ∣ B P F n ∣ = n n |\mathrm{BPF}_n| = n^n ∣ BPF n ∣ = n n .
As in the Monopoly case, we are interested in determining the preference lists with a fixed backgammon outcome. For π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , we denote this set by
O B − 1 ( π ) : = { α ∈ [ n ] n : O B ( α ) = π } \mathcal{O}_{B}^{-1}(\pi) := \{\alpha\in[n]^n : \mathcal{O}_{B}(\alpha) = \pi\} O B − 1 ( π ) := { α ∈ [ n ] n : O B ( α ) = π }
and as usual we let ∣ O B − 1 ( π ) ∣ |\mathcal{O}_{B}^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ denote the cardinality of the set.
For Monopoly parking functions, we were able to fully enumerate the preference lists resulting in a specified parking outcome. However, the backgammon parking scheme returning a previously parked car to the start of the street creates some challenges in addressing the analogous question. The complication arising from cars being bumped from their spot was also a major challenge in the MVP parking function problem, where the authors establish an upper bound for the number of preference lists that park the cars in a given order [19 Theorem 3.1] .
We prove that for any permutation π \pi π , the number of preference lists with backgammon outcome equal to π \pi π is at most C n = 1 n + 1 ( 2 n n ) C_n = \frac{1}{n+1}\binom{2n}{n} C n = n + 1 1 ( n 2 n ) , the n n n -th Catalan number, with corresponding OEIS sequence A000108 . Furthermore, we determine the outcomes for which this upper bound is an equality and for which it is a strict inequality.
Theorem 1.6. Fix n ∈ N n \in\mathbb{N} n ∈ N and let C n C_n C n denote the n n n -th Catalan number. For any π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , we have
∣ O B − 1 ( π ) ∣ ≤ C n . |\mathcal{O}_{B}^{-1}(\pi)| \leq C_n. ∣ O B − 1 ( π ) ∣ ≤ C n . Furthermore, ∣ O B − 1 ( π ) ∣ = C n |\mathcal{O}_{B}^{-1}(\pi)| = C_n ∣ O B − 1 ( π ) ∣ = C n whenever π = 12 ⋯ ( n ) \pi= 12\cdots(n) π = 12 ⋯ ( n ) , 12 ⋯ ( n − 2 ) ( n ) ( n − 1 ) 12\cdots(n-2)(n)(n-1) 12 ⋯ ( n − 2 ) ( n ) ( n − 1 ) , or 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) 12\cdots(n-3)(n)(n-2)(n-1) 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) . Otherwise, the inequality is strict.
We also establish that for any permutation π \pi π , there are at least 2 n − 1 2^{n-1} 2 n − 1 preference lists in [ n ] n [n]^n [ n ] n whose backgammon outcome is equal to π \pi π , thereby providing a lower bound for this count.
Theorem 1.7. For any π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , we have ∣ O B − 1 ( π ) ∣ ≥ 2 n − 1 |\mathcal{O}_{B}^{-1}(\pi)| \geq2^{n-1} ∣ O B − 1 ( π ) ∣ ≥ 2 n − 1 . For n ≥ 5 n \geq5 n ≥ 5 , this inequality is strict for all π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n .
We give proofs of Theorem 1.6 and Theorem 1.7 in § 3.1 .
As noted above, it is difficult to determine the number of backgammon parking functions with a fixed outcome in general, but for some special cases we establish connections to the Motzkin numbers, which enumerate Motzkin lattice paths (Definition 3.14 ). Here M n M_n M n denotes the n n n -th Motzkin number (see Equation (3) ) and { M n } n ≥ 1 \{M_n\}_{n\geq1} { M n } n ≥ 1 corresponds to OEIS sequence A001006 . In § 3.2 , we establish the following results.
Theorem 1.8. For n ≥ 1 n \ge1 n ≥ 1 , ∣ O B − 1 ( n ( n − 1 ) ⋯ 21 ) ∣ = M n \left|\mathcal{O}_B^{-1}(n(n-1)\cdots21)\right|=M_n O B − 1 ( n ( n − 1 ) ⋯ 21 ) = M n .
Corollary 1.9. For n ≥ 1 n \ge1 n ≥ 1 , ∣ O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ = M n + 1 − M n \left|\mathcal{O}_B^{-1}(1(n)(n-1)\cdots32)\right|=M_{n+1}-M_n O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) = M n + 1 − M n .
Corollary 1.10. For n ≥ 2 n \ge2 n ≥ 2 , ∣ O B − 1 ( 12 ( n ) ( n − 1 ) ⋯ 3 ) ∣ = M n + 2 − 2 M n + 1 + M n − M n − 1 \left|\mathcal{O}_B^{-1}(12(n)(n-1)\cdots3)\right|=M_{n+2}-2M_{n+1}+M_n-M_{n-1} O B − 1 ( 12 ( n ) ( n − 1 ) ⋯ 3 ) = M n + 2 − 2 M n + 1 + M n − M n − 1 .
Displacement
Recall that the displacement d i d_i d i of car i i i is the absolute value of the difference between the spot car i i i prefers and where it ultimately parks. For any parking scheme, we say a car is “lucky” if at the conclusion of parking, it ends up in the spot that it preferred. Otherwise, we say that the car is “unlucky.” Thus, the unlucky cars are precisely those with positive displacement.
Let X ∈ { C , M , B } X \in\{C,M,B\} X ∈ { C , M , B } be a parking scheme, where X = C X=C X = C denotes the classical parking scheme, X = M X=M X = M denotes the Monopoly parking scheme, and X = B X=B X = B denotes the backgammon parking scheme. Then we define:
Definition 1.11. For a preference list α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha=(a_1,a_2,\ldots,a_n)\in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n with outcome O X ( α ) = π 1 π 2 ⋯ π n \mathcal{O}_X(\alpha)=\pi_1\pi_2\cdots\pi_n O X ( α ) = π 1 π 2 ⋯ π n and k ≥ 0 k\ge0 k ≥ 0 unlucky cars, the displacement multiset D X ( α ) \mathcal{D}_X(\alpha) D X ( α ) is the multiset of the displacements d i d_i d i of each unlucky car i i i .
To highlight how Definition 1.11 depends on the parking scheme used, we present some examples. Given an outcome π = π 1 π 2 ⋯ π n ∈ S n \pi=\pi_1\pi_2\cdots\pi_n\in\mathcal{S}_n π = π 1 π 2 ⋯ π n ∈ S n , we define π − 1 = p 1 p 2 ⋯ p n \pi^{-1}=p_1p_2\cdots p_n π − 1 = p 1 p 2 ⋯ p n to be the permutation of [ n ] [n] [ n ] such that π p j = j \pi_{p_j}=j π p j = j for all j ∈ [ n ] j\in[n] j ∈ [ n ] ; that is, p j = k p_j=k p j = k denotes that car j j j parks in spot k k k .
Example 1.12. As illustrated in Figures 1 to 3, the preference list α = ( 1 , 4 , 4 , 3 , 2 , 2 ) \alpha=(1,4,4,3,2,2) α = ( 1 , 4 , 4 , 3 , 2 , 2 ) satisfies the following:
The (classical) outcome of α \alpha α is O C ( α ) = π = 154236 \mathcal{O}_C(\alpha)=\pi=154236 O C ( α ) = π = 154236 , so π − 1 = 145326 \pi^{-1}=145326 π − 1 = 145326 and the (classical) displacement multiset is D C ( α ) = { 1 , 4 } \mathcal{D}_C(\alpha)=\{1,4\} D C ( α ) = { 1 , 4 } .
The Monopoly outcome of α \alpha α is O M ( α ) = π = 134256 \mathcal{O}_M(\alpha)=\pi=134256 O M ( α ) = π = 134256 , so π − 1 = 142356 \pi^{-1}=142356 π − 1 = 142356 and the Monopoly displacement multiset is D M ( α ) = { 2 , 3 , 4 } \mathcal{D}_M(\alpha)=\{2,3,4\} D M ( α ) = { 2 , 3 , 4 } .
The backgammon outcome of α \alpha α is O B ( α ) = π = 164325 \mathcal{O}_B(\alpha)=\pi=164325 O B ( α ) = π = 164325 , so π − 1 = 154362 \pi^{-1}=154362 π − 1 = 154362 and the backgammon displacement multiset is D B ( α ) = { 1 , 4 } \mathcal{D}_B(\alpha)=\{1,4\} D B ( α ) = { 1 , 4 } .
Example 1.13. Similarly, for the preference list α = ( 1 , 3 , 3 , 1 ) \alpha=(1,3,3,1) α = ( 1 , 3 , 3 , 1 ) , we have:
The (classical) outcome of α \alpha α is O C ( α ) = π = 1423 \mathcal{O}_C(\alpha)=\pi=1423 O C ( α ) = π = 1423 , so π − 1 = 1342 \pi^{-1}=1342 π − 1 = 1342 and the (classical) displacement multiset is D C ( α ) = { 1 , 1 } \mathcal{D}_C(\alpha)=\{1,1\} D C ( α ) = { 1 , 1 } .
The Monopoly outcome of α \alpha α is O M ( α ) = π = 1324 \mathcal{O}_M(\alpha)=\pi=1324 O M ( α ) = π = 1324 , so π − 1 = π \pi^{-1}=\pi π − 1 = π and the Monopoly displacement multiset is D M ( α ) = { 1 , 3 } \mathcal{D}_M(\alpha)=\{1,3\} D M ( α ) = { 1 , 3 } .
The backgammon outcome of α \alpha α is O B ( α ) = π = 4231 \mathcal{O}_B(\alpha)=\pi=4231 O B ( α ) = π = 4231 , so π − 1 = π \pi^{-1}=\pi π − 1 = π and the backgammon displacement multiset is D B ( α ) = { 1 , 3 } \mathcal{D}_B(\alpha)=\{1,3\} D B ( α ) = { 1 , 3 } .
We define N X ( D X ) N_X(\mathcal{D}_X) N X ( D X ) to be the number of parking functions with displacement multiset D X \mathcal{D}_X D X using the parking scheme X ∈ { C , M , B } X\in\{C,M,B\} X ∈ { C , M , B } . For the Monopoly parking scheme , we prove the following result. We use H k H_k H k to denote the k k k -th Harmonic number ∑ j = 1 k 1 j \sum_{j=1}^{k}\frac{1}{j} ∑ j = 1 k j 1 .
Theorem 1.14. For x ∈ [ n − 1 ] x\in[n-1] x ∈ [ n − 1 ] , the number of Monopoly parking functions α ∈ M P F n \alpha\in\mathrm{MPF}_n α ∈ MPF n with displacement multiset D M ( α ) = { x } \mathcal{D}_M(\alpha)=\{x\} D M ( α ) = { x } is
N M ( { x } ) = H n − H x + H n − x + 1 − 1. N_M(\{x\})=H_n-H_x+H_{n-x+1}-1. N M ({ x }) = H n − H x + H n − x + 1 − 1.
For the backgammon parking scheme , we prove the following results.
Theorem 1.15. For x ∈ [ n − 1 ] x\in[n-1] x ∈ [ n − 1 ] , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x } \mathcal{D}_B(\alpha)=\{x\} D B ( α ) = { x } is
N B ( { x } ) = ( n − x ) n ! . N_B(\{x\})=(n-x)n!. N B ({ x }) = ( n − x ) n ! .
Theorem 1.16. For x 1 , x 2 ∈ [ n − 1 ] x_1,x_2 \in[n-1] x 1 , x 2 ∈ [ n − 1 ] with x 1 > x 2 x_1 > x_2 x 1 > x 2 , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x 1 , x 2 } \mathcal{D}_{\mathrm{B}}(\alpha)=\{x_1,x_2\} D B ( α ) = { x 1 , x 2 } is
N B ( { x 1 , x 2 } ) = { n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) when n ≥ x 1 + x 2 , n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + ( 3 x 1 x 2 + 4 x 1 ) ) otherwise. (1) N_{\mathrm{B}}(\{x_1,x_2\})=
\begin{cases}
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+8)n+(3x_1x_2+8x_1+4x_2)\right) & \text{when } n\ge x_1+x_2,\\
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+4)n+(3x_1x_2+4x_1)\right) & \text{otherwise.}
\end{cases} \tag*{(1)} N B ({ x 1 , x 2 }) = { 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + ( 3 x 1 x 2 + 4 x 1 ) ) when n ≥ x 1 + x 2 , otherwise. (1) For x 1 ∈ [ n − 1 ] x_1 \in[n-1] x 1 ∈ [ n − 1 ] , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x 1 , x 1 } \mathcal{D}_{\mathrm{B}}(\alpha)=\{x_1,x_1\} D B ( α ) = { x 1 , x 1 } is
N B ( { x 1 , x 1 } ) = { n ! 12 ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) when n ≥ 2 x 1 , n ! 4 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) otherwise. (2) N_{\mathrm{B}}(\{x_1,x_1\})=
\begin{cases}
\frac{n!}{12}\left(3n^2-(6x_1+7)n+(3x_1^2+11x_1)\right) & \text{when } n\ge2x_1,\\
\frac{n!}{4}\left(n^2-(2x_1+1)n+(x_1^2+x_1)\right) & \text{otherwise.}
\end{cases} \tag*{(2)} N B ({ x 1 , x 1 }) = { 12 n ! ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) 4 n ! ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) when n ≥ 2 x 1 , otherwise. (2)
We also prove the following result comparing the number of backgammon and Monopoly parking functions for the same displacement multiset of size 1.
Theorem 1.17. For x ∈ [ n − 1 ] x \in[n-1] x ∈ [ n − 1 ] , the number N M ( { x } ) N_{\mathrm{M}}(\{x\}) N M ({ x }) of Monopoly parking functions in M P F n \mathrm{MPF}_n MPF n with displacement multiset { x } \{x\} { x } is at most the number N B ( { x } ) N_{\mathrm{B}}(\{x\}) N B ({ x }) of backgammon parking functions in B P F n \mathrm{BPF}_n BPF n with the displacement multiset { x } \{x\} { x } . That is, we have,
N M ( { x } ) ≤ N B ( { x } ) . N_{\mathrm{M}}(\{x\}) \le N_{\mathrm{B}}(\{x\}). N M ({ x }) ≤ N B ({ x }) . Moreover, equality holds if and only if n = 2 n=2 n = 2 and x = 1 x=1 x = 1 .
Organization
In the sections that follow, we consider each of the newly introduced parking schemes and prove our major results. § 2 contains our results for counting the number of Monopoly parking functions with a specific outcome, and § 3 provides analogous results for backgammon parking functions. In § 4 , we give results on displacement multisets for both Monopoly and backgammon parking functions. We conclude with § 5 , where we detail some directions for future work.
Remark 1. Readers interested primarily in Monopoly parking functions may consult § 2 and § 4.1 , together with the comparison in § 4.3 . Readers interested primarily in backgammon parking functions may consult § 3 , § 4.2 , and § 4.3 . § 5 discusses open problems and connections with MVP parking functions.
Monopoly Parking Functions
We begin by giving a proof that every tuple in [ n ] n [n]^n [ n ] n is a Monopoly parking function.
Proposition 1.1. If n ∈ N n \in\mathbb{N} n ∈ N , then M P F n = [ n ] n \mathrm{MPF}_n=[n]^n MPF n = [ n ] n and ∣ M P F n ∣ = n n |\mathrm{MPF}_n|=n^n ∣ MPF n ∣ = n n .
Proof. The set containment M P F n ⊆ [ n ] n \mathrm{MPF}_n \subseteq[n]^n MPF n ⊆ [ n ] n holds by definition. Now consider an arbitrary tuple ( a 1 , a 2 , … , a n ) ∈ [ n ] n (a_1,a_2,\ldots,a_n)\in[n]^n ( a 1 , a 2 , … , a n ) ∈ [ n ] n . We claim that the tuple allows all cars to park using the Monopoly parking scheme. The first car always parks in its preferred spot. Suppose that at step i ∈ [ n ] i\in[n] i ∈ [ n ] , there are i − 1 i-1 i − 1 cars parked in i − 1 i-1 i − 1 spots, and there are n − i + 1 n-i+1 n − i + 1 open spots. Once car i i i enters, it either parks in its preferred spot or is forced to return to the start of the street and parks in the first available spot it encounters. Since n − i + 1 > 0 n-i+1>0 n − i + 1 > 0 , such a spot always exists. Thus, after n n n steps, all cars end up parked in the n n n spots.
Recall that for any outcome π \pi π , the set of good indices I π I_\pi I π is given by { i ∈ [ n ] : π j < π i for all j < i } \{i\in[n]:\pi_j<\pi_i\text{ for all }j<i\} { i ∈ [ n ] : π j < π i for all j < i } (see Definition 1.2 ). Thus, we prove Theorem 1.3.
Theorem 1.3. Fix an outcome π = π 1 π 2 ⋯ π n \pi=\pi_1\pi_2\cdots\pi_n π = π 1 π 2 ⋯ π n of length n n n and let I π I_\pi I π be the set of good indices of π \pi π . Then the number of preference lists α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha=(a_1,a_2,\ldots,a_n)\in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n whose Monopoly outcome is π \pi π is given by
∣ O M − 1 ( π ) ∣ = ∏ i ∈ I π π i . \left|\mathcal{O}_{\mathrm{M}}^{-1}(\pi)\right|=\prod_{i\in I_\pi}\pi_i. O M − 1 ( π ) = i ∈ I π ∏ π i .
Proof. We show that for each good index i ∈ I π i \in I_\pi i ∈ I π , car π i \pi_i π i contributes a factor of π i \pi_i π i to the count, while if i i i is not a good index, then car π i \pi_i π i contributes a factor of 1 to the count.
Suppose i i i is not a good index. Then there exists some j < i j < i j < i such that π j > π i \pi_j > \pi_i π j > π i . Since car π j \pi_j π j arrives after car π i \pi_i π i , when car π i \pi_i π i arrives, it finds at least one spot earlier than spot i i i that is vacant, namely spot j < i j < i j < i . Therefore, in order for car π i \pi_i π i to end up in spot i i i , it must have preferred spot i i i to begin with, thus contributing a factor of 1 to the count. On the other hand, if i i i is a good index, then π j < π i \pi_j < \pi_i π j < π i for every j < i j < i j < i , which means that all cars that eventually occupy spots 1 , … , i − 1 1, \ldots, i - 1 1 , … , i − 1 arrive before car π i \pi_i π i . Hence, when car π i \pi_i π i arrives, every spot before i i i is already occupied and spot i i i is available. Therefore, car π i \pi_i π i will park in spot i i i whenever its preferred spot is either i i i itself or any of the π i − 1 \pi_i - 1 π i − 1 previously occupied spots. Thus, car π i \pi_i π i contributes a factor of π i \pi_i π i , and the total count is given by the product
∏ i ∈ I π π i \prod_{i \in I_\pi} \pi_i i ∈ I π ∏ π i
where I π = { i ∈ [ n ] : π j < π i for all j < i } I_\pi= \{i \in[n] : \pi_j < \pi_i \text{ for all } j < i\} I π = { i ∈ [ n ] : π j < π i for all j < i } is the set of good indices of π \pi π (Definition 1.2). This proves the claim. □
Backgammon Parking Functions
We begin by giving a proof of Proposition 1.5.
Proposition 1.5. If n ∈ N n \in\mathbb{N} n ∈ N , then BPF n = [ n ] n \operatorname{BPF}_n = [n]^n BPF n = [ n ] n and ∣ BPF n ∣ = n n |\operatorname{BPF}_n| = n^n ∣ BPF n ∣ = n n .
Proof. The first car always parks in its preferred spot. Suppose that at step i ∈ [ n ] i \in[n] i ∈ [ n ] , there are i − 1 i - 1 i − 1 cars parked in i − 1 i - 1 i − 1 spots, and there are n − i + 1 n - i + 1 n − i + 1 open spots. Once car i i i enters, it either finds its preferred spot unoccupied (and parks) or bumps a previously parked car j < i j < i j < i out of car j j j ’s current spot. In the second case, since car i i i has taken up an already occupied spot, there are still n − i + 1 > 0 n - i + 1 > 0 n − i + 1 > 0 open spots, all of which are available for car j j j to take. As car j j j re-enters the street at the beginning, it is guaranteed to find an empty spot in which to park. Thus, after n n n steps, all cars will be parked in the n n n spots. □
Bounds for the Number of Backgammon Parking Functions with a Fixed Outcome
Similar to Theorem 1.3 for Monopoly parking functions, we wish to answer the following question: given an outcome π = π 1 π 2 ⋯ π n ∈ S n \pi= \pi_1\pi_2 \cdots\pi_n \in\mathfrak{S}_n π = π 1 π 2 ⋯ π n ∈ S n , how many preference lists α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n \alpha= (a_1, a_2, \ldots, a_n) \in[n]^n α = ( a 1 , a 2 , … , a n ) ∈ [ n ] n allow cars to park in this configuration using the backgammon parking scheme? Theorem 1.6 gives an upper bound for this count. Before restating this result, we recall some background on Dyck paths.
Definition 3.1. A Dyck path of semilength n n n (or length 2 n 2n 2 n ) is a lattice path from ( 0 , 0 ) (0,0) ( 0 , 0 ) to ( n , n ) (n,n) ( n , n ) that lies on or above the main diagonal y = x y = x y = x and consists of East steps (denoted by E) and North steps (denoted by N). We let D n D_n D n denote the set of Dyck paths of semilength n n n .
In Figure 4 , we illustrate the five Dyck paths of semilength 3. We recall that Dyck paths of semilength n n n are Catalan objects and, as such, ∣ D n ∣ = C n = 1 n + 1 ( 2 n n ) |D_n| = C_n = \frac{1}{n+1}\binom{2n}{n} ∣ D n ∣ = C n = n + 1 1 ( n 2 n ) , where C n C_n C n denotes the n n n -th Catalan number. For more on Catalan objects, we recommend Stanley’s book on Catalan numbers [29 ] . Moreover, we recall that there is a bijection between parking functions and Dyck paths with north steps labeled by the set [ n ] [n] [ n ] in such a way that consecutive north steps are labeled in increasing order. This bijection is described in [25 Theorem 6] .
Figure 4. Illustration of the five distinct Dyck paths of semilength 3.
Another classical set of combinatorial objects enumerated by the Catalan numbers is the possible arrangements of n n n pairs of parentheses that are valid. A bijection between valid placements of n n n pairs of parentheses and a Dyck path of semilength n n n is given by replacing every N with “(” and E with “)”. For example, the Dyck path of semilength 3 given by NENNEE corresponds to the valid parentheses ()(()). Henceforth, we use the term “Dyck path” to refer to both the lattice path and its corresponding valid parenthesization.
Definition 3.2. For each preference list α \alpha α for n n n cars, we associate to it a set partition of [ n ] [n] [ n ] known as the content partition of α \alpha α and denoted by S ( α ) \mathcal{S}(\alpha) S ( α ) , where the blocks of S ( α ) \mathcal{S}(\alpha) S ( α ) correspond to maximal subsets of cars that share the same preference.
Example 3.3. If α = ( 1 , 2 , 2 , 4 , 4 , 3 ) \alpha=(1,2,2,4,4,3) α = ( 1 , 2 , 2 , 4 , 4 , 3 ) , then S ( α ) = { { 1 } , { 2 , 3 } , { 4 , 5 } , { 6 } } \mathcal{S}(\alpha)=\{\{1\},\{2,3\},\{4,5\},\{6\}\} S ( α ) = {{ 1 } , { 2 , 3 } , { 4 , 5 } , { 6 }} .
Lemma 3.4. Given a set partition S S S of [ n ] [n] [ n ] and a permutation π \pi π of [ n ] [n] [ n ] , there is at most one α ∈ [ n ] n \alpha\in[n]^n α ∈ [ n ] n such that S = S ( α ) S=\mathcal{S}(\alpha) S = S ( α ) , and π = O B ( α ) \pi=\mathcal{O}_B(\alpha) π = O B ( α ) .
Proof. If no such preference list exists, we are done, so assume at least one exists and call it α \alpha α . Recall that O B ( α ) = π 1 π 2 ⋯ π n \mathcal{O}_B(\alpha)=\pi_1\pi_2\cdots\pi_n O B ( α ) = π 1 π 2 ⋯ π n , where π x = y \pi_x=y π x = y means that car y y y parked in spot x x x . Let J J J be a block of S ( α ) \mathcal{S}(\alpha) S ( α ) , and let k = max ( J ) k=\max(J) k = max ( J ) be the highest index in J J J . Then, car k k k parks in its preferred position, and every car indexed by a number in J J J shares its preference. Since car k k k parks in spot π − 1 ( k ) \pi^{-1}(k) π − 1 ( k ) , this common preference is π − 1 ( k ) \pi^{-1}(k) π − 1 ( k ) . As the block J J J was arbitrary, we have that for each block J ′ ∈ S ( α ) J'\in\mathcal{S}(\alpha) J ′ ∈ S ( α ) , all cars indexed by elements in block J ′ J' J ′ share the preference π − 1 ( max ( J ′ ) ) \pi^{-1}(\max(J')) π − 1 ( max ( J ′ )) . Thus, α \alpha α is completely determined by S ( α ) = S \mathcal{S}(\alpha)=S S ( α ) = S and O B ( α ) = π \mathcal{O}_B(\alpha)=\pi O B ( α ) = π , which finishes the proof. □
Example 3.5. Consider S = { { 1 } , { 2 , 3 } , { 4 , 5 } , { 6 } } S=\{\{1\},\{2,3\},\{4,5\},\{6\}\} S = {{ 1 } , { 2 , 3 } , { 4 , 5 } , { 6 }} and π = 654213 \pi=654213 π = 654213 . Using Lemma 3.4, we can uniquely find α \alpha α such that S ( α ) = S \mathcal{S}(\alpha)=S S ( α ) = S and O B ( α ) = π \mathcal{O}_B(\alpha)=\pi O B ( α ) = π , as follows: Since car 1 parked in spot 5 and it is the largest-numbered car in its own block, car 1 has to have preferred spot 5. Since car 3 parks in spot 6, and it is the largest-numbered car in its block, all cars in the same block (i.e., cars 2 and 3) have to prefer spot 6. Since car 5 parks in spot 2, and it is the largest-numbered car in its block, all cars in the same block (i.e., cars 4 and 5) have to prefer spot 2. Since car 6 parks in spot 1, and it is the largest-numbered car in its block, it has to prefer spot 1. This then establishes that the only possible α \alpha α is α = ( 5 , 6 , 6 , 2 , 2 , 1 ) \alpha=(5,6,6,2,2,1) α = ( 5 , 6 , 6 , 2 , 2 , 1 ) . Indeed, we can check that this α \alpha α parks the cars in the order π = 654213 \pi=654213 π = 654213 .
Example 3.6. Consider S = { { 1 } , { 2 , 3 } , { 4 , 5 } , { 6 } } S=\{\{1\},\{2,3\},\{4,5\},\{6\}\} S = {{ 1 } , { 2 , 3 } , { 4 , 5 } , { 6 }} and π = 652413 \pi=652413 π = 652413 . The cars corresponding to the highest index in each block, namely cars 1, 3, 5, 6, must prefer the spots they park in. Car 2 has the same preference as car 3 and car 4 has the same preference as car 5, so the only potential preference list is again α = ( 5 , 6 , 6 , 2 , 2 , 1 ) \alpha=(5,6,6,2,2,1) α = ( 5 , 6 , 6 , 2 , 2 , 1 ) . However, this yields the outcome 654213 654213 654213 , which is not π = 652413 \pi=652413 π = 652413 . Consequently, there is no preference list α \alpha α such that S ( α ) = S \mathcal{S}(\alpha)=S S ( α ) = S and O B ( α ) = π \mathcal{O}_B(\alpha)=\pi O B ( α ) = π .
Theorem 1.6. Fix n ∈ N n\in\mathbb{N} n ∈ N and let C n C_n C n denote the n n n -th Catalan number. For any π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , we have
∣ O B − 1 ( π ) ∣ ≤ C n . \left|\mathcal{O}_B^{-1}(\pi)\right|\le C_n. O B − 1 ( π ) ≤ C n . Furthermore, ∣ O B − 1 ( π ) ∣ = C n \left|\mathcal{O}_B^{-1}(\pi)\right|=C_n O B − 1 ( π ) = C n whenever π = 12 ⋯ ( n ) , 12 ⋯ ( n − 2 ) ( n ) ( n − 1 ) \pi=12\cdots(n),12\cdots(n-2)(n)(n-1) π = 12 ⋯ ( n ) , 12 ⋯ ( n − 2 ) ( n ) ( n − 1 ) , or 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) 12\cdots(n-3)(n)(n-2)(n-1) 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) . Otherwise, the inequality is strict.
For clarity, we separate the proof of Theorem 1.6 into a few technical results: Proposition 3.7, Proposition 3.11, and Proposition 3.13.
Proposition 3.7. For any π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , ∣ O B − 1 ( π ) ∣ ≤ C n \left|\mathcal{O}_B^{-1}(\pi)\right|\le C_n O B − 1 ( π ) ≤ C n .
Before presenting the proof of this result, we introduce the notion of a partial parking outcome.
Definition 3.8. Let α \alpha α be a backgammon parking function with outcome O B ( α ) = π \mathcal{O}_B(\alpha)=\pi O B ( α ) = π . Fix t ∈ [ 0 , n ] t\in[0,n] t ∈ [ 0 , n ] . After t t t cars have parked on the street with preference list α \alpha α , we denote by O B , t ( α ) = π 1 π 2 ⋯ π n \mathcal{O}_{B,t}(\alpha)=\pi_1\pi_2\cdots\pi_n O B , t ( α ) = π 1 π 2 ⋯ π n the *partial backgammon outcome after step t t t , where
π i = { 0 if there is no car parked in spot i , j if car j is parked in spot i . \pi_i=
\begin{cases}
0 & \text{if there is no car parked in spot }i,\\
j & \text{if car }j\text{ is parked in spot }i.
\end{cases} π i = { 0 j if there is no car parked in spot i , if car j is parked in spot i .
Note that for every t ∈ [ 0 , n ] t \in[0,n] t ∈ [ 0 , n ] , O B , t ( α ) \mathcal{O}_{B,t}(\alpha) O B , t ( α ) is a permutation of the multiset { 0 , … , 0 , 1 , 2 , … , t } \{0,\ldots,0,1,2,\ldots,t\} { 0 , … , 0 , 1 , 2 , … , t } , where 0 0 0 appears n − t n-t n − t times.
In particular, O B , n ( α ) = O B ( α ) = π \mathcal{O}_{B,n}(\alpha)=\mathcal{O}_{B}(\alpha)=\pi O B , n ( α ) = O B ( α ) = π and O B , 0 ( α ) = 0 ⋯ 0 ⏟ n \mathcal{O}_{B,0}(\alpha)=\underbrace{0\cdots0}_{n} O B , 0 ( α ) = n 0 ⋯ 0 . For the example in Figure 3 , the partial backgammon outcome of α = ( 1 , 4 , 4 , 3 , 2 , 2 ) \alpha=(1,4,4,3,2,2) α = ( 1 , 4 , 4 , 3 , 2 , 2 ) after step 4 is 124300.
Remark 2. Note that we can analogously define a partial parking outcome O M , t ( α ) \mathcal{O}_{M,t}(\alpha) O M , t ( α ) for the Monopoly parking scheme, though we will refer to this definition only in § 5 .
Inspired by the discussion in [27 ] , we introduce the notion of a Dyck path P S P_S P S associated to a set partition S S S of [ n ] [n] [ n ] , which we call the pathification of S S S .
Definition 3.9. Any set partition S S S of [ n ] [n] [ n ] can be mapped to a Dyck path P S P_S P S of semilength n n n in the following manner:
If { i } \{i\} { i } is a block of S S S , then the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path are ().
If i i i is in a block of S S S of size greater than one and
if i i i is the smallest element in its block, then the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path are ((,
if i i i is the largest element in its block, then the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path are )),
if i i i is neither the smallest nor largest element in its block, then the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path are )(.
Note that each block contributes an equal number of ( and ). It is easy to verify that the output of this map is always a Dyck path. However, this map is not a bijection in general.
For examples of the map, consider S = { { 1 , 2 } , { 3 } } S=\{\{1,2\},\{3\}\} S = {{ 1 , 2 } , { 3 }} and S ′ = { { 1 , 3 , 6 } , { 2 , 5 } , { 4 } } S'=\{\{1,3,6\},\{2,5\},\{4\}\} S ′ = {{ 1 , 3 , 6 } , { 2 , 5 } , { 4 }} . Then P S = ( ( ) ) ( ) P_S=(() )() P S = (( )) ( ) and P S ′ = ( ( ( ( ) ( ( ) ) ) ) ) P_{S'}=(((()(())))) P S ′ = (((( ) (( ))))) .
We now state the following lemma.
Lemma 3.10. For every pair of a permutation π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n and a Dyck path P P P of semilength n n n (i.e., length 2 n 2n 2 n ), there is at most one preference list α \alpha α with outcome π \pi π whose content partition S ( α ) \mathcal{S}(\alpha) S ( α ) maps to P P P under the pathification map (see Definition 3.9 ).
Proof. By Lemma 3.4 , at most one preference list α \alpha α with a given content partition can result in a particular outcome π \pi π . Therefore, it suffices to show that for every pair ( π , P ) (\pi,P) ( π , P ) , with π \pi π a permutation and P P P a Dyck path, there is at most one set partition S S S mapping to P P P , such that S = S ( α ) S=\mathcal{S}(\alpha) S = S ( α ) for some α \alpha α with O B ( α ) = π \mathcal{O}_{B}(\alpha)=\pi O B ( α ) = π .
To this end, fix a permutation π \pi π and fix a Dyck path P P P . If i i i corresponds to )), that is, the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path P P P are )), then i i i must be the last element of a block of S S S , while if the ( 2 i − 1 ) (2i-1) ( 2 i − 1 ) -th and ( 2 i ) (2i) ( 2 i ) -th steps of the Dyck path are (), then { i } \{i\} { i } must be a block of size 1. At this point, each block has had a representative chosen, so no new blocks will be added. We now proceed by repeatedly working backward from n n n until every element has been assigned to a block. At each step, we consider the highest element, j j j , of [ n ] [n] [ n ] which is not yet assigned to a block, so in particular, proceeding analogously to the proof of Lemma 3.4 , we uniquely know the preferences of the cars numbered higher than j j j . Next, we show that there is always at most one choice for which block to assign j j j to, regardless of whether the ( 2 j − 1 ) (2j-1) ( 2 j − 1 ) -th and ( 2 j ) (2j) ( 2 j ) -th steps of P P P are (( or )(), i.e., whether j j j is the minimal element of the block it is contained in or whether j j j is some element that is neither the minimum nor maximum of the block it is contained in.
Suppose, for the sake of contradiction, that there exist two valid choices for which block of S S S contains j j j . That is, suppose that there are two possible extensions of the set partition corresponding to the pair ( π , P ) (\pi,P) ( π , P ) that have j j j in different blocks. By Lemma 3.4 , the content partition of α \alpha α along with π \pi π uniquely determines α \alpha α . In particular, as presented in the proof of the lemma, if J J J is the block of S S S containing j j j , then car j j j 's preference is π − 1 ( k ) \pi^{-1}(k) π − 1 ( k ) , where k k k is the highest index in J J J . Thus, for there to be two possible extensions placing j j j in different blocks, there must be two distinct possible preferences for car j j j , which we refer to as spots A A A and B B B . We aim to show that since A ≠ B A \ne B A = B , the final parking spot of car j j j will be distinct in each of these scenarios. Ultimately, at most one of these scenarios corresponds to the outcome π \pi π .
For the sake of readability, we summarize here the objects that will be used in the arguments that follow:
A A A and B B B : the two distinct possible preferred spots for car j j j .
G m G_m G m : the set of distinct preferred spots among the first m m m cars.
g m : = ∣ G m ∣ g_m := |G_m| g m := ∣ G m ∣ : the number of distinct preferred spots among the first m m m cars.
h m : = m − g m h_m := m - g_m h m := m − g m : in the partial parking outcome after step m m m , this is the number of cars parked in thus-far undesired spots.
f ( m ) f(m) f ( m ) : the h m h_m h m -th lowest-numbered spot in [ n ] ∖ G m [n] \setminus G_m [ n ] ∖ G m .
Since neither A A A nor B B B could a priori be ruled out as car j j j ’s preferred spot, there must already be a car indexed by an element a > j a > j a > j of [ n ] [n] [ n ] corresponding to )) whose preference is known to be spot A A A , and a car indexed by an element b > j b > j b > j of [ n ] [n] [ n ] corresponding to )) whose preference is spot B B B . Furthermore, there is no car indexed by an element of [ n ] [n] [ n ] greater than j j j and corresponding to (( whose preference is spot A A A or spot B B B .
Regardless of whether car j j j ’s true preference is spot A A A or spot B B B (or something else), we know that in the partial parking outcome (see Definition 3.8) after step j j j , both spots A A A and B B B are occupied. Namely, in the case that car j j j does not prefer spot A A A (respectively, spot B B B ), there exists an ℓ ∈ [ j − 1 ] \ell\in[j-1] ℓ ∈ [ j − 1 ] corresponding to (( so that car ℓ \ell ℓ prefers spot A A A (respectively, spot B B B ). Regardless of the preferences for the cars in [ j − 1 ] [j-1] [ j − 1 ] , the following holds: If car j j j initially parks in spot A A A , it will never occupy spot B B B even after bumping, as that spot is already occupied. Similarly, if it initially parks in spot B B B , it will never occupy spot A A A .
We consider the scenarios where car j j j prefers either spot A A A or spot B B B and compare how car j j j is affected by the parking of subsequent cars. In particular, we will show that after any possible sequence of bumps corresponding to the preferences of the cars with indices greater than j j j , there is no partial parking outcome where car j j j is parked in the same spot if it originally preferred spot A A A vs. spot B B B . Thus, at most one of these scenarios corresponds to our desired outcome π \pi π .
For m > j m > j m > j , recall G m G_m G m is the set of distinct preferred spots among the first m m m cars and g m = ∣ G m ∣ g_m = |G_m| g m = ∣ G m ∣ . Note that G m G_m G m and consequently g m g_m g m do not depend on car j j j ’s original preference, nor on any of the thus-far undetermined preferences of lower-indexed cars. In particular, as we already know the preferences of every car with an index corresponding to )) or (), we know the entire set of spots preferred by at least one car. As we also know the preferences of every car with an index greater than j j j , and hence of every car with an index greater than m m m , we also know which spots are desired by a car with an index greater than m m m corresponding to (( or () and thus by no car of lower index. If car m m m performs a bump, we know that there is a repeated preference among the first m m m cars so g m < m g_m < m g m < m and the bumped car is bumped into the ( m − g m ) (m-g_m) ( m − g m ) -th lowest-numbered spot in [ n ] ∖ G m [n] \setminus G_m [ n ] ∖ G m . Recall that h m : = m − g m h_m := m-g_m h m := m − g m and f ( m ) f(m) f ( m ) is the h m h_m h m -th lowest-numbered spot in [ n ] ∖ G m [n] \setminus G_m [ n ] ∖ G m , so any car bumped by car m m m is bumped into spot f ( m ) f(m) f ( m ) .
Suppose that the first time car j j j occupies the same spot in both scenarios is after car p ′ p' p ′ parks and suppose without loss of generality that car p ′ p' p ′ bumped car j j j in the scenario where car j j j preferred spot B B B . Let p < p ′ p < p' p < p ′ be the index of the car that performed the most recent bump of car j j j in the scenario where car j j j preferred spot A A A . Any car bumped by car p p p is bumped to spot f ( p ) f(p) f ( p ) while any car bumped by car p ′ p' p ′ is bumped to spot f ( p ′ ) f(p') f ( p ′ ) so f ( p ) = f ( p ′ ) f(p) = f(p') f ( p ) = f ( p ′ ) .
Thus, the h p h_p h p -th lowest-numbered spot among those not desired by any of the first p p p cars, (i.e., in [ n ] ∖ G p [n] \setminus G_p [ n ] ∖ G p ), is the same as the h p ′ h_{p'} h p ′ -th lowest-numbered spot among those not desired by any of the first p ′ p' p ′ cars. Note that for a given t t t and k 1 < k 2 k_1 < k_2 k 1 < k 2 , the t t t -th lowest-numbered spot in [ n ] ∖ G k 2 [n] \setminus G_{k_2} [ n ] ∖ G k 2 , if such a spot exists, has an index at least as large as the t t t -th lowest-numbered spot in [ n ] ∖ G k 1 [n] \setminus G_{k_1} [ n ] ∖ G k 1 . By considering t = h p t = h_{p} t = h p , k 1 = p k_1 = p k 1 = p , k 2 = p ′ k_2 = p' k 2 = p ′ , we conclude that h p ′ ≤ h p h_{p'} \le h_p h p ′ ≤ h p .
Furthermore, since h i h_i h i is nondecreasing, we have in general that f ( i ) f(i) f ( i ) is nondecreasing, a fact we use shortly. Also, since p ′ > p p' > p p ′ > p , we have g p ′ − g p ≤ p ′ − p g_{p'} - g_p \le p' - p g p ′ − g p ≤ p ′ − p , with equality only obtained if cars p + 1 , … , p ′ p+1,\ldots,p' p + 1 , … , p ′ all park in previously undesired spots. This rearranges to p − g p ≤ p ′ − g p ′ p-g_p \le p'-g_{p'} p − g p ≤ p ′ − g p ′ or equivalently h p ≤ h p ′ h_p \le h_{p'} h p ≤ h p ′ . Thus h p = h p ′ h_p = h_{p'} h p = h p ′ , meaning that cars p + 1 , … , p ′ p+1,\ldots,p' p + 1 , … , p ′ all park in previously undesired spots, and in particular, none of them prefers a spot desired by any of the first p p p cars. However, in either scenario, note that the first car to bump car j j j has the same preference as car j j j . Since j < p j < p j < p , it means the preference of the first car to bump car j j j is among the preferences of the first p p p cars, so in the scenario where car j j j preferred spot B B B , car p ′ p' p ′ cannot be the first car to bump car j j j .
Suppose car q < p ′ q < p' q < p ′ is the car that most recently bumped car j j j before car p ′ p' p ′ did, in the scenario where car j j j preferred spot B B B . In particular, car q q q bumps car j j j to spot f ( q ) f(q) f ( q ) . Thus, car p ′ p' p ′ ’s preferred spot is f ( q ) f(q) f ( q ) . As every car from car p + 1 p+1 p + 1 through car p ′ p' p ′ parked in a spot undesired by the first p p p cars, it means none of the first p p p cars preferred spot f ( q ) f(q) f ( q ) .
Let l l l denote the common value h p ′ = h p h_{p'} = h_p h p ′ = h p . Thus, f ( p ) f(p) f ( p ) is the l l l -th lowest-numbered spot in [ n ] ∖ G p [n]\setminus G_p [ n ] ∖ G p and f ( p ′ ) f(p') f ( p ′ ) is the l l l -th lowest-numbered spot in [ n ] ∖ G p ′ [n]\setminus G_{p'} [ n ] ∖ G p ′ . As these are equivalent, none of the l l l lowest-numbered spots in [ n ] ∖ G p [n]\setminus G_p [ n ] ∖ G p are desired by any of the cars p + 1 , … , p ′ p+1,\ldots,p' p + 1 , … , p ′ . As f ( q ) f(q) f ( q ) is desired by one of the cars p + 1 , … , p ′ p+1,\ldots,p' p + 1 , … , p ′ , namely car p ′ p' p ′ , it means f ( q ) f(q) f ( q ) is not among the l l l lowest-numbered spots in [ n ] ∖ G p [n]\setminus G_p [ n ] ∖ G p . However, f ( q ) f(q) f ( q ) is undesired by the first p p p cars so there are at least l l l lower-numbered spots also undesired by the first p p p cars. In particular, spot f ( p ) f(p) f ( p ) is the l l l -th lowest-numbered spot undesired by the first p p p cars, so f ( q ) > f ( p ) = f ( p ′ ) f(q)>f(p)=f(p') f ( q ) > f ( p ) = f ( p ′ ) . Because f f f is nondecreasing, this implies q > p ′ q>p' q > p ′ , a contradiction. Thus, for every pair ( π , P ) (\pi,P) ( π , P ) , with π \pi π a permutation and P P P a Dyck path, there is at most one set partition S S S mapping to P P P , such that S = S ( α ) S=\mathcal{S}(\alpha) S = S ( α ) for some α \alpha α with O B ( α ) = π \mathcal{O}_B(\alpha)=\pi O B ( α ) = π .
We are now ready to establish the proof of Proposition 3.7.
Proof of Proposition 3.7. Consider the map from O B − 1 ( π ) \mathcal{O}_B^{-1}(\pi) O B − 1 ( π ) to the set of Dyck paths of semilength n n n defined by sending α ∈ O B − 1 ( π ) \alpha\in\mathcal{O}_B^{-1}(\pi) α ∈ O B − 1 ( π ) to the pathification of S ( α ) S(\alpha) S ( α ) (see Definition 3.9). By Lemma 3.10, this map is injective. Thus ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ is bounded above by the number of Dyck paths of semilength n n n , which is C n C_n C n .
Next we consider the case where the inequality in Proposition 3.7 is strict.
Proposition 3.11. Let L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) } ⊆ S n L=\{12\cdots(n-1)n,\ 12\cdots(n-2)n(n-1),\ 12\cdots(n-3)n(n-2)(n-1)\}\subseteq\mathfrak{S}_n L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 )} ⊆ S n . Then for all π ∈ S n ∖ L \pi\in\mathfrak{S}_n\setminus L π ∈ S n ∖ L , we have:
∣ O B − 1 ( π ) ∣ < C n . \left|\mathcal{O}_B^{-1}(\pi)\right|<C_n. O B − 1 ( π ) < C n .
Proof. For a given permutation π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n and a Dyck path P P P of semilength n n n , we established in Lemma 3.10 that there is at most one preference list α \alpha α with outcome π \pi π whose content partition S ( α ) \mathcal{S}(\alpha) S ( α ) has pathification P P P . We show that for all π ∈ S n ∖ L \pi\in\mathfrak{S}_n\setminus L π ∈ S n ∖ L , there is at least one Dyck path where there is no such preference list. To this end, consider the following Dyck paths, where a “pairing” refers to steps 2 i − 1 2i-1 2 i − 1 and steps 2 i 2i 2 i for 1 ≤ i ≤ n 1\le i\le n 1 ≤ i ≤ n :
Q = ( ( ( ) ) ( ⋯ ) ( ) ) Q=((())(\cdots)()) Q = ((( )) ( ⋯ ) ( )) , i.e., the Dyck path that contains just one pairing ((\ at the beginning, just one pairing ) ) )) )) at the end, and no ( ) () ( ) pairing,
R = ( ( ( ) ) ( ⋯ ) ( ) ) ) R=((())(\cdots)())) R = ((( )) ( ⋯ ) ( ))) , i.e., the Dyck path that contains just one pairing ((\ , one pairing ) ) )) )) , and one pairing ( ) () ( ) , where ((\ appears at the beginning, and the pairings ) ) )) )) and ( ) () ( ) appear in this order at the end.
We will show that for every preference list α \alpha α corresponding to Q Q Q , O ( α ) \mathcal{O}(\alpha) O ( α ) must be of the form 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) 12\cdots(r-1)n(r)(r+1)\cdots(n-1) 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) for some r ∈ [ n ] r\in[n] r ∈ [ n ] . This shows that for π \pi π not of this form, the path Q Q Q suffices.
For the remaining π \pi π , we will show that if π = O ( α ) \pi=\mathcal{O}(\alpha) π = O ( α ) for some α \alpha α whose content partition corresponds to R R R , then O ( α ) = 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) \mathcal{O}(\alpha)=12\cdots(r-1)n(r)(r+1)\cdots(n-1) O ( α ) = 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) must have r ≥ n − 2 r\ge n-2 r ≥ n − 2 , thus narrowing our choice of π \pi π down to L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) } L=\{12\cdots(n-1)n,\ 12\cdots(n-2)n(n-1),\ 12\cdots(n-3)n(n-2)(n-1)\} L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 )} .
Consider the Dyck path Q = ( ( ( ) ) ( ⋯ ) ( ) ) Q=((())(\cdots)()) Q = ((( )) ( ⋯ ) ( )) . Then, Q = P S Q=P_S Q = P S if and only if S = { [ n ] } S=\{[n]\} S = {[ n ]} , the trivial set partition. If the content partition of some preference list corresponds to this Dyck path, it is a preference list where every car has the same preference. If every car prefers spot r r r , the resulting permutation has car n n n in spot r r r and the other cars in increasing order. Thus, only permutations of the form 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) 12\cdots(r-1)n(r)(r+1)\cdots(n-1) 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) for some r ∈ [ n ] r\in[n] r ∈ [ n ] could possibly have a preference list whose content partition corresponds to Q Q Q . This implies that there are strictly fewer than C n C_n C n preference lists resulting in any other outcome.
Next, consider the Dyck path R = ( ( ) ( ) ( ⋯ ) ( ) ) ( ) R=(()()(\cdots)())() R = (( ) ( ) ( ⋯ ) ( )) ( ) . Then, R = P S R=P_S R = P S if and only if S S S is the set partition { { 1 , 2 , … , n − 1 } , { n } } \{\{1,2,\ldots,n-1\},\{n\}\} {{ 1 , 2 , … , n − 1 } , { n }} . If a preference list has this content partition and has outcome 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) 12\cdots(r-1)n(r)(r+1)\cdots(n-1) 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) , then car n n n prefers spot r r r and no other car prefers spot r r r . Hence, car n n n must not have bumped car n − 1 n-1 n − 1 , as they do not share a preference.
Thus, car n − 1 n-1 n − 1 must have preferred the spot it ends up parked in which is spot n n n when r ≤ n − 1 r\le n-1 r ≤ n − 1 . Consequently, for r ≤ n − 1 r\le n-1 r ≤ n − 1 , every car but car n n n prefers spot n n n . However, if r ≤ n − 2 r\le n-2 r ≤ n − 2 , this means that in the partial parking outcome after step n − 1 n-1 n − 1 , car r r r is in spot r r r and spot n − 1 n-1 n − 1 is empty. Thus, when car n n n parks, car r r r is bumped to spot n − 1 n-1 n − 1 . For this to actually result in the outcome 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) 12\cdots(r-1)n(r)(r+1)\cdots(n-1) 12 ⋯ ( r − 1 ) n ( r ) ( r + 1 ) ⋯ ( n − 1 ) , we must have r = n − 2 r=n-2 r = n − 2 . Thus, aside from possibly the permutations 12 ⋯ n 12\cdots n 12 ⋯ n , 12 ⋯ ( n − 2 ) n ( n − 1 ) 12\cdots(n-2)n(n-1) 12 ⋯ ( n − 2 ) n ( n − 1 ) , and 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) 12\cdots(n-3)n(n-2)(n-1) 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) , there are no others where two preference lists resulting in that outcome have content partitions corresponding to Q = ( ( ) ( ) ( ⋯ ) ( ) ) Q=(()()(\cdots)()) Q = (( ) ( ) ( ⋯ ) ( )) and R = ( ( ) ( ) ( ⋯ ) ( ) ) ( ) R=(()()(\cdots)())() R = (( ) ( ) ( ⋯ ) ( )) ( ) . Thus, every permutation outside L L L is obtained as an outcome by strictly fewer than C n C_n C n preference lists. □
Next, we make the following definition.
Definition 3.12. Suppose car j j j is parked in spot i i i on the street. If car j j j is bumped out of spot i i i and reparks in a spot numbered k > i k>i k > i , we say that car j j j was bumped forward. If instead car j j j is bumped out of spot i i i and reparks in a spot numbered k < i k<i k < i , we say that car j j j was bumped backward.
Remark 3. Note that under the backgammon parking scheme, whenever a car gets bumped, it gets bumped to a spot that has no open spots preceding it. Consequently, if the car is bumped again, it must be bumped forward. Therefore, aside from possibly the first time it is bumped, a car is never bumped backward, so no car is ever bumped backward more than once.
Proposition 3.13. Let L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) } ⊆ S n L=\{12\cdots(n-1)n,\ 12\cdots(n-2)n(n-1),\ 12\cdots(n-3)n(n-2)(n-1)\}\subseteq\mathfrak{S}_n L = { 12 ⋯ ( n − 1 ) n , 12 ⋯ ( n − 2 ) n ( n − 1 ) , 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 )} ⊆ S n . Then, for all π ∈ L \pi\in L π ∈ L , we have ∣ O B − 1 ( π ) ∣ = C n \lvert\mathcal{O}_B^{-1}(\pi)\rvert=C_n ∣ O B − 1 ( π )∣ = C n .
Proof. Fix π ∈ L \pi\in L π ∈ L . Recall that a set partition is said to be non-nesting if we cannot find four elements i < j < j ′ < i ′ i<j<j'<i' i < j < j ′ < i ′ with i , i ′ i,i' i , i ′ in one block and j , j ′ j,j' j , j ′ in another block such that there is no other k k k in the block with i , i ′ i,i' i , i ′ satisfying i < k < i ′ i<k<i' i < k < i ′ . We will show that for each non-nesting set partition S S S of [ n ] [n] [ n ] , there exists a preference list α S \alpha_S α S with content partition S ( α S ) = S \mathcal{S}(\alpha_S)=S S ( α S ) = S and outcome O ( α S ) = π \mathcal{O}(\alpha_S)=\pi O ( α S ) = π . Consequently, the number of preference lists yielding π \pi π is at least the number of non-nesting partitions of [ n ] [n] [ n ] , which is C n C_n C n (see A0000108). Along with the upper bound in Proposition 3.7, this establishes ∣ O B − 1 ( π ) ∣ = C n \lvert\mathcal{O}_B^{-1}(\pi)\rvert=C_n ∣ O B − 1 ( π )∣ = C n .
For a given non-nesting set partition S S S , we construct our desired α S : = ( a 1 , a 2 , … , a n ) \alpha_S:=(a_1,a_2,\ldots,a_n) α S := ( a 1 , a 2 , … , a n ) as follows. Let J J J be a block of S S S , and let k = max ( J ) k=\max(J) k = max ( J ) be the highest index in J J J . For each index j j j in J J J , assign the preference a j = π − 1 ( k ) a_j=\pi^{-1}(k) a j = π − 1 ( k ) . “Any car whose index is highest in its block is the last car with that preference to arrive, and therefore parks in its preferred spot. Thus any such car k k k , including car k = n k=n k = n , parks in the spot π − 1 ( k ) \pi^{-1}(k) π − 1 ( k ) as desired. We must now check that the remaining cars park according to π \pi π and it suffices to check that they park in increasing order.
First, we establish that for the cars that are bumped, their respective first bumps occur in increasing order. Suppose otherwise and that there are indices i < j i<j i < j and j ′ < i ′ j'<i' j ′ < i ′ such that car i i i is bumped for the first time by car i ′ i' i ′ and car j j j is bumped for the first time by car j ′ j' j ′ . As j ′ j' j ′ must be greater than j j j , this yields i < j < j ′ < i ′ i<j<j'<i' i < j < j ′ < i ′ . Furthermore, cars i , i ′ i,i' i , i ′ must have the same preference and no car k k k with i < k < i ′ i<k<i' i < k < i ′ can share that preference, as otherwise car k k k would have bumped car i i i earlier than car i ′ i' i ′ . Similarly, cars j , j ′ j,j' j , j ′ must have the same preference and no car k k k with j < k < j ′ j<k<j' j < k < j ′ can share that preference. Thus, the parts of S S S containing { i , i ′ } \{i,i'\} { i , i ′ } and { j , j ′ } \{j,j'\} { j , j ′ } would violate the fact that S S S is non-nesting.
As the first bumps occur in increasing order, the only way the bumped cars will not park in increasing order is if some car is bumped more than once. We show that this is only possible when π = 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) \pi= 12\cdots(n-3)(n)(n-2)(n-1) π = 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) and in that case, at most one car (in particular, the car indexed n − 2 n-2 n − 2 ) can be bumped twice.
For π ∈ { 12 ⋯ n , 12 ⋯ ( n − 2 ) n ( n − 1 ) } ⊂ L \pi\in\{12\cdots n, 12\cdots(n-2)n(n-1)\} \subset L π ∈ { 12 ⋯ n , 12 ⋯ ( n − 2 ) n ( n − 1 )} ⊂ L , we show that no car is bumped more than once. Let k = max ( J ) k = \max(J) k = max ( J ) for some block J J J of S S S . The only time car k k k prefers a spot whose index is smaller than k k k is when π = 12 ⋯ ( n − 2 ) n ( n − 1 ) \pi= 12\cdots(n-2)n(n-1) π = 12 ⋯ ( n − 2 ) n ( n − 1 ) and k = n k = n k = n , in which case car k = n k = n k = n prefers spot n − 1 n-1 n − 1 . Lower-numbered indices in the same block correspond to cars with the same preference, so any car j j j ’s preferred spot is at least j j j except when π = 12 ⋯ ( n − 2 ) n ( n − 1 ) \pi= 12\cdots(n-2)n(n-1) π = 12 ⋯ ( n − 2 ) n ( n − 1 ) and j = n j = n j = n . If a car i i i is bumped for the first time by car j j j , it necessarily is bumped into one of the first j j j spots. Then, in the case of 12 ⋯ n 12\cdots n 12 ⋯ n , every subsequent car has a preferred spot of index at least j + 1 j+1 j + 1 so car i i i cannot possibly be bumped again. The only possible exception for π = 12 ⋯ ( n − 2 ) n ( n − 1 ) \pi= 12\cdots(n-2)n(n-1) π = 12 ⋯ ( n − 2 ) n ( n − 1 ) is if car i i i is first bumped into spot n − 1 n-1 n − 1 and then bumped a second time by car n n n . However, the only way a car could be bumped into spot n − 1 n-1 n − 1 by one of the first n − 1 n-1 n − 1 cars is if it is bumped by car n − 1 n-1 n − 1 and none of the first n − 1 n-1 n − 1 cars prefer spot n n n . Based on how α S \alpha_S α S is constructed, car n − 1 n-1 n − 1 would prefer spot n n n if n − 1 n-1 n − 1 is the highest index in its block of S S S . Thus, it suffices to consider when n − 1 n-1 n − 1 is not the highest index in its block of S S S , which would mean cars n − 1 n-1 n − 1 and n n n have the same preference in α S \alpha_S α S . This would mean car n n n bumps car n − 1 n-1 n − 1 and consequently cannot bump the car already bumped by car n − 1 n-1 n − 1 . Thus, no car is bumped twice, as desired.
Now, we fix π = 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) \pi= 12\cdots(n-3)(n)(n-2)(n-1) π = 12 ⋯ ( n − 3 ) ( n ) ( n − 2 ) ( n − 1 ) and show that only one car can possibly be bumped twice. Let k = max ( J ) k = \max(J) k = max ( J ) for some block J J J of S S S . Then, the only time car k k k has a preference in α S \alpha_S α S that is less than k k k is when k = n k = n k = n . In that case, car k k k prefers spot n − 2 n-2 n − 2 , so for any car j ≤ n − 2 j \le n-2 j ≤ n − 2 , the index of car j j j ’s preferred spot is at least j j j . Cars n n n and n − 1 n-1 n − 1 each have a preferred spot with index at least n − 2 n-2 n − 2 . If a car i i i is bumped for the first time by a car j ≤ n − 3 j \le n-3 j ≤ n − 3 , it is necessarily bumped into one of the first j j j spots. Then, every subsequent car has a preferred spot of index at least j + 1 j+1 j + 1 so car i i i cannot possibly be bumped again. Thus, for a car to be bumped multiple times, it must be bumped by at least two of the three highest-numbered cars. Therefore, at most one car, say car c c c , is bumped at least twice.
The only way the bumped cars do not end up parked in increasing order is if some car d d d is bumped after the first time car c c c is bumped but before the last time car c c c is bumped. The first time car c c c is bumped is by a car with index at least n − 2 n-2 n − 2 , so this is only possible if car c c c is bumped by cars n − 2 n-2 n − 2 and n n n , and car d d d is bumped by car n − 1 n-1 n − 1 . For this to happen, car n − 2 n-2 n − 2 must bump car c c c into spot n − 2 n-2 n − 2 , meaning none of the first n − 2 n-2 n − 2 cars have a preference outside the first n − 2 n-2 n − 2 spots. Also, since car n n n does not bump car n − 1 n-1 n − 1 , it means that n − 1 n-1 n − 1 is the highest index in its block of S S S , so car n − 1 n-1 n − 1 must prefer spot n n n . This gives a contradiction, since none of the first n − 2 n-2 n − 2 cars prefer spot n n n but car n − 1 n-1 n − 1 is supposed to park in a spot preferred by car d d d . Thus, even if some car ends up being bumped twice, the bumped cars among 1 , … , n − 1 1,\ldots,n-1 1 , … , n − 1 still end up in increasing order. Therefore, for each non-nesting set partition S S S , the preference list α S \alpha_S α S yields the outcome 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) 12\cdots(n-3)n(n-2)(n-1) 12 ⋯ ( n − 3 ) n ( n − 2 ) ( n − 1 ) , as desired. □
Theorem 1.6 follows directly from Proposition 3.7, Proposition 3.11, and Proposition 3.13. We are now ready to show that for any permutation π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , there are at least 2 n − 1 2^{n-1} 2 n − 1 preference lists with backgammon outcome equal to π \pi π .
Theorem 1.7. For any π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , we have ∣ O B − 1 ( π ) ∣ ≥ 2 n − 1 |O_B^{-1}(\pi)| \ge2^{n-1} ∣ O B − 1 ( π ) ∣ ≥ 2 n − 1 . For n ≥ 5 n \ge5 n ≥ 5 , this inequality is strict for all π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n .
Proof. Define L n : = min π ∈ S n ∣ O B − 1 ( π ) ∣ L_n := \min_{\pi\in\mathfrak{S}_n}|O_B^{-1}(\pi)| L n := min π ∈ S n ∣ O B − 1 ( π ) ∣ to be the smallest number of preference lists that can lead to an outcome π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n . We will show that L n ≥ 2 n − 1 L_n \ge2^{n-1} L n ≥ 2 n − 1 . By direct computation, we determine the following values: L 1 = 1 L_1 = 1 L 1 = 1 , L 2 = 2 L_2 = 2 L 2 = 2 , L 3 = 4 L_3 = 4 L 3 = 4 , L 4 = 8 L_4 = 8 L 4 = 8 , and L 5 = 17 L_5 = 17 L 5 = 17 .
For n ≥ 6 n \ge6 n ≥ 6 , fix an outcome π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n . For each 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n , there exists a partial parking outcome β i \beta_i β i consisting of n − 1 n-1 n − 1 cars occupying all spots except the spot i i i , such that parking car n n n in spot π − 1 ( n ) \pi^{-1}(n) π − 1 ( n ) will yield outcome π \pi π . For each such partial parking outcome β i \beta_i β i , we consider preference lists satisfying all the following properties:
car n n n prefers spot π − 1 ( n ) \pi^{-1}(n) π − 1 ( n ) ,
the partial parking outcome after step n − 1 n-1 n − 1 is β i \beta_i β i ,
any car j < n j<n j < n occupying a spot greater than i i i in the partial parking outcome after step n − 1 n-1 n − 1 prefers that spot, and
any car j < n j<n j < n occupying a spot less than i i i in the partial parking outcome after step n − 1 n-1 n − 1 prefers a spot among { 1 , 2 , … , i − 1 } \{1,2,\ldots,i-1\} { 1 , 2 , … , i − 1 } .
As all such preference lists have outcome π \pi π , counting them will yield a lower bound for ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ .
By construction, for each such preference list, the only bumps before car n n n parks occur between the i − 1 i-1 i − 1 cars that are in spots less than i i i in the partial parking outcome after step n − 1 n-1 n − 1 . Thus, for i ≥ 2 i\geq2 i ≥ 2 , the number of ways for this to happen and to produce the outcome π \pi π is at least the minimum number of preference lists for i − 1 i-1 i − 1 cars that yield a given outcome of length i − 1 i-1 i − 1 . Also, including the case where i = 1 i=1 i = 1 , which occurs in precisely one way, we get a lower bound
L n ≥ 1 + ∑ i = 2 n L i − 1 . L_n \geq1+\sum_{i=2}^{n}L_{i-1}. L n ≥ 1 + i = 2 ∑ n L i − 1 .
By induction, this gives L n ≥ 2 n − 1 L_n\geq2^{n-1} L n ≥ 2 n − 1 . Additionally, L 5 = 17 L_5=17 L 5 = 17 , so for n ≥ 5 n\geq5 n ≥ 5 , we have L n > 2 n − 1 L_n>2^{n-1} L n > 2 n − 1 . □
Remark 4. Since we have n n n^n n n possible preference lists divided among n ! > ( n / e ) n n!>(n/e)^n n ! > ( n / e ) n outcomes, some outcome must arise from fewer than e n e^n e n preference lists. This means that the smallest number of preference lists giving a particular outcome of length n n n is strictly less than e n e^n e n .
Decreasing Permutations
There are several other permutations π \pi π for which we can compute the exact size of O B − 1 ( π ) \mathcal{O}_B^{-1}(\pi) O B − 1 ( π ) . These results are related to Motzkin numbers, which first appeared in the work of Motzkin [23 ] , and have since received considerable attention in combinatorics [14 ] . For our purposes, we recall the definition of Motzkin paths, which are enumerated by the Motzkin numbers.
Definition 3.14. Let n ∈ N n\in\mathbb{N} n ∈ N . A Motzkin path of length n n n is a lattice path consisting solely of horizontal steps ( 1 , 0 ) (1,0) ( 1 , 0 ) (denoted H), upward diagonal steps ( 1 , 1 ) (1,1) ( 1 , 1 ) (denoted U), and downward diagonal steps ( 1 , − 1 ) (1,-1) ( 1 , − 1 ) (denoted D), which begins at ( 0 , 0 ) (0,0) ( 0 , 0 ) and ends at ( n , 0 ) (n,0) ( n , 0 ) , and which does not fall below the x x x -axis. We let M n M_n M n denote the set of Motzkin paths of length n n n and we let M n = ∣ M n ∣ M_n=|M_n| M n = ∣ M n ∣ .
We recall that M n M_n M n is called the n n n -th Motzkin number and satisfies the formula
M n = ∑ k = 0 ⌊ n / 2 ⌋ ( n 2 k ) C k , (3) M_n=\sum_{k=0}^{\lfloor n/2\rfloor}\binom{n}{2k}C_k, \tag*{(3)} M n = k = 0 ∑ ⌊ n /2 ⌋ ( 2 k n ) C k , (3)
where C k C_k C k is the k k k -th Catalan number. The sequence { M n } n ≥ 1 \{M_n\}_{n\geq1} { M n } n ≥ 1 is OEIS sequence A001006 . Figure 5 illustrates the nine Motzkin paths of length 4.
Figure 5. Illustration of the nine distinct Motzkin paths of length 4.
We recall the following definition of permutation patterns:
Definition 3.15. Fix m ≤ n m\leq n m ≤ n and let π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n and σ ∈ S m \sigma\in\mathfrak{S}_m σ ∈ S m . Then, π \pi π is said to contain a σ \sigma σ -pattern, if some subsequence of the entries of π \pi π has the same relative order as all of the entries of σ \sigma σ .
For instance, permutation π \pi π contains a 213-pattern whenever π \pi π has three entries x x x , y y y , and z z z that appear within π \pi π in the order x ⋯ y ⋯ z x\cdots y\cdots z x ⋯ y ⋯ z but whose values are ordered as y < x < z y<x<z y < x < z , the same as the ordering of the values in the permutation 213.
Example 3.16. For example, π = 536421 \pi=536421 π = 536421 contains several instances of a 231-pattern, including the subsequences 564 and 341.
We now state the main result of this section.
Theorem 1.8. For n ≥ 1 n \ge1 n ≥ 1 , ∣ O B − 1 ( n ( n − 1 ) ⋯ 21 ) ∣ = M n \lvert\mathcal{O}_{B}^{-1}(n(n-1)\cdots21)\rvert= M_n ∣ O B − 1 ( n ( n − 1 ) ⋯ 21 )∣ = M n .
The proof of Theorem 1.8 relies on the following technical lemmas.
Lemma 3.17. If the backgammon outcome is n ( n − 1 ) ⋯ 21 n(n-1)\cdots21 n ( n − 1 ) ⋯ 21 , then no car is bumped forward twice. Consequently, no car is bumped more than twice.
Proof. Suppose for the sake of contradiction that car i i i is bumped forward by cars j j j and k k k with i < j < k i<j<k i < j < k , and consider the partial parking outcome after step k k k . Since car i i i was bumped forward by car k k k , immediately after that bump, car k k k is in a lower-numbered spot than car i i i . By Remark 3, car i i i could not have been bumped backward by any cars between j j j and k k k . Thus, if car j j j has not been bumped, then car j j j is in a lower-numbered spot than car k k k . If car j j j has been bumped, then the highest numbered car between j j j and k k k which shares j j j ’s preference is in a lower-numbered spot than car k k k . Either way, the partial parking outcome after step k k k contains a 231-pattern with no empty spots before the 1. We now show that once we have achieved a 231-pattern with no empty spots before the 1, after each subsequent step, our partial parking outcome contains at least one of the following:
This would imply that we can never achieve the outcome where the cars are parked in decreasing order. If we have a 231-pattern with no empty spots before 1, we continue to have this unless one of the three cars representing 2, 3, or 1 in the pattern is bumped by a higher car representing 4. This results in having a partial parking outcome containing one of the patterns 4312, 2413, or 2341, where again there are no empty spots before the last of these four cars. Both patterns 2413 and 2341 contain a 231-pattern, while 4312 contains a 312-pattern. If we have a 312-pattern with no empty spots before the 2, we continue to have this unless one of the three cars representing 3, 1, or 2 is bumped by a higher car representing 4. This results in 4123, 3421, or 3142 with again no empty spots before the last of these four cars. Both 4123 and 3142 contain a 312-pattern, while 3421 contains a 231-pattern. Thus, when the final backgammon outcome is n ( n − 1 ) ⋯ 21 n(n-1)\cdots21 n ( n − 1 ) ⋯ 21 , no car is bumped forward more than once. Note that in general, by Remark 3, no car is ever bumped backward more than once. Thus, if the final outcome is n ( n − 1 ) ⋯ 21 n(n-1)\cdots21 n ( n − 1 ) ⋯ 21 , no car is bumped more than twice.
For the sake of completion, we prove two recurrences for the triangle of Motzkin ballot numbers. The recurrence in (4) is stated in [24 [A091836](https://oeis.org/A091836)] without proof. These recurrences are used in our proof of Theorem 1.8.
Lemma 3.18. Let t ( n , k ) t(n,k) t ( n , k ) denote the number of Motzkin paths with n n n steps that touch k − 1 k-1 k − 1 points on the x x x -axis besides the beginning and the end. For n ≥ 2 n \ge2 n ≥ 2 and k ≥ 2 k \ge2 k ≥ 2 , t ( n , k ) t(n,k) t ( n , k ) satisfies the following recurrence:
t ( n , k ) = t ( n , k − 1 ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) . (4) t(n,k)=t(n,k-1)+t(n-1,k-1)-t(n-1,k-2)-t(n-2,k-2). \tag*{(4)} t ( n , k ) = t ( n , k − 1 ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) . (4) Furthermore, when n ≥ 3 n \ge3 n ≥ 3 and k ≥ 1 k \ge1 k ≥ 1 , we have:
t ( n , k ) = t ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 t ( n − 2 , i ) . (5) t(n,k)=t(n-1,k-1)+\sum_{i=k-1}^{n-2}t(n-2,i). \tag*{(5)} t ( n , k ) = t ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 t ( n − 2 , i ) . (5)
Proof. Note that t ( n , k ) t(n,k) t ( n , k ) is understood to be 0 if k > n k>n k > n or if k = 0 k=0 k = 0 and n > 0 n>0 n > 0 . For induction purposes, we define t ( 0 , 0 ) : = 1 t(0,0):=1 t ( 0 , 0 ) := 1 . Let g ( x ) = ∑ i ≥ 0 M i − 1 x i g(x)=\sum_{i\ge0}M_{i-1}x^i g ( x ) = ∑ i ≥ 0 M i − 1 x i with the convention that M − 1 : = 1 M_{-1}:=1 M − 1 := 1 . For k ≥ 1 k \ge1 k ≥ 1 , a Motzkin path which touches the x x x -axis at k − 1 k-1 k − 1 points besides the beginning and the end can be viewed as the composition of k k k Motzkin paths which each only touch the x x x -axis at their respective endpoints. A Motzkin path of length i ≥ 2 i \ge2 i ≥ 2 with no intermediate points on the x x x -axis starts with a U step and ends with a D step. Having no other intermediate points on the x x x -axis means that never in the middle i − 2 i-2 i − 2 steps does the path go below where it starts and finishes those i − 2 i-2 i − 2 steps. Thus, there are M i − 2 M_{i-2} M i − 2 Motzkin paths of length i i i which hit the x x x -axis only at their endpoints. (Note that the previous statement also holds for i = 1 i=1 i = 1 , since M − 1 = 1 M_{-1}=1 M − 1 = 1 ). Therefore, for ( n , k ) ≠ ( 0 , 0 ) (n,k) \ne(0,0) ( n , k ) = ( 0 , 0 ) , t ( n , k ) t(n,k) t ( n , k ) is the sum of the products M i 1 − 2 M i 2 − 2 ⋯ M i k − 2 M_{i_1-2}M_{i_2-2}\cdots M_{i_k-2} M i 1 − 2 M i 2 − 2 ⋯ M i k − 2 over all tuples ( i 1 , i 2 , … , i k ) (i_1,i_2,\ldots,i_k) ( i 1 , i 2 , … , i k ) of positive integers satisfying i 1 + i 2 + ⋯ + i k = n i_1+i_2+\cdots+i_k=n i 1 + i 2 + ⋯ + i k = n . As M i − 2 M_{i-2} M i − 2 is the coefficient of x i − 1 x^{i-1} x i − 1 for g ( x ) g(x) g ( x ) , we obtain that t ( n , k ) t(n,k) t ( n , k ) is the [ x n − k ] [x^{n-k}] [ x n − k ] coefficient of g ( x ) k g(x)^k g ( x ) k for k ≥ 1 k\ge1 k ≥ 1 . Note that this still holds for k = 0 k=0 k = 0 , n ≥ 0 n\ge0 n ≥ 0 since for n ≥ 1 n\ge1 n ≥ 1 , [ x n ] g ( x ) 0 = 0 = t ( n , 0 ) [x^n]g(x)^0=0=t(n,0) [ x n ] g ( x ) 0 = 0 = t ( n , 0 ) and for n = 0 n=0 n = 0 , [ x n ] g ( x ) 0 = 1 = t ( 0 , 0 ) [x^n]g(x)^0=1=t(0,0) [ x n ] g ( x ) 0 = 1 = t ( 0 , 0 ) .
After reindexing, the recurrence we wish to show for n , k ≥ 0 n,k\ge0 n , k ≥ 0 is
t ( n + 2 , k + 2 ) = t ( n + 2 , k + 1 ) + t ( n + 1 , k + 1 ) − t ( n + 1 , k ) − t ( n , k ) . (6) t(n+2,k+2)=t(n+2,k+1)+t(n+1,k+1)-t(n+1,k)-t(n,k). \tag*{(6)} t ( n + 2 , k + 2 ) = t ( n + 2 , k + 1 ) + t ( n + 1 , k + 1 ) − t ( n + 1 , k ) − t ( n , k ) . (6)
If k > n + 1 k>n+1 k > n + 1 , then eq. (6) simply becomes 0 = 0 + 0 − 0 − 0 0=0+0-0-0 0 = 0 + 0 − 0 − 0 . If k = n + 1 k=n+1 k = n + 1 , then eq. (6) becomes 0 = t ( n + 2 , n + 2 ) + 0 − t ( n + 1 , n + 1 ) − 0 0=t(n+2,n+2)+0-t(n+1,n+1)-0 0 = t ( n + 2 , n + 2 ) + 0 − t ( n + 1 , n + 1 ) − 0 . This is true since t ( m , m ) = 1 t(m,m)=1 t ( m , m ) = 1 for all m ≥ 1 m\ge1 m ≥ 1 because the only Motzkin path of length m m m touching the x x x -axis at m − 1 m-1 m − 1 points besides the beginning and the end is the path consisting solely of H steps. Thus we may assume n ≥ k n\ge k n ≥ k . In this case, we wish to show that the coefficient [ x n − k ] [x^{n-k}] [ x n − k ] of g ( x ) k + 2 g(x)^{k+2} g ( x ) k + 2 is equal to the sum of the coefficients [ x n − k ] [x^{n-k}] [ x n − k ] and [ x n − k + 1 ] [x^{n-k+1}] [ x n − k + 1 ] for ( g ( x ) − 1 ) g ( x ) k (g(x)-1)g(x)^k ( g ( x ) − 1 ) g ( x ) k .
Let j = n − k j=n-k j = n − k . Since n ≥ k n\ge k n ≥ k , we have j ≥ 0 j\ge0 j ≥ 0 , and n = j + k n=j+k n = j + k . Rewriting the desired identity in terms of j j j , we obtain
[ x j ] g ( x ) k + 2 = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k ) . [x^j]g(x)^{k+2}=[x^j]\left((g(x)-1)g(x)^k\right)+[x^{j+1}]\left((g(x)-1)g(x)^k\right). [ x j ] g ( x ) k + 2 = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k ) .
Thus, it suffices to prove that for all k ≥ 0 k\ge0 k ≥ 0 , the above statement holds for every j ≥ 0 j\ge0 j ≥ 0 . We proceed by induction on k k k . For the base case k = 0 k=0 k = 0 , we split into j = 0 j=0 j = 0 and j ≥ 1 j\ge1 j ≥ 1 . To handle j = k = 0 j=k=0 j = k = 0 , we note that
[ x 0 ] g ( x ) 2 = 1 = 0 + 1 = [ x 0 ] ( g ( x ) − 1 ) + [ x 1 ] ( g ( x ) − 1 ) . [x^0]g(x)^2=1=0+1=[x^0](g(x)-1)+[x^1](g(x)-1). [ x 0 ] g ( x ) 2 = 1 = 0 + 1 = [ x 0 ] ( g ( x ) − 1 ) + [ x 1 ] ( g ( x ) − 1 ) .
For j ≥ 1 j\ge1 j ≥ 1 , we must show that [ x j ] g ( x ) 2 = 2 M j − 1 + ∑ i = 1 j − 1 M i − 1 M j − i − 1 [x^j]g(x)^2=2M_{j-1}+\sum_{i=1}^{j-1}M_{i-1}M_{j-i-1} [ x j ] g ( x ) 2 = 2 M j − 1 + ∑ i = 1 j − 1 M i − 1 M j − i − 1 is equal to [ x j ] ( g ( x ) − 1 ) + [ x j + 1 ] ( g ( x ) − 1 ) = M j + M j − 1 [x^j](g(x)-1)+[x^{j+1}](g(x)-1)=M_j+M_{j-1} [ x j ] ( g ( x ) − 1 ) + [ x j + 1 ] ( g ( x ) − 1 ) = M j + M j − 1 . This follows from the well-known identity [6 page 90] :
M n = M n − 1 + ∑ i = 1 n − 1 M i − 1 M n − i − 1 . M_n=M_{n-1}+\sum_{i=1}^{n-1}M_{i-1}M_{n-i-1}. M n = M n − 1 + i = 1 ∑ n − 1 M i − 1 M n − i − 1 .
The induction hypothesis is that for some k k k , we have for all j ≥ 0 j\ge0 j ≥ 0 , that
[ x j ] g ( x ) k + 2 = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k ) . [x^j]g(x)^{k+2}=[x^j]\left((g(x)-1)g(x)^k\right)+[x^{j+1}]\left((g(x)-1)g(x)^k\right). [ x j ] g ( x ) k + 2 = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k ) .
Inducting on k k k , we obtain for j ≥ 0 j\ge0 j ≥ 0 ,
[ x j ] g ( x ) k + 3 = ∑ i = 1 j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] g ( x ) k + 2 ) = ∑ i = 1 j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] + [ x j + 2 − i ] ) ( ( g ( x ) − 1 ) g ( x ) k ) = ∑ i = 1 j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) + ∑ i = 1 j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 2 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) + ∑ i = 1 j + 2 ( [ x i − 1 ] g ( x ) ) ( [ x j + 2 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) , \begin{aligned}
[x^j]g(x)^{k+3}
&=\sum_{i=1}^{j+1}\left([x^{i-1}]g(x)\right)\left([x^{j+1-i}]g(x)^{k+2}\right)\\
&=\sum_{i=1}^{j+1}\left([x^{i-1}]g(x)\right)\left([x^{j+1-i}]+[x^{j+2-i}]\right)\left((g(x)-1)g(x)^k\right)\\
&=\sum_{i=1}^{j+1}\left([x^{i-1}]g(x)\right)\left([x^{j+1-i}]\left((g(x)-1)g(x)^k\right)\right)\\
&\quad+\sum_{i=1}^{j+1}\left([x^{i-1}]g(x)\right)\left([x^{j+2-i}]\left((g(x)-1)g(x)^k\right)\right)\\
&=[x^j]\left((g(x)-1)g(x)^{k+1}\right)\\
&\quad+\sum_{i=1}^{j+2}\left([x^{i-1}]g(x)\right)\left([x^{j+2-i}]\left((g(x)-1)g(x)^k\right)\right)\\
&=[x^j]\left((g(x)-1)g(x)^{k+1}\right)+[x^{j+1}]\left((g(x)-1)g(x)^{k+1}\right),
\end{aligned} [ x j ] g ( x ) k + 3 = i = 1 ∑ j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] g ( x ) k + 2 ) = i = 1 ∑ j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] + [ x j + 2 − i ] ) ( ( g ( x ) − 1 ) g ( x ) k ) = i = 1 ∑ j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 1 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) + i = 1 ∑ j + 1 ( [ x i − 1 ] g ( x ) ) ( [ x j + 2 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) + i = 1 ∑ j + 2 ( [ x i − 1 ] g ( x ) ) ( [ x j + 2 − i ] ( ( g ( x ) − 1 ) g ( x ) k ) ) = [ x j ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) + [ x j + 1 ] ( ( g ( x ) − 1 ) g ( x ) k + 1 ) ,
where the penultimate equality follows from the fact that [ x 0 ] ( ( g ( x ) − 1 ) g ( x ) k ) = 0 [x^0]\left((g(x)-1)g(x)^k\right)=0 [ x 0 ] ( ( g ( x ) − 1 ) g ( x ) k ) = 0 . This completes the proof of (4) .
Next, we claim that for n ≥ 3 n \ge3 n ≥ 3 , k ≥ 1 k \ge1 k ≥ 1 :
t ( n , k ) = t ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 t ( n − 2 , i ) . t(n,k)=t(n-1,k-1)+\sum_{i=k-1}^{n-2}t(n-2,i). t ( n , k ) = t ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 t ( n − 2 , i ) .
Recalling that for i ≥ 1 i \ge1 i ≥ 1 , t ( i , 1 ) = M i − 2 t(i,1)=M_{i-2} t ( i , 1 ) = M i − 2 and t ( i , 0 ) = 0 t(i,0)=0 t ( i , 0 ) = 0 , we have for n ≥ 3 n \ge3 n ≥ 3 , that
t ( n , 1 ) = M n − 2 = t ( n − 1 , 0 ) + ∑ i = 0 n − 2 t ( n − 2 , i ) . t(n,1)=M_{n-2}=t(n-1,0)+\sum_{i=0}^{n-2}t(n-2,i). t ( n , 1 ) = M n − 2 = t ( n − 1 , 0 ) + i = 0 ∑ n − 2 t ( n − 2 , i ) .
We now induct on k k k . Beginning with Equation (4) , for n ≥ 2 n \ge2 n ≥ 2 and k ≥ 2 k \ge2 k ≥ 2 we have that
t ( n , k ) = t ( n , k − 1 ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) = ( t ( n − 1 , k − 2 ) + ∑ i = k − 2 n − 2 t ( n − 2 , i ) ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) = ∑ i = k − 2 n − 2 t ( n − 2 , i ) + t ( n − 1 , k − 1 ) − t ( n − 2 , k − 2 ) = t ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 t ( n − 2 , i ) , \begin{aligned}
t(n,k)&=t(n,k-1)+t(n-1,k-1)-t(n-1,k-2)-t(n-2,k-2)\\
&=\left(t(n-1,k-2)+\sum_{i=k-2}^{n-2}t(n-2,i)\right)+t(n-1,k-1)-t(n-1,k-2)-t(n-2,k-2)\\
&=\sum_{i=k-2}^{n-2}t(n-2,i)+t(n-1,k-1)-t(n-2,k-2)\\
&=t(n-1,k-1)+\sum_{i=k-1}^{n-2}t(n-2,i),
\end{aligned} t ( n , k ) = t ( n , k − 1 ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) = ( t ( n − 1 , k − 2 ) + i = k − 2 ∑ n − 2 t ( n − 2 , i ) ) + t ( n − 1 , k − 1 ) − t ( n − 1 , k − 2 ) − t ( n − 2 , k − 2 ) = i = k − 2 ∑ n − 2 t ( n − 2 , i ) + t ( n − 1 , k − 1 ) − t ( n − 2 , k − 2 ) = t ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 t ( n − 2 , i ) ,
as desired. □
Proof of Theorem 1.8. As before, let t ( n , k ) t(n,k) t ( n , k ) denote the number of Motzkin paths with n n n steps, which touch k − 1 k-1 k − 1 points on the x x x -axis besides the beginning and the end. For n , k ≥ 1 n,k \ge1 n , k ≥ 1 , let f ( n , k ) f(n,k) f ( n , k ) denote the number of preference lists yielding outcome n ( n − 1 ) ⋯ 321 n(n-1)\cdots321 n ( n − 1 ) ⋯ 321 , where the longest initial sequence of distinct preferences has length k k k . Note that f ( n , k ) = 0 f(n,k)=0 f ( n , k ) = 0 for k > n k>n k > n .
Next, we show that f ( n , k ) = t ( n , k ) f(n,k)=t(n,k) f ( n , k ) = t ( n , k ) for all n ≥ k ≥ 1 n \ge k \ge1 n ≥ k ≥ 1 . First note that f ( 1 , 1 ) = f ( 2 , 1 ) = f ( 2 , 2 ) = 1 f(1,1)=f(2,1)=f(2,2)=1 f ( 1 , 1 ) = f ( 2 , 1 ) = f ( 2 , 2 ) = 1 so the statement holds for n < 3 n<3 n < 3 . Thus, the total number of preference lists yielding n ( n − 1 ) ⋯ 321 n(n-1)\cdots321 n ( n − 1 ) ⋯ 321 is M n M_n M n for n = 1 , 2 n=1,2 n = 1 , 2 . To prove the desired equalities for n ≥ 3 n \ge3 n ≥ 3 , we now induct on n n n with the induction hypothesis that f ( m , k ) = t ( m , k ) f(m,k)=t(m,k) f ( m , k ) = t ( m , k ) for all 1 ≤ k ≤ m ≤ n − 1 1 \le k \le m \le n-1 1 ≤ k ≤ m ≤ n − 1 . To show that f ( n , k ) = t ( n , k ) f(n,k)=t(n,k) f ( n , k ) = t ( n , k ) for all 1 ≤ k ≤ n 1 \le k \le n 1 ≤ k ≤ n , it suffices to show that the following hold for each fixed n n n :
Claim 1. f ( n , 1 ) = M n − 2 = t ( n , 1 ) f(n,1)=M_{n-2}=t(n,1) f ( n , 1 ) = M n − 2 = t ( n , 1 ) .
Claim 2. For k ≥ 2 k \ge2 k ≥ 2 , f ( n , k ) f(n,k) f ( n , k ) obeys the same recurrence as t ( n , k ) t(n,k) t ( n , k ) , namely
f ( n , k ) = f ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 f ( n − 2 , i ) . f(n,k)=f(n-1,k-1)+\sum_{i=k-1}^{n-2}f(n-2,i). f ( n , k ) = f ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 f ( n − 2 , i ) .
Proof of Claim 1. Observe that f ( n , 1 ) f(n,1) f ( n , 1 ) counts sequences yielding outcome n ( n − 1 ) ⋯ 321 n(n-1)\cdots321 n ( n − 1 ) ⋯ 321 , where cars 1 and 2 have the same preference. If this preference is spot 1, then car 2 bumps car 1 forward into spot 2. Eventually, car 1 will need to be bumped forward into spot n n n but by Lemma 3.17, it cannot be bumped forward twice. Thus, car 1 does not prefer spot 1 and is thus bumped into spot 1 by car 2. In order to end up in spot n n n , car 1 must be the last car bumped. Thus, car 1 must still be parked in spot 1 in the partial parking outcome after step n − 1 n-1 n − 1 , so that it is bumped by car n n n . Thus no car from those numbered 2 to n − 1 n-1 n − 1 prefers spot 1 and also no car from those numbered 2 to n − 1 n-1 n − 1 can prefer spot n n n since that must be left open for car 1 to be bumped into. Therefore, cars 2 to n − 1 n-1 n − 1 park into spots 2 to $n-1 such that they end up in decreasing order. Since none of these cars can be bumped to spot 1, this is equivalent to cars 1 to n − 2 n-2 n − 2 parking in spots 1 to $n-2 in decreasing order. This is ∑ k = 1 n − 2 f ( n − 2 , k ) \sum_{k=1}^{n-2}f(n-2,k) ∑ k = 1 n − 2 f ( n − 2 , k ) which by the induction hypothesis is equal to ∑ k = 1 n − 2 t ( n − 2 , k ) = M n − 2 \sum_{k=1}^{n-2}t(n-2,k)=M_{n-2} ∑ k = 1 n − 2 t ( n − 2 , k ) = M n − 2 , as desired. □
Proof of Claim 2. Now for n ≥ 3 n \ge3 n ≥ 3 , k ≥ 2 k \ge2 k ≥ 2 , consider the ways in which car 1 could end up in spot n n n . Either
car 1 prefers spot n n n ,
ii) car 1 prefers spot 1 and is bumped forward by car n n n , or
iii) car 1 prefers something else, is bumped to the start of the street and parks in spot 1, and then is later bumped forward by car n n n .
Since by Remark 3, a car cannot be bumped backward more than once, and by Lemma 3.17, a car cannot be bumped forward more than once, these are the only possibilities.
For case i), no other car can prefer spot n n n , so restricting to cars 2 through n n n , the length of the longest initial sequence of distinct preferences is k − 1 k-1 k − 1 . Cars 2 through n n n park in spots 1 through n − 1 n-1 n − 1 in decreasing order, which is equivalent to cars 1 to n − 1 n-1 n − 1 doing the same thing, so this case contributes f ( n − 1 , k − 1 ) f(n-1,k-1) f ( n − 1 , k − 1 ) to the count.
For case ii), we must have k ≤ n − 1 k \le n-1 k ≤ n − 1 as cars 1 and n n n share a preference for spot 1. Cars 2 through n − 1 n-1 n − 1 must have preferences among spots 2 through n − 1 n-1 n − 1 so that spot n n n is left open for car 1 to be bumped into. No other car prefers spot 1 besides cars 1 and n n n , so when restricting to cars 2 through n − 1 n-1 n − 1 , the length of the longest initial sequence of distinct preferences is k − 1 k-1 k − 1 . The number of such preference lists for cars 2 through n − 1 n-1 n − 1 that park them in decreasing order in spots 2 through n − 1 n-1 n − 1 is then f ( n − 2 , k − 1 ) f(n-2,k-1) f ( n − 2 , k − 1 ) . Car n n n has no choice but to park in spot 1, so this case contributes f ( n − 2 , k − 1 ) f(n-2,k-1) f ( n − 2 , k − 1 ) .
For case iii), no car besides car n n n can prefer spot 1, and car 1 must be the first car bumped. Since the first k k k preferences are distinct and the longest such prefix has length k k k , car k + 1 k+1 k + 1 is the first car sharing a preference with an earlier car. Since car 1 must be the first bumped car, that repeated preference must be car 1’s preference. Thus car k + 1 k+1 k + 1 initially bumps car 1. Since car 1 must be bumped at least twice, we have that k ≤ n − 2 k \le n-2 k ≤ n − 2 . Restricting to just cars 2 through n − 1 n-1 n − 1 , the initial sequence of distinct preferences has length at least k k k . When it is i i i , there are f ( n − 2 , i ) f(n-2,i) f ( n − 2 , i ) ways to park cars 2 through n − 1 n-1 n − 1 in decreasing order in spots 2 through n − 1 n-1 n − 1 as none of those cars can ever occupy spot 1 nor spot n n n . The preference of car 1 must then match the preference of car k + 1 k+1 k + 1 and the preference of car n n n is spot 1. Thus, for each k ≤ n − 2 k \le n-2 k ≤ n − 2 , this contributes a total of ∑ i = k n − 2 f ( n − 2 , i ) \sum_{i=k}^{n-2} f(n-2,i) ∑ i = k n − 2 f ( n − 2 , i ) to the count.
Tabulating the three cases for k ≤ n − 1 k \le n-1 k ≤ n − 1 , we get
f ( n , k ) = f ( n − 1 , k − 1 ) + f ( n − 2 , k − 1 ) + ∑ i = k n − 2 f ( n − 2 , i ) = f ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 f ( n − 2 , i ) , f(n,k)=f(n-1,k-1)+f(n-2,k-1)+\sum_{i=k}^{n-2}f(n-2,i)=f(n-1,k-1)+\sum_{i=k-1}^{n-2}f(n-2,i), f ( n , k ) = f ( n − 1 , k − 1 ) + f ( n − 2 , k − 1 ) + i = k ∑ n − 2 f ( n − 2 , i ) = f ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 f ( n − 2 , i ) ,
while for k = n k=n k = n , we get
f ( n , k ) = f ( n − 1 , k − 1 ) = f ( n − 1 , k − 1 ) + ∑ i = k − 1 n − 2 f ( n − 2 , i ) , f(n,k)=f(n-1,k-1)=f(n-1,k-1)+\sum_{i=k-1}^{n-2}f(n-2,i), f ( n , k ) = f ( n − 1 , k − 1 ) = f ( n − 1 , k − 1 ) + i = k − 1 ∑ n − 2 f ( n − 2 , i ) ,
thus establishing the recurrence for k ≥ 2 k \ge2 k ≥ 2 and completing the proof that f ( n , k ) = t ( n , k ) f(n,k)=t(n,k) f ( n , k ) = t ( n , k ) . □
Therefore, the total number of preference lists yielding outcome n ( n − 1 ) ⋯ 321 n(n-1)\cdots321 n ( n − 1 ) ⋯ 321 is ∑ i = 1 n f ( n , i ) = ∑ i = 1 n t ( n , i ) = M n \sum_{i=1}^{n}f(n,i)=\sum_{i=1}^{n}t(n,i)=M_n ∑ i = 1 n f ( n , i ) = ∑ i = 1 n t ( n , i ) = M n , as desired. □
Next we show that the number of backgammon parking functions with two special outcomes depends on the Motzkin numbers.
Corollary 1.9. For n ≥ 1 n \ge1 n ≥ 1 , ∣ Θ B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ = M n + 1 − M n |\Theta_B^{-1}(1(n)(n-1)\cdots32)|=M_{n+1}-M_n ∣ Θ B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ = M n + 1 − M n .
Proof. Let P n : = ∣ Θ B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ P_n:=|\Theta_B^{-1}(1(n)(n-1)\cdots32)| P n := ∣ Θ B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ , with P 1 = 1 P_1=1 P 1 = 1 and P 2 = 2 P_2=2 P 2 = 2 . Now consider n ≥ 3 n \ge3 n ≥ 3 . In order for the cars to park in decreasing order, there are n n n possibilities for the partial parking outcome after step n − 1 n-1 n − 1 . It is either 0 ( n − 1 ) ( n − 2 ) ⋯ 1 0(n-1)(n-2)\cdots1 0 ( n − 1 ) ( n − 2 ) ⋯ 1 , ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 1 (n-1)0(n-2)(n-3)\cdots1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 1 or ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 1 (k)(n-1)(n-2)\cdots(k+1)0(k-1)(k-2)\cdots1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 1 for some 1 ≤ k ≤ n − 2 1 \le k \le n-2 1 ≤ k ≤ n − 2 where car k k k is the car that will be bumped by car n n n and which will ultimately park in the remaining open spot, which is denoted by a 0.
Notably, all the cars after the empty spot have lower indices than the cars before the empty spot, so no car parked before the empty spot could have had a preference after the empty spot. The cars parked after the empty spot must have preferred the spots they ended up in. Thus, there is only one way to obtain each of the partial parking outcomes 0 ( n − 1 ) ( n − 2 ) ⋯ 1 0(n-1)(n-2)\cdots1 0 ( n − 1 ) ( n − 2 ) ⋯ 1 and ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 1 (n-1)0(n-2)(n-3)\cdots1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 1 . For 1 ≤ k ≤ n − 2 1 \le k \le n-2 1 ≤ k ≤ n − 2 , the number of ways for the cars k k k through n − 1 n-1 n − 1 to park before the empty spot in the order ( k ) ( n − 1 ) ( n − 2 ) ( n − 3 ) ⋯ ( k + 1 ) (k)(n-1)(n-2)(n-3)\cdots(k+1) ( k ) ( n − 1 ) ( n − 2 ) ( n − 3 ) ⋯ ( k + 1 ) is the same as P n − k P_{n-k} P n − k , the number of ways for the first n − k n-k n − k cars to park in the order 1 ( n − k ) ( n − k − 1 ) ⋯ 2 1(n-k)(n-k-1)\cdots2 1 ( n − k ) ( n − k − 1 ) ⋯ 2 . Thus, the number of ways for the cars to park in decreasing order, which is given in Theorem 1.8 as M n M_n M n , is equal to 2 + ∑ k = 1 n − 2 P n − k 2+\sum_{k=1}^{n-2}P_{n-k} 2 + ∑ k = 1 n − 2 P n − k . Therefore,
M n + 1 − M n = ( 2 + ∑ k = 1 n − 1 P n + 1 − k ) − ( 2 + ∑ k = 1 n − 2 P n − k ) = ∑ j = 2 n P j − ∑ j = 2 n − 1 P j = P n , M_{n+1}-M_n=\left(2+\sum_{k=1}^{n-1}P_{n+1-k}\right)-\left(2+\sum_{k=1}^{n-2}P_{n-k}\right)=\sum_{j=2}^{n}P_j-\sum_{j=2}^{n-1}P_j=P_n, M n + 1 − M n = ( 2 + k = 1 ∑ n − 1 P n + 1 − k ) − ( 2 + k = 1 ∑ n − 2 P n − k ) = j = 2 ∑ n P j − j = 2 ∑ n − 1 P j = P n ,
as desired. □
Corollary 1.10. For n ≥ 2 n\ge2 n ≥ 2 , ∣ O B − 1 ( 12 n ( n − 1 ) ⋯ 3 ) ∣ = M n + 2 − 2 M n + 1 + M n − M n − 1 \left|\mathcal{O}_B^{-1}\left(12n(n-1)\cdots3\right)\right|=M_{n+2}-2M_{n+1}+M_n-M_{n-1} O B − 1 ( 12 n ( n − 1 ) ⋯ 3 ) = M n + 2 − 2 M n + 1 + M n − M n − 1 .
Proof. Let Q n : = ∣ O B − 1 ( 12 n ( n − 1 ) ⋯ 3 ) ∣ Q_n:=\left|\mathcal{O}_B^{-1}\left(12n(n-1)\cdots3\right)\right| Q n := O B − 1 ( 12 n ( n − 1 ) ⋯ 3 ) with Q 1 = 1 Q_1=1 Q 1 = 1 , Q 2 = 2 Q_2=2 Q 2 = 2 , and Q 3 = 5 Q_3=5 Q 3 = 5 . Now consider n ≥ 4 n\ge4 n ≥ 4 . In order for the cars to park in the order 1 ( n ) ( n − 1 ) ⋯ 32 1(n)(n-1)\cdots32 1 ( n ) ( n − 1 ) ⋯ 32 , the partial parking outcome after step n − 1 n-1 n − 1 is either ( 1 ) 0 ( n − 1 ) ( n − 2 ) ⋯ 32 (1)0(n-1)(n-2)\cdots32 ( 1 ) 0 ( n − 1 ) ( n − 2 ) ⋯ 32 , 0 ( 1 ) ( n − 1 ) ( n − 2 ) ⋯ 32 0(1)(n-1)(n-2)\cdots32 0 ( 1 ) ( n − 1 ) ( n − 2 ) ⋯ 32 , 12 ( n − 1 ) ( n − 2 ) ⋯ 30 12(n-1)(n-2)\cdots30 12 ( n − 1 ) ( n − 2 ) ⋯ 30 , 1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 32 1(n-1)0(n-2)(n-3)\cdots32 1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 32 , or 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 1(k)(n-1)(n-2)\cdots(k+2)(k+1)0(k-1)(k-2)\cdots32 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 , for some 3 ≤ k ≤ n − 2 3\le k\le n-2 3 ≤ k ≤ n − 2 , where car k k k is the car that will be bumped by car n n n and which will ultimately park in the remaining open spot, which is denoted by a 0 0 0 .
The partial parking outcomes ( 1 ) 0 ( n − 1 ) ( n − 2 ) ⋯ 32 (1)0(n-1)(n-2)\cdots32 ( 1 ) 0 ( n − 1 ) ( n − 2 ) ⋯ 32 and 1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 32 1(n-1)0(n-2)(n-3)\cdots32 1 ( n − 1 ) 0 ( n − 2 ) ( n − 3 ) ⋯ 32 can each be attained in n − 1 n-1 n − 1 ways as any car with index greater than 1 is parked in its preferred spot while car 1 either preferred spot 1 or was bumped by any of the cars from 2 through n − 1 n-1 n − 1 . The partial parking outcome 0 ( 1 ) ( n − 1 ) ⋯ 32 0(1)(n-1)\cdots32 0 ( 1 ) ( n − 1 ) ⋯ 32 can be attained in one way and the partial parking outcome 12 ( n − 1 ) ( n − 2 ) ⋯ 30 12(n-1)(n-2)\cdots30 12 ( n − 1 ) ( n − 2 ) ⋯ 30 is attained in Q n − 1 Q_{n-1} Q n − 1 ways.
For the partial parking outcome 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 1(k)(n-1)(n-2)\cdots(k+2)(k+1)0(k-1)(k-2)\cdots32 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 for 3 ≤ k ≤ n − 2 3\le k\le n-2 3 ≤ k ≤ n − 2 , the cars parked after the empty spot must have preferred the spots they ended up in. These cars also have lower indices than every car parked before the empty spot except for car 1. Thus, no car numbered at least k k k preferred a spot after the empty spot. If car 1 also preferred a spot before the empty spot, then the number of ways to attain this partial parking outcome is the number of ways to park car 1 and cars k k k through n − 1 n-1 n − 1 in the order 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 1(k)(n-1)(n-2)\cdots(k+2)(k+1) 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) , which is the same as the number of ways to park n − k + 1 n-k+1 n − k + 1 cars in the order 12 ( n − k + 1 ) ( n − k ) ⋯ 43 12(n-k+1)(n-k)\cdots43 12 ( n − k + 1 ) ( n − k ) ⋯ 43 . Thus, this subcase contributes Q n − k + 1 Q_{n-k+1} Q n − k + 1 to the count.
If instead car 1 preferred a spot after the empty spot, there are k − 2 k-2 k − 2 ways for this to happen, and by the time car k k k tries to park, car 1 will have been bumped to spot 1. Therefore none of the cars from k k k through n − 1 n-1 n − 1 prefer spot 1 and the number of ways for these to park in the order ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) (k)(n-1)(n-2)\cdots(k+2)(k+1) ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) within spots 2 through n − k + 1 n-k+1 n − k + 1 is the number of ways for n − k n-k n − k cars to park in the order 1 ( n − k ) ( n − k − 1 ) ⋯ 32 1(n-k)(n-k-1)\cdots32 1 ( n − k ) ( n − k − 1 ) ⋯ 32 , which, by Corollary 1.9, is M n − k + 1 − M n − k M_{n-k+1}-M_{n-k} M n − k + 1 − M n − k . Thus, in total, the partial parking outcome 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 1(k)(n-1)(n-2)\cdots(k+2)(k+1)0(k-1)(k-2)\cdots32 1 ( k ) ( n − 1 ) ( n − 2 ) ⋯ ( k + 2 ) ( k + 1 ) 0 ( k − 1 ) ( k − 2 ) ⋯ 32 for 3 ≤ k ≤ n − 2 3\le k\le n-2 3 ≤ k ≤ n − 2 comes from Q n − k + 1 + ( k − 2 ) ( M n − k + 1 − M n − k ) Q_{n-k+1}+(k-2)(M_{n-k+1}-M_{n-k}) Q n − k + 1 + ( k − 2 ) ( M n − k + 1 − M n − k ) possible preference lists for the first n − 1 n-1 n − 1 cars.
Combining all these cases gives ∣ O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) ∣ \left|\mathcal{O}_B^{-1}\left(1(n)(n-1)\cdots32\right)\right| O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 32 ) , which we know, by Corollary 1.9, to be M n + 1 − M n M_{n+1}-M_n M n + 1 − M n . Hence
M n + 1 − M n = 1 + 2 ( n − 1 ) + Q n − 1 + ∑ k = 3 n − 2 ( Q n − k + 1 + ( k − 2 ) ( M n − k + 1 − M n − k ) ) . (7) M_{n+1}-M_n=1+2(n-1)+Q_{n-1}+\sum_{k=3}^{n-2}\left(Q_{n-k+1}+(k-2)(M_{n-k+1}-M_{n-k})\right). \tag*{(7)} M n + 1 − M n = 1 + 2 ( n − 1 ) + Q n − 1 + k = 3 ∑ n − 2 ( Q n − k + 1 + ( k − 2 ) ( M n − k + 1 − M n − k ) ) . (7)
Reindexing (7) yields
M n + 2 − M n + 1 = 1 + 2 n + Q n + ∑ k = 3 n − 1 ( Q n − k + 2 + ( k − 2 ) ( M n − k + 2 − M n − k + 1 ) ) . (8) M_{n+2}-M_{n+1}=1+2n+Q_n+\sum_{k=3}^{n-1}\left(Q_{n-k+2}+(k-2)(M_{n-k+2}-M_{n-k+1})\right). \tag*{(8)} M n + 2 − M n + 1 = 1 + 2 n + Q n + k = 3 ∑ n − 1 ( Q n − k + 2 + ( k − 2 ) ( M n − k + 2 − M n − k + 1 ) ) . (8)
Subtracting Equation (7) from Equation (8) gives
M n + 2 − 2 M n + 1 + M n = 2 + Q n + ∑ i = 3 n − 1 ( M i − M i − 1 ) M_{n+2}-2M_{n+1}+M_n=2+Q_n+\sum_{i=3}^{n-1}(M_i-M_{i-1}) M n + 2 − 2 M n + 1 + M n = 2 + Q n + i = 3 ∑ n − 1 ( M i − M i − 1 )
M n + 2 − 2 M n + 1 + M n = 2 + Q n + M n − 1 − M 2 , M_{n+2}-2M_{n+1}+M_n=2+Q_n+M_{n-1}-M_2, M n + 2 − 2 M n + 1 + M n = 2 + Q n + M n − 1 − M 2 ,
and solving for Q n Q_n Q n we get Q n = M n + 2 − 2 M n + 1 + M n − M n − 1 Q_n=M_{n+2}-2M_{n+1}+M_n-M_{n-1} Q n = M n + 2 − 2 M n + 1 + M n − M n − 1 , as desired. □
Displacement
Given an outcome π = π 1 π 2 ⋯ π n ∈ S n \pi=\pi_1\pi_2\cdots\pi_n\in S_n π = π 1 π 2 ⋯ π n ∈ S n , we recall that π − 1 = p 1 p 2 ⋯ p n \pi^{-1}=p_1p_2\cdots p_n π − 1 = p 1 p 2 ⋯ p n is the permutation of { 1 , 2 , … , n } \{1,2,\ldots,n\} { 1 , 2 , … , n } such that π p j = j \pi_{p_j}=j π p j = j for all j ∈ [ n ] j\in[n] j ∈ [ n ] . We recall that the displacement of car i i i is the absolute difference between the spot car i i i parks in and the spot it prefers; call this difference d i d_i d i .
For a preference list α \alpha α , we define its displacement multiset (see Definition 1.11 ) to be the multiset consisting of the nonzero values d i d_i d i , and we denote this by D X ( α ) \mathcal{D}_X(\alpha) D X ( α ) , where X ∈ { C , M , B } X\in\{C,M,B\} X ∈ { C , M , B } and denotes which parking scheme we are using: C C C for classical, M M M for Monopoly, and B B B for backgammon. We define N X ( D X ) N_X(\mathcal{D}_X) N X ( D X ) to be the number of parking functions under the parking scheme X ∈ { C , M , B } X\in\{C,M,B\} X ∈ { C , M , B } with displacement multiset D X \mathcal{D}_X D X .
For examples of how displacement multisets differ for classical, Monopoly, and backgammon parking functions, see Example 1.12 and Example 1.13.
Recall a car is “lucky” (otherwise, “unlucky”) if, at the conclusion of parking, it ends up in the spot that it originally preferred. Let lucky ( α ) \operatorname{lucky}(\alpha) lucky ( α ) (resp. unlucky ( α ) \operatorname{unlucky}(\alpha) unlucky ( α ) ) be the number of lucky (resp. unlucky) cars in the preference list α \alpha α . As we are interested in studying the displacement multiset of Monopoly and backgammon parking functions, we focus on unlucky cars because they contribute to the displacement multiset. While Gessel and Seo [18 ] established the generating function for the number of classical parking functions with a fixed number of lucky cars, we state their result in terms of unlucky cars:
U ( q ) = ∑ α ∈ P F n q unlucky ( α ) = ∏ i = 1 n − 1 ( i q + ( n − i + 1 ) ) . (9) U(q)=\sum_{\alpha\in\mathrm{PF}_n}q^{\operatorname{unlucky}(\alpha)}=\prod_{i=1}^{n-1}(iq+(n-i+1)). \tag*{(9)} U ( q ) = α ∈ PF n ∑ q unlucky ( α ) = i = 1 ∏ n − 1 ( i q + ( n − i + 1 )) . (9)
Displacement for Monopoly Parking Functions
Under the Monopoly parking scheme to park n n n cars, we let unlucky M ( α ) \operatorname{unlucky}_M(\alpha) unlucky M ( α ) denote the number of unlucky cars in the preference list α ∈ M P F n \alpha\in\mathrm{MPF}_n α ∈ MPF n .
Theorem 4.1. The generating function U M ( q ) U_M(q) U M ( q ) for the number of unlucky cars under the Monopoly parking scheme is given by
U M ( q ) = ∑ α ∈ M P F n q unlucky M ( α ) = ∏ i = 1 n ( ( i − 1 ) q + ( n − i + 1 ) ) . U_M(q)=\sum_{\alpha\in\mathrm{MPF}_n}q^{\operatorname{unlucky}_M(\alpha)}=\prod_{i=1}^{n}((i-1)q+(n-i+1)). U M ( q ) = α ∈ MPF n ∑ q unlucky M ( α ) = i = 1 ∏ n (( i − 1 ) q + ( n − i + 1 )) .
Proof. Note that car 1 has n n n possible preferences, none of which make it unlucky. Parking the cars one at a time, each subsequent car i i i , regardless of how its predecessors have parked, has i − 1 i-1 i − 1 possible preferences that would make it unlucky (that is selecting a preference among the spots occupied by the previous i − 1 i-1 i − 1 cars) and thus increase the number of unlucky cars by 1 and has n − i + 1 n-i+1 n − i + 1 preferences that would not increase the number of unlucky cars. Thus, the generating function is ∏ i = 1 n ( ( i − 1 ) q + ( n − i + 1 ) ) \prod_{i=1}^{n}((i-1)q+(n-i+1)) ∏ i = 1 n (( i − 1 ) q + ( n − i + 1 )) . □
Note that the argument in the proof of Theorem 4.1 would apply to any parking scheme where there are no bumps and every preference list is a parking function. In particular, up to reindexing, this is the same as the analogous generating function given for parking functions of Type B in [10 ] . The same expression will also appear in a different context when we consider the backgammon parking scheme (see Theorem 4.2 ). The coefficients of q i q^i q i and q n − 1 − i q^{n-1-i} q n − 1 − i are always the same and the table of coefficients is given in OEIS A071208 .
Theorem 1.14. For x ∈ [ n − 1 ] x \in[n-1] x ∈ [ n − 1 ] , the number of Monopoly parking functions α ∈ M P F n \alpha\in\mathrm{MPF}_n α ∈ MPF n with displacement multiset D M ( α ) = { x } \mathcal{D}_{\mathrm{M}}(\alpha)=\{x\} D M ( α ) = { x } is
N M ( { x } ) = H n − H x + H n − x + 1 − 1. N_{\mathrm{M}}(\{x\})=H_n-H_x+H_{n-x+1}-1. N M ({ x }) = H n − H x + H n − x + 1 − 1. Proof. A displacement multiset of cardinality 1 means that there is exactly one unlucky car. Specifically, when the displacement multiset is { x } \{x\} { x } , there is one doubly preferred spot, which differs by x x x from the spot that no car preferred. The higher-indexed car with the doubled preference ends up in the undesired spot.
We begin by counting the number of ways a car that prefers spot i i i ends up in spot m m m (and all other cars get what they want). Suppose the unlucky car is car k k k . Its predecessors must use all the spots before spot m m m but not use spot m m m , which can happen in ( n − m k − m ) \binom{n-m}{k-m} ( k − m n − m ) ways. If i < m i<m i < m , then all these ways have the spot car k k k wanted already occupied when car k k k tries to park. If i > m i>m i > m , we need to specify that spot i i i is also used by some predecessor of car k k k , so the predecessors of car k k k can park in ( n − m − 1 k − m − 1 ) \binom{n-m-1}{k-m-1} ( k − m − 1 n − m − 1 ) ways. There are then ( k − 1 ) ! (k-1)! ( k − 1 )! ways to permute the preferences of the predecessors and ( n − k ) ! (n-k)! ( n − k )! ways to permute the preferences of the successors of car k k k among the spots still available after car k k k parks. Now the pairs of ( i , m ) (i,m) ( i , m ) that give a difference of x x x are ( 1 , x + 1 ) , ( 2 , x + 2 ) , … ( n − x , n ) (1,x+1),(2,x+2),\ldots(n-x,n) ( 1 , x + 1 ) , ( 2 , x + 2 ) , … ( n − x , n ) and ( x + 1 , 1 ) , ( x + 2 , 2 ) , … , ( n , n − x ) (x+1,1),(x+2,2),\ldots,(n,n-x) ( x + 1 , 1 ) , ( x + 2 , 2 ) , … , ( n , n − x ) .
We will prove the following two claims:
Claim 1. For 1 ≤ j ≤ n − x 1\le j\le n-x 1 ≤ j ≤ n − x , the number of ways to get ( j , x + j ) (j,x+j) ( j , x + j ) is n ! / ( x + j ) n!/(x+j) n ! / ( x + j ) .
Claim 2. For 1 ≤ j ≤ n − x 1\le j\le n-x 1 ≤ j ≤ n − x , the number of ways to get ( x + j , j ) (x+j,j) ( x + j , j ) is n ! / ( j + 1 ) n!/(j+1) n ! / ( j + 1 ) .
Proof of Claim 1. The number of ways to get ( j , x + j ) (j,x+j) ( j , x + j ) is
∑ k = 1 n ( k − 1 ) ! ( n − k ) ! ( n − ( j + x ) k − ( j + x ) ) = ∑ k = j + x n ( k − 1 ) ! ( n − ( j + x ) ) ! ( k − ( j + x ) ) ! . (10) \sum_{k=1}^{n}(k-1)!(n-k)!\binom{n-(j+x)}{k-(j+x)}
=
\sum_{k=j+x}^{n}(k-1)!\frac{(n-(j+x))!}{(k-(j+x))!}. \tag*{(10)} k = 1 ∑ n ( k − 1 )! ( n − k )! ( k − ( j + x ) n − ( j + x ) ) = k = j + x ∑ n ( k − 1 )! ( k − ( j + x ))! ( n − ( j + x ))! . (10) where, as usual, ( a b ) = 0 \binom{a}{b}=0 ( b a ) = 0 whenever b < 0 b<0 b < 0 .
Next, we establish the following identity:
∑ k = m n ( k − 1 ) ! ( k − m ) ! = n ! m ( n − m ) ! . \sum_{k=m}^{n}\frac{(k-1)!}{(k-m)!}=\frac{n!}{m(n-m)!}. k = m ∑ n ( k − m )! ( k − 1 )! = m ( n − m )! n ! . We fix m m m and proceed by induction on n n n . For the base case of n = m n=m n = m , we have ( m − 1 ) ! = m ! m (m-1)!=\frac{m!}{m} ( m − 1 )! = m m ! . Then, assuming the desired statement holds for n = n ′ n=n' n = n ′ , we have
∑ k = m n ′ + 1 ( k − 1 ) ! ( k − m ) ! = n ′ ! ( n ′ + 1 − m ) ! + ∑ k = m n ′ ( k − 1 ) ! ( k − m ) ! = n ′ ! ( n ′ + 1 − m ) ! + n ′ ! m ( n ′ − m ) ! = m ( n ′ ! ) + ( n ′ + 1 − m ) ( n ′ ! ) m ( n ′ + 1 − m ) ! = ( n ′ + 1 ) ! m ( n ′ + 1 − m ) ! . \begin{aligned}
\sum_{k=m}^{n'+1}\frac{(k-1)!}{(k-m)!}
&=\frac{n'!}{(n'+1-m)!}+\sum_{k=m}^{n'}\frac{(k-1)!}{(k-m)!}\\
&=\frac{n'!}{(n'+1-m)!}+\frac{n'!}{m(n'-m)!}\\
&=\frac{m(n'!)+(n'+1-m)(n'!)}{m(n'+1-m)!}\\
&=\frac{(n'+1)!}{m(n'+1-m)!}.
\end{aligned} k = m ∑ n ′ + 1 ( k − m )! ( k − 1 )! = ( n ′ + 1 − m )! n ′ ! + k = m ∑ n ′ ( k − m )! ( k − 1 )! = ( n ′ + 1 − m )! n ′ ! + m ( n ′ − m )! n ′ ! = m ( n ′ + 1 − m )! m ( n ′ !) + ( n ′ + 1 − m ) ( n ′ !) = m ( n ′ + 1 − m )! ( n ′ + 1 )! . completing the induction. Using this identity in (10) yields that the number of ways to get ( j , x + j ) (j,x+j) ( j , x + j ) is
( n − ( j + x ) ) ! ∑ k = j + x n ( k − 1 ) ! ( k − ( j + x ) ) ! = ( n − ( j + x ) ) ! n ! ( j + x ) ( n − ( j + x ) ) ! = n ! j + x . (n-(j+x))!\sum_{k=j+x}^{n}\frac{(k-1)!}{(k-(j+x))!}
=(n-(j+x))!\frac{n!}{(j+x)(n-(j+x))!}
=\frac{n!}{j+x}. ( n − ( j + x ))! k = j + x ∑ n ( k − ( j + x ))! ( k − 1 )! = ( n − ( j + x ))! ( j + x ) ( n − ( j + x ))! n ! = j + x n ! .
Proof of Claim 2. Using the same identity, we have that the number of ways to get ( x + j , j ) (x+j,j) ( x + j , j ) is
∑ k = 1 n ( k − 1 ) ! ( n − k ) ! ( n − j − 1 k − j − 1 ) = ∑ k = j + 1 n ( k − 1 ) ! ( n − j − 1 ) ! ( k − j − 1 ) ! = ( n − j − 1 ) ! ∑ k = j + 1 n ( k − 1 ) ! ( k − j − 1 ) ! = ( n − j − 1 ) ! n ! ( j + 1 ) ( n − ( j + 1 ) ) ! = n ! j + 1 . \begin{aligned}
\sum_{k=1}^{n}(k-1)!(n-k)!\binom{n-j-1}{k-j-1}
&=\sum_{k=j+1}^{n}(k-1)!\frac{(n-j-1)!}{(k-j-1)!}\\
&=(n-j-1)!\sum_{k=j+1}^{n}\frac{(k-1)!}{(k-j-1)!}\\
&=(n-j-1)!\frac{n!}{(j+1)(n-(j+1))!}\\
&=\frac{n!}{j+1}.
\end{aligned} k = 1 ∑ n ( k − 1 )! ( n − k )! ( k − j − 1 n − j − 1 ) = k = j + 1 ∑ n ( k − 1 )! ( k − j − 1 )! ( n − j − 1 )! = ( n − j − 1 )! k = j + 1 ∑ n ( k − j − 1 )! ( k − 1 )! = ( n − j − 1 )! ( j + 1 ) ( n − ( j + 1 ))! n ! = j + 1 n ! .
Thus, the number of ways to get ( x + j , j ) (x+j,j) ( x + j , j ) is as claimed. □ \square □
In total, these cases yield
n ! ( ∑ j = 1 n − x 1 x + j + 1 j + 1 ) = n ! ( ∑ i = x + 1 n 1 i + ∑ i = 2 n − x + 1 1 i ) = n ! ( H n − H x + H n − x + 1 − 1 ) . n!\left(\sum_{j=1}^{n-x}\frac{1}{x+j}+\frac{1}{j+1}\right)
=n!\left(\sum_{i=x+1}^{n}\frac{1}{i}+\sum_{i=2}^{n-x+1}\frac{1}{i}\right)
=n!(H_n-H_x+H_{n-x+1}-1). n ! ( j = 1 ∑ n − x x + j 1 + j + 1 1 ) = n ! ( i = x + 1 ∑ n i 1 + i = 2 ∑ n − x + 1 i 1 ) = n ! ( H n − H x + H n − x + 1 − 1 ) .
□ \square □
Displacement for Backgammon Parking Functions
Under the backgammon parking scheme, the lucky cars are precisely those which are the highest-numbered car with their respective preference. Thus, the number of unlucky cars, unlucky B ( α ) \operatorname{unlucky}_B(\alpha) unlucky B ( α ) in the preference list α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n is n n n minus the number of distinct preferences in α \alpha α .
We let bump ( α ) \operatorname{bump}(\alpha) bump ( α ) denote the number of bumps taking place for the preference list α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n .
Theorem 4.2. The generating function B ( q ) B(q) B ( q ) for the number of bumps under the backgammon parking scheme is given by
B ( q ) = ∑ α ∈ B P F n q bump ( α ) = ∏ i = 1 n ( ( i − 1 ) q + ( n − i + 1 ) ) . B(q)=\sum_{\alpha\in\mathrm{BPF}_n}q^{\operatorname{bump}(\alpha)}
=\prod_{i=1}^{n}\bigl((i-1)q+(n-i+1)\bigr). B ( q ) = α ∈ BPF n ∑ q bump ( α ) = i = 1 ∏ n ( ( i − 1 ) q + ( n − i + 1 ) ) .
Proof. Each car i i i , regardless of how its predecessors have parked, has i − 1 i-1 i − 1 possible preferences that result in car i i i performing a bump and n − i + 1 n-i+1 n − i + 1 preferences which do not. Thus car i i i contributes a factor of ( i − 1 ) q + ( n − i + 1 ) (i-1)q+(n-i+1) ( i − 1 ) q + ( n − i + 1 ) to the generating function. □ \square □
Note that this generating function matches the expression in Theorem 4.1 for the number of unlucky cars when parking under the Monopoly parking scheme. We now give a count for backgammon parking functions with a given displacement multiset with one element, analogous to the Monopoly result presented in Theorem 1.14.
Theorem 1.15. For x ∈ [ n − 1 ] x\in[n-1] x ∈ [ n − 1 ] , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x } \mathcal{D}_B(\alpha)=\{x\} D B ( α ) = { x } is
N B ( { x } ) = ( n − x ) n ! . N_B(\{x\})=(n-x)n!. N B ({ x }) = ( n − x ) n ! .
Proof. Exactly n − 1 n-1 n − 1 cars park in their preferred spot. The remaining car must be in the one spot that was undesired, which means the duplicated preference must differ by x x x from the label of the undesired spot. Under the backgammon parking scheme, the one car that gets bumped is the lower-numbered car with the duplicated preference and since every other car ends up in its preferred spot, the bumped car automatically ends up in the undesired spot. That is, only the multiset of preferences matters, not the order. There are 2 ( n − x ) 2(n-x) 2 ( n − x ) ways to pick the pair of the duplicate preference and the undesired spot. There are ( n 2 ) \binom{n}{2} ( 2 n ) ways to pick which two cars have the same preference and ( n − 2 ) ! (n-2)! ( n − 2 )! ways to permute the preferences of the other cars. This gives a total of ( n − x ) n ! (n-x)n! ( n − x ) n ! backgammon parking functions with displacement multiset { x } \{x\} { x } . □ \square □
We now consider the number of backgammon parking functions with a displacement multiset with two elements.
Theorem 1.16. For x 1 , x 2 ∈ [ n − 1 ] x_1,x_2 \in[n-1] x 1 , x 2 ∈ [ n − 1 ] with x 1 > x 2 x_1>x_2 x 1 > x 2 , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x 1 , x 2 } \mathcal{D}_{B}(\alpha)=\{x_1,x_2\} D B ( α ) = { x 1 , x 2 } is
N B ( { x 1 , x 2 } ) = { n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) , when n ≥ x 1 + x 2 , n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + ( 3 x 1 x 2 + 4 x 1 ) ) , otherwise. (11) N_B(\{x_1,x_2\})=
\begin{cases}
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+8)n+(3x_1x_2+8x_1+4x_2)\right), & \text{when } n\ge x_1+x_2,\\
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+4)n+(3x_1x_2+4x_1)\right), & \text{otherwise.}
\end{cases} \tag*{(11)} N B ({ x 1 , x 2 }) = { 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) , 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + ( 3 x 1 x 2 + 4 x 1 ) ) , when n ≥ x 1 + x 2 , otherwise. (11) For x 1 ∈ [ n − 1 ] x_1\in[n-1] x 1 ∈ [ n − 1 ] , the number of backgammon parking functions α ∈ B P F n \alpha\in\mathrm{BPF}_n α ∈ BPF n with displacement multiset D B ( α ) = { x 1 , x 1 } \mathcal{D}_{B}(\alpha)=\{x_1,x_1\} D B ( α ) = { x 1 , x 1 } is
N B ( { x 1 , x 1 } ) = { n ! 12 ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) , when n ≥ 2 x 1 , n ! 4 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , otherwise. (12) N_B(\{x_1,x_1\})=
\begin{cases}
\frac{n!}{12}\left(3n^2-(6x_1+7)n+(3x_1^2+11x_1)\right), & \text{when } n\ge2x_1,\\
\frac{n!}{4}\left(n^2-(2x_1+1)n+(x_1^2+x_1)\right), & \text{otherwise.}
\end{cases} \tag*{(12)} N B ({ x 1 , x 1 }) = { 12 n ! ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) , 4 n ! ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , when n ≥ 2 x 1 , otherwise. (12)
Proof. For a displacement multiset { x 1 , x 2 } \{x_1,x_2\} { x 1 , x 2 } with x 1 ≥ x 2 x_1\ge x_2 x 1 ≥ x 2 , we can have either three cars with a preference for the same parking spot, while all other cars have a distinct preference, or we can have two pairs of cars with the same preference (but distinct from each other). The first case we refer to as having “a triple-preference”, and the second case we refer to as having “two double-preferences”. Note that in either case, the unlucky cars end up in the two undesired spots, so their positions (up to swapping which unlucky car ends up in which undesired spot) are determined by the multiset of preferences. We now consider each case separately and start by letting T ( x 1 , x 2 ) T(x_1,x_2) T ( x 1 , x 2 ) denote the number of preference lists arising from the triple-preference case.
To find the value of T ( x 1 , x 2 ) T(x_1,x_2) T ( x 1 , x 2 ) , we first count preference lists containing a triple-preference for spot p p p which have no other repeated preferences and satisfy either of the following conditions:
neither spot p + x 1 p+x_1 p + x 1 nor p − x 2 p-x_2 p − x 2 is preferred by any car,
neither spot p − x 1 p-x_1 p − x 1 nor p + x 2 p+x_2 p + x 2 is preferred by any car.
If x 1 + x 2 ≥ n x_1+x_2\ge n x 1 + x 2 ≥ n , then no such triple-preferences can occur as the undesired spots p − x 1 , p + x 2 p-x_1,p+x_2 p − x 1 , p + x 2 or p − x 2 , p + x 1 p-x_2,p+x_1 p − x 2 , p + x 1 would differ by at least n n n . Hence, in this case, it must be that x 1 + x 2 < n x_1+x_2<n x 1 + x 2 < n . For x 1 ≠ x 2 x_1\ne x_2 x 1 = x 2 , there are 2 ( n − x 1 − x 2 ) 2(n-x_1-x_2) 2 ( n − x 1 − x 2 ) such triple-preferences as p p p can range from 1 + x 1 1+x_1 1 + x 1 to n − x 2 n-x_2 n − x 2 or from 1 + x 2 1+x_2 1 + x 2 to n − x 1 n-x_1 n − x 1 depending on the subcase. For x 1 = x 2 x_1=x_2 x 1 = x 2 , there are only n − x 1 − x 2 = n − 2 x 1 n-x_1-x_2=n-2x_1 n − x 1 − x 2 = n − 2 x 1 such triple-preferences as the pairs p − x 1 , p + x 2 p-x_1,p+x_2 p − x 1 , p + x 2 and p − x 2 , p + x 1 p-x_2,p+x_1 p − x 2 , p + x 1 now coincide and p p p can range from 1 + x 1 1+x_1 1 + x 1 to n − x 1 n-x_1 n − x 1 . If x 1 > x 2 x_1>x_2 x 1 > x 2 , we also have to consider when the undesired spots are both higher or both lower than the triple-preference p p p , which yields another 2 ( n − x 1 ) 2(n-x_1) 2 ( n − x 1 ) possible choices, as p p p can range from 1 1 1 to n − x 1 n-x_1 n − x 1 when both undesired spots are greater than p p p or from x 1 + 1 x_1+1 x 1 + 1 to n n n when both undesired spots are less than p p p . Then there are ( n 3 ) \binom{n}{3} ( 3 n ) ways to pick which cars have the exact same preference, times ( n − 3 ) ! (n-3)! ( n − 3 )! ways to decide which remaining cars get which remaining preferences. Thus, the total number of preference lists with a triple-preference and displacement multiset { x 1 , x 2 } \{x_1,x_2\} { x 1 , x 2 } is
T ( x 1 , x 2 ) = { n ! 6 ( 4 n − 4 x 1 − 2 x 2 ) , for x 1 > x 2 , n ≥ x 1 + x 2 , n ! 6 ( 2 n − 2 x 1 ) , for x 1 > x 2 , n < x 1 + x 2 , n ! 6 ( n − 2 x 1 ) , for x 1 = x 2 , n ≥ 2 x 1 , 0 , for x 1 = x 2 , n < 2 x 1 . T(x_1,x_2)=
\begin{cases}
\frac{n!}{6}(4n-4x_1-2x_2), & \text{for } x_1>x_2,\ n\ge x_1+x_2,\\
\frac{n!}{6}(2n-2x_1), & \text{for } x_1>x_2,\ n<x_1+x_2,\\
\frac{n!}{6}(n-2x_1), & \text{for } x_1=x_2,\ n\ge2x_1,\\
0, & \text{for } x_1=x_2,\ n<2x_1.
\end{cases} T ( x 1 , x 2 ) = ⎩ ⎨ ⎧ 6 n ! ( 4 n − 4 x 1 − 2 x 2 ) , 6 n ! ( 2 n − 2 x 1 ) , 6 n ! ( n − 2 x 1 ) , 0 , for x 1 > x 2 , n ≥ x 1 + x 2 , for x 1 > x 2 , n < x 1 + x 2 , for x 1 = x 2 , n ≥ 2 x 1 , for x 1 = x 2 , n < 2 x 1 .
In the case of two double-preferences, the lower-numbered car in each double ends up in an undesired spot. If the double-preferences are spots a a a and b b b (with a ≠ b a\ne b a = b ), the undesired spots are c c c and d d d with ∣ a − c ∣ = x 1 , ∣ b − d ∣ = x 2 |a-c|=x_1,|b-d|=x_2 ∣ a − c ∣ = x 1 , ∣ b − d ∣ = x 2 . We have to consider the case where the unlucky car that preferred spot a a a parks in spot d d d and where the unlucky car that preferred spot b b b parks in spot c c c . If this gives the same displacement multiset, it means that either ∣ a − d ∣ = x 1 \lvert a-d\rvert=x_1 ∣ a − d ∣ = x 1 , ∣ b − c ∣ = x 2 \lvert b-c\rvert=x_2 ∣ b − c ∣ = x 2 or that ∣ a − d ∣ = x 2 \lvert a-d\rvert=x_2 ∣ a − d ∣ = x 2 , ∣ b − c ∣ = x 1 \lvert b-c\rvert=x_1 ∣ b − c ∣ = x 1 . In the former case, we get that a a a is equidistant from d d d and c c c so it is exactly in between, but b b b is also equidistant from c c c and d d d , which gives a contradiction. In the latter case, d d d is equidistant from a a a and b b b , and c c c is also equidistant from a a a and b b b , again giving a contradiction. Thus, we only get the displacement multiset { x 1 , x 2 } \{x_1,x_2\} { x 1 , x 2 } if the unlucky car which preferred spot a a a parks in spot c c c and unlucky car which preferred spot b b b parks in spot d d d .
Next, we determine the number of ways to select the double-preferred spots a , b a,b a , b and the undesired spots c c c and d d d . The pair a , c a,c a , c differs by x 1 x_1 x 1 and the pair b , d b,d b , d differs by x 2 x_2 x 2 . There are n − x 1 n-x_1 n − x 1 ways to pick a pair that differs by x 1 x_1 x 1 and n − x 2 n-x_2 n − x 2 ways to pick a pair that differs by x 2 x_2 x 2 , but we also have to make sure not to count the cases where these pairs overlap.
When x 1 ≠ x 2 x_1\ne x_2 x 1 = x 2 , the overlap occurs when some spot is x 1 x_1 x 1 away from the second and x 2 x_2 x 2 away from the third, which is precisely what we tabulated previously when counting triples.
This leaves ( n − x 1 ) ( n − x 2 ) − ( 4 n − 4 x 1 − 2 x 2 ) = n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) (n-x_1)(n-x_2)-(4n-4x_1-2x_2)=n^2-(x_1+x_2+4)n+(x_1x_2+4x_1+2x_2) ( n − x 1 ) ( n − x 2 ) − ( 4 n − 4 x 1 − 2 x 2 ) = n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) possibilities when x 1 + x 2 ≤ n x_1+x_2\le n x 1 + x 2 ≤ n and ( n − x 1 ) ( n − x 2 ) − 2 ( n − x 1 ) = n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) (n-x_1)(n-x_2)-2(n-x_1)=n^2-(x_1+x_2+2)n+(x_1x_2+2x_1) ( n − x 1 ) ( n − x 2 ) − 2 ( n − x 1 ) = n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) possibilities when x 1 + x 2 > n x_1+x_2>n x 1 + x 2 > n .
When x 1 = x 2 x_1=x_2 x 1 = x 2 , we have 1 2 ( n − x 1 ) ( n − x 1 − 1 ) \frac{1}{2}(n-x_1)(n-x_1-1) 2 1 ( n − x 1 ) ( n − x 1 − 1 ) ways to pick two distinct pairs with each differing by x 1 x_1 x 1 , but for n ≥ 2 x 1 n\ge2x_1 n ≥ 2 x 1 , we must subtract the n − 2 x 1 n-2x_1 n − 2 x 1 ways where they overlap. This leaves 1 2 ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) \frac{1}{2}(n^2-(2x_1+3)n+x_1^2+5x_1) 2 1 ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) options for n ≥ 2 x 1 n\ge2x_1 n ≥ 2 x 1 and 1 2 ( n − x 1 ) ( n − x 1 − 1 ) \frac{1}{2}(n-x_1)(n-x_1-1) 2 1 ( n − x 1 ) ( n − x 1 − 1 ) for n < 2 x 1 n<2x_1 n < 2 x 1 .
Since the pair a , c a,c a , c differs by x 1 x_1 x 1 and the pair b , d b,d b , d differs by x 2 x_2 x 2 , the freedom to interchange the values of a a a and c c c contributes a factor of 2 to the count. Similarly, we get a factor of 2 for the pair b , d b,d b , d .
Hence, the number of ways to select the double-preferred spots a , b a,b a , b and the undesired spots c c c and d d d is given by:
{ 4 ( n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , 4 ( n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) ) , for x 1 > x 2 , n < x 1 + x 2 , 2 ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) , for x 1 = x 2 , n ≥ 2 x 1 , 2 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 = x 2 , n < 2 x 1 . \begin{cases}
4\left(n^2-(x_1+x_2+4)n+(x_1x_2+4x_1+2x_2)\right), & \text{for }x_1>x_2,\ n\ge x_1+x_2,\\
4\left(n^2-(x_1+x_2+2)n+(x_1x_2+2x_1)\right), & \text{for }x_1>x_2,\ n<x_1+x_2,\\
2\left(n^2-(2x_1+3)n+x_1^2+5x_1\right), & \text{for }x_1=x_2,\ n\ge2x_1,\\
2\left(n^2-(2x_1+1)n+(x_1^2+x_1)\right), & \text{for }x_1=x_2,\ n<2x_1.
\end{cases} ⎩ ⎨ ⎧ 4 ( n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) ) , 4 ( n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) ) , 2 ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) , 2 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , for x 1 > x 2 , n < x 1 + x 2 , for x 1 = x 2 , n ≥ 2 x 1 , for x 1 = x 2 , n < 2 x 1 .
In addition, there are ( n 2 ) ( n − 2 2 ) \binom{n}{2}\binom{n-2}{2} ( 2 n ) ( 2 n − 2 ) ways to pick which cars prefer spots a , b a,b a , b and ( n − 4 ) ! (n-4)! ( n − 4 )! ways to assign the remaining cars to the remaining preferred spots. For bookkeeping purposes, we denote this count by:
K ( x 1 , x 2 ) : = { n ! ( n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , n ! ( n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) ) , for x 1 > x 2 , n < x 1 + x 2 , n ! 2 ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) , for x 1 = x 2 , n ≥ 2 x 1 , n ! 2 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 = x 2 , n < 2 x 1 . K(x_1,x_2):=
\begin{cases}
n!\left(n^2-(x_1+x_2+4)n+(x_1x_2+4x_1+2x_2)\right), & \text{for }x_1>x_2,\ n\ge x_1+x_2,\\
n!\left(n^2-(x_1+x_2+2)n+(x_1x_2+2x_1)\right), & \text{for }x_1>x_2,\ n<x_1+x_2,\\
\frac{n!}{2}\left(n^2-(2x_1+3)n+x_1^2+5x_1\right), & \text{for }x_1=x_2,\ n\ge2x_1,\\
\frac{n!}{2}\left(n^2-(2x_1+1)n+(x_1^2+x_1)\right), & \text{for }x_1=x_2,\ n<2x_1.
\end{cases} K ( x 1 , x 2 ) := ⎩ ⎨ ⎧ n ! ( n 2 − ( x 1 + x 2 + 4 ) n + ( x 1 x 2 + 4 x 1 + 2 x 2 ) ) , n ! ( n 2 − ( x 1 + x 2 + 2 ) n + ( x 1 x 2 + 2 x 1 ) ) , 2 n ! ( n 2 − ( 2 x 1 + 3 ) n + x 1 2 + 5 x 1 ) , 2 n ! ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , for x 1 > x 2 , n < x 1 + x 2 , for x 1 = x 2 , n ≥ 2 x 1 , for x 1 = x 2 , n < 2 x 1 .
We claim that exactly half of these K ( x 1 , x 2 ) K(x_1,x_2) K ( x 1 , x 2 ) possible preference lists actually give displacement multiset { x 1 , x 2 } \{x_1,x_2\} { x 1 , x 2 } . Assuming this claim holds, the total number of preference lists that produce the displacement multiset D B = { x 1 , x 2 } \mathcal{D}_B=\{x_1,x_2\} D B = { x 1 , x 2 } is then N B ( { x 1 , x 2 } ) = T ( x 1 , x 2 ) + K ( x 1 , x 2 ) 2 N_B(\{x_1,x_2\})=T(x_1,x_2)+\frac{K(x_1,x_2)}{2} N B ({ x 1 , x 2 }) = T ( x 1 , x 2 ) + 2 K ( x 1 , x 2 ) , which simplifies to
N B ( { x 1 , x 2 } ) = { n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , n ! 6 ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + 3 x 1 x 2 + 4 x 1 ) , for x 1 > x 2 , n < x 1 + x 2 , n ! 12 ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) , for x 1 = x 2 , n ≥ 2 x 1 , n ! 4 ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 = x 2 , n < 2 x 1 . (13) N_B(\{x_1,x_2\}) =
\begin{cases}
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+8)n+(3x_1x_2+8x_1+4x_2)\right), & \text{for } x_1>x_2,\ n\ge x_1+x_2,\\
\frac{n!}{6}\left(3n^2-(3x_1+3x_2+4)n+3x_1x_2+4x_1\right), & \text{for } x_1>x_2,\ n<x_1+x_2,\\
\frac{n!}{12}\left(3n^2-(6x_1+7)n+(3x_1^2+11x_1)\right), & \text{for } x_1=x_2,\ n\ge2x_1,\\
\frac{n!}{4}\left(n^2-(2x_1+1)n+(x_1^2+x_1)\right), & \text{for } x_1=x_2,\ n<2x_1.
\end{cases} \tag*{(13)} N B ({ x 1 , x 2 }) = ⎩ ⎨ ⎧ 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 8 ) n + ( 3 x 1 x 2 + 8 x 1 + 4 x 2 ) ) , 6 n ! ( 3 n 2 − ( 3 x 1 + 3 x 2 + 4 ) n + 3 x 1 x 2 + 4 x 1 ) , 12 n ! ( 3 n 2 − ( 6 x 1 + 7 ) n + ( 3 x 1 2 + 11 x 1 ) ) , 4 n ! ( n 2 − ( 2 x 1 + 1 ) n + ( x 1 2 + x 1 ) ) , for x 1 > x 2 , n ≥ x 1 + x 2 , for x 1 > x 2 , n < x 1 + x 2 , for x 1 = x 2 , n ≥ 2 x 1 , for x 1 = x 2 , n < 2 x 1 . (13)
Notice that Equation (13) recovers Equations (1) and (2), which completes the proof of the theorem.
We now prove the claim. If the four cars with preferred spots a a a , b b b are numbered y 1 < y 2 < y 3 < y 4 y_1<y_2<y_3<y_4 y 1 < y 2 < y 3 < y 4 , then in the partial parking outcome after step y 4 y_4 y 4 , there are two cars not in their preferred spots and the relative order is determined by the preference of car y 4 y_4 y 4 .
If car y 4 y_4 y 4 prefers spot b b b , then the most recent car to be bumped is the unlucky car preferring spot b b b . Thus, the unlucky car preferring spot b b b occupies a higher-numbered spot in the partial parking outcome after step y 4 y_4 y 4 than the unlucky car preferring spot a a a . Similarly, if y 4 y_4 y 4 prefers spot a a a , then it will bump the unlucky car preferring spot a a a into a higher-numbered spot than the unlucky car preferring spot b b b . Thus, in the partial parking outcome after step y 4 y_4 y 4 , the two possible relative orders of the unlucky cars preferring spots a a a and b b b are equally likely.
For a fixed set of preferences for the other n − 4 n-4 n − 4 cars, the relative order of the unlucky cars in the partial parking outcome after step y 4 y_4 y 4 determines the final relative order of the unlucky cars, namely which ends up in spot c c c and which ends up in spot d d d . Thus, outcomes where the unlucky cars which preferred spots a a a and b b b park in spots c c c and d d d , respectively, and outcomes where they park in spots d d d and c c c , respectively, are equally likely. Thus, the total number of preference lists with displacement multiset { x 1 , x 2 } \{x_1,x_2\} { x 1 , x 2 } arising from the two double-preferences case is 1 2 K ( x 1 , x 2 ) \frac{1}{2}K(x_1,x_2) 2 1 K ( x 1 , x 2 ) , which completes the proof of the claim.
A Comparison
We conclude this section by comparing the number of backgammon and Monopoly parking functions for the same displacement multiset with one element.
Theorem 1.17. For x ∈ [ n − 1 ] x\in[n-1] x ∈ [ n − 1 ] , the number N M ( { x } ) N_M(\{x\}) N M ({ x }) of Monopoly parking functions in M P F n \mathrm{MPF}_n MPF n with displacement multiset { x } \{x\} { x } is at most the number N B ( { x } ) N_B(\{x\}) N B ({ x }) of backgammon parking functions in B P F n \mathrm{BPF}_n BPF n with the displacement multiset { x } \{x\} { x } . That is, we have,
N M ( { x } ) ≤ N B ( { x } ) . N_M(\{x\})\le N_B(\{x\}). N M ({ x }) ≤ N B ({ x }) . Moreover, equality holds if and only if n = 2 n=2 n = 2 and x = 1 x=1 x = 1 .
Proof. For there to be exactly one unlucky car, there must be two cars with the same preference, while every other car has a distinct preference. For the one unlucky car to have displacement x x x , the doubly preferred spot and the undesired spot must differ by x x x . Under the backgammon parking scheme, any such preference list yields displacement multiset { x } \{x\} { x } , but under the Monopoly parking scheme, there is a possibility that the higher-indexed car with the repeated preference blocks a later car from its preferred spot, causing another car to be unlucky. Thus,
N M ( { x } ) ≤ N B ( { x } ) . (14) N_M(\{x\})\le N_B(\{x\}). \tag*{(14)} N M ({ x }) ≤ N B ({ x }) . (14)
When n = 2 n=2 n = 2 , the only option is that x = 1 x=1 x = 1 . In this case, there are only two spots and only two cars, so the only such preference lists are ( 1 , 1 ) (1,1) ( 1 , 1 ) and ( 2 , 2 ) (2,2) ( 2 , 2 ) both of which have displacement multiset { 1 } \{1\} { 1 } for both the Monopoly and backgammon parking schemes. Thus, in this case, we achieve equality in (14) .
When n ≥ 3 n\ge3 n ≥ 3 , regardless of the value of x x x , there is some preference list that has displacement multiset { x } \{x\} { x } under the backgammon parking scheme, but not under the Monopoly parking scheme. In particular, when x = 1 x=1 x = 1 , consider any preference list where the first two cars prefer spot 2 and the remaining cars have distinct preferences in [ n ] ∖ { 2 , 3 } [n]\setminus\{2,3\} [ n ] ∖ { 2 , 3 } . When x > 1 x>1 x > 1 , consider any preference list where the first two cars prefer spot 1 and the remaining cars have distinct preferences in [ n ] ∖ { 1 , x + 1 } [n] \setminus\{1,x+1\} [ n ] ∖ { 1 , x + 1 } . Thus, in this case, the inequality in (14) is strict. □
Future directions
We conclude this work by providing some questions for further study.
In Theorem 1.6, we established that the maximum value of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ is the Catalan number C n C_n C n , while in Theorem 1.7, we established that the minimum value of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ is at least 2 n − 1 2^{n-1} 2 n − 1 . In Table 1 , we note the minimum values of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ computed for up to ten cars, along with the outcomes π \pi π obtaining these minima. The sequence does not appear on the OEIS, hence, we ask the following:
Table 1. Minimum value of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ for up to ten cars and each outcome π \pi π obtaining the minimum.
Question 5.1. For π ∈ S n \pi\in\mathfrak{S}_n π ∈ S n , what is the minimum value of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ ? Moreover, which outcomes achieve the minimum value?
While it remains an open problem to determine both the minimum cardinality of ∣ O B − 1 ( π ) ∣ |\mathcal{O}_B^{-1}(\pi)| ∣ O B − 1 ( π ) ∣ , as well as exactly which outcomes π \pi π achieve that minimum, the data in Table 1 suggests there may be a pattern characterizing the outcomes that achieve the minimum value. We leave this exploration to future work.
In Theorem 1.3 we determined exactly the number of preference lists yielding each possible outcome under the Monopoly parking scheme. However, we only determined exact values under the backgammon parking scheme for certain outcomes. For instance, in Theorem 1.8 and its corollaries, we determined ∣ O B − 1 ( n ( n − 1 ) ⋯ 21 ) ∣ |\mathcal{O}_B^{-1}(n(n-1)\cdots21)| ∣ O B − 1 ( n ( n − 1 ) ⋯ 21 ) ∣ , ∣ O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 2 ) ∣ |\mathcal{O}_B^{-1}(1(n)(n-1)\cdots2)| ∣ O B − 1 ( 1 ( n ) ( n − 1 ) ⋯ 2 ) ∣ , and ∣ O B − 1 ( 12 ( n ) ( n − 1 ) ⋯ 3 ) ∣ |\mathcal{O}_B^{-1}(12(n)(n-1)\cdots3)| ∣ O B − 1 ( 12 ( n ) ( n − 1 ) ⋯ 3 ) ∣ , all of which can be expressed as a sum involving Motzkin numbers. Hence, we ask:
Question 5.2. For fixed k ∈ N k \in\mathbb{N} k ∈ N , can ∣ O B − 1 ( 12 ⋯ ( k − 1 ) ( k ) ( n ) ( n − 1 ) ⋯ ( k + 2 ) ( k + 1 ) ) ∣ |\mathcal{O}_B^{-1}(12\cdots(k-1)(k)(n)(n-1)\cdots(k+2)(k+1))| ∣ O B − 1 ( 12 ⋯ ( k − 1 ) ( k ) ( n ) ( n − 1 ) ⋯ ( k + 2 ) ( k + 1 )) ∣ for n > k n > k n > k be expressed as a sum involving Motzkin numbers whose indices depend on n n n ?
Next, we provide some questions related to displacement. Recall that we studied the number of Monopoly and backgammon parking functions with a prescribed displacement multiset of small cardinality. Hence, it is natural to ask the following:
Question 5.3. Determine counts or bounds for the numbers N M ( Y ) N_M(Y) N M ( Y ) and N B ( Y ) N_B(Y) N B ( Y ) for multisets Y Y Y .
In Theorem 1.17, we showed that ∣ N M ( Y ) ∣ ≤ ∣ N B ( Y ) ∣ |N_M(Y)| \le|N_B(Y)| ∣ N M ( Y ) ∣ ≤ ∣ N B ( Y ) ∣ when ∣ Y ∣ = 1 |Y| = 1 ∣ Y ∣ = 1 . It would also be interesting to classify for which other Y Y Y this inequality holds.
Given a fixed preference list α \alpha α , the partial parking outcomes O M , t ( α ) \mathcal{O}_{M,t}(\alpha) O M , t ( α ) and O B , t ( α ) \mathcal{O}_{B,t}(\alpha) O B , t ( α ) under the Monopoly and backgammon parking schemes have the same spots filled after every step t t t . However, they often lead to distinct displacement multisets. Along these lines, we ask:
Question 5.4. For n n n cars, can we characterize and enumerate the preference lists that have the same displacement multiset under the backgammon and Monopoly parking schemes?
One can always consider a street with more spots than cars; hence we ask:
Question 5.5. How do our results on backgammon and Monopoly parking functions change if we are allowed to consider more spots than cars?
Acknowledgments
P. E. Harris was supported in part by a Simons Travel Support for Mathematicians award #00007621. A. Clifton was supported in part by the Institute for Basic Science (IBS-R029-C1) and by the grant 23-06815M of the Grant Agency of the Czech Republic. The contents of this work were solely generated by humans; no AI was used.
(A. Clifton) Department of Theoretical Computer Science, Czech Technical University in Prague, Prague, Czechia
Email address: alexander.clifton@fit.cvut.cz
(P. E. Harris) Department of Mathematical Sciences, University of Wisconsin-Milwaukee, Milwaukee, WI 53211 USA
Email address: peharris@uwm.edu
(M. Khaqan) Department of Mathematics, University of Toronto, Toronto, ON, Canada M5T 3J1
Email address: maryam.khaqan@utoronto.ca