Toppling on permutations with an extra chip

The study of toppling on permutations with an extra labeled chip was initiated by the first author with D. Hathcock and P. Tetali (arXiv:2010.11236), where the extra chip was added in the middle. We extend this to all possible locations $p$ as well as values $r$ of the extra chip and give a complete characterization of permutations which topple to the identity. Further, we classify all permutations which are outcomes of the toppling process in this generality, which we call resultant permutations. Resultant permutations turn out to be certain decomposable permutations. The number of configurations toppling to a given resultant permutation is shown to depend purely on the number of left-to-right maxima (or records) of the permutation to the left of $n-p$ and the number of right-to-left minima to the right of $n-p$. The number of permutations toppling to a given resultant permutation (identity or otherwise) is shown to be the binomial transform of a poly-Bernoulli number of type B.


Introduction
Chip-firing (also called abelian sandpile model) is a stochastic discrete dynamical system defined on a graph. Hopkins-McConville-Propp [HMP17] introduced a labeled version of the chip-firing process on the infinite path graph. They showed the remarkable property that when the chips start at the origin and the number of chips is even the chips always end up in sorted order. Many variants of this original problem have been considered since then [GHMP19, GHMP21, HP19, KL20, FK21].
The first author with D. Hathcock and P. Tetali [AHT20] considered a variant where a permutation of chips labeled 1 through n were placed contiguously on the path graph and one extra chip, labelled r was added in the middle. In that case, they showed that the final configuration is deterministic. They defined a toppleable permutation to be one which results in the identity permutation for all values of r, and showed that the number of toppleable permutations is a poly-Bernoulli number of type C, even though they did not use that language.
In this paper we investigate this model in much greater generality and explain the connection to the combinatorics of the poly-Bernoulli numbers. Poly-Bernoulli numbers of types B and C arise naturally in many combinatorial problems, such as permutations according to excedance sets, acyclic orientations of bipartite graphs, lonesum matrices, Vesztergombi permutations and a lot more; see [BH17] for a review.
Our first results are a natural generalization of the formulation of [AHT20]. We add the extra chip r to an arbitrary site p in the permutation. We consider toppleability in two different but related ways. In the first, we fix p and count all possible configurations that result in a sorted configuration. In the second, we count permutations which are toppleable for fixed r and p. In both cases, we show that the numbers are related to the poly-Bernoulli numbers of type B. Generalizing [AHT20, Theorem 2.4], we also count permutations which are toppleable for all r for a fixed p. In this case, we show that we always obtain poly-Bernoulli numbers of type C.
Our second results give a characterization of all the permutations that can arise as the result of a toppling procedure, which we call resultant permutations. It turns out that resultant permutations can be succintly characterized by left-to-right maxima to the left of p and right-to-left minima to the right of p. We also enumerate toppling to these resultant permutations. Here too we study configurations with a fixed p and permutations with a fixed r and p. In both cases, we show that the enumeration is related to the poly-Bernoulli numbers of type B.
The plan of the rest of this article is as follows. In Section 2, we introduce the model, give the necessary background and state the main results. We give a self-contained summary of combinatorial aspects of poly-Bernoulli numbers of types B and C in Section 3. Section 4 is devoted to the understanding of configurations and permutations which topple to the sorted configuration. Finally, we classify all resultant permutations and enumerate the number of configurations and permutations that topple to them in Section 5.

The toppling model
Let L n be the line segment L n = {0, 1, . . . , n + 1}. We distribute n + 1 chips labeled by {1, 2, . . . , n + 1} on L n as follows: we first distribute n of these chips on the sites 1 through n, and then we add the remaining chip on a site p, 1 ≤ p ≤ n. The set of all such configurations is denoted S(n, p).
We define a dynamical system on L n by the process of toppling, which is defined as follows: 1. If no position in L n has two or more chips stop. Else, go to step 2. 2. Choose a position i uniformly at random among positions occupied by more than one chip. 3. Pick two chips α < β uniformly from those at site i. 4. Move α to position i − 1 and β to i + 1. 5. Go to step 1. For instance, the configuration denoted by C = (7, 3, 1, 5, (2, 4), 6, 8) ∈ S(7, 5) has two chips on the fifth site and is depicted as  . . , n}. Configurations in S(n, p) naturally arise from permutations in S n . Given a permutation π = π 1 π 2 . . . π n in one-line notation and an element r ∈ [n + 1], we first place the chips labeled by π i on site i for 1 ≤ i ≤ n. We then place the chip labeled by r on site p and increase each value π i ≥ r by 1. It is easy to see that every configuration can arise in two ways from a permutation in the above described way by the choice of r at site p. For example, the configuration in (2.1) arises from the permutation π = 6214357 with r = 2 and from the permutation σ = 6314257 with r = 4. An initial configuration C ∈ S(n, p) that arises from a permutation π ∈ S n and r ∈ [n + 1] is denoted π (r,p) . The following result follows from the proof of [AHT20, Proposition 2.1] with almost no change.
(1) At every step the configuration lives in L n . No chips moves to the left of the site 0 or to the right of the site n + 1.
(2) The final configuration is deterministic containing exactly one chip on every site except one.
Another important and useful property is the symmetry property. This is easy to prove by analyzing what happens at a single toppling step.
Proposition 2.2 (Symmetry). For a positive integer n, fix p ≤ n − 1. The toppling dynamics on a configuration C ∈ S(n, p) is isomorphic to that ofĈ ∈ S(n, n − p), wherê C is obtained by reversing the direction and subtracting each chip value in C from n + 1. Definition 2.3. We say that a configuration C ∈ S(n, p) is p-toppleable if the final configuration is sorted.
Our first main result is for the number of p-toppleable configurations. To state our results, we recall the relevant sequences. The well-known polylogarithm function is given by When the base k is a non-positive integer, then it is well-known to be a rational function. In particular, for a non-negative integer m, where m j is the number of permutations in S n with j ascents. (Recall that a position k is an ascent in a permutation if π k < π k+1 .) Poly-Bernoulli numbers of type B are defined by the generating function, where k ≥ 0. The reason for this terminology is that Li 1 (x) = − log(1 − x) and so, the generating function of the Bernoulli numbers. The related family of poly-Bernoulli numbers of type C are defined by the generating function, It is also the value of the Arakawa-Kaneko function [AK99] ξ k (−n) = (−1) n C n,k , where the Arakawa-Kaneko function is defined as See Table 1(a) and (b) for the first few poly-Bernoulli numbers of types B and C respectively. In particular, notice the nontrivial symmetries, B n,k = B k,n and C n+1,k = C k+1,n . Section 3 contains more details about these numbers and their relation to combinatorics.
Theorem 2.4. The number of p-toppleable configurations in S(n, p) is given by B n−p+1,p /2.
Although it is not obvious from any of the definitions, it turns out that B n,k is even if n, k > 0; see Remark 3.7. As a consequence, Theorem 2.4 makes sense. We also formulate an analogous definition to Definition 2.3 in terms of the corresponding permutations.
Definition 2.5. We say that a permutation π ∈ S n is (r, p)-toppleable if starting with the configuration π (r,p) the final configuration of the toppling process is sorted.

