A Generalization of Parking Functions Allowing Backward Movement

Classical parking functions are defined as the parking preferences for $n$ cars driving (from west to east) down a one-way street containing parking spaces labeled from $1$ to $n$ (from west to east). Cars drive down the street toward their preferred spot and park there if the spot is available. Otherwise, the car continues driving down the street and takes the first available parking space, if such a space exists. If all cars can park using this parking rule, we call the $n$-tuple containing the cars' parking preferences a parking function. In this paper, we introduce a generalization of the parking rule allowing cars whose preferred space is taken to first proceed up to $k$ spaces west of their preferred spot to park before proceeding east if all of those $k$ spaces are occupied. We call parking preferences which allow all cars to park under this new parking rule $k$-Naples parking functions of length $n$. This generalization gives a natural interpolation between classical parking functions, the case when $k=0$, and all $n$-tuples of positive integers $1$ to $n$, the case when $k\geq n-1$. Our main result provides a recursive formula for counting $k$-Naples parking functions of length $n$. We also give a characterization for the $k=1$ case by introducing a new function that maps $1$-Naples parking functions to classical parking functions, i.e. $0$-Naples parking functions. Lastly, we present a bijection between $k$-Naples parking functions of length $n$ whose entries are in weakly decreasing order and a family of signature Dyck paths.


