Dhar's Burning Algorithm Overview
- Dhar’s Burning Algorithm is a graph-theoretic procedure that propagates a ‘fire’ from a distinguished vertex to certify chip-firing configurations and determine reducedness or effectivity.
- It includes classical sink-based tests, iterated burning for q-reduced divisors, weighted generalizations, and a depth-first variant linking parking functions with rooted spanning trees.
- The algorithm is pivotal for applications in chip-firing, graph gonality computations, and spanning tree enumeration, offering polynomial-time performance across various formulations.
Searching arXiv for the cited papers to ground the article in published sources. Dhar's burning algorithm is a family of graph-theoretic procedures built around the propagation of a “fire” from a distinguished vertex and used to certify reducedness, effectivity, or failure thereof in chip-firing configurations, and, in a depth-first search variant, to construct a bijection between graph parking functions and rooted spanning trees. In the sources considered here, the term encompasses the classical sink-based test for the Dollar Game, the iterated reduction algorithm for computing -reduced divisors, a modified form adapted to higher gonalities, a weighted-graph generalization, and a depth-first burning process tied to inversion statistics on labeled trees [(Beougher et al., 2024); (Aidun et al., 2020); (Doyle, 2023); (Perkinson et al., 2013)].
1. Classical sink-based formulation
In the chip-firing setting, one fixes a finite connected graph and a distinguished vertex , often called the sink. A divisor is an integer vector , with interpreted as the number of chips at ; negative entries represent debt. Dhar’s burning algorithm is applied to divisors satisfying for all , with possibly negative. Its purpose is to decide whether the Dollar Game at is winnable, equivalently whether there exists a sequence of chip-firing moves that makes 0 as well (Beougher et al., 2024).
A single burning phase begins with the burning set 1. Repeatedly, one burns all edges incident to vertices in 2, and for each vertex 3 counts the number 4 of burning edges incident to 5. If 6, then 7 is added to 8 and remains there permanently. This continues until no new vertex can be added. If eventually 9, then “the whole graph burns” and the algorithm declares “LOSS.” If instead 0, then the unburned complement 1 is nonempty, and one fires every vertex of 2 simultaneously:
3
where 4 is the graph Laplacian and 5 is the indicator of 6 (Beougher et al., 2024).
The key correctness statement is Dhar’s criterion: for a divisor 7 with 8 for 9, the Dollar Game at 0 is winnable if and only if Dhar’s burning algorithm terminates with “WIN.” Equivalently, “WIN” means that eventually 1 becomes nonnegative, while “LOSS” means that in some burning phase one obtains 2 (Beougher et al., 2024).
The primer on chip-firing for Platonic solids gives a complete run on the tetrahedron graph 3. With sink 4 and divisor
5
the first burning phase yields 6 while 7 remains unburned, so one set-fires 8. The new divisor is
9
and now 0, so the algorithm returns “WIN” (Beougher et al., 2024).
2. 1-reduced divisors and iterated burning
A closely related formulation is expressed in terms of 2-reduced divisors. For a finite (multi-)graph 3, a divisor 4 is 5-semi-reduced if 6 for all 7. It is 8-reduced if, in addition, for every nonempty 9 there exists a vertex 0 such that
1
where 2 is the number of edges from 3 to 4 (Aidun et al., 2020).
In this formulation, Dhar’s algorithm computes the unique 5-reduced representative 6 in the linear-equivalence class of a 7-semi-reduced divisor. One initializes
8
If there exists 9 with 0, then 1 burns and is removed from 2. If no such vertex exists, one fires all of 3 at once by replacing 4 with 5, then restarts with 6. When finally 7, the whole graph has burned and the resulting divisor is 8-reduced (Aidun et al., 2020).
This perspective is integrated into the Baker–Norine theory of divisors on graphs through the criterion
9
where 0 is the rank of the divisor. Consequently, testing rank at least one reduces to computing reduced representatives at each sink vertex (Aidun et al., 2020).
Termination is proved via a lexicographic potential. Fixing a distance partition 1 of the vertex set, one defines
2
Each time a nonempty set 3 is fired, one chip moves strictly closer to 4 in the lexicographic order on 5, so 6 increases. Because this vector is bounded above by the total number of chips and the distance parameter 7, the process terminates (Aidun et al., 2020).
3. Modified burning for higher gonalities
For higher-rank questions, the classical approach is indirect because testing whether 8 requires checking 9 for every effective divisor 0 of degree 1 and, in the standard formulation, repeating semi-reduction and burning for different sinks. The modified version introduced for gonality sequences is designed to decide whether an arbitrary divisor class contains an effective representative in a single pass, and is described as better suited to testing rank 2 and hence higher gonalities (Aidun et al., 2020).
Write an arbitrary divisor as
3
with 4. The fire is initialized not at a single sink but on the support of the debt, 5. The initial safe set is
6
As in the classical algorithm, one removes vertices 7 satisfying 8. If no such vertex exists, one fires the entire safe set:
9
If at any point 0, the algorithm returns an effective divisor 1; if instead the whole graph burns while some vertex remains in debt, it returns None (Aidun et al., 2020).
Three structural differences from the original formulation are explicit. There is no choice of sink 2; the initial fire is placed on exactly those vertices in debt. There is no separate semi-reduction step, because whenever the algorithm fires the entire safe set 3, one has 4, so no new debt is introduced. Finally, the algorithm stops early as soon as an effective representative is reached (Aidun et al., 2020).
The paper’s worked example uses the 8-vertex path
5
and the divisor
6
In the first iteration, burning from 7 leaves only 8 unburned, so 9 is fired, producing
00
In the second iteration, burning from 01 leaves 02 unburned, and firing that set produces
03
which is effective. The algorithm therefore returns 04 after two passes (Aidun et al., 2020).
The performance bounds recorded in the source are explicit. Each pass through the fire-loop takes 05 time in the worst case, there are at most 06 passes, and the total time is
07
The paper notes that, even though the worst-case asymptotic matches the standard algorithm, in practice the modified version is somewhat faster when computing higher gonalities (Aidun et al., 2020).
4. Weighted-graph generalization
Dhar’s burning algorithm has also been generalized to finite, connected weighted multigraphs with no loops and no legs. In this setting one has positive integer vertex weights 08 and edge weights 09, subject to the divisibility condition that whenever an edge 10 has endpoints 11, the weight 12 divides both 13 and 14. The weighted valency is
15
A firing at 16 removes 17 chips from 18 and sends along each incident edge 19 exactly 20 chips to 21 (Doyle, 2023).
The corresponding weighted Laplacian 22 has entries
23
and linear equivalence is defined by 24 for an integer firing script 25. A divisor is 26-effective if 27 for all 28. It is 29-reduced if it is 30-effective, has the largest possible value at 31 among all linearly equivalent 32-effective divisors, and, when another 33-effective representative has the same value at 34, any nontrivial firing script from 35 to that representative must fire 36 at least once (Doyle, 2023).
The weighted algorithm introduces the charge vector. Let
37
The script 38 with 39 lies in 40 and generates it. The generalized burning algorithm starts by setting 41 for each 42, then loops over 43, setting 44. At each stage one computes 45 and declares that a vertex 46 burns precisely when
47
Burning reduces 48 by 49, and after all such reductions stabilize, the algorithm records the resulting candidate. Among the 50 candidates, it chooses the one maximizing the residual value at 51 (Doyle, 2023).
Termination follows because the outer loop runs at most 52 times, while in the inner loop each coordinate 53 begins at 54 and can be decreased only finitely many times. The overall bound stated in the paper is 55 burning steps, and with the cost of computing 56 this yields time complexity
57
where 58 (Doyle, 2023).
The weighted formulation also changes the structural picture. The source emphasizes that the Laplacian is generally not symmetric, that the outer loop of size 59 is needed to search for the script leaving the maximum possible number of chips at 60, and that there can be more than one 61-reduced representative in a single linear-equivalence class when 62 (Doyle, 2023).
5. Depth-first burning, parking functions, and tree inversions
A different but closely related procedure appears in the study of 63-parking functions and labeled spanning trees. Here 64 is a finite, connected, simple graph with distinguished root 65, and a 66-parking function is a map
67
such that for every nonempty 68 there exists 69 with
70
where 71 is the number of edges joining 72 to a vertex outside 73 (Perkinson et al., 2013).
The depth-first search version of Dhar’s burning algorithm lights the root 74 on fire and lets the fire spread according to a depth-first rule. Each nonroot vertex 75 carries 76 drops of water. When the fire arrives at 77 along an edge 78, two cases occur. If 79, one uses one drop of water, replaces 80 by 81, dampens 82, and immediately backtracks. If 83, then 84 is permanently burnt, the edge 85 is recorded as a tree edge, and the search continues from 86, always choosing the largest-labeled unburnt neighbor next (Perkinson et al., 2013).
This process yields a dichotomy. If every vertex burns, then exactly 87 edges burn through, forming a spanning tree 88 rooted at 89, and the number of dampened edges is 90. If instead some set 91 never burns, then each 92 has every edge to a burnt vertex dampened, so 93, certifying that 94 is not a parking function (Perkinson et al., 2013).
The inverse procedure starts from a rooted spanning tree 95 and runs the same depth-first skeleton, dampening every non-tree edge encountered in the same order and incrementing 96 whenever 97 is the head of a dampened edge. The two procedures are inverse to one another, producing a bijection
98
The central enumerative statement is the degree–inversion correspondence. If
99
is the circuit rank, and 00 denotes the number of 01-inversions of the rooted spanning tree 02, then
03
or equivalently
04
The paper states this as its main theorem and notes that, when specialized to the complete graph, it answers a problem posed by R. Stanley (Perkinson et al., 2013).
The worked “house” example takes the root 05 and the parking function 06 on vertices 07. The burn produces the rooted spanning tree with edges
08
with a single dampened edge 09. Hence 10. Since the graph has 11, one checks that 12, in accordance with 13 (Perkinson et al., 2013).
6. Applications, scope, and algorithmic significance
The applications recorded in these sources are concentrated in chip-firing, graph gonality, and spanning-tree enumeration. In the primer on Platonic solids, Dhar’s burning algorithm is one of the main tools used alongside independent sets, treewidth, and scramble number; that work presents the first proofs that the dodecahedron graph has gonality 14 and that the icosahedron graph has gonality 15 (Beougher et al., 2024).
Within gonality computations, the algorithm serves both as a decision procedure and as a source of lower-bound arguments. The primer explicitly refers to “Dharguments,” meaning variations on Dhar’s algorithm used to obtain quick lower bounds on gonality by showing that any small-degree divisor will trigger a full burn from a suitable choice of sink. The modified version for gonality sequences extends this role from rank at least one to higher-rank questions by solving the general “dollar-game” problem of deciding effectivity in one pass (Beougher et al., 2024, Aidun et al., 2020).
Algorithmically, the formulations represented here range from linear-time depth-first search on simple graphs to polynomial-time chip-firing procedures on divisors and more elaborate weighted variants. The DFS-burning bijection runs in 16, the classical burning phase can be implemented in 17 time, the iterated set-firing process is polynomial in the graph size and chip magnitudes, and the weighted version has complexity governed by the charge parameters 18 induced by the vertex weights [(Perkinson et al., 2013); (Beougher et al., 2024); (Doyle, 2023)].
Taken together, these formulations show that “Dhar’s burning algorithm” is not a single fixed routine but a coherent method family. In every version, a burn from a distinguished source exposes whether a configuration can resist propagation. What changes across the literature is the object being tested—Dollar Game solvability, 19-reducedness, existence of an effective divisor in a linear-equivalence class, or membership in a parking-function class—and the output, which may be a win/loss certificate, a reduced divisor, a legal firing script, or a rooted spanning tree endowed with inversion statistics [(Beougher et al., 2024); (Aidun et al., 2020); (Doyle, 2023); (Perkinson et al., 2013)].