.2, Exercise 36] is given by the
It is easy to see that ∆ m f (n) is (−1) m times the (n + m)'th term of the binomial transform of the sequence (f (n)). Our second main result is on the enumeration of (r, p)-toppleable permutations.
We then recover one of the main results of [AHT20] as a special case.
Corollary 2.7 ([AHT20, Theorem 3.4 and Lemma 3.5]). Let n be an odd integer and p = (n + 1)/2 . Then for r = p and r = p + 1, |T We next enumerate permutations in S n which are (r, p) toppleable for every r with arbitrary but fixed p. This generalizes [AHT20, Theorem 2.4] for p = n/2 , where these were called toppleable permutations.
Further, the number of such permutations is C p,n−p .
Theorems 2.4 and 2.6, Corollary 2.7, and Theorem 2.8 will be proved in Section 4. We next study the toppling process from another point of view. We have seen that not every permutation topples to the identity permutation, but it is possible to characterize those who topple to it. On the other hand, it is also clear that not all permutations will be the final configuration after a toppling process. For instance, in case of 4 chips, by adding a chip on the second position, only the 4 permutations 1234, 1243, 2134, 2143 occur out of the 24; see Table 2.
The question naturally arises as to which permutations arise as the result of a toppling process. Moreover, we would like to give a characterization of permutations that end in a certain permutation. Definition 2.9. We say that a configuration C ∈ S(n, p) topples to the permutation π ∈ S n+1 if toppling C results in π. For π ∈ S n+1 , if there exists a C ∈ S(n, p) which topples to π, we say that π is a p-resultant permutation.
The list of 2-resultant permutations in S 4 and the number of configurations in S(3, 2) that topple to them are given in Table 2.
The characterization of p-resultant permutations is then as follows.
Theorem 2. 10. A permutation π ∈ S n is a p-resultant permutation if and only if (π 1 , . . . , π n−p ) ∈ S n−p . To count the number of configurations toppling to a given p-resultant permutation, we recall that a left-to-right maximum or a record of a permutation π is a value π j such that π j = max{π 1 , . . . , π j }. By convention, π 1 is taken to be a left-to-right maximum. It is a standard fact that the number of permutations in S n with k left-to-right maxima are given by n k , the (unsigned) Stirling number of the first kind ; see [GKP94, Problem 6.63] for example. Similarly, one can define a right-to-left minimum for a permutation. If π i = j is a left-to-right maximum for π, then one can show that π −1 j = i is a right-to-left minimum for π −1 . Therefore, the number of permutations of S n with k right-to-left minima is also n k .

Resultant permutation
For a given p-resultant permutation π, let π left be the induced permutation on [n − p] and π right be the induced permutation on {n − p + 1, . . . , n}. The point of these definitions is the following lemma.
Lemma 2.11. The number of configurations toppling to a given p-resultant permutation π ∈ S n depends solely on the number of left-to-right maxima of π left and the right-to-left minima of π right .
For general n and p, we form an array T n be the number of configurations that topple to any permutation π with i left-to-right maxima in π left and j right-to-left minima in π right . Lemma 2.11 guarantees that this is well-defined. For example, see Table 3.
Our next theorem gives a statement about the size of the set of configurations that topple to a permutation in a class, i.e. with a given number of left-to-right maxima in π left and given number right-to-left minima of π right . as defined after Lemma 2.11.
Theorem 2.12. The number of configurations that topple to a resultant permutation π with i left-to-right maxima in π left and j right-to-left minima of π right is 1 2 B i,j . To have the complete picture about resultant permutations, we now focus on the distinguished chip r in an initial configuration. More precisely, we consider configurations of the form σ r,p as σ varies. According to Theorem 2.10 and Lemma 2.11, the resultant permutation π splits up into π left of [n − p] and π right of {n − p + 1, . . . , n}. However, not all permutations of [n − p] and {n − p + 1, . . . , n} will necessarily appear.
Theorem 2.13. A p-resultant permutation π ∈ S n is obtained by toppling a permutation by adding the chip r if and only if π satisfies the following conditions: (1) If r ≤ n − p, then r is a left-to-right maximum of π left , (2) If r > n − p, then r is a right-to-left minimum of π right .
Theorem 2.10, Lemma 2.11, and Theorems 2.12 and 2.13 will be proved in Section 5. The last theorem determines the number of permutations N π ≡ N π (r, p) toppling to a given permutation for a fixed value of r and p. Before stating the next result for p-resultant permutations in S n obtained by adding the chip r to site p, we give some data for n = 6 and p = r = 2 in Table 4. Using Proposition 2.2, it suffices to look at r ≤ n − p.  Table 4. The 2-resultant permutations of S 4 obtained by adding the chip r = 2 along with the number of permutations toppling to them written as an array in the style of Table 3.
Proof. This follows from Theorem 2.6 and the bijection in the proof of Theorem 2.12.
As a corollary of Theorem 2.14, we mention the special case where poly-Bernoulli numbers of type C occur. The permutations π which occur and the corresponding N π 's for n = 6, p = 3 for both r = 3, 4 are listed in Table 5.  Table 5. The 3-resultant permutations of S 6 obtained by adding either the chip r = 3 or r = 4 along with the number of permutations toppling to them written as an array in the style of Table 3.
Proof. This follows from Corollary 2.7 and the bijection in the proof of Theorem 2.12.
Using Proposition 2.2, we observe that the poly-Bernoulli numbers of type C occur when r = n − p or n − p + 1.

