Determining the stabilizability of the abelian sandpile model
Introduction
Suppose that we have sandpiles denoted as a set . Each sandpile has a toppling threshold , and each ordered pair of sandpiles has a toppling transfer amount . The tuple is called an abelian sandpile model.
A configuration is to assign an amount of sand to each sandpile , and it is legal if for all (or conveniently denoted as ). For any configuration , any can topple, which is a transition to a new configuration defined as The toppling is legal if , in which case we call an unstable site of the configuration . Notice that a legal configuration undergoing a legal toppling must become a legal configuration. A sequence of topplings where each toppling uses the resultant configuration of the previous toppling as the initial configuration is called a toppling procedure.
In its historically original form (Dhar, 1990), is the lattice sites on a 2D rectangular grid, and for all , and is if and are nearest neighbors or otherwise. It is then generalized to an arbitrary directed multigraph (Holroyd et al., 2008), where is its vertices, and is the out-degree of vertex , and is the number of edges from to .
A configuration where none of the sandpiles can legally topple is called a stable configuration. In other words, configuration is stable if for all , or denoted as in abbreviation. A toppling procedure that makes a configuration stable is called a stabilizing toppling procedure that stabilizes the configuration. A legal configuration is stabilizable if it has a finite legal stabilizing toppling procedure. Otherwise, the configuration is exploding. A natural question to ask then is how to determine whether a configuration is stabilizable or exploding.
Abelian property
One important fact to notice is that the abelian sandpile model has the so-called abelian property: if a configuration is stabilizable, then every legal toppling procedure of it is finite, and the stabilizing legal toppling procedure is unique up to the order of topplings. In other words, if we define the toppling counting function such that is the number of times that topples throughout the toppling procedure, then every legal stabilizing toppling procedure of a stabilizable configuration has the same toppling counting function, which is called the odometer of the configuration. We will leave the proof of the abelian property to a later part in this section.
In order to better describe the model, we can define a function (the notation comes from the notation of the Laplacian operator in vector analysis due to its direct analogy in the case of the abelian sandpile model on a grid, in which case it is called a Laplacian matrix in the language of graph theory) as follows: It encodes information from both and and provides everything we need to know to find the resultant configuration given any initial configuration and the toppling counting function. Explicitly, configuration undergoing a toppling procedure with the toppling counting function becomes For abbreviation, we denote as so that . Therefore, the resultant configuration of a toppling procedure can be denoted as . This notation is natural if we think of as an -dimensional matrix and think of and as -dimensional column vectors. This equation tells us that the resultant configuration of two toppling procedures is the same as long as they have the same toppling counting function.
A toppling procedure can then be expressed as a sequence of toppling counting functions where the th toppling counting function is that of the toppling procedure derived by truncating the full toppling procedure up to the first topplings. If the th toppling happens at site , then We stipulate that is the zero function. From now on, we call a sequence (where is either a natural number or infinity) as a toppling procedure as long as the following conditions are satisfied: , and for all , there exists such that . It is obvious to see that for all . Therefore, the length of a toppling procedure is the same as the sum , where is the final toppling counting function of the toppling procedure. The definition of the legality of a toppling procedure is also naturally extended to this formulation.
Because the resultant configuration of a toppling procedure is independent of the order of the topplings, for two different sites and , toppling and then is equivalent to toppling and then . Both toppling procedures have the same toppling counting function . If both sites are unstable sites of the initial configuration, then both toppling procedures are legal. To see this, suppose that and are two different unstable sites of the configuration . Then, the configuration after topples is given by . Its value at is (notice that because ). The first term is at least because is an unstable site of . The second term is nonnegative by definition. We then have , which means that is also an unstable site of , so toppling and then is legal. By the same logic, toppling and then is legal.
Now, we proceed to prove the abelian property: a stabilizable configuration has a unique odometer. To prove this, it is sufficient to prove that, if a configuration is stabilizable, then you can always construct a legal stabilizing toppling procedure by choosing an arbitrary unstable site to topple at each step until the configuration becomes stable, which is guaranteed to happen in finite steps, and the resultant toppling counting function is independent of the choices of unstable sites to topple at each step.
We prove this by induction on the length of an arbitrary legal stabilizing toppling procedure. We will prove case by case for length being and as base cases, and then prove the inductive step for length being assuming the case for length being .
The base case with zero length is trivial. For the base case with length , suppose that the configuration has a legal stabilizing toppling procedure of length . We need to prove that any choice of unstable site to topple leads to a stable configuration, and the odometer is uniquely determined. Becasue the constraint on the length of the toppling procedure, we need to prove that the unstable site in the initial configuration that topples in the legal stabilizing toppling procedure is the only unstable site in the initial configuration (so that the odometer can only be ). This is obvious because we have already proven that, if there is another unstable site , then is also an unstable site of the configuration after topples, which contradicts the assumption that toppling is stabilizing.
Then proceed with the inductive part of the proof. Suppose that, for any configuration with a legal stabilizing toppling procedure of length , arbitrarily choosing an unstable site to topple at each step will always stabilize after exactly steps, and the toppling counting function of the resultant toppling procedure is unique. Then, we need to prove the same thing for length . Suppose that configuration has a legal stabilizing toppling procedure of length and that its toppling counting function is . Denote as the first toppling site in this toppling procedure. Then, the configuration after the first toppling is given by , and it has a legal stabilizing toppling procedure of length whose toppling counting function is . By the induction assumption, stabilizes after arbitrary legal topplings, and the toppling counting function must be . Now, arbitrarily choose an unstable site of . If , then toppling gives , which stabilizes after arbitrary legal topplings. If , then the fact that is an unstable site of implies that is an unstable site of , so we can construct a legal stabilizing toppling procedure of such that the first toppling site is . We then get a legal stabilizing toppling procedure of whose toppling counting function is such that the first two toppling sites are and . Because both and are unstable sites of , we can simply swap the first two toppling sites to get a toppling procedure of such that the first two toppling sites are and . This means that toppling makes become a configuration with a legal stabilizing toppling procedure of length with toppling counting function . By the induction assumption, stabilizes after topples followed by another arbitrary topplings. Because itself is an arbitrary choice of an unstable site, stabilizes after arbitrary topplings, and the toppling counting function is . This finishes the induction step of the proof.
Least action principle
Another property of the abelian sandpile model is the least action principle 1: assuming that is the odometer of a stabilizable configuration , then for any such that , we have .
Here I present a proof inspired by Fey et al. (2009). Construct a legal toppling procedure starting from the configuration as follows. At each step where , the toppling site satisfies and . When there are multiple sites satisfying the conditions, arbitrarily choose one. Continue until none of the sites satisfy the conditions, which always happen after finite steps because any toppling procedure of a stabilizable configuration is finite. This is a legal toppling procedure whose toppling counting function never exceeds . Suppose that the length of the toppling procedure is . We then prove by contradiction that this toppling procedure is stabilizing. Suppose that the final configuration of this toppling procedure has an unstable site . Because the final configuration is unstable, the only reason that the toppling procedure stops is that . Define , so and . We have which contradicts the assumption that is an unstable site of .
What the least action principle tells us is that, the odemeter of a stabilizable configuration is the unique minimum natural number solution to the system of linear inequalities . The toppling procedure defined above also provides a constructive way to find the odometer once we have any natural number solution to the system of linear inequalities.
Notice that we cannot relax to be a more general real-valued function. If so, in the proof above, the condition becomes . In fact, we can easily find counterexamples where, there exists a real-valued solution to the system of linear inequalities, but the configuration is exploding. This is sad news because it means that determining the stabilizability of a configuration cannot be done by linear programming.
A corollary of the least action principle is that, if has a natural number solution, then there exists a unique minimum solution, whose value at each site is the minimum among all natural number solutions at that site.
A related property is that, if and both satisfies , then also satisfies , where denotes the pointwise minimum. This property also applies to general real-valued solutions instead of just natural number solutions. To prove this, assuming without loss of generality, notice that By this property, under the binary operator , the set forms an idempotent commutative semigroup if not empty. Its closure is an idempotent commutative monoid if not empty, whose identity element is the unique minimum element of , which obviously exists. The set is a subsemigroup of and also a monoid if not empty. However, notice that the identity element of is always different from that of .
Integer linear programming
As we have seen, determining the stabilizability of a configuration is equivalent to determining whether there exists a natural number solution to the system of linear inequalities . Such problems are called integer linear programming (ILP) problems.
The most general form of an ILP problem is, given a matrix and vectors and , to find natural number vector that minimizes subject to the constraint . There is also the feasibility version of ILP problems, which only asks whether there exists a natural number vector satisfying the constraint without the objective of optimizing some objective.
Now come back to the problem of determining the stabilizability of a configuration . From a computational point of view, because we cannot really store arbitrary real numbers in a computer, we are only going to consider the case where and are both rational-valued functions. Then, without loss of generality, when is finite, we can multiply both functions by a common multiple of denominators to make them both integer-valued functions 2. The problem of determining the stabilizability of a configuration then becomes a special case of the feasibility version of ILP problems, which is to determine whether there exists a natural number solution to , where . It is only a special case because by the definition of the abelian sandpile model can only be a Z-matrix, which is defined as a square matrix whose off-diagonal entries are all nonpositive. Because of this restriction, it may not be as hard as the general ILP problems, which are known to be NP-complete. However, because I neither have found any reference discussing the complexity of Z-matrix ILP problems nor have devised any polynomial-time algorithm to solve them or reduced any known NP-complete problems to them 3, I do not know whether the Z-matrix ILP problems are NP-complete or not.
We can design this algorithm inspired by Hochbaum et al. (1994) to solve the Z-matrix ILP problem. To find a natural number solution to for some given Z-matrix and vector , first solve the linear programming relaxation of the problem to find a real-valued minimum solution or exit and report nonexistence of solutions if does not exist, and then iteratively calculate a sequence starting from (where is the componentwise ceiling function) by this procedure: for each row of , if the inequality is violated, then exit and report nonexistence of solutions if , or update and start the next iteration; repeat the iteration until either all inequalities are satisfied (solution found) or any component of exceed a predetermined upper bound .
Before we address this dubious upper bound , let us first prove that this algorithm finds the minimum solution if a solution exists and is within the bound . There are three ways in which the program ends: exceeding the bound, satisfying all inequalities, or having for an unsatisfied inequality.
For the case when the program ends due to exceeding the bound, we need to prove that no solution exists within the bound. It is equivalent to proving that, if a solution exists within the bound, then can never exceed the bound. Sufficiently, I will prove by induction that for all . The base case is obvious because as the minimum real solution must satisfy . For the inductive step, suppose that for some . Then, if row of the inequalities is violated (in other words, ), we have where the first inequality is due to the induction assumption and the Z-matrix property and the second inequality is due to the assumption that is a solution of .
For the case when the program ends due to satisfying all inequalities, we have found a solution.
For the case when the program ends due to having for an unsatisfied inequality, I will prove by contradiction that no solution exists in this case. Suppose that there exists a solution , then we have . We then have where the first inequality is because of the violated inequality, and the second inequality is because and the Z-matrix property, and the third inequality is because is a solution of . This is a contradiction.
Finally, we address the dubious upper bound . In order for the algorithm to work, we need to determine a finite upper bound under which a solution is guaranteed to exist if any solution exists. A safe choice is , where is maximum of the absolute values of subdeterminants 4 of the matrix . I follow Cook et al. (1986) to give a proof.
Suppose that there exists a natural number solution . Partition elements in into two disjoint subsets and defined as The set corresponds to the rows of inequalities that are slack. To see this, notice that for , we have . This motivates us to use complementary slackness to get more information about . Notice that, for any , is an optimal solution to the linear program of minimizing subject to . Its dual linear program is to maximize subject to the constraint for all . By complementary slackness, the optimal solution exists and satisfies for all . Therefore, for any such that for all , we have Because is arbitrary, this means that for all implies .
We can define a polyhedral cone , where We then have that implies . We can choose a finite set that generates (in other words, is the nonnegative linear combination of ) such that, for all , is integral and . To see that is always possible, notice that is in the null space of some submatrix of , which is spanned by vectors whose components are subdeterminants of , which are all bounded by in absolute value by definition. By definition of and , we obviously have . Therefore, by Carathéodory’s theorem, there exists (the dimension of ) vectors in and nonnegative real numbers such that . Construct It is obviously integral and satisfies . We can verify that it is a solution of . For , we have For , we have We thus have found a solution .
Therefore, is a valid upper bound. However, it is often hard to compute in practice, so we may use for some that is easier to compute. Obviously a choice is , where .
Now that we have proven the correctness of the algorithm, we can analyze its time complexity. Because every iteration increases at least one component of by at least , the total number of iterations is at most , where is the sum of absolute values of components. Each iteration takes time to check all inequalities. Therefore, the total time complexity is . It is a pseudopolynomial time algorithm for fixed , but grows superexponentially by for fixed .
Also, notice that, in each iteration, we can update any components of whose corresponding inequalities are violated in parallel instead of only updating one component at each iteration. The proof of correctness still holds.
Guaranteed stabilizability
One interesting question to ask is how to determine whether an abelian sandpile model guarantees the stabilizability of all legal configurations. If determining this is easier than solving ILP problems, then it is even useful for determining the stabilizability of particular configurations.
The answer to this question is that an abelian sandpile model guarantees the stabilizability of all legal configurations if and only if is a nonsingular M-matrix (an M-matrix is defined as a matrix that can be written in the form , where is the identity matrix, is a nonnegative matrix, and is at least as large as the spectral radius of ; it is nonsingular when is strictly larger than the spectral radius of ), which is also equivalent to saying that there exists such that (Plemmons, 1977). The necessity of this condition is easy to see because it is implied by the stabilizibility of any configuration such that . To see the sufficiency, suppose that there exists such that . Without loss of generality, we can assume that is rational-valued because as a linear transformation on a finite-dimensional vector space must be continuous. We can then further assume that is integer-valued by multiplying it by a common multiple of denominators. Now, for any configuration , we can always choose a sufficiently large constant such that . By the least action principle, is stabilizable.
In this case, we can define an abelian group called the sandpile group. The elements are equivalent classes of configurations, where two configurations and are equivalent if there exists some such that . The group operation is defined such that , where denotes the equivalence class represented by a configuration. Only if all configurations are stabilizable can any equivalence class be represented by a stable legal configuration. This group has many interesting properties (Holroyd et al., 2008), but they are outside of the scope of this article.
To determine whether a Z-matrix is a nonsingular M-matrix, we can perform an LU decomposition on and check whether all diagonal entries of the two triangular matrices are positive. If they are, then is a nonsingular M-matrix. For fixed , this can be done in time using Gaussian elimination.
Implementation
Ask LLM to code for you.
I was puzzled by why people made the theorem have the same name as the more famous principle in the field of classical mechanics also known as Hamilton’s principle. Apparently, people who coined the name are also phycists, who must have known Hamilton’s principle, so I think there must be a relation between those two seemingly unrelated propositions, but I cannot devise such a relation.↩︎
This “without loss of generality” is actually not very obvious. Mathematically speaking, we can always reduce the rational-valued case to the integer-valued case. However, computationally speaking, we need to prove that the input size of the reduced problem is bounded by a polynomial of the input size of the original problem. Fortunately, it is easy to prove for this case if the input size of a rational number is defined as .↩︎
The main difficulty in reducing other computation problems to Z-matrix ILP problems is that Z-matrix ILP problems are “monotonic” in the sense that two solutions and imply that their componentwise minimum is also a solution. If we want to encode the answer to a computation problem into a solution to a Z-matrix ILP problem, the original problem must also have this monotonicity property.↩︎
I was confused by the word “subdeterminant” as I found it in the literature because I never heard of it when I learned linear algebra. I then searched it up on Wikipedia and found that it is the title of a Czech Wikipedia article whose English version is titled “minor”. I then realized that a subdeterminant just means a minor, which is the determinant of a matrix after removing some rows and/or columns. I then think the word “subdeterminant” actually makes more sense than “minor” because the latter is overused for too many concepts.↩︎