Introduction
Parking functions were introduced independently by Ronald Pyke and by Alan Konheim and Benjamin Weiss in relation to hashing problems [5,6]. Parking functions are combinatorial objects defined as follows. Let the set of natural numbers be defined as N := {1, 2, 3, . . . }, and for n ∈ N let [n] := {1, . . . , n}. Now, consider n parking spaces on a one-way street arranged in a line numbered 1 to n from west to east. Suppose there are n cars, denoted c 1 , c 2 , . . . , c n , that drive in order down this one-way street. For all 1 ≤ i ≤ n, each car c i has a preferred parking spot a i ∈ [n] and multiple cars are allowed to have the same preference. This is illustrated 1 in Figure 1.
A parking preference of length n is an n-tuple of integers in [n] where the i-th component corresponds to the preferred parking spot of car c i . We denote the set of parking preferences of length n as P P n . Note that |P P n | = n n . For a parking preference α = (a 1 , . . . , a n ) ∈ P P n , we establish the following parking rule: for all 1 ≤ i ≤ n, c i starts at parking space 1 and drives toward its preferred parking spot a i . If a i is unoccupied c i parks. Otherwise, c i proceeds forward until it reaches the next available parking spot. If every parking spot numbered from a i up to and including n is taken, then c i is unable to park. On the other hand, if every car is able to park given the preference α ∈ P P n , then we say that α is a parking function. A necessary and sufficient condition to determine if a parking preference α = (a 1 , a 2 , . . . , a n ) ∈ P P n is a parking function is determined by considering β = (b 1 , . . . , b n ) which is the increasing rearrangement of the entries in α. Then, α is a parking function if and only if b i ≤ i for each i. We denote the set of all parking functions of length n as P F n . It is known that |P F n | = (n + 1) n−1 (see [5]).
Parking functions are interesting in their own right and have applications in combinatorics, group theory, the study of hyperplane arrangements, and computer science. Many generalizations of parking functions exist and the main results give formulas to count the number of generalized parking functions. For example, (n, m)-parking functions allow the n cars to park in a line of n ≤ m parking spots and are counted by (n − m + 1)(n + 1) m−1 [2]. Another generalization of parking functions given in [8], known as x-parking functions, are defined by generalizing the necessary and sufficient condition so that given α ∈ P P n and a vector x = (x 1 , . . . , x n ) ∈ Z n , α is an x-parking function if its increasing rearrangement β = (b 1 , . . . , b n ) satisfies b i ≤ x 1 + · · · + x i for each i. For a survey of classical parking functions and their generalizations, we refer the reader to [9].
In this paper, we study a new generalization of parking functions, introduced by Baumgardner in [1], called Naples parking functions. In this generalization, the parking rule for the parking preference α = (a 1 , a 2 , . . . , a n ) is as follows. Car c i drives to its preferred parking spot a i , and if the spot is empty c i parks there. Otherwise, c i first checks back to see if parking spot a i − 1 (the one directly behind its preferred parking spot) is available. If spot a i − 1 is empty and a i − 1 ≥ 1, c i parks there. Otherwise, c i continues east and parks in the first unoccupied spot. If under this new parking rule the parking preference α allows all cars to park, then we call α a Naples parking function. We extend this parking rule by allowing a car that finds its preferred parking spot occupied to look back up to k spaces, for 0 ≤ k < n. The car backs up one space at a time and parks in the first spot available. If none of the k spaces before its preferred parking spot are available, then the car continues east past its preferred spot and parks in the first available spot. If under the parking preference α all cars can park using this new parking rule, then we say that α is a k-Naples parking function of length n and we denote this set by P F n,k . Then P F n,0 = P F n , P F n,1 is the set of Naples parking functions, and P F n,k−1 ⊆ P F n,k for all 0 ≤ k < n.
Our first main result provides a recursive formula for the number of k-Naples parking functions of length n. Theorem 1.1. If k, n ∈ N with 0 ≤ k ≤ n − 1, then the number of k-Naples parking functions of length n + 1 is counted recursively by Given a recurrence, there are well-established ways in which one can develop closed formulas. However, these techniques cannot be applied to the recursive formula in Theorem 1.1 since simplifying the recursion by removing factors yields recurrences that enumerate combinatorial objects for which there are no known formulas. For example, if we simplify the recursion to a n+1 = n i=0 n i a i with seed values a 0 = a 1 = 1, it yields the Bell numbers 2 , for which there is no known closed formula. If we incorporate the factor (n − i + 1) n−i−1 to the simplified recurrence, then a n+1 = n i=0 n i (n−i+1) n−i−1 a i counts the number of forests of trees on n labeled nodes 3 , for which there is also no known closed formula. Lastly, incorporating the term min((i + 1) + k, n + 1) into the previous recurrence yields the recursion presented in Theorem 1.1.
In light of the fact that these subsets of the set P F n,k do not have closed formulas for their size, we focus our study on the growth of |P F * n,k | := |P F n,k \P F n,k−1 | as we fix n and increase k from 1 to n, and where P F * n,0 = ∅. Experimental evidence suggests that |P F * n,k | is largest when k = 1, which corresponds to the number of parking preferences gained by changing the parking rule defining classical parking functions to that defining Naples parking functions. For n = 25, 50, 75, 100 and 0 ≤ k ≤ n, we plot the size of P F * n,k in Figure 2. Figure 2. Plots for |P F * n,k | for varying values of n and with 1 ≤ k ≤ n. The scale of the y-axis is scaled by a factor of 10 34 , 10 83 , 10 139 , and 10 198 , when n = 25, 50, 75, and 100, respectively.
Given this observation, Naples parking functions are of particular interest. Our next main result gives a necessary and sufficient condition to characterizing Naples parking functions. Theorem 1.2. Fix n ∈ N. Let α = (a 1 , a 2 , . . . , a n ) ∈ P P n , and define T : P P n → P P n as T(α) = (τ (a 1 ), τ (a 2 ), . . . , τ (a n )), where τ (a i ) is defined Then α is a Naples parking function if and only if T(α) is a parking function.
It is known that every rearrangement of the entries of a parking function is also a parking function. However, this is not true for k-Naples parking functions that are not parking functions. Therefore, we study decreasing k-Naples parking functions of length n, those whose entries are in weakly-decreasing order, and give a bijection from this set to a set of decreasing lattice paths of length 2n, which we call k-lattice paths. These lattice paths are a particular family of signature Dyck paths and we enumerate certain families of them. We note that signature Dyck paths were defined by Cellabos and González D'León, but in general there are no known closed formulas enumerating these combinatorial objects [3]. Theorem 1.3. If n, k ∈ N with 1 ≤ k ≤ n, then the set of decreasing k-Naples parking functions of length n and the set of k-lattice paths of length 2n are in bijection. This paper is organized as follows. Section 2 gives a precise definition of the k-Naples parking functions, some illustrative examples, and some preliminary results. In Section 3, we prove Theorem 1.1, thereby providing a formula for computing the number of k-Naples parking functions for any length n. Then, in Section 4 and 5, we prove Theorem 1.2 and 1.3, respectively. For the interested reader, we scatter open problems throughout.