Poly-Bernoulli numbers
Here, we introduce the combinatorial sequences that will play the main role in this work. Poly-Bernoulli numbers were introduced by M. Kaneko [Kan97] as a generalization of the classical Bernoulli numbers during his investigations of multiple zeta values.

3.1.
Poly-Bernoulli numbers of type B. For integers n > 0 and k, poly-Bernoulli numbers of type B were originally defined by the generating function (2.2). From the combinatorial point of view poly-Bernoulli numbers with negative indices are of interest, since these numbers are nonnegative integers and there are several different combinatorial objects that are enumerated by these numbers. The array appears in OEIS as [OEI20,A099594].
The combinatorics of poly-Bernoulli numbers is very rich. The first combinatorial interpretation was given by Brewbaker [Bre08] as the number of n × k lonesum matrices, which are {0, 1}-matrices uniquely determined by their row and column sum vectors. We now give some combinatorial objects counted by poly-Bernoulli numbers of type B that are relevant to the toppling process. For further examples, see [BH15] for instance.
Permutations with the restriction on the difference between position and value are well studied [BH17, KKL13, Lau07, Sjo07, Ves74, LV78]. We follow the convention of [BH15] and refer to them as Vesztergombi permutations since they were first studied by Vesztergombi [Ves74].
The double exponential generating function of poly-Bernoulli numbers is given by the

Recall that
n m is the Stirling number of the second kind, which enumerates, among other things, set partitions of [n] with m parts. The following three basic formulas were proven combinatorially in the literature: 1. the closed formula [BH15,Bre08], 2. the inclusion-exclusion type formula [Bre08], 3. and the recurrence relation [BH15], The asymptotic for the diagonal entries is given in [KLM21] We now define two other classes of objects counted by the poly-Bernoulli numbers. The first definition appears in [OEI20, Sequence A099594] by D. Callan, hence the nomenclature in [BH15].
In order to emphasize the two types in the set we sometimes distinguish the elements {1, 2, . . . , n} with an underline and the elements {n+1, n+2, . . . , n+k} with an overline. In this terminology, a Callan permutation is an alternating sequence of increasing underlined and decreasing overlined subsequences. Definition 3.5. For any simple, undirected graph, an orientation is an assignment of arrows to the edges. An acyclic orientation (AO) is an orientation in which there is no directed cycle. It is easy to see that every graph has an acyclic orientation and every acyclic orientation has at least one source (vertex with no incoming arrows) and one sink (vertex with no outgoing arrows).
Recall that the complete bipartite graph K m,n is a graph with m + n vertices such that the first m vertices are adjacent to the last n vertices, and there are no other edges. The following result is a combination of several results in the literature.
Proof. Part (1) is due to [CGS14, Theorem 2.1]. We prove (2) by constructing an explicit bijection between (k, n)-Callan permutations π and (k, n)-Vesztergombi permutations σ such that π 1 = σ −1 n+1 . We sketch here a bijection along with an example. Since this bijection is essentially the translation of the bijection between Vesztergombi permutations and lonesum matrices given by Kim-Krotov-Lee [KKL13, Appendix], we will be sketchy. We refer the reader to the original paper for the details.
Remark 3.7. We can see that B n,k are even integers for n, k > 0 as follows. It is trivial in any combinatorial model that B n,1 are powers of 2. For instance, in terms of Callan permutations, B n,1 counts permutations where all consecutive entries are in increasing order except the element n + 1. So, if i denotes the number of elements to the left of n, we can count by n i=0 n i = 2 n the different permutations with such a property. The parity of B n,k for k > 1 then follows from the recurrence (3.4).

3.2.
Poly-Bernoulli numbers of type C. Poly-Bernoulli numbers of type C were introduced by Kaneko analytically for general k by the generating function in (2.3). Several combinatorial sequences are enumerated by these numbers as well when k is a nonnegative integer. We list them below.
Definition 3.8. An excedance of a permutation π is a position i such that π i > i. The positions at which there are excedances for π is called the excedance set of π.
Recall the definition of Vesztergombi permutations from Definition 3.1, Callan permutations from Definition 3.3 and acyclic orientations from Definition 3.5.
Theorem 3.9 ([BH17, Theorems 12, 10, 19, 16]). The poly-Bernoulli number C n,k counts the following objects: (1) the number of permutations in S n+k having excedance set [k], the number of permutations π in S n+k with −k ≤ π(i) − i < n, (3) the number of AOs of K n,k with a unique sink, (4) (n, k)-Callan permutations that start with an underlined element.
The bivariate exponential generating function for C n,k is given by The analogue formulas to the ones of the poly-Bernoulli numbers of type B are as follows [BH17]: 1. the closed formula, 3. and the recurrence relation The relation between the two types of poly-Bernoulli numbers can be expressed by the following equations. The asymptotic for the diagonal entries is given in [dALN15] C n,n ∼ 1 2 log 2 √ 1 − log 2 + o(1) n! (2 log 2) n .

