Strong Emergence of Wave Patterns on Kadanoff Sandpiles

Emergence is easy to exhibit, but very hard to formally explain. This paper deals with square sand grains moving around on nicely stacked columns in one di-mension (the physical sandpile is two dimensional, but the support of sand columns is one dimensional). The Kadanoﬀ sandpile model is a discrete dynamical system describing the evolution of ﬁnitely many sand grains falling from an hourglass (or equivalently from a ﬁnite stack of sand grains) to a stable conﬁguration. The repeated application of a simple local rule let grains move until reaching a ﬁxed point. The diﬃculty of understanding its behavior, despite the simplicity of its rule, is the main interest of the model. In this paper we prove the emergence of exact wave patterns periodically repeated on ﬁxed points. Remarkably, those regular patterns do not cover the entire ﬁxed point, but eventually emerge from a seemingly disordered segment: grains are added on the left, triggering avalanches that become regular as they fall down the sandpile. The proof technique we set up associated arguments of linear algebra and combinatorics, which interestingly allow to formally demonstrate the emergence of regular patterns without requiring a precise understanding of the non-regular initial segment’s dynamic.


Introduction
Understanding and explaining regularity properties on discrete dynamical systems (DDS) rapidly becomes a puzzling problem, and formally proving the global behavior of a DDS defined with local rules is at the heart of our comprehension of natural phenomena [21,35]. A lot of simply stated conjectures, often issued from simulations, remain open (among the famous examples is the Langton's Ant [14,15]). Sandpile models are a class of DDS describing how grains move according to local rules in discrete space and time. We start from a finite number of grains stacked on a single column (the analogy with an hourglass is formally presented in Subsection 2.4), and try to predict the asymptotic shape of the stable configurations reached at the end of the dynamical evolution.
Bak, Tang and Wiesenfeld introduced sandpile models as simple examples of systems presenting self-organized criticality (SOC), a property of dynamical systems having critical points as attractors [1]. Informally, they considered a discretized flat surface on which grains are added one by one. Each addition possibly triggers an avalanche, consisting in grains falling from column to column according to one elementary local rule, and after a while a heap of sand has formed. SOC is related to the fact that a single grain addition on a stabilized sandpile has a hardly predictable consequence on the system, on which surprising fractal structures appear [5]. This model can naturally be extended to any number of dimensions.
A one-dimensional sandpile configuration can be represented as a sequence (h i ) i∈N of non-negative integers, h i being the number of sand grains stacked on column i. The initial configuration is composed of a finite number of stacked grains on column 0: the configuration h where h 0 = N and h i = 0 for i > 0, and in the classical sandpile model one grain can fall from column i to column i+1 if and only if the height difference h i −h i+1 > 1. Different update policies may be applied: sequential, parallel, block-sequential, etc. Onedimensional sandpile models were well studied in recent years [8,10,12,17,18,29,34].
In this paper, we study the Kadanoff sandpile model (KSM) which generalizes classical sandpile models. A fixed parameter, denoted p, indicates the number of grains falling at each rule application. The results we develop in this paper present an interesting feature: we asymptotically completely describe the form of stable configurations: they are made out of exact wave patterns, though there is a part of asymptotically null relative size (and asymptotically infinite absolute size) on the left of fixed points, apparently complicated and non-regular, which remains unexplained. Furthermore, proven regularities are directly issued from this unordered initial segment, which precise understanding is bypassed by the proof technic. Indeed, the fixed point can be reached by adding grains one by one, each grain addition triggering an avalanche letting grains fall down the sandpile until they eventually create and maintain very regular wave shapes. This point is discuted in the conclusion.
We formally define the model in Subsection 1.1, and Subsection 1.2 introduces the results we expound in the rest of the paper. We present useful folklore in Section 2: in particular an interesting and useful way of computing fixed points in Subsection 2.4. The proof of the main result is presented in Section 3, and at the light of those developments, Section 4 discusses that sandpile models exhibit a behavior at the edge between discrete and continuous phenomena.

Definition of the Kadanoff sandpile model
In 1989, Kadanoff et al proposed a generalization of classical models in which a fixed parameter p denotes the number of grains falling at each step [23]. Starting from the initial configuration composed of N stacked grains on column 0, we iterate the following rule: if the difference of height (the slope) between columns i and i + 1 is greater than p, then p grains can fall from column i, and one grain reaches each of the p columns i + 1, i + 2, . . . , i + p. Note that when p = 1 we get the classical sandpile model. The rule > p is applied once (non-deterministically) during each time step. The words column and index are synonyms, and for the sake of imagery we always consider indices (column numbers) to be increasing on the right as it is presented on Figure 1.
Formally, the rule is defined on the space of ultimately null decreasing integer sequences, where each integer represents a column of stacked sand grains. A configuration is denoted h = (h i ) i∈N , and h i is the number of grains on column i. It is very convenient to consider only the relative height between columns, so we will mainly represent configurations as sequences of , within the space of ultimately null non-negative integer sequences (also called partitions in the litterature). We use 0 ω to denote the infinite sequence of zeros at the end of a configuration.
Let us now give two definitions of the model, obviously isomorphic. Definition 1 is more natural and uses heights, but Definition 2 is more convenient and uses slopes, this latter is the main one we will use throughout the paper. Definition 1. The Kadanoff sandpile model with parameter p > 0, KSM(p), is defined by two sets: • height configurations. Ultimately null non-negative and decreasing integer sequences.
• transition rules. We have a transition from a configuration h to a configuration h on column i, and we note h i → h when In this case we say that i is fired. Remark that according to the definition of the transition rules, i may be fired if and only if h i − h i+1 > p, otherwise h i is negative or the sequence h is not decreasing.  (2) from the initial configuration for N = 24 to π(24). π(24) = (2, 1, 2, 1, 2, 0 ω ) and its shot vector (defined in Subsection 3.1) is (8, 1, 2, 0 ω ).
Definition 2. The Kadanoff sandpile model with parameter p > 0, KSM(p), is defined by two sets: • slope configurations. Ultimately null non-negative integer sequences.
• transition rules. We have a transition from a configuration b to a configuration b on column i, and we note b Again, remark that according to the definition of the transition rules, i may be fired if and only if b i > p, otherwise b i is negative. if there exists i and j such that b A configuration b is stable, or a fixed point, if no transition is possible from b. As a consequence of the diamond property, for each configuration b there exists a unique stable configuration, denoted by π(b), such that b * → π(b). Moreover, for any configuration b such that b * → b , we have π(b ) = π(b) (see [20] for details). Figure 2 pictures an example of evolution. For convenience, we abusively denote by N the initial configuration (N, 0 ω ), such that π(N ) is the sequence of slopes of the fixed point associated to the initial the electronic journal of combinatorics 24(2) (2017), #P2.4 (24,   configuration composed of N stacked grains on column 0 (see Figure 3 for an illustration). This paper is devoted to the study of π(N ) according to N and the fixed parameter p.

Objective of the paper
Let us briefly recall classical notations and state the main result of this paper. Regarding regular expressions, let denote the empty word, and · (respectively +) denote the concatenation (respectively or) operator. + is to the or what Σ is to the sum 1 , and * is the Kleene star denoting finite repetitions of a regular expression (see for example [22] for details). Finally, for a configuration b we denote b [n , ∞[ the infinite subsequence of b starting from index n to ∞.
In this paper we prove the following precise asymptotic form of fixed points (expressed in terms of slope configuration). Importantly, note that the support of π(N ) is in Θ( √ N ), as it is a non-degenerated rectangular triangle whose area is N (details in Subsection 2.2).
Theorem 3. For a fixed p > 1, the smallest n such that   A graphical representation of our main result providing an exact bound for wave appearance (Theorem 26) is given on Figure 4. The asymptotic form of fixed points shows a very regular structure made out of wave, emerging from a seemingly complex initial segment. Again, since we can see this fixed point as the configuration reached after all the grains have been added one by one on the leftmost column, any single grain part of a wave pattern (on the right part of the fixed point) has travelled through the left part until it adopts, together with the sandpile upper layer it walks on, a regular behavior leading to perfect wave patterns.
The result above and the proof technics exposed thereafter present a promising feature: we asymptotically completely describe the form of stable configurations, though there is a part of asymptotically null relative size (but asymptotically infinite absolute size) which remains unknown. This part, on the left of fixed points, does not seem to have a highly ordered structure. It may look like a drawback that we can't explain any single column of the fixed point, but this remark can also be seen in a reversed way: the proof technic we develop does not require to understand precisely this complex initial segment to formally explain the emergence of very regular patterns periodically repeated on fixed points. As it has been argued above, we think it is natural to qualify the wave patterns as emergent regularities; and this paper will explain how to prove that those regularities emerge from a transitional less ordered phase, without requiring a fully accurate understanding of the dynamic.

6
A series of previous works ( [30,31,33]) lead us to a similar result, but only for the smallest "new" parameter p = 2 (the case p = 1 is the well known sandpile model), using exclusively arguments of combinatorics. However, for the general case, we introduce a completely different approach. The proof of the tight Θ(log N ) bound is decomposed into two parts: • in a first part ( • in a second part (Subsection 3.5) we prove the Ω(log N ) bound, stated in Corollary 25 and leading to the exact bound theorem (Theorem 26).
The main ideas are the following: we establish a relation between different representations of a sandpile configuration (Subsection 3.1), leading to a recurrence relation of the form where a i is the number of times the column i is fired to reach π(N ) from (N, 0 ω ).
• During the first step, the term π(N ) i is in some sens neglected. The recurrence is rewritten in term of the discrete derivative y i = a i − a i−1 . It appears that the recurrence describes an averaging process on p successive y i such that in O(log(N )) iterations the difference between the maximal and minimal value among (y i−p+1 , . . . , y i ) becomes lower than a constant α (Lemma 10). This upper bounds result requires linear algebra and a study of eigenvalues of a related matrix.
• During the second step, the arithmetic properties of the π(N ) i are considered to show that in a linear time with respect to the constant α, the recurrence leads to p consecutive equal values y i−p+1 = y i−p+2 = · · · = y i (Lemmas 12 and 13). We say that the sequence (y i ) i∈N is p-uniform at i.
• The third step requires to identify some regular patterns modulo p in the exact analysis in all possible cases of the arithmetic properties of the π(N ) i starting from the step n where (y i ) i∈N is p-uniform. It appears that either one reads π(N ) i = 0 and (y i ) i∈N is also p-uniform at n + 1 or π(N ) i = p, π(N ) i+1 = p − 1, . . . , π(N ) i+p−1 = 1 and then (y i ) i∈N is p-uniform at n + p (Lemma 16). This observation is at the origin of the wave pattern.
• The fourth step relies explicitly on fine properties of the Kadanoff sandpile model to show that π(N ) i = 0 is chosen at most once before the last occurrence of the pattern p · p−1 · . . . · 1 in (π(N ) i ) i∈N (Lemma 20). At this stage, the upper bounds part of Theorem 26 is proved (Theorem 22).
• The fifth step discusses the lower bounds. The origin of these bounds is the averaging process in step 1 which can not be too quick (Lemma 23) and the additional fact that if the final wave patterns appear at i it conversely implies that (y i ) i∈N is p-uniform at i (Lemma 24).

The context
Finding and formally proving global regularity properties suggested by numerical simulations, for models defined by elementary local rules, is a present challenge for physicists, mathematicians, and computer scientists. A lot of conjecture have been proposed on such discrete dynamical systems (sandpile models [6] or chip firing games, but also rotor router [26], the famous Langton's ant [14,15], etc) but very few results have actually been proved.
Regarding KSM(1), the prediction problem (the computational complexity of computing the fixed point π(k)), has been proven in [28] to be in NC 2 ⊆ AC 2 for the one dimensional case (NC is Nick's class, of problems efficiently computable in parallel), the model of our purpose (improved to LOGCFL ⊆ AC 1 in [27]), and P-complete when the dimension is 3.
The two-dimensional case has been recently studied in [19], where the authors have shown that the avalanche problem (given a configuration and two columns i and j, does adding one grain on column i have an influence on column j?) is P-complete for KSM(p) with p > 1, which points out an inherently sequential behavior. It is also shown in [11] that the avalanche problem of KSM(p) is in NC 1 (computable in logarithmic time on a polynomial number of processors, i.e. efficiently computable in parallel) for all p 1 in one dimension. The two dimensional case for p = 1 is still open, though we know from [13] that simple wires cannot cross.

Useful folklore
This section is devoted to the presentation of useful pieces of folklore, simple extensions of known results. We begin with two straightforward results concerning the KSM model (Subsections 2.1 and 2.2), included for the sake of self-containedness. We then present how KSM can be seen as a Chip Firing Game in Subsection 2.3, and Subsection 2.4 gives an inductive way of computing fixed points, via avalanches, which will be used to complete the proof of the upper bound theorem (Theorem 22).

There is no plateau of length larger than p + 1
A plateau is a set of at least two non-empty and consecutive columns of equal height in terms of height configuration, or a set of at least two consecutive slope values equal to 0 in terms of slope configuration. The length of a plateau is the number of columns composing it.
of steps to reach σ, there exists two slope configurations ρ and τ such that ρ → τ and such that there is a plateau of length at least p + 2 in τ , and none in ρ (H 2 ). Let k be the leftmost column of the plateau of length at least p + 2 in τ , i.e. for all column j between k and k + p, τ j = 0 (H 3 ). We will now see that there is no i such that ρ i → τ , which completes the proof.
• if i < k − p or i > k + p + 1 then a firing at i has no influence on columns between k and k + p + 1 and there is a plateau of length at least p + 2 in ρ, contradicting H 2 .
• if k − p i k then according to the rule definition we have τ i+p = ρ i+p−1 − 1, and from H 3 ρ i+p = 0 therefore τ i+p < 0 which is not possible from H 1 .
• if k < i k + p + 1 then according to the rule definition we have We give bounds for the maximal index of a non-empty column in the fixed point π(N ) according to the number N of grains, denoted w(N ). w(N ) can be interpreted as the support or width or size of π(N ). We consider a general model KSM(p) with p a constant integer greater or equal to 1. A formal definition of w(N ) is for example Figure 5.
. It is lower bounded by the fact that each slope on a stable configuration is at most p, and upper bounded by the fact that there is no plateau of length larger than p + 1.
Proof. The support of π(N ) is denoted w(N ).
the electronic journal of combinatorics 24(2) (2017), #P2.4 Lower bound: π(N ) is a fixed point, therefore by definition for all index i we have π(N ) i p. Then, . Upper bound: From Proposition 4, there is no plateau of length greater than p + 1. Therefore, for w(N ) p we have

KSM is a Chip Firing Game
Chip Firing Games (CFG) are sandpile models on arbitrary graphs ([2, 3]) (or just sandpile models as Dhar defined them in [7]). A CFG is played on a directed graph in which each vertex v has a load l(v) and a threshold t then v gives one unit to each of its neighbors (we say v is fired). As a consequence, we inherit all properties of CFGs.
Kadanoff sandpile is referred to as a linear chip firing game in [20]. The authors show that the set of reachable configurations endowed with the order induced by the successor relation has a lattice structure, in particular it has a unique fixed point. Since the model is non-deterministic, they also prove strong convergence i.e. the number of iterations to reach the fixed point is the same whatever the evolution strategy is. The morphism from KSM(2) to CFG is depicted on Figure 6.
For example the vertex with load N is the difference of height between column 0 (N grains) and column 1 (0 grain). The content of the sink is ignored.
When reasoning and writing formal developments about KSM, it is convenient to think about its CFG representation where local rules let units of slope move between columns.

Hourglass, inductive computation and avalanches
In order to compute π(N ), the basic procedure is to start from the initial configuration (N, 0 ω ) and perform all the possible transitions. However, it also possible to start from the configuration (0 ω ), add one grain on column 0 and perform all the possible transitions, leading to π(1), then add another grain on column 0 and perform all the possible transitions, leading to π(2), etc. . . And repeat this process until reaching π(N ). This inductive definition of fixed points will play a role in Subsection 3.4.
Formally, let b be a slope configuration, b ↓0 denotes the configuration obtained by adding one grain on column 0. In other words, The correctness of the process described above relies on the fact that Indeed, there exists a sequence of firings, named a strategy, . It is obvious that using the same strategy we have (k, since we only drag one more grain on column 0 along the evolution, which does not prevent any firing to occur (see Figure 7). Thus, with the uniqueness of the fixed point reachable from (k, 0 ω ), we have the recurrence formula with the initial condition π(0) = 0 ω , enabling an inductive computation of π(k). Figure 7: Inductive computation of π(k) from π(k − 1). The bold arrow represents an avalanche.
The strategy from π(k − 1) ↓0 to π(k) is called an avalanche. Note that from the non-determinacy of the model, this strategy is not unique. To overcome this issue, it is natural to distinguish a particular one which we think is the simplest: the k th avalanche s k is the leftmost strategy from π(k − 1) ↓0 to π(k), where leftmost is the minimal strategy according to the lexicographic order. This means that at each step, the leftmost possible firing is performed (example on Figure 8). We reproduce below a preliminary result of [30], which allows to write without ambiguity for an index i: i ∈ s k or i / ∈ s k .

Lemma 6 ([30]
). During an avalanche each column is fired at most once.
Proof. We prove the result by induction on the number of iterations of the avalanche. At each time step, in order to be fired twice a column must have received at least p + 2 units of slope, since: • it has initially a slope at most p on the fixed point,  (24), we add one grain on column 0 (darkened on the leftmost configuration) and apply the iteration rule until reaching π (25). Arrows are labelled by the index of the fired column (the leftmost unstable column is fired at each step). The 25 th avalanche s 25 = (0, 2, 1, 4, 3).
• it looses p + 1 units the first time it is fired, • and it needs to have a slope at least equal to p + 1 to fire again.
However, if every other column has been fired only once (by induction hypothesis), any column i received at most p units of slope: 1 unit from the firing at i − p, and p units from the firing at i + 1. The case i = 0 is slightly different: it receives the additional sand grain, but cannot receive a unit of slope from i − p.

Analysis
Upper bounding the column from which waves appear on fixed points is the major difficulty this paper overcomes. This section mainly concentrates on this issue, expressed in the upper bound theorem (Theorem 22) (providing an index n in O(log N )). The last Subsection 3.5 is devoted to lower bounding it (showing that n is in Ω(log N )). Let us remark that the known results about the case p = 1 matches the upper bound result we develop, but not the lower bound result [17]. We consider the parameter p > 1 to be fixed, and static constraints on fixed points: the possible sand content on a column has important relations (restrictions) according to its local neighborhood. We therefore study the "internal dynamic" of fixed points, via the construction of a DDS in Z p+1 , such that the orbit of a well chosen point according to the number of grains N describes the fixed point π(N ) (Subsection 3.1). The aim is then to prove the convergence of this orbit in O(log N ) steps, such that the values it takes involve regular wave patterns, as described in the exact bound theorem (Theorem 26).
The reader can refer to Subsection 3.6 and Figure 10 for an illustration of the representations that will be used along the Analysis section.

Internal dynamic of fixed points
A useful representation of a configuration reachable from (N, 0 ω ) is its shot vector (a i ) i∈N , where a i is the number of times that the rule has been applied on column i from the initial configuration [9] (see Figure 2 for an example). In the following, (a i ) i∈N and the electronic journal of combinatorics 24(2) (2017), #P2.4 (π(N ) i ) i∈N respectively denote the shot vector and sequence of slopes of the unique fixed point reached from (N, 0 ω ). Those two representations are obviously linked in various ways. In particular for any i we can compute the slope at index i provided the number of firings at i − p, i and i + 1, because the slope at i is initially equal to 0 (the case i = 0 is discussed below), and • a firing at i − p increases the slope at i by 1; • a firing at i decreases the slope at i by p + 1; • a firing at i + 1 increases the slope at i by p; • any other firing has no consequence on the slope at i. Therefore, π(N ) i = a i−p − (p + 1) a i + p a i+1 , with 0 π(N ) i p since π(N ) is a fixed point, and thus This equation expresses the value of the shot vector at position i+1 according to its values at positions i−p and i, and a bounded perturbation 0 π(N ) i p 1. As an initial condition, we consider a virtual column of index −p that has been fired N times: a −p = N and a i = 0 for −p < i < 0, representing the fact that column 0 is the only one receiving N times 1 unit of slope.
The following lemma states that the value of π(N ) i is nearly determined.
Lemma 7. Given a i−p and a i , there is only one possible value of π(N ) i , except when −a i−p + (p + 1) a i ≡ 0 mod p in which case π(N ) i equals 0 or p.
Proof. Note that a i+1 ∈ N, thus −a i−p + (p + 1) a i + π(N ) i ≡ 0 mod p. The Lemma holds since on fixed points we have 0 π(N ) i p.
For example, consider π(2000) for p = 4 (see Figure 10). We have a 8 = 120 and a 4 = 189, so −a 4 + 5a 8 = 411 ≡ 3 mod 4. From this knowledge, π(N ) 8 is determined to be equal to 1, so that a 9 = − 1 4 a 4 + 5 4 a 8 + 1 4 π(N ) 8 = 103 is an integer. Let us first manipulate Equation 1 so that the resulting recurrence relation is suitable for a study of the convergence. Adding zero sum terms to Equation 1 gives We rewrite this relation as a linear system we can manipulate easily. Let y i = a i −a i−1 , and Y i = t (y i−p+1 , . . . , y i ), with t v the transpose of v, be vectors in Z p . Note that we consider only finite configurations, so there always exists an integer i 0 such that a i = 0 the electronic journal of combinatorics 24(2) (2017), #P2.4 for i 0 i, and therefore Y i = 0 for i 0 + p i, with 0 = t (0, . . . , 0). Given Y i and π(N ) i we can compute Y i+1 with the relation M is a square matrix 2 of size p, and we call this partially defined recurrence relation (the sequence (π(N ) i ) i∈N is not known) the averaging system. This system expresses the difference of shot vector around position i+1 (via Y i+1 ) in terms of the shot vector around position i (via Y i ) and the slope at i (via π(N ) i ). Thus there exists an orbit of the point Y 0 = (−N, 0, . . . , 0, a 0 ) of Z p , i.e. a sequence of non-deterministic iterations (since π(N ) i may take two possible values as stated in Lemma 9, of which only one corresponds to the real value of π(N ) i ) starting from Y 0 , which describes the sequence of differences of shot vector of the fixed point composed of N grains. The system we get is a linear map plus a perturbation induced by the discreteness of values of the slope. Note that it may look odd to study the sequence (π(N ) i ) i∈N using a DDS whose iterations presuppose the knowledge of (π(N ) i ) i∈N . It is actually helpful because of the underlined fact that values π(N ) i are nearly determined (Lemma 7): in a first phase we will make no assumption on the sequence (π(N ) i ) i∈N (except that 0 π(N ) i p for all i) and prove that the system converges exponentially quickly in N ; and in a second phase we will see that from an n in O(log N ) such that the system has converged, the sequence (π(N ) i ) i n is determined to have a regular wavy shape. Now that we have the averaging system, the proof of the upper bound theorem (Theorem 22) is done in two steps: 1. first prove that it converges exponentially quickly (in O(log N ) steps) to a uniform vector (Subsection 3.2); 2. then prove that as soon as the vector is uniform, then the wavy shape of the upper bound theorem (Theorem 22) takes place (Subsections 3.3 and 3.4).

Convergence of the averaging system
The averaging system is understandable in simple terms. From Y i in Z p , we obtain Y i+1 by: 1. shifting all the values one row upward; 2. for the bottom component, computing the mean of values of Y i , and adding a small perturbation (a multiple of 1 p between 0 and 1) to it. For example, consider π(2000) for p = 4 (see Figure 10a, be careful that it pictures a i − a i+1 at position i). We have Y 13 = t (−3, −5, −7, −7), then m 13 = − 11 2 and π(N ) 13 is forced to be equal to 2 so that y 14 = −5 and Y 14 = t (−5, −7, −7, −5) is an integer vector.
We can foresee what happens as we iterate this dynamical system and new values are computed: on a large scale (when values are large compared to p) the system evolves roughly toward the mean of values of the initial vector Y 0 , and on a small scale (when values are small compared to p) the perturbation lets the vector wander a little around.
The study of the convergence of the averaging system works in three steps: (i). state a linear convergence of the whole system; then express Y n in terms of Y 0 and (π(N ) i ) 0 i n ; (ii). isolate the perturbations induced by (π(N ) i ) 0 i n and bound them; (iii). prove that the other part (corresponding to the linear map M ) converges exponentially quickly.
From (ii) and (iii), a point converges exponentially quickly into a ball of constant radius, then from (i) this point needs a constant number of extra iterations in order to reach the center of the ball, that is, a uniform vector. Recall notations 8, we will prove that m i −m i converges exponentially quickly to 0 (N is fixed and i runs). For p > 1 we start with Y 0 = t (−N, 0, . . . , 0, a 0 ), thus m 0 −m 0 = N +a 0 . Furthermore N p + 1 a 0 N p .
Indeed, recall that a 0 is the number of times column 0 has been fired: we can begin the evolution from (N, 0 ω ) by firing it N p+1 times, and after N p firings there are no more grains on column 0. Consequently m 0 − m 0 is in Θ(N ).
Firstly, we prove that the system converges exponentially quickly on a large scale. Intuitively, when m i − m i is large compared to p, the perturbation induced by (π(N ) i ) i∈N is negligible. Let M i = t (m i , . . . , m i ) in Z p . Since Y i converges roughly towards the mean of its values, we consider the evolution of Z i = Y i − M i which tends to 0. We have The aim is thus to prove that there exists an n 0 in O(log N ) such that the norm of Z n 0 is bounded by a constant.
We express Z n in terms of Z 0 and (π(N ) i ) 0 i n : The main argument for the proof of the lemma is in the following fact.
Fact 11. The matrix O is diagonalizable, and the spectral radius r (the maximal modulus of an eigenvalue of O) is such that r p−1 p < 1.
Let us postpone the demonstration of Fact 11. The rest of the proof is straightforward, using the infinity norm induced by a basis of proper vectors. With such a norm, we have: A classical theorem of linear algebra (see for example [4]) claims that, in finite dimension, all norms are equivalent. In particular, there exists a positive constant c such that, for each vector Z, we have: Z ∞ c Z . Using it, we get: Now, if we take α = 2 c 1 + L 1−r , and n 0 the lowest integer such that r n 0 Z 0 < 1, i.e. n 0 > − ln( Z 0 ) ln(r) , then we have the result (note that N, 0, 0, . . . , 0, a 0 ) with a 0 < N p , so this also holds for Z 0 since all norms are equivalent).
Moreover, a classical result due to Eneström and Kakeya (see for example [16]) states that, if λ is a root of a polynomial P such that P (x) = n i=0 α i x i with each α i > 0, then Applying this result to R(x), we obtain that all roots of R(x) have a modulus between 1 2 and p−1 p . As a consequence M is diagonalizable, and the set of eigenvalues of M is M λ = {1, λ 1 , . . . , λ p−1 }, with all λ i pairwise distinct. Now, let v 0 , . . . , v p−1 be non null eigenvectors respectively associated to the eigenvalues 1, λ 1 , . . . , λ p−1 of M . • For the other eigenvectors, that is, for 1 i p − 1, let c i be the uniform vector with all its components equal to 1 where the last equality is obtained from the fact that by definition of D, we have D v i = v i − c i . As a consequence, λ i is an eigenvalue of DM .
Finally, the set DM λ of eigenvalues of DM is DM λ = {0, λ 1 , . . . , λ p−1 }, and the spectral radius of DM is at most p−1 p . Secondly, on a small scale, the system converges linearly. Note that the convergence is not "stable", in the sense that once a uniform vector is reached (m i = m i ), the next y i+1 may be incremented so that after one more iteration the vector may not be uniform anymore (as can be seen on the example of Figure 10a). This reasoning applies while m i+j = m i+j , from which we get m i+j < y i+p+j m i+j and m i+j m i+j+1 m i+j+1 m i+j .
If there exists c p such that m i+c = m i+c , then, we are done. Otherwise, for 0 j < p, we have, m i m i+j < y i+j+p m i+j m i ), thus m i < m i+p m i+p m i . Lemmas 10 and 12 allow to conclude the exponential convergence of Z n to a uniform vector, stated in the following convergence lemma. Lemma 13. There exists an n in O(log N ) such that Y n is a uniform vector.
Proof. We start with m 0 − m 0 in O(N ), we have a constant α and a n 0 in O(log N ) such that m n 0 −m n 0 < α thanks to the exponential decrease on a large scale (Lemma 10). Then after p iterations the value of m n 0 +p − m n 0 +p is decreased by at least 1 (Lemma 12), hence there exists β with β p α such that after β extra iterations we have m n 0 +β − m n 0 +β = 0. Thus Y n 0 +β is a uniform vector, and n 0 + β is in O(log N ).
In this proof, neither the continuous (Lemma 10) nor the discrete (Lemma 12) studies is conclusive by itself. On one hand, the discrete study (combinatorial arguments) gives a linear convergence to a precise pattern, but not an exponential convergence. On the other hand, the continuous study (arguments of linear algebra) gives an exponential convergence towards an almost uniform vector, but in itself the continuous part never reaches a uniform vector (because of the uncertainties in the values of (π(N ) i ) i∈N ). Furthermore the uniform vector towards which the averaging system tends are not stable: once a uniform vector is reached, one more iteration may lead to a non-uniform vector. The combination of results on those two modalities (discrete and continuous) appears as an important step for proving the convergence lemma (Lemma 13).
Remark 14. Note that for p = 1, the averaging system has a trivial dynamics. For p = 2, the behavior is a bit more complex, but major simplifications are found: the computed value is equal to the mean of two values, hence in this case the difference m i −m i decreases by a factor of two at each time step.
Remark 15. Y i is uniform implies that Y j is almost uniform for all j i. Indeed, the mean m i is an integer, consequently y i+1 = m i + π(N ) i p is either equal to y i , or equal to y i + 1. In the latter case y i+1 = y i+2 = · · · = y i+p , as it is detailed in Subsection 3.3.

Emergence of a loosely wavy shape
We call wave the pattern p · . . . · 2 · 1 in the sequence of slopes. The convergence lemma (Lemma 13) shows that there exists an n in O(log N ) such that Y n is a uniform vector. In this subsection, we prove that if Y n is a uniform vector, then from index n the shape of the sandpile configuration is exclusively composed of waves and 0s. Proof. The idea of this proof follows Lemma 9. If Y i is a uniform vector, we notice that the value of π(N ) i is 0 or p. If it is 0, then Y i+1 is still a uniform vector; if it is p, then the sequence (π(N ) j ) i j<i+p is determined to be equal to p · p − 1 · . . . · 1, and Y i+p is again a uniform vector (recall that y i+1 = m i + π(N ) i p ∈ Z). The following diagram illustrates this observation: the grey node corresponds to a uniform vector Y i , and at each iteration we follow an arc whose label gives the value for π(N ) i . If we start from the grey node, any path's labels verify the statement of the lemma. We concentrate on the sequence of values of Y i . The fact that its components are integers, and especially the last one, will play a crucial role in the determination of the value of π(N ) i because 0 π(N ) i p.
• If π(N ) i = 0 then Y i+1 = t (γ, . . . , γ) and we are back to the same situation, the dilemma goes on: the value of π(N ) i+1 is not determined, it can be 0 or p.
Therefore we are back to the initial grey node, after one complete wave pattern has formed.
This process goes on until Y i = 0.
Composing the convergence lemma (Lemma 13) and Lemma 16, we can show the exponentially quick emergence of loosely wavy patterns:  Note that Proposition 4 of Subsection 2.1, stating the impossibility of having more than p + 1 consecutive columns with the same height in a configuration reachable from (N, 0 ω ), allows to refine the corollary above to get: This corollary is illustrated on Figure 9.

Avalanches to complete the proof
In order to prove the upper bound theorem (Theorem 22), we refine Corollary 18 to show that there is at most one set of two non-empty and consecutive columns of equal height, called a plateau of size two, and corresponding to a slope equal to 0. It seems necessary to overcome the static study -(or a given fixed point) presented above, and consider the dynamic of sand grains from π(0) to π(N ). These developments use the notion of avalanche introduced in Subsection 2.4: from the relation for all k > 0, π(π(k − 1) ↓0 ) = π(k) the k th avalanche is the minimal strategy from π(k − 1) ↓0 to π(k) according to the lexicographic order. We will use the fact that the structure of an avalanche on a wave pattern is very constrained.
We say that there is a hole at position i in an avalanche s k if and only if i / ∈ s k and (i+1) ∈ s k . An interesting property of an avalanche is the absence of hole from an index the electronic journal of combinatorics 24(2) (2017), #P2.4 l, which tells that there exists an m such that for all i with l i m, we have i ∈ s k for all i with m < i, we have i / ∈ s k namely, from column l, a set of consecutive columns is fired, and nothing else. We say that an avalanche s k is dense starting from an index l when s k contains no hole i with i l. We studied the structure of avalanches in [30,31,33], and saw that this property leads to important regularities in successive fixed points. It induces a kind of "pseudo linearity" on avalanches, it somehow "breaks" the criticality of avalanche's behavior and let them flow smoothly along the sandpile. Let us introduce a formal notation: is the minimal column such that the k th avalanche is dense starting at L (p, k): Then, the global density column L(p, N ) is defined as: The global density column L(p, N ) is the smallest column number starting from which the N first avalanches are dense (i.e. contain no hole). A conjecture of [30], proven only for p = 2, is solved by Corollary 21 of the following lemma. This latter shows how constrained the avalanche is on wave patterns: it is forced to stop on the first slope of value 0 it encounters. The column on which the avalanche stops is the maximal index fired within the N +1 th avalanche, and is denoted max s N +1 .
Proof. If max s N +1 < n, the two parts of the lemma are straightforwardly true. Let us consider the case where max s N +1 n.
We prove the two parts of the lemma by induction on the number of consecutive (without column of slope 0 in-between) wave patterns. Considering an avalanche, it is easy to observe that (one can refer to [30] for details): 2. the greatest fired column, max s N +1 has slope value p in π(N ).
From the two remarks above it is now straightforward to conclude: n has value p and is fired (since max s N +1 n), and then by induction if the next wave is consecutive (without symbol 0) then the avalanche goes on one wave further, otherwise is stops, and in both cases the two parts of the lemma are verified. More precisely, let π(N ) q = p with q n be a fired column, we will prove one induction step (initialization is done with n).
• If q + p = 0, that is if there is a wave on columns q + p to q + 2 p − 1, then q + p is fired since π(N ) q+p = p and receives one unit of slope when column q is fired. We can now notice that a chain reaction fires columns q + p − 1 to q + 1: the tumbling of q + p gives p units of slope to q + p − 1, but π(N ) q+p−1 = 1 therefore it becomes unstable and will be fired ; the tumbling of q + p − 1 gives p units of slope to q + p − 2, but π(N ) q+p−2 = 2 therefore it becomes unstable and will be fired ; -. . .
the tumbling of q + 2 gives p units of slope to q + 1, but π(N ) q+1 = p − 1 therefore it becomes unstable and will be fired.
Columns q + 1 to q + p − 1 are all fired, and q + p is the next column considered in the induction (recall Lemma 6, each column is fired at most once).
from observation 1 the avalanche stops at q + p and the lemma holds.
From Corollary 17, this lemma applies for a column n in O(log N ). We therefore have L (p, N ) in O(log N ), i.e., the N th avalanche is dense starting from a logarithmic index in N , and we deduce the following corollary on the emergence of regularities in the structure of avalanches.
We are now able to conclude the proof of the first part of our main theorem.
Let N be the set of such indices n (for N from 0 to N ). We will consider the column = max N + p, which is in O(log N ), and prove that π(N ) [ , ∞[ has at most one symbol 0.
We prove the result by induction, supposing that for a N with N < N we have at most one value 0 within π(N ) [ , ∞[ (apart from the final 0 ω ), and showing that this fact still holds for N + 1. Let q = min {i : π(N ) i = 0} be the index of slope 0 among the wave patterns, or the first in the infinite sequence of 0. We depict π(N ) as follows • If max s N +1 + p < then this avalanche does not modify the slopes on the right of (included), thus π(N + 1) [ , ∞[ still has at most one value 0.
• If max s N +1 + p then by definition of we can apply Lemma 20 for a column smaller of equal to − p, which gives which means according to the induction hypothesis that max s N +1 = q − p.
Thanks to the density of avalanches before column − p (hypothesis H dense ), we know all the fired columns (max s N +1 = q − p), and we can simply compute the values of π(N + 1) on the right of column by summing the gain and loss of units of slope: Consequently, the value of slope 0 has "climbed" one wave on the left, which concludes the proof.

Lower bounding the wave appearance
Few more developments allow us to prove a tight asymptotic bound of Θ(log N ) for the wave appearance. This subsection is devoted to it. We first prove an Ω(log N ) bound on the n such that Y n is uniform, and then that it is not possible to get wave patterns as described in the upper bound theorem (Theorem 22) if Y n is not uniform.
Lemma 23. For a fixed p > 1, the smallest n such that Y n is a uniform vector is in Ω(log N ).
Combining Lemmas 23 and 24 we get the corollary below.
Corollary 25. For a fixed p > 1, the smallest n such that The upper bound theorem (Theorem 22) and Corollary 25 give the final result.
Theorem 26. For a fixed p, the smallest n such that 3.6 An illustrative example We can notice on Figure 10a that the shot vector differences contract towards some "steps" of length p, which corresponds to the statement of the convergence lemma (Lemma 13) that the vector Y n becomes uniform exponentially quickly (note that this graphic plots the opposite of the values of the components of Y n ). Figure 10c pictures the sandpile configuration on which the wavy shape appears starting from column 20 over the 40 non-empty columns. To see that wave patterns cover asymptotically completely the fixed point, let us briefly present the fixed point for p = 4 and N = 20000:

Concluding Discussion
The proof technic we set up in this paper allowed to prove the emergence of regular patterns periodically repeated on fixed points, stemming from an initial segment presenting a disordered structure. The absolute size of this segment tends to infinity, and its  relative size (compared to the width of the fixed point) tends to zero. Consequently, the result asymptotically completely describes the fixed point. Arguments of linear algebra allowed to prove a rough convergence of the system (in an imprecise but coarsely bounded representation), completed with the use of combinatorial arguments exploiting the discrete nature of the model, leading to the description and explanation of precise and regular wave patterns. Interestingly, this main result is proved without requiring a precise understanding of the initial segment's dynamic. Let us argue again that the word emergence, though not formally defined, feels right to describe the phenomenon captured in the exact bound theorem (Theorem 26). As presented in Subsection 2.4, the fixed point configuration can be reached by adding sand grains one by one on the leftmost column: each grain addition triggers an avalanche (that may involve more grains in its way) traveling along the upper layer of the sandpile. During their movements, as they go rightward and downward, they self-organize into regular structures that do not appear immediately, but only after a transient of asymptotically unbounded size (though, relatively, very small). Since all the grains creating and maintaining the regular wave patterns on the right cross the left and weakly ordered part, it feels natural to say that the regularities emerge from the dynamic of sand grains: naively, some kind of order is destroyed (the initial column may be seen as extremely regular) and recreated in this process.
Trying to extend the proof technics of Theorem 26 (especially the upper bound) to the electronic journal of combinatorics 24(2) (2017), #P2.4 other models is a promising track of research. It is easy to construct such models from the CFG representation of KSM. An example where similar regularities experimentally emerge is to apply the KSM rule for all k p when the height difference between two columns is strictly greater than p k=1 k. It would shade some light on the concept of emergence to find families of models of increasing expressiveness on which the technics allow to understand the asymptotic shape of fixed point, or the asymptotic dynamic.
It seems that an alternative proof can be derived from the developments of [24,25], using others tools like harmonic functions and the least action principle. We think that the technic presented here is nonetheless of interest, as it clearly separates two ingredients: the continuous one linked to linear algebra arguments, and the discrete one linked to combinatorial arguments.
This result stresses the idea that sandpile models are on the edge between discrete and continuous systems. As we pour grains one by one, they start to self-organize and create regular wave structures. Hypothetically, the result suggests a separation of the discrete and continuous parts of the system. On one hand, there is a seemingly unordered initial segment, interpreted as reflecting the discrete behavior. On the other hand, the asymptotic and ordered part, interpreted as reflecting the continuous behavior, lets a regular and smooth pattern emerge. Can we interpret the continuous part as a liquid limit of the discrete part?
There is a slight bias appearing on the continuous part: it is not fully homogeneous (that is, with exactly the same slope at each index) which would have been expected for a continuous system, but a (very small) pattern is repeated. It looks like this bias does not come from the unicity of the initial column, because we still observe the appearance of wave patterns starting from variations of the initial configuration (for example starting from p consecutive columns of height N , thus p N grains, or starting with a whole sandpile of wave patterns and adding grains one by one on the leftmost column). Rather, we think that this bias comes from the gap between the unicity of the border column on the left side (at index −1) compared to the rule which affects p columns.
Finally, the emergence of regularities in this system hints at a clear qualitative distinction between some sand grains and a heap of sand, providing a solution to the sorite paradox in the Kadanoff sandpile model: we have a heap as soon as a wave pattern appears.