The stochastic sandpile model on complete graphs

The stochastic sandpile model (SSM) is a generalisation of the standard Abelian sandpile model (ASM), in which topplings of unstable vertices are made random. When unstable, a vertex sends one grain to each of its neighbours independently with probability $p \in (0,1)$. We study the SSM on complete graphs. Our main result is a description of the recurrent states of the model. We show that these are given by convex sums of recurrent states for the ASM. This allows us to recover a well-known result: that the number of integer lattice points in the $n$-dimensional permutation polytope is equal to the number of labeled spanning forests on $n$ vertices. We also provide a stochastic version of Dhar's burning algorithm to check if a given (stable) state is recurrent or not, which runs in linear time. Finally, we study a family of so-called"partial"SSMs, in which some vertices topple randomly, while others topple deterministically (as in the ASM, sending one grain to all neighbours). We show that this distinction is meaningful, yielding sets of recurrent states that are in general different from those of both the ASM and SSM. We also show that to get all recurrent states of the SSM, we can allow up to two vertices to topple deterministically.


Introduction
The Abelian sandpile model (ASM) was introduced by Bak, Tang and Wiesenfeld in the late 1980's [2,3] as an example of a model exhibiting a phenomenon known as selforganised criticality.This phenonemon describes systems which self-tune themselves towards some critical state, without the need for external modification of their parameters.The model was then generalised and formalised a few years later by Dhar [10].
The ASM is a random process on a graph, where vertices are assigned a number of grains of sand (a non-negative integer).At each unit of time, a grain is added to a randomly selected vertex of the graph.If this causes the number of grains to exceed a certain threshold (usually the degree of the vertex), that vertex is said to be unstable, and topples, sending one grain to each of its neighbours in the graph.A special vertex called the sink absorbs grains (never topples), and so the process eventually stabilises.
Of particular interest in this model are the so-called recurrent states, which are states that appear infinitely often in the long-time running of the model.While there are a number of ways to check if a given state is recurrent or not (Theorem 5 gives four of these), computing the set of all recurrent states is in general a difficult question, both algorithmically and combinatorially.As such, a fruitful direction of ASM research has been to instead focus on certain graph families with high levels of symmetry or structure, on which the set of recurrent states can be more easily studied and computed.
The seminal example of such a study is due to Cori and Rossin [9], who showed that on complete graphs, the set of recurrent states is in bijection with the set of parking functions (see Section 2.5 for a definition of these, and Theorem 16 for a statement of the bijection).Similar combinatorial studies on many other graph families -such as complete bipartite [13] and multi-partite [8] graphs, complete split graphs [12], wheel and fan graphs [26], Ferrers graphs [15], permutation graphs [14], and so on -followed.Related combinatorial objects include generalisations of parking functions, parallelogram polyominoes, Motzkin words, subgraphs of cycles, lattice paths, decorated EW-tableaux, tiered trees, and a number of others.
In the ASM, the only randomness lies in the choice of vertex where grains are added at each time step, together with possibly the randomness of the initial state.After this, the toppling and stabilisations processes are entirely deterministic.Stochastic variants of the ASM add an extra layer of randomness to the model by making topplings random.When a vertex is unstable, it chooses a random (multi-)subset of its neighbours to send grains to according to some probability distribution.There are a number of stochastic variants of the ASM in the literature, including the following.
• In [20], there are two different types of grain, which cannot occupy the same vertex.
When they do, one of the grains is moved to a randomly chosen neighbouring vertex instead.
• In [24], unstable vertices lose a fixed number grains, which are re-distributed at random to their neighbours: some neighbours may receive more than one grain, others none, while some grains may exit the system directly.
• In [5], unstable vertices flip a biased coin for each neighbour to decide which neighbours to send grains to.That is, all neighbours independently of each other receive a grain with probability p ∈ (0, 1) (with probability (1 − p) that grain is kept by the toppling vertex).
• The model in [21] generalises the two previous models in [5,24].In this model, toppling vertices send grains to a random multi-set of neighbours, with the total number of grains lost being itself random.
• In [18], the toppling threshold of a vertex is set to a (fixed) multiple M of its degree.
For each toppling, a random number γ ∈ {1, . . ., M} is chosen, and each neighbour of the toppling vertex receives the same (random) number γ of grains.
In general, these models have not been studied as widely as the ASM.The existing research has mainly focused on the physical properties of the models such as the steady state distribution, and no real combinatorial studies have been conducted.This paper proposes the first such combinatorial study.We focus on the "coin-flipping" model from [5], which we call the stochastic sandpile model (SSM).We choose this model because it has known characterisations of recurrent states, i.e. conditions under which a given state is recurrent (see Theorem 6 in this paper).We study the SSM on complete graphs, seeking a combinatorial description of its set of recurrent states in the spirit of that of Cori and Rossin for the ASM [9].
Our paper is organised as follows.In Section 2 we introduce the necessary definitions, tools and notation for our study.This includes formal definitions of the ASM and SSM, and characterisations of their recurrent states (Theorems 5 and 6).We also introduce various notions such as orientations, parking functions, and polytopes, which will be needed later in the paper.In Section 3 we focus on the sandpile model (both Abelian and stochastic) on complete graphs.We re-state the characterisation theorems mentioned above in terms of complete graphs, and this allows us to define a stochastic burning algorithm that establishes in log-linear time whether a given state is recurrent for the SSM or not (Theorem 21).In Section 4 we state and prove our main combinatorial description of recurrent states for the SSM on complete graphs (Theorem 26), namely that these are given by integer lattice points in the convex polytope of the set of recurrent states for the ASM.In Section 5 we introduce a concept of partially stochastic sandpile models in which some vertices topple according to the SSM rules, while others topple according to the ASM rules.We show that the recurrent states for these models are in general distinct to those of both the ASM and SSM (Propositions 33 and 34), and that if at most two vertices topple according to the ASM rules, we in fact get all the recurrent states of the SSM (Theorem 37).Finally, Section 6 summarises our main results, and lists some potential directions of future research.

Preliminaries
In this section, we introduce some of the necessary definitions, tools and notation we will need and use throughout the rest of the paper.As usual, the sets Z and N denote the sets of integers and (strictly) positive integers respectively.We let Z + := N ∪ {0} denote the set of non-negative integers.For a positive integer n ∈ N, we denote [n], resp.
[n] 0 , the set {1, . . ., n}, resp.{0, . . ., n}.For a vector for the non-decreasing rearrangement of v. Throughout this section, a graph G is a labelled, undirected, connected graph with vertex set [n] 0 .The edge set E is finite, and may contain multiple edges, but no loops.We call vertex 0 the sink of the graph G.For i ∈ [n] 0 , we write deg i = deg G i for the degree of the vertex i in G, omitting the superscript where the underlying graph is unambiguous.For a subset of vertices A ⊆ [n] 0 , we denote G[A] the induced subgraph of G on A, that is the graph with vertex set A and edge set the set of edges of G with both endpoints in A. The complete graph K 0 n is the graph where there is one edge between any two distinct vertices i, j ∈ [n] 0 .