Toppleable configurations and permutations
In this section, we will be interested in configurations and permutations that get sorted after the toppling process, i.e., the final configuration is the identity permutation. The data for the number of toppleable configurations is given in Table 6.
Since the order of the topplings does not influence the final configuration by Proposition 2.1, we can define a special order of the topplings, that is easy to analyze. This idea leads to the notion of a pass that we recall from [AHT20]. For the sake of simplicity, we focus now only on the number of chips at each site. We start with the unlabeled configuration ( , 1, . . . , 1, 1,2, 1, 1, . . . , 1, ) on L n where the hat denotes the site p. The first toppling is  Table 6. The number of toppleable configurations in S(n, p) for small values of n and p.
Similarly, we perform the second pass starting with the toppling of the two chips at site p, and continue similarly as before ending up with (1, 1, , 1, . . . , 1, 1,2, 1, 1, . . . , 1, , 1, 1). We continue this way, settling the topplings in passes. After min(p, n + 1 − p) passes, we will arrive at a final configuration in which no site contains more than one chip.
The intermediate configuration after every pass can be decomposed into three parts depending on the locations of the empty sites. We call the part of the configuration to the left of the first empty site (1, 1, . . . , 1, ) the left arm, the part to the right of the second empty site ( , 1, 1, . . . , 1) the right arm, and the part between the two empty parts the active part.
We now list some important observations about these pass moves which follow from [AHT20] when considering the toppling process on a configuration in S(n, p).
(1) At the end of any pass, the chips in the left and right arms are 'frozen', i.e. these chips do not change their positions in any topplings or passes thereafter.
(2) Every chip in the active part topples at least once during a pass.
(3) After the last pass, there are only two parts: the left arm containing a chip each on the sites 0, 1, . . . , n − p, and the right arm containing a chip each on the sites n − p + 2, . . . , n + 1. (4) Assume a and b, with a < b, are the chips at the site p at the beginning of a pass.
In a pass, a propagates to the left, until it meets a smaller element, a 1 say. At that point, a is stuck at that position, and a 1 moves to the left until it meets a smaller element, and so on. Similarly b moves to the right, until it meets a greater element, b 1 say, after which it gets stuck. Then b 1 moves right until it meets a greater element and so on.
To summarize, to the left of site p, chips a > a 1 > · · · > a j move some positions to the left, while all the other chips are just shifted by one position to the right without changing their relative positions. Similarly, to the right of p, chips b < b 1 < · · · b k move some positions to the right, while all the other chips are only shifted by one position to the left without changing their relative positions.
We define some more terminology in order to be able to talk about the toppling process more precisely. We refer to the active sites i with i ≤ p as the left part and those active sites i with i ≥ p as the right part. See Figure 1 for an illustration of the terminology used in the proofs. Let S 0 denote the set of chips that are on sites i ≤ p, i.e. set of the chips in the left part and the two chips at site p in the initial configuration. Similarly, let T 0 be the set of chips in the right part and on site p in the initial configuration. In general, let S j be the set of chips on the sites ≤ p, and T j be the set of chips on the sites ≥ p after the j'th pass. It is easy to see that the least element in S 0 will topple during the first pass to the first position as the first element in the left arm, becoming the first element of the resulting sorting, π 1 . Similarly, the greatest element of T 0 will topple to the last site during the first pass and be frozen there.
By Remark 4.1(1), if a configuration is toppleable then chips i and n − i + 1 have to be in their correct positions after the i'th pass. This fact restricts the positions of the chips in the initial configuration in a toppleable configuration. As we will see in the next proposition this property characterizes toppleable configurations. The idea of the proof is similar to that of the classification in [AHT20, Theorem 3.4] up to a point. The novelty here is that the number of passes is potentially much smaller than n/2 + 1.
For a configuration C, let C −1 (i) denote the position of the chip labeled by i in the initial configuration.
Theorem 4. 2. A configuration C ∈ S(n, p) is toppleable if and only if for 1 ≤ i ≤ n + 1 It will be useful to state two lemmas explicitly as a preparation of the proof of the theorem. The proof of the first one, Lemma 4.3 is directly based on the proof in [AHT20]. Let C −1 j (i) denote the position of the chip i after the j'th pass. Lemma 4.3. Suppose that we have a configuration C ∈ S(n, p). If p + i − n − 1 ≤ C −1 (i) ≤ p + i − 1 holds for all chips i then after j (j ≤ p) passes, the chips 1, 2, . . . , j and n + 1, n, . . . , n − j + 2 are fixed in their correct positions. Furthermore, for the chips i = j + 1, j + 2, . . . , p, C −1 Proof. The lemma states that the distance between the chip labeled by i and the i'th site is reduced by at least one in each pass.
We argue using induction on j. The base case is j = 0 which is fulfilled by assumption. Now suppose the statement holds for the pass j − 1, and consider the j'th pass. For chip i = j, we have C −1 j−1 (j) < p + j − (j − 1) = p + 1, which means C −1 j−1 (j) ≤ p. Recall from Remark 4.1(3) that a chip to the left of p moves to the left arbitrary many (more precisely, the number of consecutive greater elements to its left) sites to the left and at most one site to the right.
Since j is the smallest non-fixed chip from C −1 j−1 (j) ≤ p, j = min S j−1 . Hence we deduce that in the j'th pass, it will topple to the left until it is fixed, and so π j = j. Thus, after j passes, the chips 1, 2, . . . , j are fixed in the right order.
For chips i = j, . . . , p, we use an inductive argument. We show that during the j'th pass the chip i does not move to the right of site p + i − j and must land strictly to the left of the site p + i − j. The base case is i = j and it follows from the previous consideration. Assume now that the statement holds for j, j + 1, . . . , i − 1. Note that from the outer induction we have C −1 j−1 (i) < p + i − j + 1. We want to show that after the j'th pass the chip i is to the left of the site p + i − j.
• if C −1 j−1 (i) < p, then the chip i can move in the j'th pass at most one site to the right. Then it is still strictly to the left of p + 1, which is included in p + i − j for the values of i considered here.
• if C −1 j−1 (i) ≥ p then the chip i can move to the right multiple times. There are two possibilities here: either it never reaches the site p + i − j, in which case we are done, or it reaches (or starts) at the site p + i − j. Note that according to the induction hypothesis no chips smaller than i can reach the site p + i − j. Thus, chip i "meets" a greater chip at this site, and topples to the left during the j'th pass, landing to the left of the site p + i − j. Hence, in either case, we have shown that C −1 j (i) < p + i − j. A similar argument shows that the chips n + 1, n, . . . , n − j + 2 (where j ≤ p) are fixed in their correct positions after the j'th pass and for the chips i = n − j + 1, n − j, . . . , p the condition C −1 j (i) > p + i − 1 − n + j holds. Our next lemma shows that we can say even more about the positions of the chips after a given number of passes based on their initial positions.
Lemma 4.4. Suppose that we have a configuration C ∈ S(n, p). If p + k − n − 1 ≤ C −1 (k) ≤ p + k − 1 holds for all chips k and i ≤ p − 1, we have p + i − 1 − n + j < C −1 j (i). Proof. To prove this inequality we use now induction on the chips i = p − 1, p − 2, . . . and on the passes, j. The initial case is when i = p − 1 and j = 1. We have to show that p + (p − 1) − 1 − n + 1 < C −1 1 (p − 1). We focus on the moves of the chip p − 1 during the first pass. By Remark 4.1(2), chip p − 1 topples at least once during the pass. If this toppling is to the right, we are done. But if either (a) it is initially at the p'th site sharing this site with a greater chip, (b) or a greater chip topples during the pass to the site of the chip p − 1, the chip p − 1 will topple first to the left.
Moreover, if there is a greater chip to its left, then again topples to the left and so on, until it "meets" a smaller chip. In the last toppling, p − 1 has to topple to the right and does not move in the pass anymore. Let a 1 denote the chip that is greater than p − 1 and shares the site of p − 1 when it topples first to the left. In case (a), this is the other chip on the site p in the initial configuration, in case (b) this is a chip that topples to the site of p − 1 from the right side. Let a 2 denote the next greater chip that p − 1 meets and forces p − 1 topple to the left again, and so on. Let a k the last greater chip in this sequence, so that after the chips a k and p − 1 shared a site, and since p − 1 < a k , p − 1 topples to the left, but the next chip p − 1 meets is a smaller element. In other words on the site next to the left of the chip a k -C −1 (a k ) − 1 -there is a chip b < p − 1. In the toppling where b and p − 1 is on the site C −1 (a k ) − 1, the chip p − 1 topples to the right, i.e. back to the original site of a k , C −1 (a k ). We assumed that the condition p + i − n − 1 ≤ C −1 (i) < p + i − 1 holds for all i, and so also for the chip i = a k . Therefore, we have Since a k > p − 1, we have As we have seen that the chip p − 1 will land at the position of a k after the first pass, it follows that after the first pass the position of p − 1 is at least p + p − 1 − n − 1 + 1, which is what we wanted to show.
The same argument can be used for all the chips i ≤ p in the first pass, hence we have Exactly the same kind of argument can be used in all passes, which implies the general statement p + i − 1 − n + j < C −1 j (i). Now we are ready to prove Theorem 4.2.
Proof of Theorem 4. 2. First, we show that if a configuration C is toppleable, then (4.1) holds. Let C ∈ S(n, p). Suppose that for an i with 1 ≤ i ≤ p the condition (4.1) is not fulfilled, C −1 (i) > p + i − 1. (The left hand side, p + i − n − 1 ≤ C −1 (i), holds again trivially for i with 1 ≤ i ≤ p). As noted in Remark 4.1(3), a chip to the right of p (in a set T j ) moves during a pass arbitrary sites to the right, but at most one to the left. Hence, if C −1 (i) > p + i − 1, the chip i is after i − 1 passes still strictly to the right of the site p. But, since in each pass one chip is fixed on the rightmost and leftmost active site, π i is fixed after the (i − 1)'th pass. Hence, the chip that is fixed after the (i − 1)'th pass cannot be the chip i. The case for p < i ≤ n + 1 follows by symmetry . We show now that if the condition (4.1) holds for all i, the configuration is toppleable. Note that the toppling process stops after min(p, n − p + 1) passes. Assume now that n − p < p; the other case follows by symmtery. By Lemma 4.3 we know that after the (n − p + 1)'th pass, the chips 1, 2, . . . , n − p + 1, and p, p + 1, . . . , n + 1 will be in their correct order. However, the question remains as to what happens with the chips n−p+2, . . . , p−1. We show next that these chips topple also in the correct order after the (n − p + 1)'th pass. Let The condition of the theorem has the form Since the right hand side is redundant, we have actually t − 1 ≤ C −1 (n − p + t) ≤ n + 1. After n − p passes, the restriction modifies according by Lemma 4.3 and Lemma 4.4 for all t to As in the proofs of the previous lemmas, we again use an inductive argument. Consider the base case t = 2p − n − 1, i.e., before the last pass the chip p − 1 belongs to one of the sites in {p − 2, p − 1, p}. In the last pass it topples at least once by Remark 4.1(2). If it is on site p − 2 it has to topple to the right, since there are no greater elements that could force it to topple to the left (recall that the elements p, . . . , n + 1 are fixed or topple now to their correct places).
If it is on the (p − 1)'th or p'th site, one can see that it has to topple to its correct position after a little bit of thought. Essentially, after the (p − 1)'th site there is simply no other place where it could land, because the p'th and (p + 1)'th sites will be necessarily occupied by the chips p and p + 1.
Finally, induction on t completes the proof: assume that for t, t + 1, . . . , 2p − n − 1 the chips n − p + t will land at the correct site after the (n − p + 1)'th pass, so the sites n − p + t, . . . , p, p + 1, . . . , n + 1 will be occupied with the correct chips. Then before the last pass the chip n − p + t − 1 was restricted between the sites n − p + t − 2 and p. So there is no greater chip that could cause it to topple to the left from the (n − p + t − 2)'th site. In addition, there is no "free" place where it could land beside its correct site. Thus, all the chips between n − p + 1 and p have to topple to their correct sites finally in the last pass, and this proves the result.
As explained in Section 2, we can associate to each p-toppleable configuration C = (c 1 , . . . , (c 1 p , c 2 p ), . . . , c n ) ∈ S(n, p) two toppleable permutations; a (c 1 p , p)-toppleable and a (c 2 p , p)-toppleable one. Let us distinguish one chip labeled by r on site p in the configuration C and call such configurations marked configurations. Clearly, there is a one-to-one correspondence between the set of toppleable marked configurations on [n + 1] chips and (r, p)toppleable permutations of [n]. To make this precise, we define a map w that associates to each marked configuration C r p = (c 1 , . . . , (c p , r), . . . , c n ) on n + 1 chips a permutation w(C r p ) = σ * of [n + 1] as follows: Using Theorem 4.2 and the map w we can characterize (r, p)-toppleable permutations. Recall the definition of Vesztergombi permutations from Definition 3.1 and the definition of Callan permutations from Definition 3.3.
Proof. As we noted above, to each (r, p)-toppleable permutation one can associate a configuration C r p ∈ S(n, p) that topples to the identity. Using the map w, we obtain a permutation σ * of [n + 1] with σ * p+1 = r. The restriction on the positions of chips in Theorem 4.2 translates to a similar restriction on positions in σ * by shifting the right side inequality by 1, and we obtain Note that this is the same restriction as in the definition of (p, n − p + 1)-Vesztergombi permutation. Thus σ * is a (p, n − p + 1)-Vesztergombi permutation with σ * p+1 = r. Thus, the inverse of σ * , that we denote by σ, is a (n − p + 1, p)-Vesztergombi permutation 1 with σ −1 p+1 = r, proving the first part. The second part follows from the bijection in Proposition 3.6.
We are now in a position to prove the first main result of this section.
Proof of Theorem 2.4. The theorem follows from the characterization in Proposition 4.5, the bijection in Proposition 3.6 and from the result in Theorem 3.2 that Vesztergombi permutations are enumerated by the poly-Bernoulli numbers.
We now move towards proving Theorem 2.6 using combinatorial arguments. We first list the number of (r, p)-toppleable permutations for all values of r in Table 7.  Table 7. The number of (r, p)-toppleable permutations for n = 5 on the left and n = 4 on the right.
Poly-Bernoulli numbers of type B arise in the enumeration of toppleable permutations also as the number of (1, p)-toppleable permutations.
Proposition 4.6. We have |T (1,n) n | = 1 and Proof. It is easy to see that if p = n and r = 1, there is a single permutation which topples to the identity. Now, suppose p < n. Let π (1,p) ∈ T 1,p n . Then 1 is at site p together with another chip. Let a be this chip, 2 ≤ a ≤ n + 1. We define the left pass as the consecutive topplings in a pass on the left hand side of p. Using our previous notation for unlabeled configurations, we have ( , 1, . . . , 1, 2,ˆ, 2, 1, . . . , 1, ) → (1, , 1, . . . , 1, 1, 1, 1,1, 2, 1, . . . , 1, ), after a left pass. After the first left pass the chip 1 is frozen on the leftmost site, and the chip a moves one site to the right, so to the (p + 1)'th site. Thus, we have a configuration where the first site (zeroth) is occupied by the chip 1, the next site (first) is empty, and there are two chips at the (p + 1)'th site (of which one is the chip a). Ignoring the site 0 with the chip 1, and reducing all other chip labels by one, we obtain a configuration on n chips with two chips at the p'th site (note that by ignoring the site 0 the sites are shifted to the left). If our initial configuration was (1, p)-toppleable, this configuration has to be (a − 1, p)-toppleable. Conversely, given a (a − 1, p)-toppleable permutation in S n−1 , we can obtain a (a, p)-toppleable permutation in S n by reversing the process above. Since 1 ≤ a − 1 ≤ n, the sum goes from 1 to n.
We can now count the number of (1, p)-toppleable permutations.
Corollary 4.7. The number of (1, p)-toppleable permutations in S n is B n−p,p .
Proof. By Proposition 4.6, we have to sum over the number of (r, p)-toppleable permutations in S n−1 for all possible r. But this is the same as twice the number of p-toppleable configurations in S(n − 1, p) because every such configuration is represented twice. Theorem 2.12 then proves the result.
As an illustration of this result, compare the first column of the tables in Table 7 with the entries in Table 1(a). The characterisation in Proposition 4.5 gives us the class of Vesztergombi permutations and the class of Callan permutations that corresponds to (r, p)toppleable permutations for a given r.
Using these correspondences we can generalize Proposition 4.6 and give a similar recursion for arbitrary r.
Proof. We know from Proposition 4.5 that |T r,p n | is the number of (n − p + 1, p)-Callan permutations starting with r. We need to consider two cases separately: r ≤ n − p + 1 and r > n − p + 1. If r ≤ n − p + 1, i.e., r is an underlined element and by definition this means that r is followed by a greater underlined element or an overlined element. If we delete r and reduce the value of each element greater than r by one, we obtain a Callan permutation with n − p underlined elements and p overlined elements. The number of such permutations is the sum of |T (i,p) n−1 | where i goes from r to n. Similarly, if r > n−p+1, which means that r is an overlined element, then r is followed by a smaller overlined element or an underlined element. After deleting r and reducing the remaining elements greater than r by one, we obtain a Callan permutation with n − p + 1 underlined and p − 1 overlined elements and a starting element smaller than r. The number of such permutations is the sum |T (i,p−1) n−1 | where i goes from 1 to r − 1.
We are now in a position to enumerate (r, p)-toppleable permutations.
Proof of Theorem 2.6. By Proposition 4.5, it suffices to look at (n − p + 1, p)-Callan permutations starting with r. The set of (n − p + 1, p)-Callan permutations is enumerated by B n−p+1,p . As we showed in Proposition 4.6, the number of such permutations for r = 1 is B n−p,p , which is the same as ∆ 0 B n−p,p . Throughout, ∆ acts on the first index.
For r = 2, we have to consider Callan permutations starting with the underlined element r = 2. Delete the starting element 2. What we get is a permutation on the set of underlined elements {1, 3, 4, . . . , n − p + 1} and overlined elements {n − p + 2, . . . , n + 1} starting with an underlined element greater than 2, or with an overlined element. If we reduce the elements greater than 2 by one, we get a permutation with n − p underlined elements and p overlined elements not starting with 1. Thus, we see that the number of Callan permutations of n + 1 elements starting with 2 is the difference of the number of Callan permutations of n elements and Callan permutations of n elements starting with 1, namely B n−p,p − B n−p−1,p , which is ∆ 1 B n−p−1,p .
In general we can argue the same way. Let r ≤ n − p + 1 as in the condition of the theorem which means that r is an underlined element in the corresponding Callan permutation. Now, given a Callan permutation starting with the underlined element r, if we delete the starting element, we obtain Callan permutation of the underlined elements {1, 2, . . . , r − 1, r + 1, . . . , n − p + 1} and overlined elements {n − p + 2, . . . , n + 1} starting with an underlined element that is greater than r or with an overlined element. If we reduce the elements greater than r by one, we obtain a Callan permutation of underlined elements {1, . . . , n−p} and overlined elements {n−p+1, . . . , n} not starting with any of the following elements: 1, 2, . . . , r − 1. Denoting by f n−p,p (r) the number of (n − p, p)-Callan permutations starting with r we have shown that f n+1−p,p (r) = B n−p,p − f n−p,p (1) − · · · − f n−p,p (r − 1).
The remainder of the proof follows by induction on n. The result is easily verified for small values of n by explicit computation. According to the induction hypothesis By the above equation, and plugging in the induction assumption, we obtain The inner sum on k now gives us r−1 j+1 and we end up with f n+1−p,p (r) = B n−p,p − r−2 j=0 (−1) j r − 1 j + 1 B n−p−j−1,p , and the right hand side is exactly ∆ r−1 (B n−p+1−r,p ), completing the proof.
We now recover the result of [AHT20].
Proof of Corollary 2.7. The corollary follows from the fact that the two types of poly-Bernoulli numbers are inversion transforms of each other (3.8) and by Theorem 2.6. However, it is easy to prove the formula directly using the bijection with Callan permutations. By Proposition 4.5, (p, p)-toppleable permutations are in one-to-one correspondence with (p, n + 1 − p)-Callan permutations starting with the greatest underlined element r = p.
(Ignoring the first element, we obtain a Callan permutation starting with an overlined element, since subsequences of underlined elements are increasing.) By Theorem 3.9(4), we obtain the result.
If r = p + 1, the corresponding Callan permutations start with the smallest overlined element. So, ignoring this first element, we obtain a Callan permutation that start with an underlined element, since subsequences of overlined elements are ordered decreasingly. By symmetry between underlined and overlined elements in Callan permutations, the number of Callan permutations starting with an underlined element are also enumerated by the same poly-Bernoulli number.
We have another formula for |T (r,p) n | using the poly-Bernoulli numbers of type C.
Corollary 4.9. Let n, p ≤ n be integers. We have Proof. Let r ≤ n − p + 1. By Proposition 4.5, |T (r,p) n | is the number of (n − p + 1, p)-Callan permutations starting with an underlined element r. Hence, the first block is underlined. Denoting by i the number of underlined elements in this first block besides r, we can construct this block in n−p+1−r i ways, since the underlined elements are arranged increasingly. Ignoring this first block, we have a Callan permutation with n − p + i underlined and p overlined elements starting with an overlined element. This is known to be enumerated by C p,n−p−i by Theorem 3.9(4).
Similarly, if r > n − p + 1 the starting block contains overlined elements and in this case we have r−(n−p+1)−1 i possibilities to choose the elements into this block. The remaining, n − p + 1 underlined and p − 1 − i overlined elements construct a Callan permutation that starts with an overlined element, which is known to be enumerated by C n−p+1,p−i−1 . Note that we used in this argument the symmetry property of C n,k .
Another consequence of our bijection is the following relation that can be seen from the data in Table 7. Proof. n−p+1 r=1 |T (r,p) n | counts all (r, p)−toppleable permutations where r ≤ n − p + 1. According to the bijection this is the same as the number of (n−p+1, p)− Callan permutations starting with an underlined element, which is given by C n−p+1,p . The second statement is proven analogously.
Proof of Theorem 2.8. By Proposition 4.5, any toppleable configuration C ∈ S(n, p) satisfies Suppose π ∈ T (r,p) n for all 1 ≤ r ≤ n + 1. Then the configuration C r obtained by adding r at site p to π and shifting values larger than r by 1 must satisfy these inequalities for each r. Now, every value t ∈ [n] appears both as t and as t + 1 as r varies. Therefore, π has to satisfy both for each t, proving the first statement. The second then follows from Theorem 3.9(2).