Background and preliminaries
Given an integer 1 ≤ k ≤ n − 1, we consider a new parking rule for the parking preference α = (a 1 , a 2 , . . . , a n ). Car c i drives to its preferred parking spot a i , and if the spot is occupied, then car c i first checks back one spot at a time to see if any of the parking spots in the set Note the intersection is present as cars cannot look back past the first parking spot. If any of the spots in A i,k are empty, then c i parks in the available spot a j ∈ A i,k which is closest to its preferred parking spot a i . If all of the parking spots in the set A i,k are occupied, then c i proceeds east until it reaches the first unoccupied parking spot after a i . If under this new parking rule the parking preference α allows all cars to park, then we call α a k-Naples parking function of length n. We denote the set of all k-Naples parking functions of length n by P F n,k . We illustrate these definitions below.
Example 2.1. Consider the parking preference (1,3,3,2). Notice that this parking preference is both a parking function and a Naples parking function. However, the order in which the cars park varies, depending on if we are using the classical parking rule or the Naples parking rule. According to the classical parking rule, we have that c 1 parks in the first space, c 2 in the third space, then c 3 , finding the third space occupied, continues east and parks in the fourth space, and c 4 parks in its preferred second space. This is illustrated in Figure 3a. In contrast, according to the Naples parking function rule, we have that c 1 parks in the first space, c 2 in the third space, then c 3 , finding the third space occupied, looks back a space and parks in the unoccupied second space. Finally, c 4 finds the second space occupied and continues east until it parks in the unoccupied fourth space. This is illustrated in Figure 3b. We observe that for any parking preference of length n there is a maximum of n − 1 steps backward that a car can take from its preferred parking space. Moreover, if each car can take up to n − 1 steps backwards then each car is able to check each of the n spaces and all the cars park. Namely, In Table 1, we provide the cardinalities 4 of the sets P F n,k for varying k ≤ n. 4 Sequences in Table 1 were computed using https://github.com/andresramos5/Naples-Parking-Function.git.  Table 1. The cardinality of P F n,k . Numbers in bold are n n , which count the cardinality of P F n,k for k ≥ n − 1. The first column, where k = 0 is |P F n | = (n + 1) n−1 .
From the sequences in Table 1, the On-line Encyclopedia of Integer Sequences (OEIS) only catalogs the sequences (P F n,0 ) n∈N and (P F n,n−1 ) n∈N , which are the number of parking functions and the number of parking preferences, respectively. Thus, it appears that many of the sequences associated with k-Naples parking functions have not been studied. However, notice that the difference of the diagonal and subdiagonal in the table arising from the computation of |P F n,n−1 | − |P F n,n−2 | yields the sequence 1, 3, 16, 125, . . ., which is precisely the number of parking functions. In fact there is a bijection between P F * n,n−1 = P F n,k \ P F n,k−1 and P F n−1 , which we discuss in Theorem 2.3. As a consequence of this result, we establish a closed formula for the number of (n − 2)-Naples parking functions of length n, as presented in Corollary 2.4.
First, in order to formally identify the bijection between P F * n,n−1 and P F n−1 , we begin with the following observation about the set P F * n,n−1 of parking preferences that are not k-Naples parking functions for k < n − 1.
. . , b n ) ∈ P F * n,n−1 , then b n = n. Proof. By way of contradiction, assume β = (b 1 , b 2 , . . . , b n ) ∈ P F * n,n−1 and b n = n. All of the cars can park because β is a (n − 1)-Naples parking function. This implies that when you get to the last car, c n , only one spot is open. By assumption, c n 's preference satisfies 1 ≤ b n ≤ n − 1. If c n arrives to its preferred space and finds it occupied, it first checks backwards. The maximum number of steps back that c n can take is (n − 1) − 1 = n − 2 < n − 1. If c n takes n − 2 steps back it has checked all the spaces behind its preferred space. Therefore, if the remaining empty space is behind c n 's preferred space then c n finds it and parks there. If not, c n can move forward and check all the remaining spaces to find the empty one. Thus, c n can park with only n − 2 steps back and β ∈ P F n,n−2 . This contradicts our assumption that β ∈ P F * n,n−1 = P F n,n−1 \ P F n,n−2 . Thus, b n = n.
Denote the n − 1 cars with parking preferences given by α as c 1 , . . . , c n−1 , and denote the n cars with parking preferences given by Ψ(α) as d 1 , . . . , d n in order to distinguish between the two. Now, consider Ψ in the following way. For parking function α ∈ P F n−1 arrange for the car c i to park on a one-way street labeled 1 to n from east to west, where they start driving from the eastern-most space labeled 1 to their desired space a i and then proceed west if their desired space is occupied. See the red labeling of spaces in Figure 4. Thus, c i has parking preference ψ(a i ) = n + 1 − a i on a lot labeled 1 to n from west to east. See the black labeling of spaces in Figure 4. Figure 4. Labeling the parking spaces in two distinct ways.
Since α ∈ P F n−1 , the n − 1 cars park in the red labeled spaces 1 to n − 1, moving from east to west, or the in black labeled spaces 2 to n, moving west to east. Moreover, car d i with parking preference ψ(a i ) = n + 1 − a i parks in precisely the same spot as c i , whenever 1 ≤ i ≤ n − 1, since d i proceeds to black space n + 1 − a i , which is just red space a i , and then proceeds west to the first available spot if it is unoccupied. Since α ∈ P F n−1 , for any 1 ≤ i ≤ n − 1 we know that both c i and d i never need to check a space further west than the black spot at position 2, i.e. the red spot at position n − 1, so each car d i checks at most n − 2 spaces behind its preferred spot. Thus, cars d 1 , . . . , d n−1 park in (black) spaces 2, . . . , n. The car d n must have preference n by Lemma 2.2, implying that the last preference of Ψ(α) is always n and Ψ(α) / ∈ P F n,n−2 . Next, observe that ψ is an involution since Thus, Ψ is invertible, which implies it is a bijection. Now we provide a closed formula for the number of (n − 2)-Naples parking functions of length n.
Having found closed formulas for |P F n,n−1 | and |P F n,n−2 |, in the next section we present a recursive formula to count the number of k-Naples parking functions for all 1 ≤ k ≤ n − 3.