Orientations
An orientation O of a graph G is the assignment of a direction to each edge in E. If E contains a multiple edge, a direction is assigned to each of its copies.For an orientation O, and an edge e = {i, j} ∈ E, we write i O − → j to denote that the edge e is directed from i to j in O.For i ∈ [n] 0 , we denote in O i , resp.out O i , the number of incoming, resp.outgoing, edges at i in O.
An orientation is acyclic if it contains no directed cycles.A root, resp.source, of an orientation is a vertex where all edges are incoming, resp.outgoing.It is straightforward to verify that an acyclic orientation contains at least one root and one source.An orientation is said to be sink-rooted if it contains exactly one root, the sink 0. A cycle-flip refers to the act of changing the directions of all edges in a directed cycle, leaving other edge directions unchanged.
Definition 1.We say that two orientations O and The following is stated in equivalent form in [16 Note that as a consequence, if O is acyclic, its score-equivalence class contains only itself.

The Abelian sandpile model
In this part we introduce the Abelian sandpile model (ASM) on a graph, and recall some important results regarding the so-called recurrent states of the model.Let G be a graph with vertex set [n] 0 where 0 is the sink, and edge set E.
A configuration on G is a vector c = (c 1 , . . ., c n ) ∈ Z n + that assigns the number c i to vertex i.We think of c i as representing the number of grains of sand at the vertex i.Note that the sink vertex 0 is not assigned a number of grains.Denote by Config (G) the set of all configurations on G. Let α i ∈ Z n + be the vector with 1 in the i-th position and 0 elsewhere.By convention, α 0 = (0, . . ., 0) is the all-0 vector.We say that a vertex i in a configuration c i , and unstable otherwise.A configuration is called stable if all its non-sink vertices are stable (otherwise it is unstable), and we denote Stable (G) the set of all stable configurations on G.We also define c max to be the maximal stable configuration on G, i.e.
The terminology "maximal" here means that adding a grain to any vertex in c max would result in an unstable configuration.
Unstable vertices may topple.We define the deterministic toppling operator DetTopp i , corresponding to the toppling of an unstable vertex i ∈ [n] in a configuration c ∈ Config (G), by: DetTopp where the sum is over all vertices j adjacent to i in G, counted with multiplicity.In words, the deterministic toppling of a vertex i sends one grain along each edge incident to i (with multiplicity), with the grains then being received by the neighbouring vertices.
Performing this toppling may cause other vertices to become unstable, and we topple these in turn.One can show (see e.g.[11]) that starting from some unstable configuration c and successively toppling unstable vertices, we eventually reach a stable configuration c ′ (we think of the sink as absorbing grains).Moreover, this configuration c ′ does not depend on the sequence in which vertices are toppled.We write c ′ = DetStab(c) and call it the deterministic stabilisation of c. Remark 3. The qualifier deterministic for toppling operators and stabilisation is used here to distinguish the ASM from its stochastic variant introduced in Section 2.3.For this variant, we will talk instead of stochastic topplings and stabilisation.
We now define a Markov chain on the set of stable configurations Stable (G).Let µ = (µ 1 , . . ., µ n ) be a probability distribution on [n] such that µ i > 0 for all i ∈ [n].At each step of the Markov chain we add a grain at the vertex i with probability µ i and (deterministically) stabilise the resulting configuration.Formally the transition matrix Q is given by: The recurrent states for the Markov chain are the set of configurations which appear infinitely often in the long-time running of the model.In the spirit of Remark 3, we call the recurrent states of the ASM deterministically recurrent (DR), and let DetRec (G) be the set of DR states on the graph G. Since µ i > 0 for all i ∈ [n], it is clear that the maximal stable configuration c max is DR, and that the Markov chain is irreducible.
Given a configuration c = (c 1 , . . ., c n ) ∈ Config (G) and an orientation O of G, we say that O and c are compatible if stabilisations.The formulation used in the theorem stems from the remark that in this sequence, we can put all the grain additions first, and then it remains to effect just one stabilisation.
2. The second is in terms of compatible acyclic orientations.This characterisation was first stated in these terms by Biggs [4], although the author credits a previous paper [17] as having equivalent results.
3. The third is in terms of forbidden subconfigurations, essentially configurations on a strict subgraph of G which remain stable (see [23]).
4. The fourth is the famous burning algorithm, due to Dhar [11], which provides a straightforward algorithmic process to check if a given (stable) configuration is DR or not.
That Characterisations (3) and ( 4) are equivalent is fairly straightforward, but we choose to give both here to foreshadow our results on the SSM.First, let us describe Dhar's burning algorithm.This is a process which burns vertices of G until either no vertices are left, or a forbidden subconfiguration is reached.Burning a vertex of a graph means removing that vertex and all its incident edges.Dhar's algorithm can be described as follows.
• Step 1. Burn the sink vertex 0. Let Remain = [n] 0 \ {0} = [n] be the set of remaining (unburned) vertices, and G[Remain] be the induced subgraph of G on the set of remaining vertices.
• Step 2. While there exists i ∈ Remain such that c i deg , burn vertex i, setting Remain = Remain \ {i}, and repeat.
• Step 3. Output the set of remaining vertices Remain = Remain(c).
Traditionally, in Step 2, one chooses to burn the minimal i satisfying the inequality, but the output does not depend on this choice in any way, so we do not specify it here.We can now state the four equivalent characterisations of DR states referred to above.(iii) For every subset A ⊆ [n], there exists a vertex i ∈ A such that c i deg (iv) Dhar's burning algorithm burns all vertices of G, i.e. outputs Remain(c) = ∅.

The stochastic sandpile model
In this section, we introduce a stochastic variant of the ASM, called stochastic sandpile model (SSM).We are slightly more informal than in the previous section, as most of the notions introduced closely mirror those of the ASM.For a more formal definition of the SSM, see [5].
In the ASM, the only randomness in the model concerns the choice of which vertex to add a grain to at each step of the Markov chain (i.e. the distribution µ in Section 2.2), while the subsequent operations -topplings and thus stabilisation -are deterministic.
In the SSM, we introduce an additional layer of randomness by making the topplings random.Fix some parameter p ∈ (0, 1).Informally, every time we have an unstable vertex i, we flip a biased coin for each incident edge to i, and decide to send one grain along that edge with probability p (the grain gets sent to one of the neighbours of i), while with probability (1 − p) that grain remains at vertex i.The coin flips are independent for each edge, and independent of other vertex topplings.We thus define the stochastic toppling operator at vertex i by: where the sum is over all vertices j adjacent to i, counted with multiplicity, and the (B j ) are i.i.d.Bernoulli random variables of parameter p.Note that if we take p = 1, we have StoTopp i = DetTopp i a.s., and the SSM is the same as the ASM in that case, hence we assume p < 1.In general, the resulting configuration StoTopp i (c) is a random configuration.
Performing this (stochastic) toppling may cause other vertices to become unstable, and we topple these in turn.In [5,Theorem 2.2] it is shown that, as in the ASM, starting from some unstable configuration c and successively toppling unstable vertices, we eventually reach a (random) stable configuration c ′ .Moreover, this configuration c ′ does not depend on the order in which vertices are toppled.We write c ′ = StoStab(c) and call it the stochastic stabilisation of c.
As for the ASM, we can define a Markov chain for the SSM on the set of stable configurations Stable (G).Let µ = (µ 1 , . . ., µ n ) be a probability distribution on [n] such that µ i > 0 for all i ∈ [n].At each step of the Markov chain we add a grain at the vertex i with probability µ i and (stochastically) stabilise the resulting configuration.We call recurrent states for this Markov chain stochastically recurrent (SR) and denote their set StoRec (G).Note that, once again, the Markov chain is irreducible, and the maximal stable configuraiton c max is recurrent.
We now give three equivalent characterisations of SR states in terms of grain additions and stabilisations, compatible orientations, and forbidden subconfigurations.These characterisations closely mirror the first three in Theorem 5 for DR states.In the case of general graphs G, there is as yet no known equivalent to Dhar's burning algorithm.In Section 3.2, we describe a stochastic burning algorithm in the case of complete graphs.Proof.That c ∈ Stable (G) is SR if, and only if, Condition (i) holds follows as in the DR case from being able to put any grain additions first in a sequence of grain additions and topplings.The equivalence with Condition (ii), was stated in equivalent, though slightly different, form in [5,Theorem 3.4].The equivalence of Conditions (ii) and (iii) is more-or-less part of graph theory "folklore".We give a brief proof here for completeness.Suppose that there exists a sink-rooted orientation O compatible with c, and let A ⊆ [n].By summing Inequality (4) over all vertices in A, we get c(A) For the right-hand inequality, note that all edges between two vertices in A are counted exactly once in the sum of in-degrees, with this sum also possibly including some edges directed i O ← − j with i ∈ A, j / ∈ A. This shows that (ii) ⇒ (iii).For the converse, let c be a configuration on G which satisfies Condition (iii).We It therefore remains to prove the previous claim.Seeking contradiction, we assume that Condition (iii) holds for neither c ′ nor c ′′ .Then there exists some vertex subsets Note that these include at least the edge (i, j), so that k 1, and that by construction we have the electronic journal of combinatorics 31(3) (2024), #P3.26 This contradicts Condition (iii) for c, thus completing the proof.
Remark 7. Conditions (i) or (ii) of Theorems 5 and 6 immediately imply the inclusion DetRec (G) ⊆ StoRec (G).In general, the converse doesn't hold.Consider the graph in Figure 1 below, with the configuration c = (1, 1, 1) (the sink is the black square vertex).This configuration is SR since the orientation exhibited on the figure is compatible with c, but is not DR as the set of the three non-sink vertices forms a forbidden subconfiguration for Condition (iii) of Theorem 5. Proposition 12 will give straightforward, but useful, conditions under which these two sets are the same.
In other words, we can add a grain to each vertex of [n] in the configuration c, and the resulting configuration will still be stable.
Remark 9. Suppose that the graph G is simple, i.e. has no multiple edges.By Dhar's burning criterion, a strongly stable state can never be DR, since after burning the sink no further vertices can be burned.However, it is possible for a strongly stable state to be SR, as shown in Figure 2 below, which exhibits a strongly stable state on K 0 3 with a corresponding compatible orientation (the sink is the central black square).

Minimal recurrent configurations
In this part we mention briefly a few results about minimal recurrent configurations.The results are nearly identical for minimal SR or DR states, so we make a common section 1 1 1 Figure 2: Example of a configuration which is strongly stable and SR.
for both models for the sake of brevity and to avoid too much repetition, and talk simply of recurrent states.First, observe that if c is a recurrent state, by summing Inequality (4) over all vertices i ∈ [n], we get: This naturally leads to the definition of the level statistic of a recurrent configuration: By also noting that a recurrent configuration is stable, so c i deg i − 1 for all i ∈ [n], we get the bounds: which hold for any recurrent configuration c.
There is a natural partial order on the set of configurations.For c, c ′ ∈ Config (G), we define c c ′ if for all i ∈ [n], c i c ′ i .From the Markov chain definition, if c c ′ with c a recurrent state, and c ′ is stable, then c ′ is also recurrent.We say that c is minimal recurrent if c is recurrent and minimal for the partial order .Theorem 10.Let c ∈ Stable (G) be a stable configuration on G. Then c is minimal SR, resp.minimal DR, if, and only if, there exists a sink-rooted, resp.acyclic sink-rooted, orientation O of G, such that: Moreover, such an orientation is unique up to score-equivalence, resp.unique.Sketch of proof.Theorem 10 was proved in the (minimal) DR case in [25].The proof in the SR case is identical.If O is a sink-rooted orientation, compatible with a SR state c, and there exists i ∈ [n] such that c i > in O i , then c ′ := c − α i is still compatible with O, and so is SR by Theorem 6, which implies that c is not minimal.
Conversely, if c is SR and there exists a sink-rooted orientation O which satisfies Equation ( 9), then by summation we have level(c) = 0.If c were not minimal, there would exist c ′ ∈ StoRec (G) such that c ′ ≺ c, and by summation we would have level(c ′ ) < level(c) = 0, which is impossible by the left-hand side of Inequality (8), so c must be minimal, as desired.
The uniqueness of O up to score-equivalence follows immediately from the characterisation.In the DR case, as noted in Section 2.1, uniqueness up to score equivalence of acyclic orientations is simply uniqueness.
The proof above suggests a link between minimal recurrent states and those with level equal to 0. This is indeed the case.Proposition 11.Let c be a recurrent configuration.Then c is minimal recurrent if, and only if, level(c) = 0.This result is often implicit in the literature, particularly when considering the level polynomial of a graph which counts recurrent configurations according to their level.We sketch a brief proof here for completeness.

Sketch of proof.
If c is recurrent and level(c) = 0, then c is minimal recurrent.Otherwise there would exist a recurrent state c ′ such that c ′ ≺ c, and by summation we would level(c ′ ) < level(c) = 0, which is impossible by the left-hand side of Inequality (8).
Conversely, if c is minimal recurrent, there exists a sink-rooted (acyclic in DR case) orientation O satisfying Equation ( 9), and by summation we get level(c) = 0 as desired.
We end this section by stating conditions under which all SR states are also DR (we know that the converse is always true).Proof.Trivially, (i) implies (ii).It is also straightforward to show that (iii) implies (i).
Let c be a SR state.By Theorem 6 there exists a sink-rooted orientation O of G that is compatible with c.But if G ′ is a forest, it contains no cycles, so that any sink-rooted orientation of G is acyclic (there can be no directed cycles containing the sink, since it is a root of the orientation).Therefore O is an acyclic sink-rooted orientation of G, compatible with c, and so c is DR by Theorem 5.
It therefore remains to show that (ii) implies (iii), which we do by contraposition.Suppose that G ′ contains a cycle (i 1 , . . .i k , i 1 ).Let G ′′ be the graph G with all edges of this cycle removed, and O ′ be a sink-rooted orientation of G ′′ .Now let O be the sinkrooted orientation of G obtained by adding the directed cycle i 1 to O ′ , and define c to be the minimal SR state compatible with O.If c were DR, there would exist an acyclic orientation that is compatible with c, and therefore score-equivalent to O.But by Proposition 2 this is impossible: one can't go from an acyclic orientation to one containing a directed cycle through a series of cycle-flips.Therefore c is not DR, as desired.

Parking functions
Definition 13.Let p = (p 1 , . . ., p n ) ∈ N n be a tuple of positive integers, and p inc its non-decreasing rearrangement.We say that p is a parking function if The set of all n-parking functions is denoted PF n .
Remark 14.The terminology "parking function" comes from the following observation.Suppose we have n cars trying to park in n spaces, cars and spaces both labeled 1, . . ., n.
Each car has a preferred parking spot p i .The cars enter the car park in order 1, . . ., n and for each i the car i parks in the first available spot q p i (if no such spot exists, the car cannot park).Then all n cars can park if, and only if, p = (p 1 , . . ., p n ) is a parking function.
There is a rich literature on the study of parking functions.We refer interested readers to the excellent survey by C. Yan [29].In Theorem 16 we recall a straightforward bijection between n-parking functions and DR states of the ASM on the complete graph K 0 n .

Polytopes
A polytope is the convex hull of a finite set of points S ⊂ R n for some n.In other words, it is the set of all points of the form s∈S λ s s, where 0 λ s 1 for all s ∈ S and s∈S λ s = 1.
In this paper, we will be interested in three polytopes in particular.
• The regular n-permutohedron.This is the polytope of the set S n of permutations of length n.We denote it PermPoly n .
• The n-dimensional parking function polytope.This is the polytope of the set of n-parking functions PF n .We denote it PFPoly n .
• The n-dimensional DR polytope.This is the polytope of the set of DR states on the complete graph K 0 n .We denote it DRPoly n .Polytopes, and in particular permutohedrons, have been well-studied in the combinatorics literature (see [22] and references therein).One element of interest when studying a polytope combinatorially (usually in this case S ⊂ Z n ) is to look at its set of integer lattice points, i.e. the set of points in the polytope with integer coordinates.In general these sets are not easy to compute, let alone obtain an explicit formula for.One of the main results in our paper (Theorem 26) states that the set of SR states on the complete graph K 0 n is the set of integer lattice points in the n-dimensional DR polytope DRPoly n .

The sandpile model(s) on complete graphs
In this section, we study the ASM and SSM on the complete graphs K 0 n .Recall that the complete graph K 0 n is the graph with vertex set [n] 0 = {0, 1, • • • , n} where there is one edge between any pair of distinct vertices.Because the sink is connected to all the non-sink vertices, there is an obvious one-to-one correspondence between sink-rooted orientations of K 0 n and orientations of K n , where K n is the complete graph with vertex set [n] = {1, • • • , n}, i.e. the graph K 0 n with sink removed.This means that we can essentially ignore the role the sink plays in characterising recurrent states for the sandpile model on K 0 n .Therefore, to lighten notation, we will slightly abuse notation and talk of the sandpile model on, and orientations of, K n .We will write Config n for the set of configurations on K n , with similar notation for Stable n , DetRec n , and StoRec n .
The following result is an immediate consequence of the symmetry of the complete graph, which we state here as it is useful at various points in the paper.
and only if, its non-decreasing rearrangement c inc is recurrent.

The ASM on K n : parking functions and the burning algorithm
In this part, we recall the bijection from the set of DR states on K n and the set of n-parking functions from the seminal work by Cori and Rossin [9].We get the immediate following corollary, which can be thought of as a re-writing of Dhar's burning criterion for complete graphs.

The SSM on K n : a stochastic burning algorithm
In this part, we study the SSM on the complete graphs K n .First, we restate the characterisation result from Theorem 6, Condition (ii), in the complete graph case.
Theorem 18.Let c = (c 1 , . . ., c n ) ∈ Stable n be a stable configuration on K n .Then c is SR if, and only if: the electronic journal of combinatorics 31(3) (2024), #P3.26 A more convenient characterisation that will allow us to exhibit the stochastic burning algorithm (Algorithm 20) is the following.Proposition 19.Let c = (c 1 , . . ., c n ) ∈ Stable n be a stable configuration on K n , and c inc its non-decreasing rearrangement.Then c is SR if, and only if: Proof.If c is SR, then so is c inc by Proposition 15.Applying Equation (11) to c inc and subsets [i] immediately gives Equation (12).Conversely, suppose that c is such that c inc satisfies Equation (12).To simplify notation, by Proposition 15 we may assume that c = (c 1 , . . ., c n ) = c inc .Let A ⊆ [n] and write By construction, we have i j j for all j ∈ {1, . . ., k}, and thus c i j c j since c is assumed to be non-decreasing.This implies that where we applied Equation ( 12) in the third line.This shows that c is SR by Theorem 18. Step 2. While Sum Target and k > 0, do: This step is equivalent to burning the vertex with the k-th smallest number of grains in c.
For the complexity, we note that since the configuration c is bounded above by n (we have c i n − 1 for all i ∈ [n]), sorting can be done in linear time using the CountSort algorithm (also known as sort by values, see e.g.[7, proof of Proposition 13]).In brief, this algorithm first computes an auxiliary array a = (a 0 , . . ., a n−1 ) where a j = |{i ∈ [n]; c i = j}| for all j.This can be done straightforwardly in linear time by simply looping over c and incrementing a c i by one at each step.We then recover c inc from a in linear time by looping over a and appending a j times the value j to c inc at each step (since a j = n this is indeed linear).Finally, once the sorting is done, the algorithm itself requires only a linear number of calculations.
Remark 22.The stochastic burning algorithm only works in the complete graph case, where this high degree of symmetry allows us to reduce configurations to their nondecreasing rearrangements.A natural attempt at generalisation would be to successively burn maximal vertices.That is, we check the condition c(A) E(G(A)) (Condition (iii) from Theorem 6) for subsets A obtained by successively burning vertices with the maximal number of grains.This however fails fairly obviously, since we can "artificially" inflate the number of grains at a given vertex v by simply connecting an arbitrary number of new vertices to v (these new vertices all have degree 1).
A less naive attempt would be to instead successively burn vertices with minimal lacking number, where the lacking number of a vertex is equal to its degree minus its number of grains.However, this also fails.For a counter-example, consider the configuration in Figure 3 below.For convenience, we don't represent the sink, but we may assume that it is connected to each vertex by a single edge.The configuration, read from left-to-right, is (0, 5, 5, 5), and the lacking numbers are (7 − 0, 7 − 5, 8 − 5, 8 − 5) = (7, 2, 3, 3).The two left-most vertices (in red) form a forbidden subconfiguration in terms of Theorem 6, Condition (iii), since there are 5 grains in total but 6 edges between the two.This implies that the configuration is not SR.One can check that this is the only such forbidden sub-configuration for the SSM.But now, notice that the vertex with minimal lacking number is part of this forbidden subconfiguration.As such, if we were to burn vertices successively in (increasing) order of their lacking number, this would be the first vertex to be burned, and so there is no possibility of the algorithm terminating on the forbidden subconfiguration: it would simply burn through it!Figure 3: A counter-example to a stochastic burning algorithm which successively burns vertices with minimal lacking number.The sub-configuration on the two left-most vertices (in red) is a forbidden sub-configuration, but all vertices would be burned.

Minimal SR states on K n : tournaments and spanning forests
We now briefly study minimal SR states on the complete graph.An n-tournament is an orientation of the complete graph K n for some n.From Theorem 10 and our remarks at the beginning of Section 3, we know that there is a bijection between minimal SR states on K n and the score-equivalent classes of n-tournaments.
A spanning forest of a graph G = (V, E) is a cycle-free subgraph F = (V, E) (or equivalently, a collection of disjoint trees such that the union of their vertices is equal to V ).The following result has been known for some time in graph theory, see for instance [18] for a bijective proof.

Theorem 23. The number of score-equivalent orientations of a graph G is equal to its number of spanning forests.
This immediately gives another enumeration of minimal SR states.
Proposition 24.The number of minimal SR states on K n is equal to the number of labelled spanning forests on n nodes.Remark 25.In fact, Proposition 24 holds in a more general setting than that of the complete graphs K n .It holds in any graph where the sink plays no role in enumerating the minimal SR states.Thus, for any graph G where every non-sink vertex has at least one edge to the sink 0, the number of minimal SR states on G is equal to the number of spanning forests of G \ {0} (the graph G with the sink removed).Conversely, if this equality holds, then every non-sink vertex in G must have at least one edge to the sink.
Because of the symmetries of K n , it is natural as we have seen to consider nondecreasing rearrangements of recurrent states.We can do this for minimal SR states, i.e. consider configurations c = (c 1 , . . ., c n ) that are minimal SR, and weakly increasing (c 1 c 2 • • • c n ).In the context of complete graphs, these are known in the literature as tournament scores (a tournament score is the weakly increasing re-arrangement of the in-degree sequence of a tournament).The characterisation of a tournament score was originally given by Landau [19] and is essentially Proposition 19 to which are added stability and minimality conditions.In recent work [6], Claesson et al. proved an elegant enumeration formula for the number of tournament scores, and their result yields an algorithm that generates these numbers in O(n 2 ) time (n is the size of the tournament).Thus, we can generate the number of non-decreasing minimal SR states on K n in quadratic O(n 2 ) time.

Characterisation of StoRec n
In this section we state and prove our main characterisation theorem: that the SR states on K n are given by the integer lattice points of the DR polytope DRPoly n .We also give a few consequences of this result.

Statement of the result and consequences
Recall that the n-dimensional DR polytope DRPoly n is the polytope of the set DetRec n of DR states on K n , and that the n-dimensional parking function polytope PFPoly n is the polytope of the set PF n of n-parking functions.Note that the bijection from Theorem 16 between the sets DetRec n and PF n extends immediately to a bijection between integer lattice points in the polytopes DRPoly n and PFPoly n .The main result of this section is the following.From the introductory remark of this section, we immediately get the following.

Corollary 27. The number of SR states for the SSM on the complete graph K n is the number of integer lattice points in the parking function polytope PFPoly n .
The first values of these numbers for n = 1, 2, . . .are: 1, 3, 17, 144, 1623, 22804, . .., given by Sequence A333331 in [28].An explicit, if somewhat complicated, enumerative formula for this sequence is given in [1,Theorem 5.1].Corollary 27 provides a new combinatorial interpretation of these numbers.
In fact (see Remark 31), our proof in Section 4.2 implies a stronger result than Theorem 26.More specifically, we will show that the result holds when restricting ourselves to recurrent states of a fixed level, i.e. that the set of SR states on K n with level k is the set of integer lattice points in the convex hull of DR states on K n with level k, for any k n 2 .A consequence of this, for the special case k = 0, gives the following well-known result (see Exercise 4.64(a) in [27]).Recall that the regular n-permutohedron is the polytope of the set of n-permutations.
the electronic journal of combinatorics 31(3) (2024), #P3.26 Corollary 28.The number of integer points in the regular n-permutohedron is the number of labelled spanning forests on n vertices.
Proof.Theorem 26 restricted to minimal recurrent states shows that the set of minimal SR states on K n is the set of integer lattice points in the convex hull of the set of minimal DR states on K n .But minimal DR states correspond to maximal parking functions via the bijection of Theorem 16.Because maximal parking functions are just permutations, this implies that the number of minimal SR states on K n is the number of integer lattice points in the regular n-permutohedron.The result then follows immediately from Proposition 24.
Remark 29.Theorem 26 is false for general graphs.Consider the graph of Figure 1 with its SR state c = (1, 1, 1).All DR states for this graph have two grains at the vertex 1 connected to the sink (this is easily checked by e.g.Dhar's burning algorithm), so c cannot be written as a convex sum of DR states.

Proof of Theorem 26
We first show that an integer lattice point in the DR polytope DRPoly n is SR.Let c ∈ DRPoly n ∩ Z n be such a point.We can write c = k i=1 λ i c (i) , for some DR states c (1) , . . ., c (k) ∈ DetRec n , and scalars λ We have: 2 , where the inequality on the second line follows from the inclusion DetRec n ⊆ StoRec n and applying Theorem 18 to each c (i) .Since this holds for any subset A ⊆ [n], by Theorem 18, we have c ∈ StoRec n as desired.
We now show the converse, that is We proceed by strong induction on n.For n = 1 or n = 2, we have StoRec n = DetRec n (in these cases K n is acyclic, so Proposition 12 applies), and the result is trivial.Suppose now that Inclusion ( 13) holds for all k < n for some n 3, and let c = (c 1 , . . ., c n ) ∈ StoRec n be a SR state on K n .We first introduce some notation.Let max ∈ [n], resp.nextMax ∈ [n], be such that In words, max is the label of the vertex with the highest number of grains in the configuration c, and nextMax the label of the vertex the electronic journal of combinatorics 31(3) (2024), #P3.26 with the second-highest number.Our first step is a reduction: we show that it is sufficient to consider the case where c max = n − 1, with the help of the following lemma.
Lemma 30.Let max and nextMax be defined as above, and assume that c is strongly stable, i.e. c max < n − 1. Define a configuration c ′ by: In words, Lemma 30 tells us that if c ∈ StoRec n is strongly stable, then we can make another SR state from c by moving one grain from vertex nextMax to vertex max.
Proof.Let c ∈ StoRec n such that c max < n − 1.Note that since n 3 we must have c nextMax > 0 since otherwise the set [n] would violate Equation (11).We show that there exists an orientation O of K n , compatible with c, such that max Consider an orientation O compatible with c, and suppose we have nextMax O − → max (otherwise there is nothing more to prove).We may also assume that in O nextMax = c nextMax , since otherwise we may simply flip the orientation of (nextMax, max) without changing the compatibility of the orientation.We will show that we can find a directed cycle of length 3 or 4 in O which contains the edge nextMax We now complete the proof of Theorem 26.Assume first that c is strongly stable, i.e. c max < n − 1, and let c ′ be defined as in the statement of Lemma 30.Define c ′′ to be the max nextMax Illustrating the 4-cycle construction.Among the edges (i, j 1 ), • • • , (i, j c nextMax ), there must be at least one edge directed i O − → j k , which forces the necessary directed cycle (in red).configuration c ′ where the values at vertices max and nextMax are switched, that is: Clearly, by symmetry, since c ′ is SR by Lemma 30, so is c ′′ .If we define k := c max − c nextMax + 1 1, we have: Thus we have shown that if c is SR and strongly stable, we can write c as a convex sum of two SR states whose maximal number of grains are strictly greater than that of c.By iterating this process, we will eventually be able to write c as a convex sum of configurations which are not strongly stable.It is thus sufficient to consider the case where c is not strongly stable, i.e. c max = n − 1. Suppose therefore that c ∈ StoRec n with c max = n − 1.To simplify notation, we may assume without loss of generality that c = c inc (since DRPoly n and StoRec n are invariant under permutation), i.e. c 1 c 2 c n = n − 1.We may also assume that c / ∈ DetRec n .By Corollary 17 we may then define and since c n = n − 1 we have j < n.
By construction, we have that for all i j, c i c j < j − 1.Thus the restriction of c to [j], defined by c , is a stable configuration on K j .Since Equation (11) holds for all A ⊆ [n], it necessarily holds for all A ⊆ [j], and so by Theorem 18 we have c [j] ∈ StoRec j .By the induction hypothesis, we can therefore write: for c (1) , . . ., c (k) ∈ DetRec j , and λ 1 , . . ., λ k ∈ [0, 1] with By construction, we have c = k i=1 λ i c(i) , so it remains to show that c(i) ∈ DetRec n for i ∈ {1, . . ., k}.But this follows immediately, using Dhar's burning criterion (Theorem 5), from the fact that c (i) ∈ DetRec j , and that by construction c ℓ ℓ − 1 for ℓ > j.Indeed, from this latter fact, we can burn vertices n, n − 1, . . ., j + 1 in that order, so that we are left with c (i) , which is DR, so all remaining vertices are also burned.This concludes the proof of Theorem 26.
Remark 31.Note that in Equation ( 14), both c ′ and c ′′ have the same level as c.As such, the same proof works when restricting to SR and DR states of a fixed level.That is, the set of SR states with level k (for fixed k) is the set of integer lattice points in the polytope of DR states with level k.Setting k = 0 then gives Corollary 28, as explained in Section 4.1.

Partially stochastic sandpile models
In this section, we introduce a notion of partially stochastic sandpile model, in which some of the vertices topple stochastically, and the others deterministically.Let n 0 and k ∈ [n] 0 .We define the k-partial SSM on K n as the model in which the vertices {1, . . ., k} topple stochastically, i.e. according to Equation (5), while the vertices {k+1, . . ., n} topple deterministically, i.e. according to Equation (2).For k = 0 we get the ASM, while for k = n we get the SSM.We let PartStoRec (k) n denote the set of recurrent states for the k-partial SSM, and refer to its elements as k-SR states.
Since partial (stochastic) topplings always have a positive probability of being full (deterministic), elementary Markov chain theory gives us the following.
Proposition 32.The sequence PartStoRec (k) n 0 k n is increasing for inclusion, i.e.
We know that for n 3, we have DetRec n StoRec n , so at least one of these inclusions must be strict.In fact, we can show the following.
Proposition 33.For n 3, we have DetRec n PartStoRec (1)  n .In words, having just one vertex topple stochastically yields a recurrent state that is not DR.
Proof.Fix n 3. We define a stable configuration c = (c 1 , . . ., c n ) ∈ Stable n by c 1 = c 2 = c 3 = 1 and c i = n − 1 for all i > 3 (maximal stable number of grains).First, note that c is not DR, since the induced cycle {1, 2, 3} is a forbidden subconfiguration (for Condition (iii) of Theorem 5).It is therefore sufficient to show that c ∈ PartStoRec (1)  n , i.e. that c is recurrent for the partially stochastic sandpile model in which vertex 1 topples stochastically, and all other vertices deterministically.
After burning the sink, all vertices i > 3 are unstable, and can be burned.This leaves us with the cycle {1, 2, 3} again, but this time it can be burned in order 2, 3, 1.Since c ′ is DR, there exists a configuration d = (b 1 , . . ., b n ) such that DetStab(c max + d) = c by Condition (i) of Theorem 5.Moreover, since c ′ 1 = 0, the last vertex to topple in the deterministic stabilisation of c max + d must be vertex 1.Indeed, toppling any other vertex sends a grain to 1, so if the last toppling in the stabilisation is not at 1 we would have c ′ 1 > 0. We now consider the same stabilisation sequence up to the last toppling of 1 excluded, and change that toppling of 1 so that it sends a grain to each neighbour except vertex 2 (this is now a stochastic toppling which has positive probability of occurring).This modifies the resulting configuration by moving one grain from 2 to 1 in c ′ , yielding exactly the configuration c.We have thus shown that c can be obtained from c max through a finite sequence of grain additions and topplings for the 1-partial SSM, meaning that c is recurrent for this model, as desired.
We can then look into the right-hand end of the sequence in (17), i.e. for which k we have PartStoRec (k)  n = StoRec n .First, we show that if at least three vertices topple deterministically, then not all SR configurations are reached.
Proof.Let c be as in the statement of the proposition.We first show that c is SR.For this, consider the orientation We now show that c is not (n − 3)-SR.Seeking contradiction, assume that c is (n − 3)-SR.This implies that c can be reached from c max through a sequence of grain additions and topplings, where the topplings are stochastic for the first (n−3) vertices, and deterministic for the last 3.But since each of the last 3 vertices has one grain of sand, they each must topple at least once in this sequence.Consider the final topplings of each of these, and without loss of generality assume that this occurs in order n − 2, n − 1, n.Since the topplings of (n−1) and n both send a grain to (n−2), and since (n−2) doesn't subsequently topple (we considered the final topplings in the sequence leading to c), then (n − 2) must have at least two grains in the final stable configuration reached, i.e. c n−2 2. This gives the desired contradiction (c n−2 = 1 by definition), and the proposition is proved.
Remark 35.The proof of Proposition 34 indicates that one thing stopping a configuration from being partially SR is a (1, 1, 1) cycle on vertices which topple fully.In fact, it is a little bit more complex than that.For example, for n = 4, the configurations which are SR, but not 1-SR, are (3, 1, 1, 1) (the counter-example from Proposition 34), and (0, 2, 2, 2).The orientation compatible with the first is as in the proof above, while the orientation compatible with the second is 2 and 1 O − → j for j ∈ {2, 3, 4}.Note that this configuration is minimal recurrent, so this orientation is unique up to a flipping of the (2, 3, 4)-cycle.
The above suggests that what stops a configuration from being partially SR is in fact precisely a "forced" cycle on vertices which topple fully.We make this observation precise in the following technical lemma.
Lemma 36.Let n 3 and ℓ 1.We define K Let O ′ be the orientation on K n−1 obtained by simply removing all edges incident to n in O.By definition of S, we have: But since in O i = c i for all i ∈ [n] by assumption, Equations ( 18) and ( 19) immediately imply that in and so c ′ is minimal recurrent on K n−1 by Theorem 10.Now note that k 1 , k 2 , k 3 and the orientation O ′ still satisfy the conditions of Lemma 36 applied to c ′ and K (ℓ+1) n−1 .We may therefore apply the induction hypothesis, meaning that c ′ can be reached from c max (on K (ℓ+1) n−1 ) through a series of grain additions and topplings, in which k 1 , k 2 and k 3 always topple deterministically, and their final topplings are in the order k 3 , k 2 , k 1 .We will write SEQ ′ to denote this sequence.Now note that, by definition of K (the extra edge to the sink in the latter cancelling out the edge to n in the former).Therefore, we can "copy" the above sequence SEQ ′ of grain additions and topplings into a sequence SEQ from c max on K (ℓ) n , as follows.Grain additions are unchanged, as are any topplings that send at most ℓ grains to the sink.Then, if ℓ + 1 vertices are sent to the sink in a single toppling in the sequence SEQ ′ , in the "copy" sequence SEQ we send ℓ grains to the sink, and one grain to vertex n.With this construction, SEQ is a legal sequence of grain additions and topplings on K (ℓ) n , and by construction we reach a configuration (grain movements between vertices of [n − 1] are unchanged).Note also that any deterministic topplings in SEQ ′ translate to deterministic topplings in SEQ.Moreover, the order of topplings is unchanged, so that in SEQ the final topplings of k 1 , k 2 and k 3 are still in the order k 3 , k 2 , k 1 .
Depending on the value of c ′′ n , we either add grains to vertex n, or repeatedly send a single grain from n to the sink (this is a stochastic toppling that has positive probability), until c . We then add one final toppling to our sequence by toppling vertex n stochastically, sending ℓ grains to the sink, and one grain to each vertex in S.This means that the number of grains remaining at n after this toppling is exactly In other words, after this final toppling we have exactly reached the configuration c, and the series of grain additions and topplings applied satisfies the conclusions of Lemma 36.This completes the proof.
In fact, we only need to apply this in the case ℓ = 1, but as we saw the general case was necessary for the proof since the reduction from n to (n − 1) forced the increase from ℓ to (ℓ + 1).We are now equipped to state our main result of this section, namely that (n − 2) stochastically-toppling vertices are sufficient to reach all SR configurations.
Theorem 37. Let n 3. We have Proof.We know from Proposition 32 that PartStoRec If we change the final toppling of (n − 2) so that it now sends grains to all vertices k < n, but doesn't send a grain to n, this changes the final configuration from c ′ to c.Note that any toppling occurring after that of (n−2) can still occur, since the only change is n no longer receiving a grain, and n's last toppling is before that of (n − 2).As such, we have constructed a sequence of grain additions and topplings leading from c max to c in which vertices (n − 1) and n always topple deterministically (since this was the case in the sequence leading to c ′ , and we left those topplings unchanged).This means exactly that c ∈ PartStoRec (n−2) n , and the theorem is proved.
Remark 38.The proof of Theorem 37 seems to suggest that SR configurations don't require many stochastic topplings to be reached.Indeed, in the proof we only required one stochastic toppling on the "forced" cycle, and in fact this toppling in question was "almost deterministic", since it kept only one grain at the toppling vertex.It would be the electronic journal of combinatorics 31(3) (2024), #P3.26 interesting to formalise this result by stating how many non-deterministic topplings are needed in general to reach a SR configuration from c max , and how close these topplings are to being deterministic.

Conclusion and future perspectives
In this paper, we have considered a stochastic variant of the ASM, called SSM, in which toppling vertices flip a biased coin for each neighbour and decide with probability p to send a grain to that neighbour, and with probability (1 − p) to keep the grain (here p ∈ (0, 1) is fixed).We have studied the SSM on complete graphs from a combinatorial point of view, focusing on characterisations of the model's recurrent states (called SR states).To our knowledge, this is the first such combinatorial study of a stochastic sandpile model.
We exhibited a stochastic version of the burning algorithm for complete graphs that establishes in log-linear time whether a given state is SR or not (Theorem 21).We then showed that the set of SR states is the set of integer lattice points of the convex polytope of DR states (Theorem 26).In other words, any SR state can be written as a convex sum of DR states.Finally, we considered a family of partially stochastic sandpile models on complete graphs, in which some vertices always topple deterministically according to the ASM rules, while others topple stochastically according to the SSM rules.We showed that in general the set of recurrent states for these models are distinct from those of both the ASM and SSM (Propositions 33 and 34), and that if at most two vertices topple deterministically, we get all SR states (Theorem 37).
There are a number of open questions and directions to be considered by future research.The first is that of more general stochastic burning algorithms, i.e. algorithms that successively burn (remove) vertices until either all vertices are burned (in which case the starting configuration is SR), or we reach a forbidden subconfiguration where no more vertices can be burned (in which case the starting configuration is not SR).Remark 22 explains why two of the more natural burning criteria don't work in the general case.
Another future research direction that seems natural is to study the SSM on other graph families.Note that the author has in fact considered the SSM on wheel graphs in [26], but in this case the difference with the ASM is minimal (there is only one additional recurrent state).It would be interesting to consider for instance the case of complete bipartite graphs (with or without a dominating sink), complete split graphs, etc., as has been done for the ASM.
Another open question is the existence of an explicit enumeration formula for the set of SR states StoRec n .Such a formula is given in terms of permutohedron lattice points enumeration in [1, Theorem 5.1], but it is rather complicated.One possible approach to this would be to use the Tutte-like deletion-contraction relationship given for the so-called lacking polynomial in [5, Theorem 3.9] (the lacking polynomial is equivalent to the level polynomial for the SSM, up to a change of variable).One would hope that this could lead to a reasonably simple recursive formula, but so far this approach has not been successful.If no such explicit enumeration formula can be found, can asymptotic estimates be given?
Finally, it would be interesting to study the partially stochastic sandpile models furthe electronic journal of combinatorics 31(3) (2024), #P3.26 ther.Table 1 below gives the first few values of |PartStoRec (1)  n | for n = 1, . . ., 6.This sequence is not known in the OEIS [28].We observe that in general the numbers of 1-SR states appear a fair amount closer to the numbers of SR states than they are to those of DR states, albeit our data is quite limited (these numbers are very slow to compute).This is somehow consistent with Remark 38 that SR states in general don't require many stochastic topplings to be reached, so a single vertex toppling stochastically should be enough to reach most of them.It would be interesting to quantify this observation in some way, perhaps in terms of asymptotic behaviour of these numbers.

Theorem 5 .
Let c = (c 1 , . . ., c n ) ∈ Stable (G) be a stable configuration on the graph G. Then c is DR if, and only if, one of the following four equivalent conditions holds.(i) There exists a configuration d ∈ Config (G) such that DetStab(c max + d) = c.(ii) There exists an acyclic, sink-rooted orientation O of G compatible with c.

Theorem 6 .
Let c = (c 1 , . . ., c n ) ∈ Stable (G) be a stable configuration on the graph G. Then c is SR if, and only if, one of the following three equivalent conditions holds.(i) There exists a configuration d ∈ Config (G) such that StoStab(c max + d) = c with positive probability.(ii) There exists a sink-rooted orientation O compatible with c. (iii) For any subset A ⊆ [n], we have c(A) |E(G[A])|, where c(A) := i∈A c i is the total number of grains in A, and |E(G[A])| is the number of edges of G with both endpoints in A (i.e. the number of edges of the induced subgraph G[A]).
proceed by induction on m = |E(G)| − deg 0 .If m = 0 the result is trivial.Otherwise, let e = (i, j) be some edge of G between two non-sink vertices i, j ∈ [n].Consider the graph G ′ with edge e removed, and the configurations c ′ := c − α i and c ′′ := c − α j .We claim that at least one of the configurations c ′ and c ′′ satisfies Condition (iii) on the graph G ′ .Suppose for now this claim proved, and without loss of generality assume the condition holds for c ′ .By induction we can find an orientation O ′ of G ′ compatible with c ′ , and taking O to be the orientation O ′ together with the edge i O ← − j yields an orientation O of G which is compatible with c, as desired.

1 1 1 Figure 1 :
Figure 1: Example of a configuration which is SR but not DR.

Proposition 12 .
Let G be a graph with vertex set [n] 0 and edge set E. The following statements are equivalent.(i) All SR states on G are also DR, i.e.StoRec (G) = DetRec (G).

(
ii) All minimal SR states on G are also DR. (iii) The graph G ′ := G [n] obtained by deleting the sink and all incident edges in G is a forest.
be the n-complement of c (we write p = n − c for short).Then c is DR if, and only if, p is a parking function.Thus the map c → n − c defines a bijection from DetRec n to PF n .

Proposition 19 leads 1 .
us to define the stochastic burning algorithm on the complete graph K n .Algorithm 20 (Stochastic burning algorithm).Input: c ∈ Stable n , a stable configuration on K n .Step 1. Obtain the non-decreasing rearrangement c inc of c. Define Sum := n i=1 c i and Target := n 2 .Initialise k := n. 2.

3. Step 3 .
Output k, the number of unburned vertices.theelectronic journal of combinatorics 31(3) (2024), #P3.26 The question of an (efficient) stochastic burning algorithm on general graphs remains a significant open problem.In fact, it remains an open problem to improve the existing (trivial) complexity bound of O 2 |V | resulting from checking Condition (iii) of Theorem 6 for all subsets A ⊂ [n]. the electronic journal of combinatorics 31(3) (2024), #P3.26

Theorem 26 .
The set StoRec n of SR states for the SSM on the complete graph K n is the set of integer lattice points (points with integer coordinates) in the DR polytope DRPoly n .In other words, a configuration c = (c 1 , . . ., c n ) ∈ Config n is SR if, and only if, there exist DR states c (1) , . . ., c (k) ∈ DetRec n , and scalars λ 1 , . . ., λ k ∈ [0, 1] with k i=1 λ i = 1, such that c = k i=1 λ i c (i) , where the sum and scalar multiplication are the usual pointwise operations in R n .

O
− → nextMax.If such an orientation exists, then let O ′ be the orientation O with max O ′ ← − nextMax and all other edges unchanged.By construction, O ′ is compatible with c ′ , and the lemma is proved.It is thus sufficient to show the existence of such an orientation O.

O−→
max (see Figure 4 for how the 4-cycle is constructed).Flipping this directed cycle then yields the desired orientation.Since c max < n − 1 there must exist i ∈ [n], i = nextMax, such that max O − → i.If i O − → nextMax, we have a 3-cycle max O − → i O − → nextMax O − → max.Otherwise consider the set of vertices j such that j O − → nextMax.By construction there are c nextMax > 0 such vertices.And for at least one of these, we must have i O − → j, since otherwise there would be at least c nextMax +1 incoming edges at i (c nextMax for those such vertices j, plus 1 for the edge max O − → i).This would imply c i in O i c nextMax +1, which would contradict the definition of nextMax.Therefore there exists a 4-cycle max O .Thus in all cases we have shown the existence of a directed cycle in O containing the edge nextMax O − → max.Flipping this cycle (and leaving other edges unchanged) gives us the desired compatible orientation O ′ with the edge nextMax O ′ ← − max, which concludes the proof of the lemma.

and k n − 3 ,
and the edges {k, k ′ } for k, k ′ n − 3 are oriented in any arbitrary manner.In words, we construct a directed cycle on the last three vertices, orient all other edges incident to one of those vertices as outgoing (away from the cycle), and choose an arbitrary direction for the remaining edges.By construction we have in O j = 1 for any j n − 2, and since c k = n − 1 in O k for any k n − 3, the orientation O is compatible with c, and c is SR by Theorem 6.

n 1 O− → k 2 , k 2 O− → k 3 , and k 1 O− → k 3 . 1 .
to be the complete graph on [n] 0 where for every k ∈ [n], the edge {k, 0} connecting k to the sink has multiplicity ℓ.Note that if ℓ = 1 this is just the usual complete graphK 0 n .Let c ∈ StoRec K (ℓ) n be SR on this graph.Let k 1 , k 2 , k 3 ∈ [n] be three distinct vertices in [n].Suppose that there exists an orientation O of K n , compatible with c, such that k Then there exists a sequence of grain additions and topplings leading from c max to c such that the vertices k 1 , k 2 , k 3 always topple deterministically.Moreover, the final topplings of these three vertices are in the order k 3 , k 2 , k 1 , possibly with k 3 never toppling.Proof.First, note that it is sufficient to show the lemma for minimal SR states c.Indeed, any recurrent configuration can be reached from a certain minimal recurrent configuration through grain additions, and putting extra grain additions at the end of the additions and topplings sequence doesn't change the conclusion of the lemma.Thus we may assume that an orientation O compatible with c satisfies c i = in O i at all vertices i ∈ [n].We proceed by induction on n 3. First, let us show that the statement holds for n = 3. Fix ℓ 1 and let c ∈ StoRec K (ℓ) 3 be minimal recurrent.Without loss of generality, we choose k 1 = 1, k 2 = 2, k 3 = 3 for the statement.Then, by definition of O, we have c 1 = 0, c 2 = 1, c 3 = 2.It is straightforward to check that c is DR (e.g. by applying Dhar's burning algorithm).Therefore, there exists a sequence of grain additions and full topplings leading from c max to c in K (ℓ) 3 .Moreover, since c 1 = 0, vertex 1 must be the last vertex to topple in this sequence, and since c 2 = 1, 2 must be the penultimate vertex the electronic journal of combinatorics 31(3) (2024), #P3.26 to topple (it receives one grain from the subsequent toppling of 1, and can't receive any other grains).This proves the statement in the case n = 3.Now fix some n 4, ℓ 1, and assume that the statement holds for (n − 1) and all ℓ ′ Let c ∈ StoRec K (ℓ) n be minimal recurrent.Let k 1 , k 2 , k 3 and the orientation O of K n be as in the statement of the lemma, with c i = in O i for all i ∈ [n].Choose some m / ∈ {k 1 , k 2 , k 3 }, and to simplify notation, assume that we can take m = n.Let S ⊆ [n − 1] be the set of vertices i such that n O − → i, and T := [n − 1] \ S. Note that by definition

⊆ 2 O− → n − 1 O 2 .
(n−2)   n StoRec n .For the converse, let c ∈ StoRec n be SR.It is once again sufficient to consider the case where c is minimal recurrent.Therefore, by Theorem 10, there exists an orientation O of K n satisfying in O k = c k for all vertices k.Suppose that there exists such an orientation where the last three vertices n − 2, n − 1, and n do not form a directed cycle.Then from Lemma 36, we can find a series of grain additions and topplings leading from c max to c such that the last three vertices always topple deterministically, implying that c ∈ PartStoRec(n−3) n ⊆ PartStoRec (n−2) n .We may therefore assume that any orientation compatible with c has a directed cycle on the last three vertices.Without loss of generality, assume that n − Flipping the edge n O − → n − 2 of O yields an orientation O ′ , and the configuration compatible with O ′ is c ′ = c+α n −α n−2 .But the orientation O ′ now satisfies the conditions of Lemma 36.Therefore, there exists a series of grain additions and topplings leading from c max to c ′ such that the vertices (n−2), (n−1) and n always topple deterministically.Moreover, the last three topplings of those vertices are n, n − 1, n − 2 in that order.
Note that if O and c are compatible, and O ′ is an orientation of G which is score-equivalent to O, then O ′ and c are also compatible.If O and c are compatible, we will sometimes say that O is compatible with c, or simply that O is compatible if there is no ambiguity over which configuration c is considered.
Theorem 21.Let c ∈ Stable n be a stable configuration on K n .Then c is SR if, and only if, all vertices are burned in the stochastic burning algorithm, that is, Algorithm 20 outputs k = 0.Moreover, the stochastic burning algorithm runs in linear O(n) time.

Table 1 :
|DetRec n | PartStoRec(1)The numbers of DR, 1-SR, and SR states on K n , for n ranging from 1 to 6.