Resultant permutations
We now classify p-resultant permutations in S n .
Proof of Theorem 2.10. By Proposition 2.2, it suffices to take p ≤ n/2 . We want to show that every p-resultant permutation in S n can be written as a concatenation of a permutation of the elements 1, 2, . . . , n − p followed by a permutation of n − p + 1, . . . , n.
(Note that the initial configuration has n − 1 sites, so C ∈ S(n − 1, p).) Let π be a presultant permutation. We recall some facts from Section 4. The first and last sites are frozen after the first pass; hence, the first entry, π 1 is the smallest element of the set S 0 . Similarly, the last entry, π n is the greatest element of the set T 0 . S 1 is the set of chips in the left part and on the site p after the first pass. It is possible that one chip from the p'th site, say a, topples out of the set S 0 and another chip, say b, topples into it from the right. In this case we have S 1 = S 0 \ {π 1 , a} ∪ {b}. Alternatively, the chip that topples in the first topple to the right from the p'th site may topple back to the left in the next topple. In this case we have S 1 = S 0 \ {π 1 }. (Note that the fixed entry π 1 is not contained in the active part of a configuration, and so is not included in S 1 .) In both cases we have |S 1 | = |S 0 | − 1.
In general, S i is defined as the set of chips in the left part and on the site p after the i'th pass. Note that after the i'th pass the chip min(S i ) is fixed at the i'th site and, arguing as above, after each pass the size of the left part is reduced by one, |S i | = |S i−1 | − 1. Since the size of S 0 is p + 1, it contains at least one element from the set V = {1, 2, . . . , n − p}. Hence, the minimum of S 0 (which is π 1 ) is from the set V = {1, 2, . . . , n − p}. The size of S 1 is p, but since the greatest element of T 0 is fixed as π n after the first pass, at least one element from the set V \ {π 1 } is contained in S 1 . Hence, the minimum of S 1 , π 2 is from the set V \ {π 1 }. In general, S i has to contain at least one element from V \ {π 1 , π 2 , . . . , π i−1 }. Hence, π i+1 = min(S i ) is from the set V \ {π 1 , π 2 , . . . , π i−1 }.
We know that there are p passes in a toppling process (we assumed p ≤ n/2 ). By symmetry this implies that π n+1−p , π n+2−p , . . . , π n are elements from the set {n + 1 − p, . . . , n}, and completes the proof.
We now prove Lemma 2.11. Let π be the p-resultant permutation that is the concatenation of the permutation π left of S n−p and π right of S p .
Proof of Lemma 2.11. It suffices to show that in a configuration that topples to π, the relative order of elements that are not left-to-right maxima in π left is the same as in π left itself. We will show that these elements have a position in the initial configuration to the right of position p. Similarly, the relative order of elements that are not right-to-left minima in π right is the same as in π right itself. These elements have a position in the initial configuration to the left of position p. By symmetry it is enough to show the first part of the statement.
We will continue to use the notation from the proof of Theorem 2.10 above. We know that π 1 = min S 0 , π 2 = min S 1 and so on. If π 2 < π 1 (so that π 2 is not a left-to-right maximum), then π 2 ∈ S 1 \ S 0 . Note also that since S 1 \ S 0 contains only at most one element, we have actually {π 2 } = S 1 \ S 0 . Moreover, π 2 has to be at the (p + 1)'th before the first pass. The same argument can be used to show that if both π 2 , π 3 < π 1 , then {π 3 } = S 2 \ S 1 and that π 3 was at the position (p + 1) before the second pass and position (p + 2) before the first pass.
In general, let k be the minimal index such that π k > π 1 but π i < π 1 for all 1 < i < k. Then {π i+1 } = S i \ S i−1 and π i+1 is in the (p + 1)'th site before the i'th pass.
Hence, the elements π 2 , . . . , π k−1 had to be in the initial configuration on the sites p + 1, . . . , p + k − 3 in this order. Note that π k could be contained either in S 0 or only in S k−1 . For the elements between π k and the next greater element, we argue the same way starting from S k and the k'th pass. Continuing this way completes the proof.
We can now enumerate the number of configurations toppling to a given resultant permutation.
Proof of Theorem 2.12. Let π ∈ S n+1 be a p-resultant permutation with i left-to-right maxima in π left and j right-to-left minima in π right . We will write π = π left ⊕ π right . By Lemma 2.11, the relative order of elements which are not left-to-right maxima/right-to-left minima is fixed, and they do not influence the number of possible initial configurations that topple to π.
Given a configuration C π ∈ S(n, p) that topple to the permutation π = π left ⊕ π right construct a configuration on i + j having two chips on the site j as follows: 1. Delete all the chips (and their sites) that are neither left-to-right maxima of π left nor right-to left minima of π right . 2. Relabel naturally the left-to-right maxima φ(π k ) = k and the right-to-left minima φ(π r j ) = i + j. Notice that φ acting on the resultant configuration gives the identity permutation in S i+j .
We prove that φ is a bijection by explicitly constructing its inverse as follows. Given a jtoppleable configuration C ∈ S(i+j−1, j) and a permutation π = π left ⊕π right such that π left is a permutation of [n − p + 1] with i left-to-right maxima, π 1 = π 1 < π 2 < · · · < π i , and π right with j right-to-left minima, π r 1 < π r 2 < · · · < π r j = π n+1 , construct a configuration C π as follows: 1. Relabel the chips k with 1 ≤ k ≤ i by π k and the chips k with i < k ≤ i + j by π r k−i .