Counting Naples Parking Functions Recursively
In this section, we begin by introducing a recursive formula for the number of parking functions, first appearing in the work of Konheim and Weiss [5, Equation (2.4), Lemma 1]. For ease of reference, we provide an independent proof of this result and then generalize this recursion so that it counts k-Naples parking functions.
Proof. We proceed by counting the number of parking functions of length n + 1 given that car n + 1 can park in the spot i + 1 for i = 0, 1, 2, . . . , n. Let S ⊆ {c 1 , c 2 , . . . , c n } consist of the cars parked to the left of the i + 1 parking space, while the cars that park to the right of the i + 1 spot consist of the complement of S. Observe that there are n i ways to select the subset S. The number of ways of assigning parking preferences to the cars in S so that they park before spot i + 1 is precisely |P F i |. Now, we count the number of ways of assigning parking preferences to the n − i cars found to the right of spot i + 1 so that they park in the parking spots i + 2 to n + 1. This is given by |P F (n+1)−(i+1) | = |P F n−i | since the cars do not park in any of the first i+1 spots. Finally, there are i + 1 possible parking preferences that allow c n+1 to park in spot i + 1. Thus, the number of parking functions of length n + 1 where car c n+1 parks in spot i + 1 is given by n i |P F i ||P F n−i |(i + 1). Accounting for all possible values of i yields as desired.
Observe that in order to generalize the recursive formula in Theorem 3.1 to count k-Naples parking functions, we need to modify it by taking into account the new rule that allows cars to look back up to k spots in search for an available one. In this case, if we want car c n+1 to park in spot i + 1, then we must only count the number of parking preferences that allow n − i cars to park in parking spots i + 2 to n + 1 without backing up to park in spot i + 1. Equivalently, we consider introducing an empty parking spot, numbered 0, to the left of 1 and counting the number of k-Naples that would leave that spot open. We refer to this subset of k-Naples parking functions as contained parking functions. We call this set the contained parking functions because if you were to introduce more available spots to the ends of the parking lot (before the first spot and/or after the nth spot), the n cars only park in spots 1, . . . , n, assuming their parking preferences were between 1, . . . , n. Example 3.3. We let the parking lot be represented by a number line of integers and consider the 2-Naples parking function α = (4, 4, 2, 3), whose cars park as depicted in Figure 5. If β = (4, 2, 2, 2), then the cars park as illustrated in Figure 6. With these definitions in hand, we now determine the number of contained parking functions. Our proof adapts Pollak's technique to establish that |P F n | = (n + 1) n−1 [4]. Lemma 3.4. If n ∈ N and k ∈ {0, 1, . . . , n}, then |B n,k | = (n + 1) n−1 .
Proof. Consider β ∈ P P n . Each car can check up to k spaces behind their preferred parking spot if it is occupied and only proceeds forward if all the spots they are allowed to check behind them are occupied. Let us arrange these parking spaces clockwise on a circle instead of on a line and introduce a space 0 between 1 and n. Now, if a car's preferred parking space is occupied, it checks up to k spaces counterclockwise from its preferred parking space and proceeds clockwise if those spots are also occupied. Based on this set up, any parking preference of length n allows all cars to park and leaves one space unoccupied. Observe that the parking preference is an element of B n,k if and only if the cars park in a way that leaves spot 0 unoccupied.
To count the number of ways of assigning n cars parking preferences on the circle, first count the number of ways to assign n + 1 preferences to n cars, which is (n + 1) n . For each parking preference, β = (b 1 , . . . , b n ) exactly one "clockwise rotation" of the wheel by an integer j, i.e. the parking preference (b 1 + j, . . . , b n + j) (mod(n + 1)), leaves the spot n + 1 unoccupied. Thus, there are (n+1) n n+1 = (n + 1) n−1 elements in B n,k . Note that Lemma 3.4 implies that the sets B n,k and P F n are equinumerous. For clarity's sake, it is important to note that the argument used in the proof of Theorem 3.4 cannot be used to count k-Naples parking functions, because in addition to the contained k-Naples parking functions counted in this argument, there are parking functions with k steps back that occupy spot 0 on the circle. For example, (1, 1, 1) ∈ P F 3,1 , but since cars first check spots behind their preferred parking spot, space 0 on the circle is occupied by the second car. Therefore, there are k-Naples parking functions that are not counted using this argument. Moreover, for small values of n we found that not only are the sets B n,k and P F n equinumerous, but they also share specific characteristics. To describe these characteristics, we consider α = (a 1 , a 2 , . . . , a n ) ∈ P P n , and for all 1 ≤ i ≤ n − 1, we say • i is an ascent if a i < a i+1 , • i is a descent if a i > a i+1 , and • i is a tie if a i = a i+1 . Experimentally, the number of ascents, descents and ties in the set B n,k are the same as the number of ascents, descents and ties of P F n , respectively. The enumeration of descents and ties of parking functions was studied in [7]. These observations lead us naturally to the following open problem.
Problem A. Find a bijection between B n,k and P F n that preserves the number of ascents, descents and ties.
We now use the set of contained parking functions to give a recursive formula for the number of k-Naples parking functions of length n. Theorem 1.1. If k, n ∈ N with 0 ≤ k ≤ n − 1, then the number of k-Naples parking functions of length n + 1 is counted recursively by Proof. As in Theorem 3.1, we now construct a recursion that counts the number of ways that n + 1 cars can park given that car c n+1 parks in the spot i + 1 for 0 ≤ i ≤ n. Let S ⊆ {c 1 , c 2 , . . . , c n } consist of the cars parked to the left of the i + 1 parking space, while the cars that park to the right of the i + 1 spot consist of the complement of S. There are n i ways to choose the subset S. Given S, the number of ways of assigning parking preferences to the cars in S which allow them to park in the first i spaces is the number of k-Naples parking functions of length i, |P F i,k |. Recall that spot i + 1 must remain empty so that car c n+1 can park there. Since cars can check up to k spots behind their preferred parking spot, we must be careful to only count the parking preferences for cars in {c 1 , . . . , c n } \ S which ensure that they do not park in spot i + 1. Fortunately, the set of parking preferences we just described is exactly B n−i,k , and by Lemma 3.4, we know that |B n−i,k | = (n − i + 1) n−i−1 . Lastly, we count how many possible parking preferences allow car c n+1 to park in spot i + 1. Since car c n+1 can check up to k spots behind its preferred spot, a n+1 , car c n+1 parks in spot i + 1 only if 1 ≤ a n+1 ≤ i + 1 + k. Also i + 1 + k ≤ n + 1, as there are only n + 1 parking spots. Thus, the number of ways of assigning a parking preference to c n+1 so that it parks in spot i + 1 is min((i + 1) + k, n + 1). The result follows from accounting for all possible values of i, which yields Evaluating Equation (2) at k = 0 recovers the recurrence from Theorem 3.1.
In this section, we obtained a closed formula for the number of k-Naples parking functions length n only in the special cases where k = n − 1 or n − 2 and provided a recursive formula for all other values of 0 ≤ k ≤ n − 3. It remains an open problem to determine closed formulas |P F n,k |, but as we discussed in the introduction, such a formula is beyond the scope of our current study. However, we note that |P F n,k | = |P F n | + |P F n,k \ P F n | = (n + 1) n−1 + X, and, by Lemma 3.4, we know that |P F n | = |B n,k |. Therefore, we can write |P F n,k | = |B n,k | + |B c n,k | where B c n,k is the complement of B n,k in P P n . Thus, |P F n,k \ P F n | = |B c n,k |. Thus, finding a closed formula for |B c n,k | is just as difficult as finding a closed formula for |P F n,k |. This motivates our next open problem.
Problem B. Find a closed formula to count the number of elements in B c n,k .

Characterization of Naples Parking Functions
In this section, we specialize the parameter k = 1 and focus our study on the set P F n,1 , i.e. the set of Naples parking functions of length n. The question of interest is: Given a parking preference, how can we determine if it is a Naples parking function? To determine whether a parking preference is a Naples parking function, we define a function which reduces the problem to checking if the image of a Naples parking function is a parking function.  Fix n ∈ N and let α = (a 1 , a 2 , . . . , a n ) ∈ P P n . We define T : P P n → P P n as T(α) = (τ (a 1 ), τ (a 2 ), . . . , τ (a n )), where We illustrate Definition 4.1 below.
We are now ready to prove Theorem 1.2, which we restate below for ease of reference. Theorem 1.2. Fix n ∈ N and let α be a parking preference. Then α is a Naples parking function if and only if T(α) is a parking function.
Proof. We first show that if α ∈ P F n,1 , then T(α) ∈ P F n . Suppose α = (a 1 , a 2 , . . . , a n ) ∈ P F n,1 and T(α) = (b 1 , b 2 , . . . , b n ). By Definition 4.1, we know that for each 1 ≤ i ≤ n, b i = a i or b i = a i − 1. In particular, if some car c i has preferred spot a i and that spot is taken by some car c j , with 1 ≤ j < i, then b i = a i − 1. Otherwise, we have b i = a i . Since c i can park using the Naples parking rule, then there exists a spot q with a i − 1 ≤ b i ≤ q ≤ n that is unoccupied. In other words, there must be an empty spot somewhere between spots a i − 1 and n in order for c i to park. Because a i − 1 ≤ b i , the new preference b i ensures that the car finds an empty spot to park in, which is either at position b i or somewhere ahead of it. Thus, c i is able to park using the original parking rule. Since i is arbitrary, each car c i with preference b i can park for 1 ≤ i ≤ n using the original parking rule.
To show that T(α) ∈ P F n implies α ∈ P F n,1 we prove the contrapositive. That is, if α / ∈ P F n,1 then T(α) / ∈ P F n . Let T(α) = (b 1 , b 2 , . . . , b n ), where α = (a 1 , a 2 , . . . , a n ) / ∈ P F n,1 . As above, b i = a i or b i = a i − 1. Since α / ∈ P F n,1 there exists a car c i that cannot park using the Naples parking rule. That means that there does not exists an available spot q satisfying a i − 1 ≤ b i ≤ q ≤ n. Moreover, since none of these spots are available for parking using the Naples parking rule, they are also not available when parking using the original parking rule. Thus, T(α) / ∈ P F n .
With the complete characterization of Naples parking functions complete, we now study their connection to Dyck paths.

Connections to Decreasing Lattice Paths
In this section, we introduce k-Lattice paths, a generalization of Dyck paths, and give a bijection between these objects and decreasing k-Naples parking functions. This result exploits the classical result which gives a correspondence between Dyck paths and decreasing 5 parking functions. We end the section by connecting our main result, Theorem 1.3, to signature Catalan objects, as presented in the work of Cellabos and González D'León [3].
Definition 5.1. For a given n ∈ N, a Dyck path of length 2n is a lattice path from (0, n) to (n, 0) consisting of n steps by (1, 0) east and n steps by (0, −1) south such that the path never goes above the line y = n − x. For any south step, the number of south steps proceeding it is larger than the number of east steps preceding it. We denote the set of all Dyck paths of length 2n as LP n .
We now describe the bijection between decreasing parking functions and Dyck paths. Recall that a decreasing parking function is one whose entries are written in weakly-decreasing order. Specifically, if α = (a 1 , . . . , a n ) ∈ P F n is a decreasing parking function, then the corresponding lattice path has an east step (i − 1, a i − 1) to (i, a i − 1) at height a i − 1 for each 1 ≤ i ≤ n, and south steps connecting these east steps so that the result is a connected path from (0, n) to (n, 0). The fact that α is a decreasing parking function implies that a i ≤ n − i + 1, hence the corresponding lattice path does not cross the line y = n − x.
Example 5.2. Let α = (4, 3, 3, 1, 1) and note that its associated Dyck path has one east step at height 3, two east steps at height 2, and two east steps at height 0. Figure 7 illustrates the corresponding Dyck path for α. We now consider a generalization of Dyck paths, which we call k-lattice paths.
Definition 5.3. If n, k ∈ N with 0 ≤ k ≤ n − 1, then a k-lattice path of length 2n is a lattice path from (0, n) to (n, 0) consisting of n steps east by (1, 0) and n steps south by (0, −1) such that the path does not cross the line y = n − x + k. We denote the set of all k-lattice paths of length 2n as LP n,k .
Notice that, LP n,0 = LP n , which is the set of Dyck paths of length 2n. Thus, k-lattice paths are a generalization of Dyck paths. Next, we present our main result, which establishes a bijection between decreasing k-Naples parking functions and k-lattice paths. Since it is well-known that there is a bijection between LP n and decreasing parking functions of length n, in what follows, we only consider the case where 1 ≤ k ≤ n − 1. Theorem 1.3. If n, k ∈ N with 1 ≤ k ≤ n−1, then the set of decreasing k-Naples parking functions of length n and the set of k-lattice paths of length 2n are in bijection.
Proof. To establish this result, it suffices to show that given a decreasing k-Naples parking function we can construct a k-lattice path, and given a k-lattice path there is a corresponding decreasing k-Naples parking function.
Suppose that α = (a 1 , a 2 , . . . , a n ) is a decreasing k-Naples parking function. As in the parking function case, from α we construct the k-lattice path of length 2n with east steps (i − 1, a i − 1) to (i, a i − 1), which we denote LP (α).
We need only show that a i ≤ min(n, n + k + 1 − i) holds for all 1 ≤ i ≤ n, as this implies that LP (α) is a k-lattice path. Suppose that there is some i such that a i > min(n, n + k + 1 − i) to obtain a contradiction. For i = 1, 2, . . . , k + 1, note that min(n, n + (k + 1) − i) = n, and because α ∈ P F n,k it cannot be that a i > n.
On the other hand, if k + 1 < i ≤ n, then min(n, n + k + 1 − i) = n + k + 1 − i, and lets assume that a i > n + k + 1 − i. Since α is in decreasing order we know that a j ≥ a i > n + k + 1 − i for all 1 ≤ j < i. The most optimal parking preference is a j = n + k + 2 − i for all 1 ≤ j < i, as this maximizes the number of parking positions cars c 1 , . . . , c j can occupy. That is, it leaves the most open spots to the right of position n + k + 2 − i. In this case, cars c 1 , c 2 , . . . , c k+1 park in positions n + k + 2 − i, n + k + 1 − i, . . . , n + 2 − i, respectively. Then, cars c k+2 , c k+3 , . . . , c i−1 first go to their preferred parking spot, namely n + k + 2 − i, finding it occupied they back up and all of the k prior spots are also full. Thus, these cars go forward and occupy the last i − k − 2 spots numbered n + k + 3 − i to n. Then car c i , arriving to its preferred position, again n + k + 2 − i, finding it occupied backs up and also finds all k spots behind full. It then moves forward and finds all remaining spots taken. Thus, c i is unable to park contradicting the assumption that α ∈ P F n,k .
We now go from an arbitrary k-lattice path to a decreasing k-Naples parking function. Given a lattice path L ∈ LP n,k , we know this path starts at (0, n), ends at (n, 0), and stays below the line y = n − x + k. Suppose the east steps of L occur from (i − 1, a i − 1) to (i, a i − 1), then by definition a i ≤ min(n, n + k + 1 − i) for all 1 ≤ i ≤ n. Construct the parking preference α = (a 1 , a 2 , . . . , a n ). Note that the construction of α guarantees that α is in decreasing order. It remains for us to show that α ∈ P F n,k . That is, we check that for all i ∈ [n], car c i can park under the k-Naples parking rules.
First, observe that the first k + 1 cars can always park, since they can back up to k positions, see Equation (1). Now for i > k + 1 we split into two cases: a i ≤ k and a i > k.
Case 1: Suppose i > k + 1 and a i ≤ k. If one of the spots between 1 and k is unoccupied, then c i parks there. Instead, if all of the parking spots between 1 and k are occupied, this means that of the i − 1 cars that have parked, k of them have occupied the first k spots, while the remaining i − (k + 1) cars occupied some spots numbered between k + 1 and n. Thus, there are less cars parked to the right of spot k, than there are parking spots between k + 1 and n. Thus, c i parks in the leftmost available spot between k + 1 and n.
Case 2: Suppose i > k + 1 and a i > k. If spot a i or a spot up to k steps behind is unoccupied then c i can park. Otherwise, spots a i − k, a i − k + 1, . . . , a i are occupied. Now, since a i ≤ n + k + 1 − i, we have that there are n − a i ≥ n − (n + k + 1 − i) = i − (k + 1) spots to the right of a i . By assumption, spots a i − k through a i are occupied by k + 1 of the i − (k + 1) cars that parked before c i so that i − (k + 2) cars have parked in the at least i − (k + 2) spots after a i . This leaves a remaining open spot between a i+1 and n in which c i can park. Since i was arbitrary, we have established that all cars c i can park for all 1 ≤ i ≤ n. Thus, α ∈ P F n,k . Now we provide a connection between k-lattice paths and signature Dyck paths. In a recent paper by Cellabos and González D'León [3], they introduce the concept of signature Dyck paths, defined by a vector s = (s 1 , s 2 , . . . , s ) ∈ N . The signature s defines a ribbon and an s-Dyck path is a lattice path that lies on or above the ribbon. To describe the ribbon, we construct a grid of dimensions × [( i=1 s i − 1) + 1]. We number the boxes in this grid from bottom to top, calling each row a level i with 1 ≤ i ≤ , and on each level we number the boxes left to right from 1 to ( i=1 s i − 1) + 1. At each level we shade a specific set of boxes. Begin by shading the boxes 1, 2, . . . , s 1 at level 1. Then, for 2 ≤ i ≤ , shade the boxes numbered ( i−1 j=1 s j − 1) + 1 to ( i j=1 s j − 1) + 1 at level i. Figure 8, illustrates the ribbon when s = (3, 2, 5, 1, 1), along with an s-Dyck path in blue, and a lattice path that is not an s-Dyck path in red.  The ribbon corresponding to the signature s = (3, 2, 5, 1, 1), and two lattice paths: one an s-Dyck path (blue path) and that is not an s-Dyck path (red path).
In our work, we consider a horizontal reflection of s-Dyck paths so that our paths are decreasing, rather than increasing. In this way, k-lattice paths of length 2n are s-Dyck paths with signature s = (k + 1, 2, 2, . . . , 2 n−k  Table 2. Known integer sequences related to enumerating decreasing k-Naples parking functions, which we denote as P F d n,k . of length 2(n + 1). In Figure 9, we illustrate the signature for a 3-lattice path of length 14, and note that any lattice path begins with a south step from (0, 7) to (0, 6) and ends with an east step from (6, 0) to (7, 0). Figure 9. Illustrating the possible locations for 3-lattice paths of length 12, which begin at (0, 6), end at (6, 0), and must lie below the red line given by y = 6 − x + 3. This corresponds to s-Dyck paths of length 14, which begin at (0, 7), end at (7, 0), and must lie on or below the signature s = (4, 2, 2, 2, 1, 1, 1). Theorem 1.3 along with the resulting sequences in Table 2 give formulas for the number of s-Dyck paths with signatures as given in Equation (3), for the special cases k = 1, 2, and 3. We note that formulas for other values of k are unknown. 5.1. Rearrangements of k-Naples parking functions. We begin by illustrating that not all rearrangements of k-Naples parking functions are k-Naples parking functions.
Example 5.4. Let α = (7, 7, 7, 7, 5, 2, 2) ∈ P P 7 . We now verify that α is an element of P F 7,3 . First, c 1 parks in its preferred parking spot 7. Then, c 2 backs up one space and parks in position 6, c 3 backs up two spaces and parks in position 5, c 4 backs up three spaces and parks in position 4, c 5 backs up two spaces and parks in position 3. Next, c 6 parks in its preferred parking space 2, while the last car, c 7 , has to back up one space to park in position 1. The filled parking lot based on α is illustrated in Figure 10.  Figure 10. Illustrating the parking order for the 3-Naples parking function (7,7,7,7,5,2,2). Now, notice that in the rearrangement β = (5, 7, 7, 7, 7, 2, 2) of α, c 1 parks at position 5, c 2 parks at position 7, c 3 backs up one space and parks at position 6, and c 4 backs up three spaces and parks at position 4. Now c 5 finds its preferred space and the three preceding occupied. Additionally, when it checks forward, there are no available spaces and c 5 cannot park. Thus, β / ∈ P F 7,3 .
Characterizing when a rearrangement of a k-Naples parking function is another k-Naples parking function remains an open problem. We state this formally below.
Problem C. Characterize and enumerate which rearrangements of decreasing k-Naples parking functions are also elements of P F n,k .
In the case where k = 1 we conjecture the following.
Conjecture 5.5. If there is only one corner above the line y = n − x then that parking preference and all of its rearrangements are elements of P F n,1 .